# Emotes

{% hint style="danger" %}
Due for Simplification, please speak to support for further info.

**31/10/2024:** Our Emotes system is a layer built on top of other functionality that enables anim montages to be played in Foreground and Crowd rendering levels. We are planning to simplify this approach and better expose the underlying API.

Support for the Emote system will decrease as we are treating it as an example of functionality rather than a feature in itself.

As part of the simplification, we will be removing Super Emotes from the platform.

MSquared will not be addressing cosmetic issues (such as those in the Emote wheel itself) going forward, but will be ensuring the emotes themselves still function correctly.
{% endhint %}

Emotes are enabled by default and are accessed by players pressing `B` and clicking an icon.

<figure><img src="/files/5783c5io6aSg7YqFwVNP" alt=""><figcaption><p>Emotes in use in a test gym</p></figcaption></figure>

## Implementation

The main implementationof emotes is in `JM_PlayerEmoteComponent`

Other key classes include:

* Emote Selection - The set of emotes that appear in the Emote Wheel UI (`WBP_EmoteSelector`) are configured via the (DEPRECATED) Roles table using the Emote Selection property.
* Emote Selection can be overridden at runtime via Blueprint on the `JM_PlayerEmoteComponent`

## Creating new emotes

Emotes are configured by creating a Primary Data Asset of the type `J_EmotePrimaryAsset`.

These emotes can then be added to the default selection set on the role component or set as overrides at runtime.

<figure><img src="/files/yH6T6PaxCa3YQSxtJvco" alt=""><figcaption><p>Clap Emote settings example</p></figcaption></figure>

## Configuration

### Enabling/Disabling Emotes for a role

Emotes can be disabled per game role in your project's (DEPRECATED) roles data table by:

1. In your editor, enable `Emotes Enabled` in the `Role Configuration Overrides` section of the `Role Configuration` section of the roles data table to expose it.

   <figure><img src="/files/QO184ID3aF4a7V8k9ir3" alt=""><figcaption></figcaption></figure>
2. Change the `Emotes Enabled` setting to `true` or `false` to enable or disable emotes for this role

<figure><img src="/files/LSsj0884H0yFBVPmw8kw" alt=""><figcaption></figcaption></figure>

#### Configuring Default Emote Selection

You can configure which emotes are available in your experience in your project's roles data table (DEPRECATED) Roles data table by:

1. In your editor, enable `Emote Selection` in the Role Configuration Overrides section of the `Role Configuration` section of the roles data table to expose it.
2.

```
<figure><img src="../../../../.gitbook/assets/EmoteSelectionSettings.PNG" alt=""><figcaption></figcaption></figure>
```

3. Assign a `J_EmoteSelectionData` asset to the Emote Selection setting.

<figure><img src="/files/toUtpHkfwliWwnbSm10H" alt=""><figcaption><p>Emote Selection Setting on the Role</p></figcaption></figure>

By default these emotes are available:

<figure><img src="/files/iFTToY5EgZS3dyhKqP5N" alt=""><figcaption><p>Emote Selection settings</p></figcaption></figure>

| Field            | Description                                                                                                                                            |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Profile as Emote | Emote used to show the Player's profile picture                                                                                                        |
| Pick Me Emote    | This emote is used in place of the Player's profile picture when Profile as Emote is disabled via the live config flag `Profile.ProfileAsEmoteEnabled` |
| Emotes           | This is an array containing all other emotes. To use the default `WBP_EmoteSelector` UI, this **must** be 7 elements long.                             |

## Changing settings at runtime

### Blueprint functions

Emote Selection can be changed at runtime by calling the following functions on the `JM_PlayerEmoteComponent`:

* `OverrideEmotesEnabled`
* `OverrideEmoteSelectionSlotAtIndex`
* `OverrideEmoteSelectionSetFromAsset`
* `OverrideProfileAsEmote`
* `OverridePickMeEmote`

Overrides can be cleared with the following functions:

* `ClearEmotesEnabledOverride`
* `ClearAllEmoteSelectionOverrides`
* `ClearEmoteSelectionOverrideAtIndex`
* `ClearProfileAsEmoteOverride`
* `ClearPickMeEmoteOverride`

### Live Config Settings <a href="#emotes-emotewithplayersprofilepicture" id="emotes-emotewithplayersprofilepicture"></a>

All emote settings live in game.json

<table><thead><tr><th width="278">Key</th><th width="144">Default Value</th><th>Description</th></tr></thead><tbody><tr><td>Emotes.Enabled</td><td>true</td><td>Project wide setting to enable/disable emotes</td></tr><tr><td>Emotes.EmoteWheelEnabled</td><td>true</td><td>Project wide setting to enable/disable the emote wheel UI</td></tr><tr><td>Emotes.ClearEmoteSelectionOverridesOnRoleChanged</td><td>false</td><td>Setting to optionally clear all override settings on role changes.</td></tr><tr><td>Emotes.MaxObjectPoolSize</td><td>20</td><td>Max number of Emote objects to pool.</td></tr><tr><td>Emotes.MaxSoundDistance</td><td>5000.0</td><td>Max distance for emote sounds to be heard</td></tr></tbody></table>

### Debugging in Editor

Console commands are available for all of the above functions to test functionality:

* `M2.Emotes.OverrideEmotesEnabled [bool Enabled]` - Overrides Emotes enabled
* `M2.Emotes.OverrideEmoteSelectionSlotAtIndex [Index Emote Name]` - Overrides an emote slot at Index with the given Emote Primary Asset name e.g. `M2.Emotes.OverrideEmoteSelectionSlotAtIndex 5 PDA_Emote_Icon_ThumbsUp`
* `M2.Emotes.OverrideEmoteSelectionSetFromAsset [Emote Selection Asset Name]` - Overrides all emotes with the given Emote selection asset name e.g. `DA_EmoteSelection_Default`
* `M2.Emotes.OverrideProfileAsEmote [Emote Name]` - Overrides the Profile As Emote slot with the given Emote Primary Asset name e.g. `PDA_Emote_Icon_ThumbsUp`
* `M2.Emotes.OverridePickMeEmote [Emote Name]` - Overrides the Pick Me Emote slot with the given Emote Primary Asset name e.g. `PDA_Emote_Icon_ThumbsUp`
* `M2.Emotes.ClearAllEmoteSelectionOverrides` - Clears all emote selection overrides
* `M2.Emotes.ClearEmoteSelectionOverrideAtIndex [Index]` - Clears emote selection override in slot with the given Index
* `M2.Emotes.ClearProfileAsEmoteOverride` - Clears the Profile As Emote override
* `M2.Emotes.ClearPickMeEmoteOverride` - Clears the Pick Me Emote override


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.otherside.xyz/platform-documentation/creation/unreal-development/features-and-tutorials/emotes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
