[LUA] Replace specific leaders/civs at the start of a game

niklas153021

Chieftain
Joined
May 23, 2016
Messages
37
Location
Germany
Hi,

I have an SQL table where I have two columns of civs so and my aim is, that the two civs that are in the same row shouldn't spawn together in one game.

I know that there is the possibility to remove civs from the game via SQL/XML rulesets, but this is not really what fits my intention. My idea was to replace a civ that is found in the table with a random civ.

Now, I'm not sure how to do that. My first question is if it is even possible to replace civs at the start of the game using LUA. If yes, my second question is where to add/modify code. I have very, very little experience in LUA modding, but my first guess was to have a look at AssignStartingPlots.lua, but I didn't know where exactly to insert my code and how. One big problem is that there seems to be no method to get a random civilization.

Is it possible to use Events ore something similar for not having to modify the base game files and risking compatibility?

I hope you can understand my problem (despite lacking English skills :p)

Thanks in advance,

niklas
 
I'm sure this is possible, AssingStartingPlots is the first file you could change in the loading order, but I'm afraid it's already too late at this moment to initialize a new civ.
 
That's a shame, then I guess I'll have to use a ruleset and SQL in order to get this working at least somehow...

Anyways, thanks for your answer!
 
Top Bottom