# [Solved]Units cant attack ingame?

Status
Not open for further replies.

#### Superz_Ze_Man

Level 8
Well, I have only been working on this map for an hour or so.. so its a bit of an eye sore. However, I've made a bunch of custom units based off of the default ones (like the rifleman or footman) and changed a bunch of their stats, but on my first test of the map I discovered they cant attack, nor do they have the attack command button thing. I'm not sure if I've changed something i wasn't supposed to, but i cant figure out what went wrong.. Any help is appreciated. You can find the units in the "custom units" section of the unit editor (all of them under human)

Last edited:

#### ap0calypse

Level 28
Set "Damage - Number of Dice" and "Damage - Sides per Dice" both to 1.
Then decrease the base damage by 1.

E.g.:

Base damage: 34
Number of Dice / Sides per Dice: 1

Damage = 35 - 35

#### Superz_Ze_Man

Level 8
I love u i was trying to keep the attack damage even for all the units to help with balancing during the early stages. thanks a lot, +rep

#### ap0calypse

Level 28
Well, the damage formula is:

(A+B) - (A + (B * C))​

Where:
A = Combat - Attack X - Damage Base
B = Combat - Attack X - Damage Number of Dice
C = Combat - Attack X - Damage Sides per Die

So technically, you're correct (if B and C are both 0, then the formula would be A - A).
But Warcraft just doesn't want to make it easy for modders and decided that B and C may not be 0.

I always set A to (first damage-1), B to 1 and then C to (last damage - A).
So if you want 80-100 damage, then A = 79 (80-1), B = 1 (always) and C = 21 (100 - 79).
Nice and easy.

One problem: a damage upgrade increases the last damage by by C (so with 1 upgrade, that would become 81 - 121).

#### Superz_Ze_Man

Level 8
i never knew that! Thanks, ive never really understood the dice thing haha. Games coming along nicely haha

Status
Not open for further replies.

Replies
4
Views
1K
Replies
13
Views
870
Replies
2
Views
560
Replies
2
Views
1K
Replies
12
Views
460