Project MMO

Project MMO

11M Downloads

1.21 - Some PMMO Scripts still not working.

Silvertide7 opened this issue ยท 9 comments

commented

Describe the bug
When trying to configure pmmo with .pmmo scripts I ran into some issues:

  1. 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!

  1. 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
commented

Vein charge is per-half-tick, so that's intentional. I'll update the wiki to reflect this. The perks thing I'll investigate.

commented

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.

Image

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.

commented

follow-up i tested a world with and without an additional datapack containing a perks.json and my results were the same.

commented

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.

commented

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

The Attributes for 1.21.1

commented

Oh, good catch, I thought it happened sooner.

commented

In 1.21, Mojang dropped the "generic." Part. Double check the wiki for all of the updated attribute IDs.

commented

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?

commented

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.

Image

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