Giving Defense Abilities to Workers?

Puppier

Chieftain
Joined
Aug 22, 2012
Messages
28
I want to be able to add a unit in my mod that would replace the worker with a military unit capable of defending itself. The unit's strength would progress throughout the eras and take the strength of the weakest non-naval and non-air unit you own of that era (or the strongest of the last era).
I have no idea how to even start with this. Any suggestions?
 
It's not hard to make a military unit that can do worker actions. All you need to do is create a new Unit, assign it build actions in the Unit_Builds table, and you're done. Many of us have done this in our own mods.

However:
1> Since it'll now be a military unit, it won't be able to stack with other military units, but WILL be able to stack with Workers and Settlers. This is not adjustable; any unit with a combat strength is automatically considered a military unit, even if you force its strength to be only defensive.
2> No, you can't make it automatically upgrade itself to be comparable to an era-appropriate strength. Or to be more specific, you CAN, using Lua, by creating a series of units and using Lua to auto-upgrade every one each time you go through an era transition. But if you're doing that, you might as well just make the series of units as normal and let the player handle the upgrades.
3> You'll need to do a LOT of animation work to have each era's worker unit animate correctly for the wide variety of build actions.
 
It's not hard to make a military unit that can do worker actions. All you need to do is create a new Unit, assign it build actions in the Unit_Builds table, and you're done. Many of us have done this in our own mods.

However:
1> Since it'll now be a military unit, it won't be able to stack with other military units, but WILL be able to stack with Workers and Settlers. This is not adjustable; any unit with a combat strength is automatically considered a military unit, even if you force its strength to be only defensive.
2> No, you can't make it automatically upgrade itself to be comparable to an era-appropriate strength. Or to be more specific, you CAN, using Lua, by creating a series of units and using Lua to auto-upgrade every one each time you go through an era transition. But if you're doing that, you might as well just make the series of units as normal and let the player handle the upgrades.
3> You'll need to do a LOT of animation work to have each era's worker unit animate correctly for the wide variety of build actions.

Ah thank you. I did figure out how to do the military units with worker jobs. Now I just have to add era specific.
 
Back
Top Bottom