Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Station AI customizations #34501

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

chromiumboy
Copy link
Contributor

@chromiumboy chromiumboy commented Jan 18, 2025

About the PR

The station AI can now customize the core and holographic projections from a list of predefined options. These customizations can be accessed when the AI is inserted in an AI core, right-clicks on it, and chooses the appropriate verb from the menu

Why / Balance

This grants AI players a way of personalizing their appearance

This PR works towards fulfilling #33954

Technical details

The system works similarly to loadouts. The customization options are prototypes, which are defined in yaml for ease of adding new / modifying old options in the future. The majority of the logic that handles the players changing their appearance and applying to their avatar is contained in SharedStationAiSystem.Customization

Media

Demonstration of the system

Screenshots
Capture

Capture2

ai-cutomization ai-cutomization2

Requirements

Breaking changes

N/A

Changelog

🆑

  • add: Station AIs can personalize the appearance of their cores and holograms by right-clicking the AI core in which they are inserted and selecting 'AI customization' from the list

@github-actions github-actions bot added S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. size/M Denotes a PR that changes 100-999 lines. S: Needs Review Status: Requires additional reviews before being fully accepted Changes: UI Changes: Might require knowledge of UI design or code. Changes: Sprites Changes: Might require knowledge of spriting or visual design. and removed S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. size/M Denotes a PR that changes 100-999 lines. labels Jan 18, 2025
Copy link
Contributor

github-actions bot commented Jan 18, 2025

RSI Diff Bot; head commit 52162bc merging into c4542ee
This PR makes changes to 1 or more RSIs. Here is a summary of all changes:

Resources/Textures/Mobs/Silicon/holograms.rsi

State Old New Status
ai_cat Added
ai_dog Added
ai_face Added
ai_female Added
ai_male Added

Resources/Textures/Mobs/Silicon/station_ai.rsi

State Old New Status
ai_angel Added
ai_angel_dead Added
ai_bliss Added
ai_clown Added
ai_clown_dead Added
ai_dorf Added
ai_heartline Added
ai_heartline_dead Added
ai_smiley Added

Edit: diff updated after 52162bc

@chromiumboy chromiumboy added the P3: Standard Priority: Default priority for repository items. label Jan 18, 2025
@chromiumboy chromiumboy added T: New Feature Type: New feature or content, or extending existing content D3: Low Difficulty: Some codebase knowledge required. S: Approved Status: Reviewed and approved by at least one maintainer; a PR may require another approval. A: General Interactions Area: General in-game interactions that don't relate to another area. A: Silicons Area: Relates to Silicon roles, including AI. labels Jan 18, 2025
@chromiumboy chromiumboy mentioned this pull request Jan 18, 2025
14 tasks
@github-actions github-actions bot added the size/M Denotes a PR that changes 100-999 lines. label Jan 18, 2025
Copy link
Member

@TheShuEd TheShuEd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this approach is quite right, and it will be difficult to expand. I would suggest implementation through some Generic !type: loadouts entries that are applied to the player entity as EntityEffects or something similar when connecting to the game. In this case, extending the new selection functionality via loadouts will be much easier and more convenient

@chromiumboy chromiumboy changed the title Station ai loadouts Station AI customizations Jan 18, 2025
@chromiumboy
Copy link
Contributor Author

I don't think this approach is quite right, and it will be difficult to expand. I would suggest implementation through some Generic !type: loadouts entries that are applied to the player entity as EntityEffects or something similar when connecting to the game. In this case, extending the new selection functionality via loadouts will be much easier and more convenient

Station AI behave very differently to crew in that they don't carry items and their entity is hidden away in their core, so their customization data needs to be handled differently. Also loadouts are intended for storing data between rounds, while AI customizations are done in round and do not persist (PJB was insistent that the AI not have loadouts for these customizations and they should be dynamically changeable)

- StationAiHologramDog

# Iconography
- type: stationAiCustomization
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't look at all of the code, but couldn't these simply be a normal entity prototype instead of a custom one?
With the hologram shader and a generic visualizer for the dead state.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, that's a good idea. I can spawn a dummy entity and use sprite view to give a preview with the hologram shader too. I'll have a look. Can the client see entities in null space?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if the iconography would work well as an entity proto though

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the client see entities in null space

