Hello. I would like like to create a mod where a trade offer can be broadcast to all other Civs in the game where possible. For example, say I'd like to offer 5 Oil for 225G to anyone who will accept. First come first serve.
Programmatically, I understand how to implement a for loop with an exit condition and so on. However, what I do not know is:
- Is it possible to offer a deal through LUA?
- Is it possible to iterate through a list of other in-game civs?
- Is it possible to do an error-check to see if a deal is valid?
I saw whoward69's trade opportunities mod, and I'd just like to take it a step further if possible and automate the actual trade offering. If it helps anyone put responses in context, I am a full-time programmer so I understand the general algorithm required.
Programmatically, I understand how to implement a for loop with an exit condition and so on. However, what I do not know is:
- Is it possible to offer a deal through LUA?
- Is it possible to iterate through a list of other in-game civs?
- Is it possible to do an error-check to see if a deal is valid?
I saw whoward69's trade opportunities mod, and I'd just like to take it a step further if possible and automate the actual trade offering. If it helps anyone put responses in context, I am a full-time programmer so I understand the general algorithm required.