ghorsington / CM3D2.YATranslator

Yet Another Translator -- Translation plug-in for CM3D2 remade from scratch
https://coder.horse/CM3D2.YATranslator
The Unlicense
28 stars 5 forks source link

[COM3D2] Dance Appreciation Mode switches to Game Mode with YATranslator Loaded #16

Closed asyetriec closed 6 years ago

asyetriec commented 6 years ago

I verified that YATranslator is making the Dance Appreciation Mode load with only the game options and not the normal one without YATranslator loaded.

I removed every single plugin and loaded it with the minimum necessary and only YATranslator but even then it still messes with the dance mode.

I don't really have much to offer as there were no major errors in the console.

The only things I saw were warnings but they may not be relevant.

The warnings happened when I went into the Dance UI.

[uGUIUtility]EventSystem が存在しないか無効になっています

(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

[uGUICanvas]EventSystem が見つからなかったので、「Canvas Tutorial Panel(Clone)」の子オブジェクトにEventSystemを作成します。

(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

Attached the output log

output_log.txt

ghorsington commented 6 years ago

Thank you for the information.

This type of issue is known: the same kind of problem occurred in #2 or in CM3D2's Edit mode. Long story short, the problem happens because the game's logic uses the UI text to determine which dance mode to use.

The long story

The COM3D2's dance selection UI's logic is based on the contents of the UI itself. To determine which dance mode to select, the in-game logic checks if the UI button's label contains a specific string. In fact, here's how the mode is chosen

If the button text contains The following mode will be selected
ゲーム Free play
鑑賞 View mode (I guess it's the "appreciation" mode)
おさわり Touch mode (?)

When you use AutoTranslate (or YAT with dance selection UI translations), the buttons get translated, and the in-game logic gets broken, which causes the dance type not being changed.

The solution

Just like with CM3D2's edit/photo mode, there will not be any fixes on YAT's side. This is because in addition to dance mode, there are bound to be a plethora of similar issues. Simply patching them one-by-one is tedious and makes YAT easier to be broken by future updates.

The solution is therefore to not translate the problematic UIs (or translate them in a way so that they still pass in-game logic). Remove any problematic translations in Config/Strings folder, and use AutoTranslate's string/level blacklist to prevent AutoTranslate from translating those strings.

A permanent solution would be to ask the game's devs to make logic independent of UI text and not to break separation between logic and UI in the future (is that really that difficult a task?).

asyetriec commented 6 years ago

Thanks denikson.

I tested what you said and manage to get it working but it seems that the AutoTranslates ignore file is a bit sketchy. If I add the string to blacklist it keeps trying to translate it. But I need to do a bit more debugging so that I can reproduce it easily enough to file a report. But that might be on AutoTranslate's dev side and not on yours.

On another note this may be off-topic, but do you mind sharing with me about your debugging process of CM3D2/COM3D2? Would like to fix some of the existing plugins that have sources and have taken a look at the Assembly-CSharp and decompiled them to understand the code but there were some changes from CM3D2 and COM3D2 especially the Yotogi Objects so just wondering what's your dev environment like so that it'll be easier to debug.

ghorsington commented 6 years ago

In that case you should consider ignoring the whole level (if possible).

As for the note, I suggest contacting me on HongFire or Discord (ghorsington#0834), since it is not related to this issue.

Closing this issue, since the answer has been posted.