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

Chameleon controller implant (Clothing fast switch) #33887

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

Conversation

beck-thompson
Copy link
Contributor

About the PR

Added a chameleon controller implant that you can get in the standard chameleon bundle!

Why / Balance

Right now it takes a very long time to switch all the clothing one by one. This will allow you to still have fine grained control, but also quickly switch entire jobs in a matter of seconds. With the AI ever watching hopefully this lets antags using the chameleon clothing get a little more of an edge. It also uses your loadout from your profile, so you can make a decent amount of customization changes!

I'm planning on adding more stuff to this implant as well (E.g chameleon ID icon change) but wanted to keep it simple for the first PR.

Technical details

It is a lot... Most of the file changes are just UI stuff, the thing that you should probably focus on is ChameleonControllerSystem.cs and SharedStationSpawningSystem.cs. The loadout system is confusing so there is a lot of odd logic. Basically, I get the users profile, try to find if they have a loadout for a given job, if they do, use that as the clothing, if they don't and if they don't create a new one with the default!

profile.Loadouts.TryGetValue(jobProtoId, out var loadout);
loadout ??= new RoleLoadout(jobProtoId);
loadout.SetDefault(profile, session, _proto);

Then, I got through every slot and try to get the item stored for that slot with the new GetGearForSlot function.

var proto = _stationSpawningSystem.GetGearForSlot(loadout, slot.Name) ?? ((IEquipmentLoadout) startingGearPrototype).GetGear(slot.Name);

If their profile doesn't have anything for that slot, I see if there is any "starting gear" for that goes in the slot.

Media

2024-12-15.21-00-54.mp4

Requirements

Breaking changes

Changelog

🆑 Beck

  • add: A chameleon controller implant that allows you to quickly switch between jobs clothing! Comes packaged in the chameleon kit.

@github-actions github-actions bot added S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. size/L Denotes a PR that changes 1000-4999 lines. Changes: UI Changes: Might require knowledge of UI design or code. Changes: Sprites Changes: Might require knowledge of spriting or visual design. labels Dec 16, 2024
Copy link
Contributor

github-actions bot commented Dec 16, 2024

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

Resources/Textures/Actions/Implants/implants.rsi

State Old New Status
chameleon Added

Edit: diff updated after 5d6947e

@Everturning
Copy link

The UI looks really good. it seems to work well in the video too.

Aeshus
Aeshus previously requested changes Dec 16, 2024
Copy link
Contributor

@Aeshus Aeshus left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

It looks pretty good, though I just have some stylistic issues, you should probably be using FancyWindow, and you should see if you can just use the SetOutfitCommand code or maybe integrate the two to share implementations.

Content.Client/Implants/UI/ChameleonControllerMenu.xaml.cs Outdated Show resolved Hide resolved
Content.Server/Implants/ChameleonControllerSystem.cs Outdated Show resolved Hide resolved
Content.Server/Implants/ChameleonControllerSystem.cs Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

I noticed there's a lot of shared/duplicate code between this and the SetOutfitCommand

https://github.com/space-wizards/space-station-14/blob/782a2978f0b34f9c74b209a072a175e84e645b24/Content.Server/Administration/Commands/SetOutfitCommand.cs

It might be useful to look or even directly integrate the two as they do a very similar job.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We talked about this on discord, the issue right now is that although there is a decent amount of duplicated code / similar code, the it would actually be relatively difficult to combine the functions. The big issue is that the set outfit command doesn't go off of jobs and is based off StartingGearPrototype which kind of messes stuff up. I might be able to somehow combine them partially but I don't really think the complexity would decrease that much unfortunately 😔

If someone with more experience with loadouts could give some pointers or anyone has ideas, I'll totally combine them but for now I'm just going to leave it separate.

Content.Shared/Station/SharedStationSpawningSystem.cs Outdated Show resolved Hide resolved
Content.Server/Implants/ChameleonControllerSystem.cs Outdated Show resolved Hide resolved
Content.Server/Implants/ChameleonControllerSystem.cs Outdated Show resolved Hide resolved
@southbridge-fur
Copy link
Contributor

southbridge-fur commented Dec 16, 2024

I love this. My one issue would be folks meta gaming people with default outfits, but that remains to be seen.

@beck-thompson
Copy link
Contributor Author

I love this. My one issue would be folks meta gaming people with default outfits, but that remains to be seen.

I actually did think of this! It will use your loadout that you have for the job so everyone can customize it. Hopefully it wont be too much of an issue

@ArtisticRoomba
Copy link
Contributor

I love this. My one issue would be folks meta gaming people with default outfits, but that remains to be seen.

Absolutely hilarious how absurd metagaming can be sometimes.

"You've been going in and out of maints with the most basic fit of all time. I'm arresting you"

