Page 1 of 1

How does tech/recipe difficulty handle the default fields?

Posted: Sat Feb 26, 2022 5:36 pm
by Mernom
How does tech/recipe difficulty handle the default fields? namely, localised name/localised description. I'm making a mod which adjusts the cost of technologies based on their position in the tech tree, but since normal and expensive mode can have different tech trees, having a single description for them might not work well.

Re: How does tech/recipe difficulty handle the default fields?

Posted: Sat Feb 26, 2022 6:17 pm
by Silari
AFAIK you can't change localized name/description based on difficulty level, as those are part of PrototypeBase which has no concept of difficulty level. Name/description has to be set during the data stage, well before a game is loaded to know what difficulty is set. Don't know if it could be added to the engine either, since difficulty can change mid-game and the game doesn't seem to handle localizations changing mid-game (like rebinding controls will still show the old one, unless you save+load).

Closest way I can think of to fake it is to have a startup setting for which mode is going to be used and require the user to set it properly for whatever game mode they're playing. Not ideal since it'd have to be changed anytime the user switches modes, but I can't see another way.

Re: How does tech/recipe difficulty handle the default fields?

Posted: Sun Apr 10, 2022 5:19 pm
by Mernom
That's too bad, this means I have to record data for both states in the description.