Oh, that part might be a little more tricky. You may be able to simply spawn them clientside?

@IProduceWidgets
Copy link
Contributor

Cat and corgi I'm not sure are a good idea because they're not easily distinguishable from real cats or real corgis. The humans at least have a unique "outfit" on.

@forgotmyotheraccount
Copy link
Contributor

Cat and corgi I'm not sure are a good idea because they're not easily distinguishable from real cats or real corgis.

they're blue

@IProduceWidgets
Copy link
Contributor

Cat and corgi I'm not sure are a good idea because they're not easily distinguishable from real cats or real corgis.

they're blue

always are
image

Comment on lines +42 to +44
station-ai-hologram-female = Female appearance
station-ai-hologram-male = Male appearance
station-ai-hologram-face = Disembodied head
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if these should specify female human appearance, etc. Maybe have options for the AI to appear as other playable races too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can update the description but I don't have plans to make options for other races, I'm using already available sprites for the holograms

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. If they're wanted, someone can add them later.

@chromiumboy
Copy link
Contributor Author

Cat and corgi I'm not sure are a good idea because they're not easily distinguishable from real cats or real corgis. The humans at least have a unique "outfit" on.

Fair point, but they're cute!

@Emisse
Copy link
Contributor

Emisse commented Jan 19, 2025

do borgs have the tool/chassis selection on spawn yet? if yes, this should be wrapped into that system. otherwise this should be expanded into a generic system that fits that. i havent kept up on the silicons sphere of things in a while though due to busy but thats my input.

@vladkaron14R
Copy link

Hello, can I find out if I can upload my sprite to the kernel so that only I can see it?

@SlimmSlamm
Copy link
Contributor

do borgs have the tool/chassis selection on spawn yet? if yes, this should be wrapped into that system. otherwise this should be expanded into a generic system that fits that. i havent kept up on the silicons sphere of things in a while though due to busy but thats my input.

they got chassis selection on spawn a month ago i believe.

@chromiumboy
Copy link
Contributor Author

do borgs have the tool/chassis selection on spawn yet? if yes, this should be wrapped into that system. otherwise this should be expanded into a generic system that fits that. i havent kept up on the silicons sphere of things in a while though due to busy but thats my input.

Yes, borg type selection is in, see #32586

I'm not sure about merging these two systems together as they function somewhat differently / have different uses. Borg switching is a one off event that changes the entire entity, while station AI customization is repeatable and ony affects appearance. The customizations also have to follow the AI so if they are inserted into a new core, the customizations get reapplied, while borgs don't need to worry about that

But if we really want a single generic system to handle all this, I'm gunna leave it to someone else. I'm not really interested in rewriting this code again, I've done that once already to meet PJB's requirements

@ruddygreat
Copy link

ruddygreat commented Jan 23, 2025

Could you add AI name customisation to this as well, or would that be too out of scope?
Being saddled with a random name at the start of a round is kinda just annoying.

@he1acdvv
Copy link
Contributor

he1acdvv commented Jan 24, 2025

Cat and corgi I'm not sure are a good idea because they're not easily distinguishable from real cats or real corgis. The humans at least have a unique "outfit" on.

You might be colorblind.
( Unless you've meant cognizine entities talking, which is a rare exception. )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: General Interactions Area: General in-game interactions that don't relate to another area. A: Silicons Area: Relates to Silicon roles, including AI. Changes: Sprites Changes: Might require knowledge of spriting or visual design. Changes: UI Changes: Might require knowledge of UI design or code. D3: Low Difficulty: Some codebase knowledge required. P3: Standard Priority: Default priority for repository items. S: Approved Status: Reviewed and approved by at least one maintainer; a PR may require another approval. S: Needs Review Status: Requires additional reviews before being fully accepted size/M Denotes a PR that changes 100-999 lines. T: New Feature Type: New feature or content, or extending existing content
Projects
None yet
Development

Successfully merging this pull request may close these issues.