Want to know if a trait is possible (Lua), if so help with the code.

turingmachine

Emperor
Joined
May 4, 2008
Messages
1,438
Okay, so I made a trait with python that worked in Civ IV which essentially gave you better starting relations with all civs and thus a slight edge to diplomacy throughout the game.

In Civ IV, I accomplished this in the EventManager python file, OnGameStart, check for the trait, make a loop, getPlayers, AI_changeAttitudeExtra, +2.

Now, can I do something similar in Civ V? (Does the diplomacy system even work that way in V, and what about City States).

If so, can someone help me out or point me in the right direction with the code. I know how to use Python but not Lua (are the two similar?)
 
Hello. :)

Since G&K it is finally possible. The solution is to register to GameEvents.GetScenarioDiploModifier1(ePlayer1, ePlayer2). This is an event fired anytime the engine recomputes the diplomatic statuses (every turn? or only under some circumstances?) and you can use it to add your own modifier. Now you will need to grant a label to "scenario diplo modifier 1" and it will be displayed in the diplomatic status tool tip (aside of "they want our land", "we denounced their ally", etc). And this label may already have been specified by another mod or scenario.

There are at least two modifiers, three maybe.
 
Back
Top Bottom