Page 3 of 5
Re: Unit Design - Unit Propery sheet - Spec unit actions
Posted: Thu Dec 02, 2021 11:16 am
by makazuwr32
Stratego (dev) wrote: ↑Wed Dec 01, 2021 9:04 pm
awesome! you are right!
called boolean
IS_BONUS_NEGLECTS_EACH_OTHER and only in AOF it is set to true!
based on this i will have a fix on this lancer thing soon!
thanks!
So this will fix no bonus on counter spec unit action for aof, right?
If yes than i think that alone will be more than enough for now for monitor lancer and raptor rider.
Re: Unit Design - Unit Propery sheet - Spec unit actions
Posted: Thu Dec 02, 2021 11:42 am
by Stratego (dev)
So this will fix no bonus on counter spec unit action for aof, right?
yes
Re: Unit Design - Unit Propery sheet - Spec unit actions
Posted: Tue Dec 07, 2021 8:38 am
by Stratego (dev)
Counter attacks
(Endru collected it - thanks!)
How currently counter attack calculations work:
Counter is based around two parts - applying bonuses and counter damage divider.
Crucial part is boolean value (possible to be changed in initialization.json) IS_BONUS_NEGLECTS_EACH_OTHER
Normally it is false, but in older times game was working this way (and AoF still uses it at the time of writing).
Counter damage is normally calculated using 50% of normal attack and applies damage bonuses.
Damage bonuses are NOT applied on counter damage in four cases:
- IS_BONUS_NEGLECTS_EACH_OTHER=true AND attacker has any bonus damage against defender
- defender has ATTACK_COUNTER_NO_BONUS_VS_BONUS spec AND attacker has any bonus damage against defender
- defender has ATTACK_COUNTER_NO_BONUS spec
- attacker has ATTACK_NO_COUNTER_BONUS_AGAINST_ME spec
There is also a case of changing attack on counter damage calculation
- it is 50% (divided by 2, commonly rounded down) normally
- becomes 100% (no decrease) in 3 cases:
- defender has ATTACK_FULL_COUNTER spec
- defender has ATTACK_FULL_COUNTER_IF_BONUS spec AND any bonus damage against attacker
- IS_BONUS_NEGLECTS_EACH_OTHER=true AND defender has any bonus damage against attacker UNLESS
-defender has any bonus damage against attacker
-defender has ATTACK_COUNTER_NO_BONUS spec
-attacker has ATTACK_NO_COUNTER_BONUS_AGAINST_ME spec
-previous value is halved if attacker has ATTACK_COUNTER_QUARTERED_AGAINST_ME spec (divider is doubled)
-previous value is halved if defender has ATTACK_COUNTER_QUARTERED spec (divider is doubled)
-previous value is doubled if defender has ATTACK_COUNTER_DOUBLE spec (divider is halved)
Re: Unit Design - Unit Propery sheet - Spec unit actions
Posted: Mon Jan 03, 2022 4:19 pm
by Stratego (dev)
new:
Code: Select all
IS_FUN_UNIT, //if unit is a fun unit (replaces the obsolete boolean isFunModeBuildable)
please modify all FUN units to this as the old isFunModeBuildable will not be used by the code anymore.
Re: Unit Design - Unit Propery sheet - Spec unit actions
Posted: Mon Apr 11, 2022 3:58 pm
by Stratego (dev)
new:
Code: Select all
IS_INFINITE_TALL, // units that should not be shot over, "spell" over, fly over - so anything behind is protected (like a wall in a room)
in AOF i set it to the cave wall unit (grey and brown), please contact me if you want to set it to anything else, i try to have it used only for real "room" walls.
Re: Unit Design - Unit Propery sheet - Spec unit actions
Posted: Mon Apr 11, 2022 8:00 pm
by makazuwr32
Stratego (dev) wrote: ↑Mon Apr 11, 2022 3:58 pm
new:
Code: Select all
IS_INFINITE_TALL, // units that should not be shot over, "spell" over, fly over - so anything behind is protected (like a wall in a room)
in AOF i set it to the cave wall unit (grey and brown), please contact me if you want to set it to anything else, i try to have it used only for real "room" walls.
How this calculates when target is near wall but attack is coming from diagonal?
For example:
Unit — U
Wall — W
Open space — O
Attacker — A
U W O O O
O O O O O
W O
W O O
O O O O O
O O O O
A
And another question:
Can you add a tile with similar property?
Re: Unit Design - Unit Propery sheet - Spec unit actions
Posted: Mon Apr 11, 2022 8:09 pm
by Stratego (dev)
it uses this: "bresenham algorithm" search for it.
in your example the wall in 3,3 will block the attack.
"tile" if u mean terrain tile than yes, later will be if this works good.
Re: Unit Design - Unit Propery sheet - Spec unit actions
Posted: Mon Apr 11, 2022 8:14 pm
by makazuwr32
Stratego (dev) wrote: ↑Mon Apr 11, 2022 8:09 pm
it uses this: "bresenham algorithm" search for it.
in your example the wall in 3,3 will block the attack.
"tile" if u mean terrain tile than yes, later will be if this works good.
What if attacker one tile to the left?
Re: Unit Design - Unit Propery sheet - Spec unit actions
Posted: Mon Apr 11, 2022 8:15 pm
by Stratego (dev)
i can only say:
it uses this: "bresenham algorithm" search for it.
or better:
try it in game - in dev version uos already.
Re: Unit Design - Unit Propery sheet - Spec unit actions
Posted: Mon Apr 11, 2022 8:26 pm
by makazuwr32
I have knowledge of this.
The reason why i am asking this is how it works in our system where you can't attack diagonally with melee range units.
Is it calculated in perfect diagonal so 2 walls near that unit (if it is covered by walls from both sides but not from corner) will be able to protect unit or not?
Re: Unit Design - Unit Propery sheet - Spec unit actions
Posted: Mon Apr 11, 2022 8:40 pm
by Stratego (dev)
please try in game.
Re: Unit Design - Unit Propery sheet - Spec unit actions
Posted: Mon Apr 11, 2022 8:46 pm
by makazuwr32
sigh
Alright.
Reason why i am asking is that we might use it for some constructible walls as well so i need to know how exactly is it working.
Right. Forgot.
1. This effect also will prevent usage of summoning abilities and jumping abilities?
2. What about aoe — if aoe hits wall with this effect in the middle will units near wall be affected by aoe?
3. How raise dead will work in case of corpse near this wall — will it raise into skeleton or will be kept as corpse?
Re: Unit Design - Unit Propery sheet - Spec unit actions
Posted: Mon Apr 11, 2022 8:48 pm
by Stratego (dev)
actually i dont not want this to any buildable atm. so we need to talk about befor making any to be such.
Re: Unit Design - Unit Propery sheet - Spec unit actions
Posted: Mon Apr 11, 2022 8:50 pm
by makazuwr32
Stratego (dev) wrote: ↑Mon Apr 11, 2022 8:48 pm
actually i dont not want this to any buildable atm. so we need to talk about befor making any to be such.
Not that i am planning to use it anytime soon anyway.
But i think megas might have it actually to show that they are big.
Re: Unit Design - Unit Propery sheet - Spec unit actions
Posted: Mon Apr 11, 2022 8:52 pm
by Stratego (dev)
no any big is not this big.
this is when "endless" tall. like a wall up to the ceiling. (in a room or in a cave)
Re: Unit Design - Unit Propery sheet - Spec unit actions
Posted: Tue Apr 12, 2022 3:36 am
by b2198
Stratego (dev) wrote: ↑Mon Apr 11, 2022 3:58 pm
new:
Code: Select all
IS_INFINITE_TALL, // units that should not be shot over, "spell" over, fly over - so anything behind is protected (like a wall in a room)
in AOF i set it to the cave wall unit (grey and brown), please contact me if you want to set it to anything else, i try to have it used only for real "room" walls.
Nice idea there, I can see a lot of uses for this one (and maybe for setting the ground for a non-infinitely tall version of the spec in the future).
A problem I can see with its current form is that bresenham is orientation-dependent, so it could (and most likely will) happen in some cases that a unit is able to fire through one of these, while the unit that is being targeted can't fire back, and could lead to some hard to predict behavior for players even if a preferred orientation was set. My suggestion would be to mark all tiles that the line between the two units touches as being part of the path, and prevent firing/etc. if one of them has a unit with this spec.
Re: Unit Design - Unit Propery sheet - Spec unit actions
Posted: Tue Apr 12, 2022 7:38 am
by Stratego (dev)
yes this is a "pilot" so in dev version you can make suchsituations and show what change we need.
but the thing you said the target can not shoot back i doubt as the "path" willbe the same both ways imho.
Re: Unit Design - Unit Propery sheet - Spec unit actions
Posted: Wed Apr 13, 2022 11:36 am
by Stratego (dev)
new options, but please use with care! and DISCUSS it with me before using!
Code: Select all
IS_DECREASE_COUNT_FACTORY, // is this unit / building is decreasing the built factory count (simulates that you have 1 less factory built)
IS_DECREASE_COUNT_MEGA, // is this unit / building is decreasing the MEGA building count (simulates that you have 1 less mega built)
Re: Unit Design - Unit Propery sheet - Spec unit actions
Posted: Wed Apr 13, 2022 2:21 pm
by Midonik
Re: Unit Design - Unit Propery sheet - Spec unit actions
Posted: Wed Apr 13, 2022 3:12 pm
by Stratego (dev)
so it is like a "powerplant"/ power source letting to build an extra building.
good idea, the only thing is it should be costy enough to be hard to make many, so it should be stopped being "spammed".
or maybe set it to "Unique" type so maximum one for one player.
Re: Unit Design - Unit Propery sheet - Spec unit actions
Posted: Wed Apr 13, 2022 3:27 pm
by Midonik
The idea is for it to be locked behind tech and unique.
Re: Unit Design - Unit Propery sheet - Spec unit actions
Posted: Wed Apr 13, 2022 3:37 pm
by Stratego (dev)
than it is good!
Re: Unit Design - Unit Propery sheet - Spec unit actions
Posted: Wed Apr 13, 2022 9:37 pm
by makazuwr32
Stratego (dev) wrote: ↑Wed Apr 13, 2022 11:36 am
new options, but please use with care! and DISCUSS it with me before using!
Code: Select all
IS_DECREASE_COUNT_FACTORY, // is this unit / building is decreasing the built factory count (simulates that you have 1 less factory built)
IS_DECREASE_COUNT_MEGA, // is this unit / building is decreasing the MEGA building count (simulates that you have 1 less mega built)
It means that you have less total counter for possible factories/megas, right?
Will it revert back with death of unit with either of those?
Re: Unit Design - Unit Propery sheet - Spec unit actions
Posted: Wed Apr 13, 2022 9:50 pm
by Midonik
Not less total possible counter - lower currently built count. So essentially you can built one more factory and/or mega than the built count would allow.
I must assume that when destroyed the currently built count would increase by one (go over limit usually).
Re: Unit Design - Unit Propery sheet - Spec unit actions
Posted: Thu Apr 28, 2022 10:49 pm
by Stratego (dev)
new possibility to turn off CAN_NOT_LOAD_UNLOAD :
Code: Select all
CAN_LOAD_UNLOAD, //Unit can now load / unload units (even if it has CAN_NOT_LOAD_UNLOAD spec already, this overrides that)
Re: Unit Design - Unit Propery sheet - Spec unit actions
Posted: Fri Apr 29, 2022 4:02 am
by makazuwr32
By the way question:
If unit has first strike and double damage on counter specs at base and got no counter spec via ability (from enemy for example) — will no counter spec override those 2?
Re: Unit Design - Unit Propery sheet - Spec unit actions
Posted: Fri Apr 29, 2022 5:00 am
by Stratego (dev)
?
seems off topic, on this, also eaarlier i opened a Q&A section in here, please always as there things - thanks!
and my answer is: gosh, i dont understand

Re: Unit Design - Unit Propery sheet - Spec unit actions
Posted: Sun May 01, 2022 2:04 am
by Hyuhjhih
The infinite tall spec is a good addition. But, could you add an exception spec , like 'CAN_PIERCE_THRU_HIGH_WALLS' for units or spells, which MUST be used the old fashioned way while all other units follow BLGA(Bresenham's Line Generation Algorithm)
Re: Unit Design - Unit Propery sheet - Spec unit actions
Posted: Wed May 04, 2022 1:49 pm
by Stratego (dev)
new option
Code: Select all
ATTACK_NEEDS_OPERATOR, //structures eg. towers, castles: if structure is not carrying any units than it can not attack with its default attack (same for counterattack)
Re: Unit Design - Unit Propery sheet - Spec unit actions
Posted: Wed May 04, 2022 5:42 pm
by Hyuhjhih
Nice