Page 1 of 1

Unit Design - Unit Propery sheet - bonuses

Posted: Sat Apr 16, 2022 5:56 am
by Stratego (dev)
Bonuses are set in trnBonusList

Code: Select all

         "trnBonusList":[ 
	    {"modifier":0.6,                     "unitList":{"categories":["U_MOUNTED"]}},
            {"modifier":0.8, "modifierValue":3,  "unitList":{"categories":["AND(", "U_HEAVY_CAVALRY", "U_SLOW_CHARGE", ")"]}},
            {"modifier":0.9, "modifierValue":5,  "unitList":{"categories":["U_MEDIUM_CAVALRY", "AND(", "U_CHARIOT", "U_MELEE", ")"]}},
            {"modifier":1.0, "modifierValue":7,  "unitList":{"categories":["AND(", "U_HEAVY_CAVALRY", "NOT", "U_SLOW_CHARGE", ")"]}},
            {"modifier":1.2, "modifierValue":16, "unitList":{"categories":["U_ELEPHANT"]}}
	     ],
modifier: the percent 0.6 = +60% on power of unit (so power*modifier) - can be 0
modifierValue: scalar value to add to power so power + modifierValue (float value) - can be 0
unitList: the same structure as in many other cases able to address
- categrories, category relations using NOT/AND/OR operators (read more here: viewtopic.php?f=216&t=7503),
- can address individual units too,
- and can define exception units

Also you can use TEMPLATE references!
read here: viewtopic.php?f=216&t=8414


Example:

+60% +20 vs buildings
+200% +40 vs fortifications
+700% vs mega buildings
attacking unit, that is in all 3 categories would mean final bonus of +700% +40

Re: Unit Design - Unit Propery sheet - bonuses

Posted: Sat Apr 16, 2022 6:01 am
by Stratego (dev)
so the new value from now: modifierValue
so ucan set bonus not only on "percent" value but scalar number.

Re: Unit Design - Unit Propery sheet - bonuses

Posted: Sat Apr 16, 2022 9:34 am
by makazuwr32
Nice.
Question though:
Can we modify via techs or abilities
Stratego (dev) wrote: Sat Apr 16, 2022 5:56 am
modifierValue: scalar value to add to power so power + modifierValue (float value) - can be 0
It is important.

Also how this new value works — is it still affected by armor same way as normal attack?

Re: Unit Design - Unit Propery sheet - bonuses

Posted: Sat Apr 16, 2022 9:46 am
by Stratego (dev)
makazuwr32 wrote: Sat Apr 16, 2022 9:34 am Nice.
Question though:
Can we modify via techs or abilities

It is important.
I think we can not modify the percentage, this value is handled same way as the percentage value. so i think you can not.
makazuwr32 wrote: Sat Apr 16, 2022 9:34 am Also how this new value works — is it still affected by armor same way as normal attack?
yes same way like:
SumAttackPower = power * bonuspercent + bonusvalue

Re: Unit Design - Unit Propery sheet - bonuses

Posted: Sat Apr 16, 2022 9:48 am
by makazuwr32
I see. Than it is still unusable for our deeds in aof in most cases.
In some cases alas it might actually give our proper balance.