Page 1 of 1

[1.1.21] localised_description field for settings doesn't support parameters in LocalisedString properly

Posted: Mon Feb 15, 2021 12:09 pm
by kirazy
I have a setting constructed in the following manner:

Code: Select all

{
        type = "bool-setting",
        name = "reskins-angels-belts-use-angels-tier-colors",
        setting_type = "startup",
        order = "bb",
        default_value = false,
        localised_description = {"mod-setting-description.reskins-angels-belts-use-angels-tier-colors", {"mod-setting-name.reskins-angels-use-angels-tier-colors"}},
        -- hidden = true,
}
The issue is that in the settings window, the description in the game is showing the parameter variable and not the intended result. The localised string works properly when printed in game:
Image

The relevant locale entries are:

Code: Select all

[mod-setting-name]
reskins-angels-use-angels-tier-colors=Use Angel's tier colors

[mod-setting-description]
reskins-angels-belts-use-angels-tier-colors=Belts and related entities will use Angel's tier coloring when "__1__" is enabled.\n\nOverridden by "Enable Custom Colors".
Edit: Interestingly, the parametized localization works if I set it to the localised_name field:
Image

Re: [1.1.21] localised_description field for settings doesn't support parameters in LocalisedString properly

Posted: Mon Feb 15, 2021 12:39 pm
by Bilka
Whatever is adding the "Default: Disabled" to the tooltip may be messing with the locale, have you tried it with that mod(?) disabled?

Re: [1.1.21] localised_description field for settings doesn't support parameters in LocalisedString properly

Posted: Mon Feb 15, 2021 8:00 pm
by kirazy
Alright. That fixes that issue. Now to figure out how to concatenate localised_descriptions when they may or may not exist. Shouldn't be too difficult, I imagine. Thanks.

Edit: There, all fixed. Issue seems obvious in hindsight, but thanks for directing me where to look!