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

User defined custom emotes #33143

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

Conversation

Nettingman
Copy link

@Nettingman Nettingman commented Nov 3, 2024

About the PR

Added new options in the general tab for the user to be able to define custom emotes.
These emotes then can be accessed from the emote menu for any character.

Why / Balance

I wanted to provide a way to define custom emotes without the need of manually editing the key binding file.

Technical details

This is the foundation for a more complex custom emote system I want to implement. If this PR is accepted, then the feature could be later improved with:

  • hotkeys for the custom emotes
  • character specific emotes
  • keywords in place of pronouns and adjectives to be replaced with the ones associated with the current character

Media

ss14-custom-emotes.mp4

Requirements

Breaking changes

Changelog

  • add: Added a way to define custom emotes in the Options menu, which can then be used from the emotes menu ingame.

@github-actions github-actions bot added the Changes: UI Changes: Might require knowledge of UI design or code. label Nov 3, 2024
@Nettingman Nettingman changed the title Feature/custom emotes User defined custom emotes Nov 3, 2024
@lzk228
Copy link
Contributor

lzk228 commented Nov 3, 2024

can you somehow integrate functions in it? so playing on characters with different pronouns there would be not only "her"

and don't know about putting it in settings, maybe it is possible to show a little tooltip under the X button in this emote category? and this button will open the settings tab

@Nettingman
Copy link
Author

As I've said in the technical details, I would later improve it with pronouns yes.
A different place to define them could be used I guess. But I have to make a new in-game menu for it.

I didn't want to spend more time with this until I was sure this would be something desired and the PR has a chance to be merged.

If it is not completely hopeless then I will gladly work on these issues/improvements.

@Everturning
Copy link

Might be a weird suggestion but what about adding an option to add a sound effect that you can normally use to the emotes?
Like "does a deep chuckle" could be attached to a certain laugh instead of having it be a random laugh.
It could be a drop-down menu of the different player sounds next to the input section.

If this doesn't make sense:
Let's say I wanted my character to laugh a certain way. So I input "chuckles heartily", and then next to that I select the laugh I want, let's say Laugh1.
Then whenever I select it in the emote menu, it'll only play Laugh1, not Laugh2. This makes it way more immersive, so if my character is supposed to talk in a deep voice, then they'll have a deep laugh

@Nettingman
Copy link
Author

Nettingman commented Nov 4, 2024

It's not a weird suggestion at all, I really like it!

Actually I wanted this to be at least identical to how the emoting with chat works, i. e. it should play sounds when you write something like "laughs". However I was pretty disappointed that no sound is played for custom emoting when you try it with something like heartily (I tried the exact same word, lol).

Manually setting what audio should be played would be pretty cool, and it would justify the feature as more than "just another way of doing something, you could already do in chat anyway".

I will have to look into what sounds are whitelisted and blacklisted in different scenarios (like whether the player can beep or not, because they are a borg or not).

Resources/Textures/Interface/Emotes/attributions.yml Outdated Show resolved Hide resolved
Resources/Locale/en-US/escape-menu/ui/options-menu.ftl Outdated Show resolved Hide resolved
Content.Client/Chat/UI/EmotesMenu.xaml.cs Outdated Show resolved Hide resolved
Content.Client/Chat/UI/EmotesMenu.xaml.cs Outdated Show resolved Hide resolved
Content.Shared/Chat/Prototypes/EmotePrototype.cs Outdated Show resolved Hide resolved
Content.Server/Chat/Systems/ChatSystem.Emote.cs Outdated Show resolved Hide resolved
Content.Server/Chat/Systems/ChatSystem.Emote.cs Outdated Show resolved Hide resolved
Content.Server/Speech/EmotesMenuSystem.cs Show resolved Hide resolved
Content.Shared/CCVar/CCVars.cs Outdated Show resolved Hide resolved
Resources/Locale/en-US/chat/ui/emote-menu.ftl Outdated Show resolved Hide resolved
@Nettingman
Copy link
Author

Thank you for the thorough review! Anything I did not comment on is a fair point and will be fixed/updated when I have the time.

The codebase is a bit new to me, and I haven't really worked with dependency injection that much so far, so I felt a bit lost figuring out basic stuff.

@PJB3005 PJB3005 self-assigned this Nov 6, 2024
@github-actions github-actions bot added S: Needs Review Status: Requires additional reviews before being fully accepted S: Merge Conflict Status: Needs to resolve merge conflicts before it can be accepted labels Nov 13, 2024
Copy link
Contributor

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

@SlamBamActionman SlamBamActionman added the S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. label Nov 14, 2024
@github-actions github-actions bot added size/L Denotes a PR that changes 100-1000 lines. and removed S: Merge Conflict Status: Needs to resolve merge conflicts before it can be accepted labels Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changes: UI Changes: Might require knowledge of UI design or code. S: Needs Review Status: Requires additional reviews before being fully accepted S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. size/L Denotes a PR that changes 100-1000 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants