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

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

Open
Xabis opened this issue Nov 22, 2022 · 3 comments

Comments

@Xabis
Copy link

Xabis commented Nov 22, 2022

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
@z16
Copy link
Member

z16 commented Nov 23, 2022

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.

@Xabis
Copy link
Author

Xabis commented Nov 23, 2022

Thank you for providing context on the current behavior.

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

@Xabis
Copy link
Author

Xabis commented Dec 9, 2022

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants