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

Drunkard Accent #476

Merged
merged 2 commits into from
Jan 11, 2025
Merged

Conversation

mazziechai
Copy link
Contributor

Description

Adds a "drunkard accent", a trait that makes a character's speech slurred like they're drunk.

There are a few alcoholic characters on Floof that would benefit from being "constantly drunk" without the actual status effect. This could be a good effect for other characters that have a speech impediment.

Technical notes

This uses a modified version of SlurredSystem's Accentuate for the trait with hardcoded values and removing the burping and "huh" additions. The functionality could be extracted into a static method, however it would require changing code in non-Floof code when this works perfectly fine; reducing changes to the codebase is preferable.

If the character is drunk past a certain point, the SlurredSpeech effect will take precedence over DrunkardAccent.

Changelog

🆑

  • add: Added a "drunkard accent", a trait that makes a character's speech slurred like they're drunk.

this uses a modified version of SlurredSystem's Accentuate for the trait with hardcoded values and removing the burping and "huh" additions. the functionality *could* be extracted into a static method, however it would require changing code in non-Floof code when this works perfectly fine
if the SlurredSpeech probability scale is higher than the base value for DrunkardAccent, use that instead of the base value
@github-actions github-actions bot added Status: Needs Review Someone please review this Changes: C# Changes any cs files Changes: Localization Changes any ftl files Changes: YML Changes any yml files labels Jan 11, 2025
@Floof-Station-Bot Floof-Station-Bot changed the title Drunkard accent Drunkard Accent Jan 11, 2025
@Mnemotechnician
Copy link
Collaborator

Mnemotechnician commented Jan 11, 2025

This is... suboptimal. You could just give the entity the slurred speech status effect and make this system renew it whenever it runs below a certain threshold (say, 5 minutes of remaining effect time). This will do for now, but it will stop working as intended if the original slurred accent gets changed.

On a second thought, we may as well just keep it this way, because the "... huuuuh..." part of the original accent is pretty annoying.

@mazziechai
Copy link
Contributor Author

This is... suboptimal. You could just give the entity the slurred speech status effect and make this system renew it whenever it runs below a certain threshold (say, 5 minutes of remaining effect time).

The unfortunate thing is that this would require either giving a constant drunk level or refactoring the original SlurredSpeech system to not be hard coupled to DrunkSystem. SlurredSystem always calculates probability based on the drunk status effect. This is a drunk accent, not an always drunk trait, so I believe that this suboptimal code is actually the best for avoiding unnecessary changes.

@FoxxoTrystan FoxxoTrystan added the Priority: 2-Medium Needs to be resolved at some point label Jan 11, 2025
@FoxxoTrystan FoxxoTrystan merged commit 6a4b2c3 into Fansana:master Jan 11, 2025
18 checks passed
Floof-Station-Bot added a commit that referenced this pull request Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changes: C# Changes any cs files Changes: Localization Changes any ftl files Changes: YML Changes any yml files Priority: 2-Medium Needs to be resolved at some point Status: Needs Review Someone please review this
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants