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

Add Illeism as a speech trait #32643

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

Conversation

thetolbean
Copy link
Contributor

@thetolbean thetolbean commented Oct 5, 2024

About the PR

Added a new speech trait, "illeism", IE: referring to yourself in third person.

Why / Balance

This added trait makes roleplaying as an illeist much easier, automatically changing references of I, me, my, and some corresponding phrases, to their correct form, rather than having to do it manually. This saves time and makes roleplaying as an illeist much more appealing to a wider audience. Illeism is compatible with other speech traits, including racial speech patterns.

Technical details

This PR adds multiple new files, IlleismAccentSystem.cs, IlleismAccentComponent.cs, & /Actions/speech.yml, as well as modifies traits.ftl & /traits/speech.yml.

IlleismAccentSystem.cs includes the regex functions to search for and replace the correct phrases.
Phrases include:
I am -> NAME is
I have -> NAME has
I do -> NAME does
I don't -> NAME doesn't
Me -> NAME
My/mine -> NAME's
I'll -> NAME will
This includes fully capitalized versions

I/myself -> NAME
"I" is a special capitalization case, which is not shared by myself. As 'I' is automatically capitalized in the chat, my code can not tell if the user wants their name to be fully capitalized or not. This can result in phrases such as "I SAID" becoming "Name SAID". My code counteracts this by checking if over 50% of the sentence is capitalized, making it possible for 'I' to result in the name being fully capitalized in context.

IlleismAccentComponent.cs is the corresponding component.
traits.ftl was modified to include a trait name and description.
traits/speech.yml was modified to include illeism as a selectable trait worth 1 speech point, as this trait is compatible with others.
actions/speech.yml was modified to add a new action, allowing the type of illeism to be adjusted.

This trait incudes an action, allowing the type of illeism to be adjusted throughout the game, although most people will use it roundstart, then remove it.
image

Multiple types of illeism are available, including splitting the name at the first space, hyphen, or not splitting at all.
IE, If you have a name using hyphens, you can now break the name at the first hyphen -> Bean-Kamax = Bean
IE, If you have a name using spaces, you can now break the name at the first space -> Bean Kamax = Bean
IE, If you have a name using spaces AND hyphens, you can now prevent it from splitting -> Bean Kamax-Testing = Bean Kamax-Testing

Requirements

Changelog

🆑

  • add: Added illeism as a selectable speech trait!

@Gameandglitch3
Copy link

Hell yes.

@Errant-4
Copy link
Member

Errant-4 commented Oct 5, 2024

Does this unpack the first name, or does it go "Jonathan Verylongname heard you." every time?

Copy link
Contributor

@lzk228 lzk228 left a comment

Choose a reason for hiding this comment

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

make sure you made all possible strings localizable

@Cojoke-dot
Copy link
Contributor

maybe I'll -> NAME'll should just break the contraction because I don't think anyone will understand what John'll means. I'll -> NAME will

@thetolbean
Copy link
Contributor Author

thetolbean commented Oct 5, 2024

Does this unpack the first name, or does it go "Jonathan Verylongname heard you." every time?

Currently, it does the full name, but I easily could split the name at the first space or dash

@thetolbean thetolbean changed the title Added Illeism as a speech trait Add Illeism as a speech trait Oct 5, 2024
@thetolbean
Copy link
Contributor Author

The trait now only replaces the phrases with the first part of the name. This split occurs on spaces, not dashes. I wanted to preserve lizard names, ie "eats-the-paper" not becoming "eats", but long names including spaces, ie "Jonathan Verylongname" would become just "Jonathan"

It also does not maintain the contraction I'll, instead replacing it with NAME will

@thetolbean thetolbean requested a review from lzk228 October 5, 2024 14:38
@github-actions github-actions bot added the S: Needs Review Status: Requires additional reviews before being fully accepted label Oct 5, 2024
@thetolbean
Copy link
Contributor Author

Also, for the traits description, I currently have: "You seem to only be able to refer to yourself by name."
If anyone has any ideas to improve it or make it 'quirky' like the other descriptions, I'd love to hear them

@Lyroth001
Copy link
Contributor

Also, for the traits description, I currently have: "You seem to only be able to refer to yourself by name." If anyone has any ideas to improve it or make it 'quirky' like the other descriptions, I'd love to hear them

"You are so full of yourself you feel your actions deserve a narrator, and have taken that task upon yourself. You only refer to yourself in third person" Or something like that?

@Nexeron94
Copy link

Awesome PR. I would definitely use it on my Vox, which however leads to the question of how very long names and nicknames are handled.

@thetolbean
Copy link
Contributor Author

thetolbean commented Oct 7, 2024

Awesome PR. I would definitely use it on my Vox, which however leads to the question of how very long names and nicknames are handled.

It currently takes up until the first space, so if you have multiple words in your name, it takes the first. ie "Jonathan Verylongname" would become just "Jonathan".

"You are so full of yourself you feel your actions deserve a narrator, and have taken that task upon yourself. You only refer to yourself in third person"

I do really like that!

@thetolbean
Copy link
Contributor Author

"You are so full of yourself you feel your actions deserve a narrator, and have taken that task upon yourself. You only refer to yourself in third person" Or something like that?

I like this idea, but it's quite long and extends beyond the boundary of the trait menu, making it seem out of place. Maybe we can shorten it a bit somehow, but keep the general theme?

image

@thetolbean thetolbean requested a review from Fildrance October 7, 2024 20:27
@thetolbean
Copy link
Contributor Author

Cleaned up leftover code fragment mentioned by @Fildrance and changed the regex string for I'll, preventing ill from being corrected. IE "He is ill" would previously have been correct to "He is Name will". Now, the apostrophe is required to have it correct. "I don't" still has the apostrophe as optional

@thetolbean thetolbean marked this pull request as draft October 14, 2024 18:34
@github-actions github-actions bot added Changes: Shaders Changes: Might require knowledge of shaders. Changes: Audio Changes: Might require knowledge of audio. labels Feb 4, 2025
@thetolbean
Copy link
Contributor Author

Things have gone very wrong

@thetolbean thetolbean force-pushed the ThirdPersonSpeech branch 2 times, most recently from 1781e04 to f231c4c Compare February 4, 2025 20:17
@thetolbean thetolbean marked this pull request as ready for review February 4, 2025 20:28
@thetolbean
Copy link
Contributor Author

thetolbean commented Feb 4, 2025

OK! Major update 🎉

  1. I apologize to all of the maintainers that got requested for reviews during the merge conflict fiasco. It's been resolved, and I'm trying to work with triagers to correct both the reviewees and labels.
  2. I've added an action, with a placeholder image, to allow the accent to cycle through different types of illeism. This allows the trait to work for every type of name by allowing the user to choose where the name splits, if at all. The three available states include spaces, hyphens, and no split. This allows the trait to accommodate nearly every standard naming convention, without needing a new trait for every type. This should increase it's usability and customizability, while reducing the issues people have with the trait
    • IE, If you have a name using hyphens, you can now break the name at the first hyphen -> Bean-Kamax = Bean
    • IE, If you have a name using spaces, you can now break the name at the first space -> Bean Kamax = Bean
    • IE, If you have a name using spaces AND hyphens, you can now prevent it from splitting -> Bean Kamax-Testing = Bean Kamax-Testing

@thetolbean thetolbean marked this pull request as draft February 4, 2025 21:55
@Tayrtahn Tayrtahn removed Changes: UI Changes: Might require knowledge of UI design or code. Changes: Map Changes: Might require knowledge of mapping. Changes: Sprites Changes: Might require knowledge of spriting or visual design. Changes: Shaders Changes: Might require knowledge of shaders. Changes: Audio Changes: Might require knowledge of audio. labels Feb 4, 2025
Copy link
Contributor

@PursuitInAshes PursuitInAshes left a comment

Choose a reason for hiding this comment

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

Code looks good.

I would really prefer this doesn't have a placeholder icon for the action, but I'm not sure what the icon could be.

@1TALERD
Copy link

1TALERD commented Feb 5, 2025

I don't see the point in not adding this. We definitely need it.

@thetolbean thetolbean marked this pull request as ready for review February 5, 2025 17:17
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. D3: Low Difficulty: Some 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.