Author Topic: Attack Boost Stats are saved incorrectly  (Read 705 times)

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
Attack Boost Stats are saved incorrectly
« on: 3 December 2013, 15:08:48 »
I noticed that when you save while a unit is receiving boosted stats, that boost is saved as the unit's base stats, so that when the game is reloaded those boosts become permanent, even once the unit leaves the boost radius. This also means that while that unit returns to the same boost radius, another boost is applied on top of the previous (now permanent) boost.

For Example:

Unit A Base Armor: 50

Unit A is in an Attack boost radius so: 50+50

Save game

When reloaded Unit A Base Armor: 100 (should be 50)

After saving, when Unit A is in the Attack boost radius: 100+50

When Unit A leaves boost radius armor returns to 100 (should return back to 50)

Unit A now permanently have more armor than it should.

Extra Computer Info:

Laptop Windows 7, 8 gigs ram, Nvidia Geforce card,  Intel I7
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: Attack Boost Stats are saved incorrectly
« Reply #1 on: 5 December 2013, 00:10:17 »
Established! This can be reproduced very good withthe prax mod. Once you start up a normal game, workers in range of the priest have a speed upgrade. Look at the workers walk speed, its 190+75.
Now save this game state and load the game again. The result is you get a worker with a move skill of 190+150. If the priest is in range ( which was the case when you saved the game)  it's 190+150. Let the priest walk out of range and the worker shows 190+75 permanent now.
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile