Typhlomence
Magical Tomomo
This thread is now obsolete - new thread can be found here.
For my Koopa Troop civilization I included some lua that gave him unique diplomacy responses depending on who the player was playing as, using the lua from Ryoga's Unique Cultural Influence as a reference. I've been working on cleaning it up and expanding it into a lua file with various functions that others can drop into their own mods and use.
Here's the file at the moment.
There are eight functions in total. For manipulating the Diplomacy Responses Table, there's:
However, I'm not sure of the approach others use when they need to change a Game Text line, since you could change a reference to an entry easily using SQL (if it's before the game starts), and Civ Names By Policies doesn't query the database to change the civilization names during the game (and that dynamically generates strings). UCI is the only one I've looked at so far that does query the database to change Game Text.
So... would having a seperate GameTextUtils.lua be useful to anyone? Or should I just polish off and release UniqueDiplomacyUtils.lua?
(I'll make a proper thread for UniqueDiplomacyUtils.lua if/when I release that one, with instructions on how to use it.)
For my Koopa Troop civilization I included some lua that gave him unique diplomacy responses depending on who the player was playing as, using the lua from Ryoga's Unique Cultural Influence as a reference. I've been working on cleaning it up and expanding it into a lua file with various functions that others can drop into their own mods and use.
Here's the file at the moment.
There are eight functions in total. For manipulating the Diplomacy Responses Table, there's:
- ChangeDiplomacyResponse()
- AddDiplomacyResponse()
- RemoveDiplomacyResponse()
- ChangeDiplomacyGameText()
- AddDiplomacyGameText() (Technically, this copies an existing entry.)
- RemoveDiplomacyGameText()
- ChangeDiplomacyGameTextToString()
- AddDiplomacyGameTextFromString()
However, I'm not sure of the approach others use when they need to change a Game Text line, since you could change a reference to an entry easily using SQL (if it's before the game starts), and Civ Names By Policies doesn't query the database to change the civilization names during the game (and that dynamically generates strings). UCI is the only one I've looked at so far that does query the database to change Game Text.
So... would having a seperate GameTextUtils.lua be useful to anyone? Or should I just polish off and release UniqueDiplomacyUtils.lua?
(I'll make a proper thread for UniqueDiplomacyUtils.lua if/when I release that one, with instructions on how to use it.)