@Aeshus Aeshus added P3: Standard Priority: Default priority for repository items. T: New Feature Type: New feature or content, or extending existing content D2: Medium Difficulty: A good amount of codebase knowledge required. A: Roundflow/Antag Area: Roundflow - "What happens in the game", including antagonist roles and their capabilities and removed S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. labels Dec 16, 2024
@TeenSarlacc
Copy link
Contributor

Absolutely hilarious how absurd metagaming can be sometimes.

"You've been going in and out of maints with the most basic fit of all time. I'm arresting you"

gotta make sure all the antags redtext, what do you mean this is a role-playing game?????

@github-actions github-actions bot added the S: Needs Review Status: Requires additional reviews before being fully accepted label Dec 18, 2024
@beck-thompson beck-thompson force-pushed the chameleon-clothing-fast-switch branch from 36fa086 to 236c7a0 Compare December 18, 2024 01:32
@github-actions github-actions bot added size/M Denotes a PR that changes 100-999 lines. and removed size/L Denotes a PR that changes 1000-4999 lines. labels Dec 18, 2024
@Pumkin69
Copy link

this is sooo cool actually amazing idea

@beck-thompson
Copy link
Contributor Author

Tested with the new PDA and it works!

@Aeshus Aeshus dismissed their stale review January 22, 2025 22:11

Review Addressed

Copy link
Contributor

@Aeshus Aeshus left a comment

Choose a reason for hiding this comment

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

Thanks for addressing the review a month ago!

I just had some nitpicks (of course, it's me) and some questions.

Imagine my shock when a maintainer made mistakes 3 months ago.

Also, any thoughts on renaming the "Chameleon Controller" to something else, like "Chameleon Tailor/Outfitter"? "Chameleon Controller" sounds too generic and doesn't make it painfully obvious what it does.

I'll probably re-review this again after you address these changes, in which I'll look more into the UI and whatever is going on with the outfit code.

Anyways, have fun trying to remember what this PR was doing!

Resources/Prototypes/Entities/Objects/Misc/implanters.yml Outdated Show resolved Hide resolved
Resources/Prototypes/Actions/types.yml Outdated Show resolved Hide resolved
Comment on lines 337 to 340
- type: InstantAction
icon: { sprite: Actions/Implants/implants.rsi, state: chameleon }
itemIconStyle: BigAction
event: !type:ChameleonControllerOpenMenuEvent
Copy link
Contributor

Choose a reason for hiding this comment

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

question: I also noticed that many of the other implant actions have a set number of charges. Do you think unlimited would be fine balancing-wise?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looking at the usage rate of chameleon clothing (Its really low) yeah I don't think is an issue at all! This was never intended to be a specific amount of uses

Content.Client/Implants/UI/ChameleonControllerMenu.xaml.cs Outdated Show resolved Hide resolved
Content.Client/Implants/UI/ChameleonControllerMenu.xaml.cs Outdated Show resolved Hide resolved
@beck-thompson
Copy link
Contributor Author

As another note, the reason why its called "Chameleon Controller" instead of something super specific is because I have a lot of other stuff planned! This is only the first PR of a few. Some other stuff I'm thinking of adding:
1.) Only allow chameleon clothing to be changed if your wearing the implant
2.) Change job icons / agent ID cards to match
3.) Update mindshield status when you have the mindshield implant when choosing a command / security outfit
3.) Integrate with the voice mask to also randomly swap names

I agree, the name isn't the best, but I don't want to make it super specific to clothing because of all that!

@beck-thompson beck-thompson requested a review from Aeshus January 30, 2025 05:26
@Everturning
Copy link

1.) Only allow chameleon clothing to be changed if your wearing the implant
2.) Change job icons / agent ID cards to match
3.) Update mindshield status when you have the mindshield implant when choosing a command / security outfit
3.) Integrate with the voice mask to also randomly swap names

i disagree with almost everything on this list. here's why:
1: There are a variety of non-job-specific clothing items one may seek to imitate. This implant, while useful, should not be mandatory.
2: While I am not opposed to the idea, I believe a diligent player should be able to remember their agent ID themself and that this is not needed.
3: The wording here is unclear, but it appears to mean either "when you have a mindshield implant, this will give you the mindshield effect" or "when you select a command/security role, you will look like you have a mindshield". The issue with the first is that if you have a mindshield implant, you should always get the effect. The issue with the second is, if you look like you have a mindshield when you don't as these roles, what is the point of the mindshield then? Please clarify the wording.
4: I really just don't think this is needed. The players can do this just fine.

Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot added the S: Merge Conflict Status: Needs to resolve merge conflicts before it can be accepted label Jan 31, 2025
@github-actions github-actions bot removed the S: Merge Conflict Status: Needs to resolve merge conflicts before it can be accepted label Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: Roundflow/Antag Area: Roundflow - "What happens in the game", including antagonist roles and their capabilities Changes: Sprites Changes: Might require knowledge of spriting or visual design. Changes: UI Changes: Might require knowledge of UI design or code. D2: Medium Difficulty: A good amount of codebase knowledge required. P3: Standard Priority: Default priority for repository items. 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.

7 participants