Skip to content

Battlemod: color codes should not breakup ability names (chatmon incompatibility) #2244

Open

Description

@Xabis

There is currently a conflict with both Battlemod and Chatmon concerning color codes.

It seems that Chatmon does not strip color codes prior to making a match, and Battlemod rewrites the log to include a lot of color coding around targets and ability names,

To exacerbate this further, Battlemod breaks up multi-word ability names with additional color codes per word, even if the color is not changing, causing a mismatch.

Example:
<trigger match="*Phlegm Expulsion*" sound="..." />

Raw text, after Battlemod (simplified mode, default template):
[��Thillloab��] � Phlegm�� � Expulsion�� �¨ ��Thillloab��

From the example, color codes are unnecessarily injected between "Phlegm" and "Expulsion", causing the above trigger to not match.

For chatmon, a work around would be to place a wildcard between each word, which is not ideal:
<trigger match="*Phlegm*Expulsion*" sound="..." />

This needs to be resolved in one of two ways:

  1. chatmon should be updated to strip all special codes prior to a match (preferred)
  2. battlemod should be updated to not break up ability names with unnecessary color codes

Activity

  1. z16 commented on Nov 23, 2022

    @z16
    Member

    It will have to be the former, since the fix for battlemod is not very simple. The reason battlemod does this is because the color formatting will disappear after line breaks (a line break resets the color). And since we cannot detect when that happens, the idea was to prepend the currently active color code before every word. Ideally we'd find a solution to that as well as fix Chatmon to strip formatting prior to text matching.

  2. Xabis commented on Nov 23, 2022

    @Xabis
    Author

    Thank you for providing context on the current behavior.

    I have opened a ticket for Chatmon here:
    Windower/Issues#1094

  3. Xabis commented on Dec 9, 2022

    @Xabis
    Author

    I wrote a lua version of chatmon, to address these issues, which is available below for any interested:

    https://github.com/Xabis/Chatmon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions