glacier-modding / H3-Community-Patches

Community bug fixes and stuff for Hitman 3
https://www.nexusmods.com/hitman3/mods/784
Other
3 stars 9 forks source link

"Optional" text appears partially doubled in Elusive Target Arcade for non-English languages #116

Open PigSunnyPig opened 2 months ago

PigSunnyPig commented 2 months ago

It is about the [Optional] objectives in ETA contracts, those affected include The Collector, The Liability and The Disruptor.

Apart from the English localisation, other versions of languages would have double [Optional] text on the objective called “Do not eliminate XXX” or “Retrieve the painting“ if the locution “Optional” is divided into two words (?)

In addition, there is a [Optional] text on the timed objectives, which will confuse the players in some ways.

Timed Objective Japanese

Ocean-Minnow commented 2 months ago

Hi. Aside from the "Optional" target escaping text, I'm afraid I'm not sure exactly what the issue is here. I can't read the language in your second screenshot, so I'm not entirely sure what's wrong with it. Would you be able to translate for me, or give more specific examples? Thanks :]

PigSunnyPig commented 2 months ago

Hi. Aside from the "Optional" target escaping text, I'm afraid I'm not sure exactly what the issue is here. I can't read the language in your second screenshot, so I'm not entirely sure what's wrong with it. Would you be able to translate for me, or give more specific examples? Thanks :]

There will be one [Optional] and half of the [Optional] wordings in one objective.

For instance, when the Liability is in an ETA contract — the "[Optional] Do not eliminate the guide" will be like "[Optional] tional] Do not eliminate the guide" (translate to English)

Optional_objectives_bug.jpg

PigSunnyPig commented 2 months ago

Hi. Aside from the "Optional" target escaping text, I'm afraid I'm not sure exactly what the issue is here. I can't read the language in your second screenshot, so I'm not entirely sure what's wrong with it. Would you be able to translate for me, or give more specific examples? Thanks :]

There will be one [Optional] and half of the [Optional] wordings in one objective.

For instance, when the Liability is in an ETA contract — the "[Optional] Do not eliminate the guide" will be like "[Optional] tional] Do not eliminate the guide" (translate to English)

Optional_objectives_bug.jpg

This only occurred when playing the ETA contracts, so I believe it might be not a localisation issue but a coding problem...

Ocean-Minnow commented 2 months ago

Ahh, I see now. I'll take a look at this when I get the chance. (unless someone else does first :p )

PigSunnyPig commented 2 months ago

Ahh, I see now. I'll take a look at this when I get the chance. (unless someone else does first :p )

thx.

VoodooHillbilly commented 2 months ago

I checked the first level of The Connoisseurs, the [Optional] ional] bug doesn't appear in French, German, Italian, or Spanish either. Only the Russian, Japanese, and both Chinese alphabets are affected in that mission. I searched all the LOCR files, the bug doesn't appear in any of them.

The Target Escaping text never appears with [Optional] in any LOCR file either.

So I can confirm the bugs aren't due to localization text.

PigSunnyPig commented 1 month ago

I checked the first level of The Connoisseurs, the [Optional] ional] bug doesn't appear in French, German, Italian, or Spanish either. Only the Russian, Japanese, and both Chinese alphabets are affected in that mission. I searched all the LOCR files, the bug doesn't appear in any of them.

The Target Escaping text never appears with [Optional] in any LOCR file either.

So I can confirm the bugs aren't due to localization text.

Yes, I already knew that. Just wondering if this bug can be fixed.

Ocean-Minnow commented 1 month ago

I wonder if it's somehow an issue with the non-Latin alphabets/fonts? I can't think of why that would happen aside from the LOCR being wrong. Could it be that the [Optional] is part of a separate standalone entry, maybe?

VoodooHillbilly commented 1 month ago

Yes, I already knew that. Just wondering if this bug can be fixed.

I wanted to confirm if the errors were due to locr text. I was also providing a little more information that only the non-Latin alphabets are affected by the duplication bug, since the first post said:

Apart from the English localisation, other versions of languages would have double [Optional] text

 

I wonder if it's somehow an issue with the non-Latin alphabets/fonts? Could it be that the [Optional] is part of a separate standalone entry, maybe?

There's a standalone "UI_DIALOG_OPTIONAL": "[Optional]" in 008D33DE8C75CACB.locr.json. That's what's being mistakenly prepended to the line "EGAME_TEXT_SL_TARGET_ESCAPING": "Target Escaping" in 00F185B27F9CC4DE.locr.json.

I checked the Disruptor ETA, all the translations for "[Optional] Target Escaping" are displaying the text without any duplication. So it's combining the text correctly there, it just shouldn't be combining them at all.

 

Turns out that standalone UI_DIALOG_OPTIONAL is also what's overwriting part of the objective text for The Liability's "UI_CONTRACT_RADLER_OBJ_2_TITLE": "[Optional] Do not eliminate the guide" in 004A3AD4EF0FB684.locr.json. I noticed it when I looked at the Russian lines. In-game it displays:

optional-bug

The standalone UI_DIALOG_OPTIONAL in Russian is [Доп.] The objective UI_CONTRACT_RADLER_OBJ_2_TITLE in Russian is [Дополнительно] Не убивайте гида

Not sure if the differences in spacing is due to mismatched character encoding between files or something else.

So is UI_DIALOG_OPTIONAL being incorrectly added by the ETA's contracts themselves?

PigSunnyPig commented 1 month ago

So is UI_DIALOG_OPTIONAL being incorrectly added by the ETA's contracts themselves?

Well, you can't deny all of those Objectives are utterly incorrect.

For instance, it applies to "All Bodies Must Be Hidden".

But I think it is better to get rid of the UI_DIALOG_OPTIONAL and add [Optional] to the LOCR file manually.

VoodooHillbilly commented 1 month ago

I never claimed they were correct. I guess I should've specified I was asking Minnow about the contract.json themselves. I haven't spent much time looking at the format. So I didn't know if combining translation strings was being done there or by something else.

So far I've only seen 3 objectives in the ETA with an unnecessary or duplicated [Optional] text: EGAME_TEXT_SL_TARGET_ESCAPING in The Disruptor for escaping UI_CONTRACT_RADLER_OBJ_2_TITLE in The Liability for the guide UI_CONTRACT_BRAMBLE_OBJ_PAINTING_TITLE in The Collector for the painting Where was [Optional] incorrectly added to "All bodies must be hidden"?

Are you talking about replacing UI_DIALOG_OPTIONAL with an empty string? Getting rid of UI_DIALOG_OPTIONAL would probably break all other contract objectives throughout the game that can be marked as optional.

Ocean-Minnow commented 1 month ago

I think they mean changing it so that UI_DIALOG_OPTIONAL isn't applied to these objectives in those languages (and perhaps adding the text directly to the languages that currently work properly, if needed)

Unfortunately I don't have experience with contract.json files. My knowledge is mostly outfits & NPCs, and I'm a bit too busy at the moment to learn a new one just now. I think Anthony might know more about them?

PigSunnyPig commented 1 month ago

Where was [Optional] incorrectly added to "All bodies must be hidden"?

Em... I think there is a misunderstanding.

Not only the 3 objectives you have mentioned, but the [Optional] also appears in other ETA contracts, even though the objectives originally don't have the [Optional] in their LOCR file.

Cache_4169ef401ce2f994.png (ETA -- The Ellipse)

VoodooHillbilly commented 1 month ago

That's not a bug. The "All bodies must be hidden" and other Contracts Mode type of objectives shouldn't have "[Optional]" in their LOCR text. Those type of objectives can be either mandatory or optional.

The game adds "[Optional]" to the objectives dynamically so there doesn't have to be a set of all the contract objectives' text without "[Optional]" and a duplicate set of the same objectives with "[Optional]".

The problem is when the "[Optional]" text already appears in at least two objectives: UI_CONTRACT_RADLER_OBJ_2_TITLE and UI_CONTRACT_BRAMBLE_OBJ_PAINTING_TITLE. The game is incorrectly cropping part of the existing "[Optional]" text before inserting the new "[Optional]".

Then of course, since the EGAME_TEXT_SL_TARGET_ESCAPING in The Disruptor shouldn't be optional, we need to prevent "[Optional]" from being applied there too.

Getting rid of UI_DIALOG_OPTIONAL as you suggested would be a hacky way to fix 3 objectives while breaking the text of all the other objectives that can currently be mandatory or optional. Because adding "[Optional]" text manually to all of them may cause the game to start cropping the text incorrectly there too, and there'd be no "[Optional]" to add. That would also mislead people into believing mandatory objectives are now optional.

PigSunnyPig commented 1 month ago

Then of course, since the EGAME_TEXT_SL_TARGET_ESCAPING in The Disruptor shouldn't be optional, we need to prevent "[Optional]" from being applied there too.

I see. Then have we sought out any feasible ways to achieve that?

Ocean-Minnow commented 4 days ago

Was this fixed in the latest official patch? The notes say

Fixed an issue in The Serial Killer Elusive Target mission, where the Japanese text would display the character for “Eliminate” twice in the mission objective.

That sounds similar to this issue, although also different in a good few ways. Are the patch notes being more narrow than they should, or is this still an issue?

PigSunnyPig commented 4 days ago

Was this fixed in the latest official patch? The notes say

Nope.

That sounds similar to this issue, although also different in a good few ways. Are the patch notes being more narrow than they should, or is this still an issue?

That was just a LOCR error, not similar to this issue actually...