"This unit may not melee attack" - Hard rule or flexable?

Joined
Jun 27, 2007
Messages
2,248
Location
Hamilton, Ontario
All ranged units have the promotion, or ability, or anti-ability, or flag, or whatever you'd define it as that says "This unit may not melee attack". Is that there just to remind us that ranged units can melee attack or could you make a ranged unit that didn't have that which could then melee attack?

Seems like someone would have tested this already just by accident when modding in a new ranged unit and forgetting to set 'no melee attack'. So does anyone know?
 
I think one of the first version of the game had ranged units with melee capability, just try by removing the free promotion Horem has mentioned for one unit and test it :)

You should have then Ranged or Melee attack available in the unit order, Ranged being the default IIRC.
 
I did this a while ago and it worked. The issue is that the unit will always range attack unless you specifically command it to melee attack. As a result, the ai will never use the unit to melee attack. At least it never did for me. I think it is an idea with some potential, but I gave up on it.
 
I did this a while ago and it worked. The issue is that the unit will always range attack unless you specifically command it to melee attack. As a result, the ai will never use the unit to melee attack. At least it never did for me. I think it is an idea with some potential, but I gave up on it.

The AI will never melee attack because if its Unit AI is UNITAI_RANGED, then that's the only thing it will do. Besides, I cannot think of any situation where a melee attack is better than a ranged attack (except for capturing cities).
 
When the ranged attack is weak and the melee could destroy your opponent's unit I think.

Units AI could be multiple, no ? I'd like to know if we could make it use such an unit.
 
I can't think of a single unit that has more combat strength than ranged strength. Maybe if the attacking unit had Cover, or something, and was in terrain where you had the melee bonuses but not the ranged bonuses...

Which reminds me, if you want to make a melee + ranged unit, you'll probably have to make a new combat class, so that it can purchase both melee promotions and ranged promotions. Given that melee attacks aren't going to be that awesome on a ranged unit, this seems like a lot of work. (Not only that, new combat classes don't display combat animations).
 
I did this a while ago and it worked. The issue is that the unit will always range attack unless you specifically command it to melee attack. As a result, the ai will never use the unit to melee attack. At least it never did for me. I think it is an idea with some potential, but I gave up on it.

Confusing the AI is probably the biggest problem.

The AI will never melee attack because if its Unit AI is UNITAI_RANGED, then that's the only thing it will do. Besides, I cannot think of any situation where a melee attack is better than a ranged attack (except for capturing cities).

I can't think of a single unit that has more combat strength than ranged strength. Maybe if the attacking unit had Cover, or something, and was in terrain where you had the melee bonuses but not the ranged bonuses...

Which reminds me, if you want to make a melee + ranged unit, you'll probably have to make a new combat class, so that it can purchase both melee promotions and ranged promotions. Given that melee attacks aren't going to be that awesome on a ranged unit, this seems like a lot of work. (Not only that, new combat classes don't display combat animations).

Yeah, you'd really have to make a mod and units specifically to work this way to have it be effective. Units with higher combat strength than ranged combat (like ships were originally, but they were never melee capable), or have some disadvantage to ranged like require set-up. I just realized I'm describing the Terran Siege Tank from Starcraft.
 
Back
Top Bottom