Project MMO

Project MMO

10M Downloads

Attributes Keep Their Original Values After Changing Per-Level In Perks

DootLoot opened this issue ยท 5 comments

commented

Describe the Bug
Changing Per-Level and starting the game again slowly increased the default generic.movement_speed using attribute command

Expected Behavior
generic.movement_speed resets on loading, then scales to level based on perk

To Reproduce

  1. Set agility to level 50
  2. close the game
  3. increase Per-Level in Agility skill up for the speed attribute
  4. open the world
  5. Set agility to level 0

Version
Minecraft (1.19.2)
Forge (43.2.0)
PMMO (2.1.5)

commented

I am not sure what you are describing. could you elaborate? can you also share your pmmo-perks.toml

commented

when i was changing the values for speed using per_level, changing the value changes how much of a boost the perk gives you, but changing it to a number smaller then the original and then decreasing your level causes the mod to decrease the attribute by the new value, which causes the generic stats to be higher then the default vanilla value at level 0. This can also happen the other way around too.
pmmo-Perks_file.txt

commented

what happens when you reach level 1 though? i'm thinking level zero is just creating a mathematical anomaly that wouldn't appear outside of testing/configuring.

commented

it just leaves the value above the default due to the math anomaly, so the generic is left higher then it should be when it scales up again

commented

I have followed the instructions you gave and tested a few cases of my own. I am not able to replicate this issue. These are the steps i tool while testing

  1. create new world with fresh configurations
  2. set agility level to 50
  3. use /attribute command to view modifier
  4. close game
  5. set per_level in config to 0.000000035 (a smaller number than the default)
  6. open game and world and use /attribute command to see value still the same
  7. set agility to zero
  8. use /attribute command to view modifier and confirm value is removed.
  9. set agility to lvl 50 again
  10. use /attribute command to see value set to new per_level-scaled value
  11. close game entirely
  12. set per_level in config to 0.005 (larger than the default)
  13. open game and use /attribute command to view modifier is same as before closing
  14. set agility to zero
  15. use /attribute command to view modifier and confirm it is at zero
  16. set agility to 50
  17. use /attribute command to see modifier is now scaled off the new per_level

Based on this testing, everything is working as intended. Is there an aspect i missed?