I'm taking my first swing at modding, and to cut my teeth I'm trying to create a small mod switch around the 'Gift Unit' functionality for giving units to City States. The idea is City States then become a place to buy mercenary units from rather than give units to.
It was all going fairly well with re-using the Gift Unit functionality as a template, and switching around the gift from/to players, to the extent that the UI would highlight the available units for the city state, and you got a popup when you selected one saying 'Are you sure you want to gift this [unit] to [major civ]'.
And then nothing happens. No errors in logs, and the highlighted unit remains. The Lua function being modified was GiftUnit in InGame.lua. Does anyone know how I could figure out where the execution goes next? I'm assuming if the code that performs the gifting is C code, I'm out of luck on re-using this functionality?
Any pointers greatly appreciated.
It was all going fairly well with re-using the Gift Unit functionality as a template, and switching around the gift from/to players, to the extent that the UI would highlight the available units for the city state, and you got a popup when you selected one saying 'Are you sure you want to gift this [unit] to [major civ]'.
And then nothing happens. No errors in logs, and the highlighted unit remains. The Lua function being modified was GiftUnit in InGame.lua. Does anyone know how I could figure out where the execution goes next? I'm assuming if the code that performs the gifting is C code, I'm out of luck on re-using this functionality?
Any pointers greatly appreciated.