Changing the hpMax handling in prop changers IMPLEMENTED
-
- Site Admin
- Posts: 15752
- Joined: Fri Apr 25, 2014 9:28 pm
Changing the hpMax handling in prop changers IMPLEMENTED
@Alexander82 @Endru1241
I saw few days/weeks ago that this hpMax handling in propchangers is very not nice in code, as i see it works like
ResultinghpMax = hpMax + (hpMaxNew / 100) * hpMax
or some similar.
i think it is a very inconvenient way using it as on all other properties the property simply added to original one - not multiplying it as percentag (in this cubersome way)
so u would rather change it to be a normal property change like
ResultinghpMax = hpMax + hpMaxNew
Questions are:
Q1: an i do it or you use anywhere in any of the prop changer jsons?
Q2: do u like the idea or u have better?
I saw few days/weeks ago that this hpMax handling in propchangers is very not nice in code, as i see it works like
ResultinghpMax = hpMax + (hpMaxNew / 100) * hpMax
or some similar.
i think it is a very inconvenient way using it as on all other properties the property simply added to original one - not multiplying it as percentag (in this cubersome way)
so u would rather change it to be a normal property change like
ResultinghpMax = hpMax + hpMaxNew
Questions are:
Q1: an i do it or you use anywhere in any of the prop changer jsons?
Q2: do u like the idea or u have better?
Re: Changing the hpMax handling in prop changers
I agree, but I have to ask:
does hpPercent property works and how?
And if not - create something as an alternative, e.g. hpMaxMod, but not with weird calc
ResultinghpMax = hpMax + (hpMaxMod/ 100) * hpMax
, but more logical
ResultinghpMax = hpMax * hpMaxMod
then reversal of the stats would be easier - ResultinghpMax = hpMax / hpMaxMod (on property effect removal).
As far as I know hpMax calculation change on propertyChangers were result of AoS balance change of two building techs: Masonry and Massive Walls.
Previously they were just adding to maxHP, but it was changed, because effect was hard to balance - values were either negligible for Castles or too strong for factories.
BTW: Masonry and Massive Walls are currently the only two using the property.
does hpPercent property works and how?
And if not - create something as an alternative, e.g. hpMaxMod, but not with weird calc
ResultinghpMax = hpMax + (hpMaxMod/ 100) * hpMax
, but more logical
ResultinghpMax = hpMax * hpMaxMod
then reversal of the stats would be easier - ResultinghpMax = hpMax / hpMaxMod (on property effect removal).
As far as I know hpMax calculation change on propertyChangers were result of AoS balance change of two building techs: Masonry and Massive Walls.
Previously they were just adding to maxHP, but it was changed, because effect was hard to balance - values were either negligible for Castles or too strong for factories.
BTW: Masonry and Massive Walls are currently the only two using the property.
Age of Strategy design leader
- phoenixffyrnig
- Posts: 774
- Joined: Fri Nov 29, 2019 1:07 pm
- Location: It changes, frequently.
Re: Changing the hpMax handling in prop changers
If these are the only two that use it the whole thing be simplified to ResultinghpMax=hpMax * 1.5.
Obviously this is no use if you intend to have other modifiers with different percentages.
Obviously this is no use if you intend to have other modifiers with different percentages.
I also play an RTS game called Life
And I also like drinking beer!
And I also like drinking beer!
Re: Changing the hpMax handling in prop changers
No.phoenixffyrnig wrote: ↑Tue Sep 01, 2020 2:53 pm If these are the only two that use it the whole thing be simplified to ResultinghpMax=hpMax * 1.5.
Obviously this is no use if you intend to have other modifiers with different percentages.
There are reasons:
- it would be very bad practice
- other Age of probably use it too
- Masonry is actually updated to give only +34%
- I already wanted to use it on other things and will surely do in the future
Age of Strategy design leader
- makazuwr32
- Posts: 7832
- Joined: Tue Oct 17, 2017 9:29 am
- Location: Moscow, Russia
Re: Changing the hpMax handling in prop changers
Yes we need in aof hp increasing techs which will give plain hp increase, not % based ones.
AoF Dev Co-Leadermakazuwr32 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™.
Re: Changing the hpMax handling in prop changers
I'm sure stratego remembers but I requested that for AoG.
Support new AoS variant, Age of Galaxy: http://ageofstrategy.net/viewforum.php? ... 608408ebc8
All help will be welcome.
All help will be welcome.
- makazuwr32
- Posts: 7832
- Joined: Tue Oct 17, 2017 9:29 am
- Location: Moscow, Russia
Re: Changing the hpMax handling in prop changers
@Stratego (dev) can you make 2 health changing effects?
one will be hpPercent that will work as current one and new one (BonusHpMax for example) that will work as ResultingHpMax = CurrentHpMax + BonusHpMax?
This will make things easier to move.
one will be hpPercent that will work as current one and new one (BonusHpMax for example) that will work as ResultingHpMax = CurrentHpMax + BonusHpMax?
This will make things easier to move.
AoF Dev Co-Leadermakazuwr32 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™.
- Alexander82
- Posts: 7969
- Joined: Thu Feb 26, 2015 8:18 pm
Re: Changing the hpMax handling in prop changers
I think we might just have 2 different properties:
1) hpmax
That would add the hp amount defined in a linear way (e.g. if you set it to 5 , the unit will get +5 maximum health points).
2) hpmaxpercent
That would work as a percentage increase (e.g. if you set it to 20, a unit with 100 hp will get +20 hpmax and a unit with 50 hp will get +10 hpmax, while a unit with 10 hp will get +2 hpmax).
1) hpmax
That would add the hp amount defined in a linear way (e.g. if you set it to 5 , the unit will get +5 maximum health points).
2) hpmaxpercent
That would work as a percentage increase (e.g. if you set it to 20, a unit with 100 hp will get +20 hpmax and a unit with 50 hp will get +10 hpmax, while a unit with 10 hp will get +2 hpmax).
Age of Fantasy design leader
- Alexander82
- Posts: 7969
- Joined: Thu Feb 26, 2015 8:18 pm
Re: Changing the hpMax handling in prop changers
Also this way we might set both in the same file to make the increase easyer to handle (avoiding too big or too low increases).
For example if I set hpmax to 5 it will be a big amount for a unit with 10 hp but it will also be low for a unit with 100 hp. At the same time a 10% increase would be 10 for a unit with 100 hp but just one on a unit with 10 hp.
If i could set a linear increase of +3 hp plus 7% it would be a +3 hp for a 10 hp unit and 10 hp for a 100 hp unit.
For example if I set hpmax to 5 it will be a big amount for a unit with 10 hp but it will also be low for a unit with 100 hp. At the same time a 10% increase would be 10 for a unit with 100 hp but just one on a unit with 10 hp.
If i could set a linear increase of +3 hp plus 7% it would be a +3 hp for a 10 hp unit and 10 hp for a 100 hp unit.
Age of Fantasy design leader
Re: Changing the hpMax handling in prop changers
I think second property is needed, but I am really set on doing it as regular multiplier, so not hpmaxpercent=7, but rather hpmaxmultiplier=1.07.
To avoid weird calculation errors on reversals (e.g. when effect expires).
Those percentage stats are weird, because human mind is weird. When we see -100% we think result needs to be 0 (and thats how it was implemented), while such system has problems with reversing changes.
To avoid weird calculation errors on reversals (e.g. when effect expires).
Those percentage stats are weird, because human mind is weird. When we see -100% we think result needs to be 0 (and thats how it was implemented), while such system has problems with reversing changes.
Age of Strategy design leader
- Alexander82
- Posts: 7969
- Joined: Thu Feb 26, 2015 8:18 pm
Re: Changing the hpMax handling in prop changers
Ok, if that solves the problem is perfectly fine for me
Age of Fantasy design leader
- Alexander82
- Posts: 7969
- Joined: Thu Feb 26, 2015 8:18 pm
-
- Site Admin
- Posts: 15752
- Joined: Fri Apr 25, 2014 9:28 pm
Re: Changing the hpMax handling in prop changers
here i plan these changes (after today publishings)
- hpMax will mean not be percent but fixed value
- (new) hpMaxPercent will work as hpMax worked but with some better, eg as a percentage multiplier (to hpMax value) like 1.2 means + 20% in hpmax. here you can set decreasing too one too ny setting 0.8 meaning hpMax will be 80% of original.
is this plan ok?
- hpMax will mean not be percent but fixed value
- (new) hpMaxPercent will work as hpMax worked but with some better, eg as a percentage multiplier (to hpMax value) like 1.2 means + 20% in hpmax. here you can set decreasing too one too ny setting 0.8 meaning hpMax will be 80% of original.
is this plan ok?
- Alexander82
- Posts: 7969
- Joined: Thu Feb 26, 2015 8:18 pm
-
- Site Admin
- Posts: 15752
- Joined: Fri Apr 25, 2014 9:28 pm
Re: Changing the hpMax handling in prop changers
it is impelented now.