RandyG
Chieftain
I made a new civ mod using xml and it works, so no problems there. Now I want to make my UB do something, well... unique, so I need to expand beyond xml.
I have been looking at the lua mod wiki for civ5 and at lua code in other mods, but I am still not sure how to get started with this. Lua is new to me, but I have done some programming in the past, so I understand for and while loops and if statements. I have been experimenting with file tuner, but it does not seem to be very helpful at the moment. I guess I am just not sure how to get started or how to go about debugging. Anyways, here is what I am trying to do:
if player city has UB then
N = number of nations player is trading with this turn
On the next turn, give percent increase in gold genertated by this city equal to N times a constant
end
I would like to exclude things like open boarders agreements, acceptance of embassies, and research agreements. Basically, when I say trade I am just thinking of interactions involving gold, luxuries, and resources. And by trading with this turn, I mean that if the player makes a trade agreement for say 240 gold for gyms or 5 gpt for 3 iron for 30 turns then for the next 30 turns the player's city with the UB would get a bonus. Multiple trades with the same nation would not stack.
Right now I am looking for someone to help me get started with lua or at least point me to a relevant thread. Of course, if anyone would like to write some of this code for me, I would certainly appreciate it. Also if this is not possible please let me know.
I have been looking at the lua mod wiki for civ5 and at lua code in other mods, but I am still not sure how to get started with this. Lua is new to me, but I have done some programming in the past, so I understand for and while loops and if statements. I have been experimenting with file tuner, but it does not seem to be very helpful at the moment. I guess I am just not sure how to get started or how to go about debugging. Anyways, here is what I am trying to do:
if player city has UB then
N = number of nations player is trading with this turn
On the next turn, give percent increase in gold genertated by this city equal to N times a constant
end
I would like to exclude things like open boarders agreements, acceptance of embassies, and research agreements. Basically, when I say trade I am just thinking of interactions involving gold, luxuries, and resources. And by trading with this turn, I mean that if the player makes a trade agreement for say 240 gold for gyms or 5 gpt for 3 iron for 30 turns then for the next 30 turns the player's city with the UB would get a bonus. Multiple trades with the same nation would not stack.
Right now I am looking for someone to help me get started with lua or at least point me to a relevant thread. Of course, if anyone would like to write some of this code for me, I would certainly appreciate it. Also if this is not possible please let me know.