itb-community / ITB-ModLoader

A lua-based mod loader for the game Into the Breach
48 stars 18 forks source link

Pilots added in Advanced Edition do not have `PilotPersonalities` defined #172

Open kartoFlane opened 2 years ago

kartoFlane commented 2 years ago

Dialogues for new pilots added in Advanced Edition are defined via the new translation system added in ITB 1.2 (localization/Pilots_ae.csv), and do not get processed by personalities/personalities.lua script. Because of this, these new pilots do not have corresponding PilotPersonality instances in the global lua scope. This makes it difficult to add/modify dialogues for these pilots using existing methods.

In this discord message, tosx simply created new global instances for the new AE pilots, and that seems to work, since the game falls back on the old, deprecated texts system when it cannot find a matching text.

Long term, we should probably add a modApi function to add dialogue lines like this.

KnightMiner commented 2 years ago

What prevents us from just adding dialogue using modApi:setText? Could always write a loop to create text with the proper keys.