Project MMO

Project MMO

10M Downloads

`nbt_bonuses` In `entities` JSON to Allow For Per-Player XP Bonuses

SomewhatDamaged opened this issue ยท 4 comments

commented

Describe the solution you'd like
nbt_bonuses entry in entities datapack files (specifically for players) to allow for per-player bonuses to XP.

Why is this feature needed
Someone was making some scripted stuff for a modpack, and wanted a way to add bonuses to players when they have done specific things in the pack's progression.

Describe alternatives you've considered
Alternatives include making a curios slot and a custom item for it that cannot be removed and putting the NBT data/WORN on that.

Additional context

Mow2.mp4
commented

I guess the better option, for dynamic bonuses, would just be to have a dict of them in the NBT on the player and be done with it.

commented

The folder pmmo/players/ let's you set configurations per player and includes bonuses. The issue with their implementation is they want those bonuses applied dynamically which isn't how datapacks work.

commented

My concern with this is the duplication of features. There is an API hook specifically for giving bonuses to players. The ideal solution would be to capture when the player logs in, check their origin, and then use this hook to set the bonuses. You could even repeat this hook call when the user changes origins. This particular use case is very compat-focused though.

commented

Ah, fair then.