New Mechanics

Magma the Great

Chieftain
Joined
Dec 7, 2014
Messages
19
Hello, I am relatively inexperienced/new with modding Civ V, but I do know some stuff.
Anyway, I would like to know how to read data from the game data with Lua (I'm assuming it's something like GameData.soAndSo because I seem to remember seeing something like that when browsing the code of a mod).
I'd also like to know how to run some code every turn. (I could probably find this out myself by looking at mods, but I'd like to be sure how so I don't do something wrong and make the "BSOD mod")
 
BSOD mod is a very successful mod, you would be honored to repeat it's success.
NOW. To the answer... Do you have any experience with Lua itself? If no, I would like to direct you to Lua's website where they have awesome tutorials and this manual; if yes, we have a tutorial for beginners right here in this forum, done by a magical man riding a cupcake-eating-unicorn to the rainbows of the stars of life.
 
"BSOD" mod ?

--------------------------------------------------------------------------------------------------

<GameData> -- </GameData> tags are used in XML files (both mods and the game's source XML files) to signal that new information is to be loaded into the game's database. SQL files write new information to the same game database, but they do not use <GameData> -- </GameData> tags.

There are also opener/closer tags named <LeaderScene> -- </LeaderScene>, but those are used with civ leader scenes (something.dds) that tells the game what fallback image to use for the diplomacy screen for modded civilizations. I have heard there are other opener/closer tags for XML files, but I am not sure what those are, or what they would be used for.

-------------------------------------------------------------------------------------------------

In lua there are animals GameInfoTypes, GameDefines, GameInfo, and DB. All of these are "data" animals, meaning they allow you to pull data from "elsewhere" in the game into an lua program. I really don't as yet understand how to use GameDefines, GameInfo, or DB. I use GameInfoTypes all the time.
 
Top Bottom