Unit Design - Unit Propery sheet - bonuses

Post Reply
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Unit Design - Unit Propery sheet - bonuses

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

Re: Unit Design - Unit Propery sheet - bonuses

Post by Stratego (dev) »

so the new value from now: modifierValue
so ucan set bonus not only on "percent" value but scalar number.
User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Unit Design - Unit Propery sheet - bonuses

Post 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?
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 - bonuses

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

Re: Unit Design - Unit Propery sheet - bonuses

Post 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.
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
Post Reply

Return to “Unit Design”