Nightinggale
Deity
- Joined
- Feb 2, 2009
- Messages
- 5,402
While searching for interesting modcomps, I came across this rather interesting one about unit automation.
http://forums.civfanatics.com/showthread.php?t=368841
It's for BTS and I haven't looked at the source code yet, but I find a few of the automation orders rather interesting.
to Afforess for this masterpiece.
1, 2 and 6 sounds like they can be used as they are.
3: we talked about precisely this for hunter automation. The exception being that we should be able to give it a plot to start on and then it will not move further than X plots away from it. That should prevent him from spending 30 turns on a return trip.
4: while this one is not particularly useful for our case, it sounds like it is a "loop all your cities and move to a city where this function is true". That could be modded into something really useful. In fact I hope we can include this in a way, where we can easily make multiple automation schemes where they only differ in the criteria for city to travel to.
5: not sure about this one. Might be useful, but pirates need to return with plunder.
As I'm busy coding other stuff right now, I will not look further into this now. However spotting this made me decide that we needed a unit automation thread
http://forums.civfanatics.com/showthread.php?t=368841
It's for BTS and I haven't looked at the source code yet, but I find a few of the automation orders rather interesting.

- City Defense:
The unit will defend your cities. If a nearby, weaker enemy approaches, the unit will engage and destroy the enemy, and return to defending the city of origin.
- Border Patrol
The unit will wander around the edges of your border, searching for potential enemies, and engage them.
- Hunt
The unit will search and destroy any enemy units it can find.
- Auto-Hurry
Not useful for normal BTS, but for any mods that add units that can hurry or speed up production of buildings in a city via the <iBaseHurry> XML tag will be able to be automated.
- Auto-Pirate
Privateers and any other sea-faring, hidden, always hostile units will be able to cause terror on the open seas, sinking weak transports and blockading wealthy harbors.
- Auto Protect
Allows the Player to select a unit to escort and protect. If you select a tile with multiple units, a popup will appear directing you to specify which unit.
1, 2 and 6 sounds like they can be used as they are.
3: we talked about precisely this for hunter automation. The exception being that we should be able to give it a plot to start on and then it will not move further than X plots away from it. That should prevent him from spending 30 turns on a return trip.
4: while this one is not particularly useful for our case, it sounds like it is a "loop all your cities and move to a city where this function is true". That could be modded into something really useful. In fact I hope we can include this in a way, where we can easily make multiple automation schemes where they only differ in the criteria for city to travel to.
5: not sure about this one. Might be useful, but pirates need to return with plunder.
As I'm busy coding other stuff right now, I will not look further into this now. However spotting this made me decide that we needed a unit automation thread
