1.21 - Some PMMO Scripts still not working.
Silvertide7 opened this issue ยท 9 comments
Describe the bug
When trying to configure pmmo with .pmmo scripts I ran into some issues:
- When setting vein charge on an item it applies twice the amount:
item(iron_sword)
.vein_charge(1.5)
.vein_capacity(30)
.deal_damage(minecraft:player_attack).award(combat,10);
The combat award now works as expected, which is great! The vein charge is coming in at 3 vein / s instead of 1.5 though. Vein capacity seems to work fine!
- Perk scripts are not working at all as far as I can tell
I tried to do something very simple, most of it straight from the website:
WITH config(perks)
set(clear_all); //removes all perks from defaults before we start adding our own. not required.
set().event(SKILL_UP)
.perk("pmmo:fireworks")
.skill(mining);
END
No fireworks fire off though. I've tried with and without quotations. I've also tried with "pmmo:attribute" but that isn't applying either.
Expected behavior
Scripts to correctly configure pmmo
Versions:
- Minecraft: 1.21.1
- Loader: Neoforge - 21.1.162
- PMMO: 1.21.1-2.6.30
Vein charge is per-half-tick, so that's intentional. I'll update the wiki to reflect this. The perks thing I'll investigate.
I am unable to reproduce this error. see the screenshot of the script and the glossary of only one perk. I also tested that i get fireworks when i level up prior to opening the glossary.
Do you by chance happen to have a perks.json config file in any of your datapacks? if so would removing that or clearing it out resolve the issue on your end? If this is the cause, i'd like to investigate why. It expect the script to override the datapacks, but that may not be what's actually happening.
follow-up i tested a world with and without an additional datapack containing a perks.json and my results were the same.
Hmm, I did get the firework to work fine after some finagling. It might be that I'm having trouble getting the pmmo attribute perk to trigger.
I am trying to do:
WITH config(perks)
set(clear_all);
set().event(SKILL_UP)
.perk("pmmo:attribute")
.skill(constitution)
.attribute("minecraft:generic.health")
.perLevel(1.0)
.maxBoost(5.0);
END
With no success. I've also tried .per_level and .max_boost but that didn't work either.
In 1.21, Mojang dropped the "generic." Part. Double check the wiki for all of the updated attribute IDs.
That was changed 1.21.2
In 1.21, Mojang dropped the "generic." Part. Double check the wiki for all of the updated attribute IDs.
Vein charge is per-half-tick, so that's intentional. I'll update the wiki to reflect this. The perks thing I'll investigate.
Also, by per half tick, do you mean per 10 ticks == per half second?
Hmm, I did get the firework to work fine after some finagling. It might be that I'm having trouble getting the pmmo attribute perk to trigger. I am trying to do:
WITH config(perks) set(clear_all); set().event(SKILL_UP) .perk("pmmo:attribute") .skill(constitution) .attribute("minecraft:generic.health") .perLevel(1.0) .maxBoost(5.0); ENDWith no success. I've also tried
.per_leveland.max_boostbut that didn't work either.
Seems to be working for me.
Note: the Glossary doesn't seem to like skill names that aren't defined in pmmo-Skills.json
Note2: the /pmmo admin <name> add [...] command at the moment doesn't trigger perks to fire. I have a fix for this PRed: #690

