Source: https://github.com/liurui39660/PayDay2.Mod/tree/LocalizationMacroReplacement
Tl;dr. If things look like this But you want them to be like this Then download this mod.
If your mod only uses SuperBLT for localization (like most of my mods), some macros may not be correctly parsed, like the example given above. This mod fixes this problem.
Put the decompressed folder into mods/
, same as other mods.
Q: What's wrong with SuperBLT?
A: It can't correctly parse macros with a suffix number, and can't properly handle the optional trailing semicolon following a macro. So if SuperBLT parses the game's default strings, the output looks very weird.
Q: Any example?
A: The default description for Graze (string ID menu_sniper_graze_damage_desc
).
BASIC: ##$basic;##$NL;Snipers that hit their target deal ##$multibasic;## of the damage dealt in a ##$multibasic2;## radius around the bullet trajectory.$NL;$NL;ACE: ##$pro;##$NL;If a bullet would headshot-kill someone, the graze skill will deal ##$multipro;## of the weapon's damage instead of ##$multipro2;##.
Q: How can I demonstrate if those issues indeed exist?
A: You can disable this mod, then append the following code to any enabled mod's any source file, then check the description of the skill Graze.
Hooks:Add("LocalizationManagerPostInit", "3e98f6e0-656e-4fdc-a330-589da3667c71", function(self)
self:add_localized_strings({
["menu_sniper_graze_damage_desc"] = "BASIC: ##$basic;##$NL;Snipers that hit their target deal ##$multibasic;## of the damage dealt in a ##$multibasic2;## radius around the bullet trajectory.$NL;$NL;ACE: ##$pro;##$NL;If a bullet would headshot-kill someone, the graze skill will deal ##$multipro;## of the weapon's damage instead of ##$multipro2;##."
})
end)
Q: How can I test if this mod works as expected?
A: Keep the above code, and enable this mod. Now the description of Graze should be what you are familiar with.
Comments and suggestions are welcomed.