Unit Design - Unit Propery sheet - Spec unit actions

User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Unit Design - Unit Propery sheet - Spec unit actions

Post 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.
makazuwr32 wrote: Mon Sep 16, 2019 7:54 amWhen you ask to change something argument why...
Put some numbers, compare to what other races have and so on...
© by Makazuwr32™.
AoF Dev Co-Leader
Image
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - Unit Propery sheet - Spec unit actions

Post by Stratego (dev) »

So this will fix no bonus on counter spec unit action for aof, right?
yes
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - Unit Propery sheet - Spec unit actions

Post 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)
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - Unit Propery sheet - Spec unit actions

Post 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.
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - Unit Propery sheet - Spec unit actions

Post 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.
User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Unit Design - Unit Propery sheet - Spec unit actions

Post 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?
makazuwr32 wrote: Mon Sep 16, 2019 7:54 amWhen you ask to change something argument why...
Put some numbers, compare to what other races have and so on...
© by Makazuwr32™.
AoF Dev Co-Leader
Image
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - Unit Propery sheet - Spec unit actions

Post 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.
User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Unit Design - Unit Propery sheet - Spec unit actions

Post 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?
makazuwr32 wrote: Mon Sep 16, 2019 7:54 amWhen you ask to change something argument why...
Put some numbers, compare to what other races have and so on...
© by Makazuwr32™.
AoF Dev Co-Leader
Image
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - Unit Propery sheet - Spec unit actions

Post 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.
User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Unit Design - Unit Propery sheet - Spec unit actions

Post 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?
makazuwr32 wrote: Mon Sep 16, 2019 7:54 amWhen you ask to change something argument why...
Put some numbers, compare to what other races have and so on...
© by Makazuwr32™.
AoF Dev Co-Leader
Image
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - Unit Propery sheet - Spec unit actions

Post by Stratego (dev) »

please try in game.
User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Unit Design - Unit Propery sheet - Spec unit actions

Post 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?
makazuwr32 wrote: Mon Sep 16, 2019 7:54 amWhen you ask to change something argument why...
Put some numbers, compare to what other races have and so on...
© by Makazuwr32™.
AoF Dev Co-Leader
Image
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - Unit Propery sheet - Spec unit actions

Post 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.
User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Unit Design - Unit Propery sheet - Spec unit actions

Post 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.
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - Unit Propery sheet - Spec unit actions

Post 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)
User avatar
b2198
Posts: 798
Joined: Mon Aug 30, 2021 5:48 pm
Location: Brazil

Re: Unit Design - Unit Propery sheet - Spec unit actions

Post 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.
Green is the correct color, other colors are "less correct".
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - Unit Propery sheet - Spec unit actions

Post 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.
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - Unit Propery sheet - Spec unit actions

Post 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)
Midonik
Posts: 5325
Joined: Mon Sep 05, 2016 5:27 pm
Location: Poland

Re: Unit Design - Unit Propery sheet - Spec unit actions

Post by Midonik »

Could I use it for this? viewtopic.php?f=180&t=10534
Support new AoS variant, Age of Galaxy: http://ageofstrategy.net/viewforum.php? ... 608408ebc8
All help will be welcome.
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - Unit Propery sheet - Spec unit actions

Post 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.
Midonik
Posts: 5325
Joined: Mon Sep 05, 2016 5:27 pm
Location: Poland

Re: Unit Design - Unit Propery sheet - Spec unit actions

Post by Midonik »

The idea is for it to be locked behind tech and unique.
Support new AoS variant, Age of Galaxy: http://ageofstrategy.net/viewforum.php? ... 608408ebc8
All help will be welcome.
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - Unit Propery sheet - Spec unit actions

Post by Stratego (dev) »

than it is good!
User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Unit Design - Unit Propery sheet - Spec unit actions

Post 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?
makazuwr32 wrote: Mon Sep 16, 2019 7:54 amWhen you ask to change something argument why...
Put some numbers, compare to what other races have and so on...
© by Makazuwr32™.
AoF Dev Co-Leader
Image
Midonik
Posts: 5325
Joined: Mon Sep 05, 2016 5:27 pm
Location: Poland

Re: Unit Design - Unit Propery sheet - Spec unit actions

Post 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).
Support new AoS variant, Age of Galaxy: http://ageofstrategy.net/viewforum.php? ... 608408ebc8
All help will be welcome.
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - Unit Propery sheet - Spec unit actions

Post 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)
User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Unit Design - Unit Propery sheet - Spec unit actions

Post 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?
makazuwr32 wrote: Mon Sep 16, 2019 7:54 amWhen you ask to change something argument why...
Put some numbers, compare to what other races have and so on...
© by Makazuwr32™.
AoF Dev Co-Leader
Image
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - Unit Propery sheet - Spec unit actions

Post 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 :)
User avatar
Hyuhjhih
Posts: 1301
Joined: Sat Sep 19, 2020 4:22 am
Location: Earth, (the part of blue ball and is named India for some reasons)

Re: Unit Design - Unit Propery sheet - Spec unit actions

Post 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)
LIE = Love Is Eternal.

Design leader of the variants Age of Gods and Age Of Civilization, and live heartedly contributing to AoS.

AoC discord server is up AoC
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unit Design - Unit Propery sheet - Spec unit actions

Post 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)
User avatar
Hyuhjhih
Posts: 1301
Joined: Sat Sep 19, 2020 4:22 am
Location: Earth, (the part of blue ball and is named India for some reasons)

Re: Unit Design - Unit Propery sheet - Spec unit actions

Post by Hyuhjhih »

Nice
LIE = Love Is Eternal.

Design leader of the variants Age of Gods and Age Of Civilization, and live heartedly contributing to AoS.

AoC discord server is up AoC
Post Reply

Return to “Unit Design”