[SDK] Advanced Unit Automations

Okay, I've got it working. I need to fine tine it a bit, but the follow command does let you select a unit, and the unit follows correctly. Smeagolheart is working on a button for me. I should have it up at the very latest, Saturday.
 
Sweet, just glad to know that I could contribute (even if only with the idea). ;) I can already see Automated Carrier Groups making their way to my enemies shores :D Or Horse Archer outriders defending their Settler charge :goodjob:
 
Here's a button, hope you like it.

autodefender.jpg
 

Attachments

Updated to Include the new automation, Automate Protect. It's a bit more involved than the previous automations, and actually is composed of a new interface mode, mission and automation. Be sure to be careful when merging.

As for the automation, it allows you to select a unit to escort and protect. The automated unit will follow it around. If your unit can't escort the selected, it will display a reason on the hover text.

Also, I figured out why the Espionage Sleep mission was giving you guys so much trouble. It was an XML issue, oddly enough.

One last thing, you can play AUA as a mod now, I included a DLL. It should work right out of the box.

Enjoy! ;)
 
One thing about the new automation, it only lets you select the center (top) unit in the stack to follow, which presents an issue for stacks of units. I'm thinking of adding a "Center Unit" mission which forces a specific unit to be on top (at it's own risk - the Center unit defends first). SmeagolHeart, could you make a Center Unit, and Cancel Center Unit button? It's not an automation, so it doesn't need those 4 edge arrows, FYI.
 
SmeagolHeart, could you make a Center Unit, and Cancel Center Unit button? It's not an automation, so it doesn't need those 4 edge arrows, FYI.

Ok. Center unit.. Any ideas on what you are seeing this look like? Only thing comes to mind to me so far is like a target or something which doesn't capture the center part of it maybe.

Hmm. .. maybe some sort of "leadership" picture...
 
One thing about the new automation, it only lets you select the center (top) unit in the stack to follow, which presents an issue for stacks of units. I'm thinking of adding a "Center Unit" mission which forces a specific unit to be on top (at it's own risk - the Center unit defends first). SmeagolHeart, could you make a Center Unit, and Cancel Center Unit button? It's not an automation, so it doesn't need those 4 edge arrows, FYI.

Just a thought, would it be possible to have the selection of a stack bring up a pop-up menu that lists all of the valid units on the tile?
 
Just a thought, would it be possible to have the selection of a stack bring up a pop-up menu that lists all of the valid units on the tile?

That might be a better idea.

Afforess, try these out. It's just a simple green flag, the background is transparent so I'm not 100% how it will look on screen.

Looks like I won't be needing it, but the flag did look fine. ;)
 
Another thought I just had, can multiple units be assigned to Protect the same unit? If so, what happens when the Protected unit is attacked? Who defends them?
 
Another thought I just had, can multiple units be assigned to Protect the same unit? If so, what happens when the Protected unit is attacked? Who defends them?

Yes, you can assign an unlimited number of units to protect one unit. I didn't change the BestDefender function, so if you decide to protect a tank with a warrior, the tank will fight, not the warrior. I'm not sure I want to change the bestDefender function, because that will mean this mod alter's gameplay - which is not it's goal.
 
Updated to v 1.51. Save compatible with 1.50.

Changes:

When you select a tile with multiple units, the game creates a popup asking for which specific unit to choose.

Enjoy!
 
Back
Top Bottom