Thal's Modding Utilities

Instructions are included:



Links to here.

Animations can be re-enabled by placing an "_" underscore at the front of this file name:

\CiVUP - Civ V Unofficial Patch\Core\_CiVUP - Quick Combat.sql
 

Attachments

  • Quick Combat.PNG
    Quick Combat.PNG
    36.9 KB · Views: 2,413
For modders, in v131 the Save/Load savegame storage functions now accept formatting (like string.format). The position of the key and value arguments were swapped in Save functions to accommodate this. I also added a generic SaveValue and LoadValue. Here are examples of using this feature:

PHP:
local someKey = 10
SaveValue(10, "someKey")
LoadValue("someKey")

MapModData.VEM.Events[playerID].Chance =
 LoadValue("MapModData.VEM.Events[%s].Chance", playerID)

SaveValue(
 MapModData.VEM.Events[playerID].Chance,
 "MapModData.VEM.Events[%s].Chance",
 playerID
)
 
MapModData.VEM.Events[playerID].HasOccured[eventID][plotID] =
 (1 == LoadValue(
  "MapModData.VEM.Events[%s].HasOccured[%s][%s]",
  playerID,
  eventID,
  plotID
 )
)
This makes it much easier to write save/load code.

  1. Copy-paste a reference.
  2. Drag variable names from [ ] to the end.
  3. Add %s to the empty [ ].
 
Top Bottom