I found another interesting script
which unfortunately is for bug mod, but unfortunately I tried to adapt it, but I think I did something wrong.
I think I need to change something here, I added this part to the beginning of the file, as https://forums.civfanatics.com/members/f1rpo.258413/ advised me in the other request, but I don't think it's good for this
Import BugEventManager
def init():
em = BugEventManager.g_eventManager
em.addEventHandler('LoadGame', loadCustomXML)
em.addEventHandler('GameStart', loadCustomXML)
em.addEventHandler('BeginGameTurn', onBeginGameTurn)
def loadCustomXML(argsList):
loadEvents("Mods/Realism Invictus/Assets/XML/CustomXML/CIV4SpawnUnitInfos.xml")
def onBeginGameTurn(argsList):
iGameTurn = argsList[0]
AddUnits(iGameTurn)
[XML+Python] SpawnUnits
This small mod component allows the player to spawn units at predefined turns at predefined positions, depending on Civ and scenario. So if you use this mod component, you can easily define via XML that for scenario XY the Americans should get...
forums.civfanatics.com
which unfortunately is for bug mod, but unfortunately I tried to adapt it, but I think I did something wrong.
I think I need to change something here, I added this part to the beginning of the file, as https://forums.civfanatics.com/members/f1rpo.258413/ advised me in the other request, but I don't think it's good for this
Import BugEventManager
def init():
em = BugEventManager.g_eventManager
em.addEventHandler('LoadGame', loadCustomXML)
em.addEventHandler('GameStart', loadCustomXML)
em.addEventHandler('BeginGameTurn', onBeginGameTurn)
def loadCustomXML(argsList):
loadEvents("Mods/Realism Invictus/Assets/XML/CustomXML/CIV4SpawnUnitInfos.xml")
def onBeginGameTurn(argsList):
iGameTurn = argsList[0]
AddUnits(iGameTurn)