Help with a UA that revolves around stealing resources by pillaging

Uighur_Caesar

Comandante en Jefe
Joined
Mar 14, 2015
Messages
1,227
Location
Florida
I have this idea for a UA that would allow your land units to steal animal resources from your enemies, but it's kind of complicated so I need some help coding it. Here's an overview of the UA: Land units that pillage a tile containing an animal resource (or start their turn on a pillaged animal resource tile since I don't think there's an event for pillaging) store that resource and can bring it back to your cities. They can only have one resource stored at a time and a tile can only be stolen from once. What I mean by "bring back the resource" is that they can place the resource they stole on any unimproved tile in your territory.

So the way I was thinking of doing this was to check what resource the unit pillaged (or started on) and then give them a promotion that corresponds to that resource. Then, they'd be able to place that resource on a tile in your territory through either a build or a mission, and upon placing the resource they would lose that promotion.

So there were a few questions I have about this:

1. Is there any event for pillaging?

2. How can I limit a tile from being stolen from multiple times?

3. How do I give the unit with the promotion a mission or build?
 
So 2013.

Anyway, answers:
1) Not really.
2) Any kind of saving data.
3) That's question is from the tricky ones of "if you ask, you will probably not gonna be able to do it". What I can suggest is a workaround to just detect when unit enter proper tile (comes back to your territory, valid for resource, workable) and force it then.
I had made it instantly moved to player's territory once stolen, since coding AI support to move back with a resource is meh work.
 
How do I actually see the code used? When I download it I just get a .civ5mod file that I can't do anything with.

It's basically a zip file that you can open with 7Zip or any archive software.
 
Back
Top Bottom