Mob Scaling Settings Config Generation
SomewhatDamaged opened this issue ยท 3 comments
Describe the bug
When pmmo-server.toml
is created, the settings for mob scaling ratios is set up badly.
This code:
Produces the following:
[Mob_Scaling.Scaling_Settings]
[Mob_Scaling.Scaling_Settings."Mob Scaling IDs and Ratios"]
[Mob_Scaling.Scaling_Settings."Mob Scaling IDs and Ratios"."minecraft:generic"]
[Mob_Scaling.Scaling_Settings."Mob Scaling IDs and Ratios"."minecraft:generic".max_health]
combat = 0.01
[Mob_Scaling.Scaling_Settings."Mob Scaling IDs and Ratios"."minecraft:generic".attack_damage]
combat = 0.001
[Mob_Scaling.Scaling_Settings."Mob Scaling IDs and Ratios"."minecraft:generic".movement_speed]
combat = 1.0E-5
Note the ."minecraft:generic"
in the 3rd key down and the ."minecraft:generic".attack_damage
and the like in the deeper keys.
Expected behavior
It should produce this, I believe:
[Mob_Scaling.Scaling_Settings]
[Mob_Scaling.Scaling_Settings."Mob Scaling IDs and Ratios"]
[Mob_Scaling.Scaling_Settings."Mob Scaling IDs and Ratios"."minecraft:generic.max_health"]
combat = 0.01
[Mob_Scaling.Scaling_Settings."Mob Scaling IDs and Ratios"."minecraft:generic.attack_damage"]
combat = 0.001
[Mob_Scaling.Scaling_Settings."Mob Scaling IDs and Ratios"."minecraft:generic.movement_speed"]
combat = 1.0E-5
To Reproduce
Steps to reproduce the behavior:
- Try to edit any of the default values, even to
0.0
- They do nothing because it isn't reading them
- Cry in a corner as a warp-zombie pwns you
Versions:
All rework version
Additional context
Pattern analysis.
This is unfortunately an issue with TOML. Because MC uses a period within the ID path, these specific strings get parsed by TOML into separate period-delimited elements. The only fix is to ensure you have your quotations in the correct place.