Author Topic: Simple override for default levels  (Read 1516 times)

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Simple override for default levels
« on: 11 July 2011, 22:40:42 »
Since you can specify that stats for leveling up (eg, you might want it to gain a 1.25x multiplier for attack after 8 kills), the old system (1.5x hp, 1.5x ep, 1.2x sight, 1.5x armor) is should generally not be used if you are specifying custom levels. Because of the large number of mods which may depend on this "faulty" combination of both the default and their specified custom leveling, we cannot just disable the old system when specifying which stats to raise and by how much when leveling.

I propose a new tag such as <disable-default-levels value="true" /> as a child for the <level> tag (sibling to the static-modifier and multiplier tags). If true, the default leveling will NOT take place. If false, it will take place in addition to whatever you specify, unless you override them with:
Code: [Select]
<multipliers>
          <max-hp value="1" />
          <max-ep value="1" />
          <sight value="1" />
          <armor value="1" />
</multipliers>
As it is, if you wish to disable to default system, you must specify this multiplier above, as it will override the defaults then. The implementation of a <disable-default-levels value="true" /> tag would be a cleaner alternative to disable to default levels, as well as hopefully reduce the number of modders who may be surprised to find the default is combined with their custom chosen stat increases.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Simple override for default levels
« Reply #1 on: 13 July 2011, 13:13:03 »
Since you can specify that stats for leveling up (eg, you might want it to gain a 1.25x multiplier for attack after 8 kills), the old system (1.5x hp, 1.5x ep, 1.2x sight, 1.5x armor) is should generally not be used if you are specifying custom levels. Because of the large number of mods which may depend on this "faulty" combination of both the default and their specified custom leveling, we cannot just disable the old system when specifying which stats to raise and by how much when leveling.

The 'old system' stats aren't used if you use 'new style' enhancements. At least, they are not meant to be.
Glest Advanced Engine - Code Monkey

Timeline | Downloads

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Simple override for default levels
« Reply #2 on: 13 July 2011, 18:23:09 »
The 'old system' stats aren't used if you use 'new style' enhancements. At least, they are not meant to be.
Hmm, is this is the state now? I haven't actually tested in forever, though when they were initially released, they didn't override the defaults. I'll have to give it a try.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Simple override for default levels
« Reply #3 on: 14 July 2011, 03:20:39 »
I just did a quick test and can confirm that the defaults are used automatically, upon investigation of the code I discovered your request has been filled already, the attribute is 'defaults' and should be false to turn off the default stats.
Code: [Select]
   <level name="test_level" kills="2" defaults="false">
Glest Advanced Engine - Code Monkey

Timeline | Downloads

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Simple override for default levels
« Reply #4 on: 15 July 2011, 05:19:18 »
I just did a quick test and can confirm that the defaults are used automatically, upon investigation of the code I discovered your request has been filled already, the attribute is 'defaults' and should be false to turn off the default stats.
Code: [Select]
   <level name="test_level" kills="2" defaults="false">
Ah thank you Silnarm, and whomever implemented it before I got a chance to request it. :D I'll add it to the wiki. Done, it's on the GAE/Custom Levels page as well as XML/Unit.
« Last Edit: 18 June 2016, 12:57:56 by filux »
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert