Does anyone know how to create a LUA script that, when an AI creates a puppet, converts it to an annexed city? (Alternatively it can check all cities every turn, and convert all puppets to annexed.)
I need it for my mod where annexed cities cause the same unhappiness as the ones you found (and Courthouse serves a different purpose), and I don't want the AI to have lower policy costs due to puppets (thanks to Slowpoke, I already know how to disable the puppet buttons for the human player).
I'm new to LUA modding (so far I only changed the resource quantities in AssignStartingPlots.lua), so I have no idea how to write this kind of event, in which file to put it etc. I only know that it should probably use the following command (found in PuppetCityPopup.lua):
I need it for my mod where annexed cities cause the same unhappiness as the ones you found (and Courthouse serves a different purpose), and I don't want the AI to have lower policy costs due to puppets (thanks to Slowpoke, I already know how to disable the puppet buttons for the human player).
I'm new to LUA modding (so far I only changed the resource quantities in AssignStartingPlots.lua), so I have no idea how to write this kind of event, in which file to put it etc. I only know that it should probably use the following command (found in PuppetCityPopup.lua):
Code:
Network.SendDoTask(cityID, TaskTypes.TASK_ANNEX_PUPPET, -1, -1, false, false, false, false);