News:

If you are a developer, please build MegaGlest on your own and get in touch to contribute (or post your patches on the forums).

Main Menu

Bugs for the percentage upgrades

Started by RobotKiller001, 27 November 2020, 19:17:23

RobotKiller001

I found this bug doing some exsperiments with the Upgrades, and when I put a percentage value it doesn't work correctly, infact sometimes the value added doesn't matches with the value on the unit.
for exemple on an Archer(tech) with 700 hp, the description of the upgrade says that it increases his life by 10%, but instead gives him like 3 hp and i'm so confused LOL., same for the damage Upgrades.
But this problem doesn't appear on all units.
Working on Megaglest Improved Mod.

titi

Do you still have trouble with this ? Is it really a bug? If you think so please show us an example xml.



Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

RobotKiller001

The script i used for the percentage valor its this:

<upgrade>
   <image path="images/upgrade_healthpoints.png"/>
   <image-cancel path="../images/upgrade_cancel.bmp"/>
   <time value="20"/>
   <unit-requirements/>
   <upgrade-requirements/>
   <resource-requirements/>
   <effects/>
   <max-hp value="10" value-percent-multiplier="true"/>
   <max-ep value="0"/>
   <sight value="0"/>
   <attack-strenght value="0"/>
   <attack-range value="0"/>
   <armor value="0"/>
   <move-speed value="0"/>
   <production-speed value="0"/>
</upgrade>
Working on Megaglest Improved Mod.

titi

#3
https://docs.megaglest.org/index.php?title=XML/Upgrade#max-hp

What you wanted to do is:
<max-hp value="110" value-percent-multiplier="true"/>

this will do +10%  ( because it's 110% of the original value )



Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios