Skip to content

Add item generator support for buffs/penetration, mob equip command, -noenchants#338

Open
Travja wants to merge 1 commit into
split/09-stat-foundation-buffs-penetrationfrom
split/12-item-generator-ux
Open

Add item generator support for buffs/penetration, mob equip command, -noenchants#338
Travja wants to merge 1 commit into
split/09-stat-foundation-buffs-penetrationfrom
split/12-item-generator-ux

Conversation

@Travja

@Travja Travja commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Split out of #320 (piece 12/12 — stacked on #335, review that one first; independent of #336/Fabled-hook PR).

Item Generator UX built on the new damage/defense % buff and penetration stats from #335:

  • DuplicableStatGenerator rolls damage buffs, defense buffs, and penetrations independently (own config sections, auto-populated), mirroring how damage/defense types already roll.
  • StatCategoryGUI is a new intermediate editor menu (General / Damage% / Defense% / Penetration) so the item-stats editor doesn't have to cram every stat type into one flat list.
  • StatGUI/StatListGUI gain a per-entry "icon material" cosmetic field and support browsing arbitrary sub-sections (not just the default list path), which the new stat categories need.
  • New /<module> mobequip command (MMobEquipCmd) equips a generated item onto a mob, targeted by UUID or ray-trace — useful for gearing up bosses.
  • /<module> drop and /<module> give gain a -noenchants flag (LoreUT#removeEnchants strips enchants from both NBT and lore so the placeholder lore stays clean).

Also fixes an accidental duplicate of the %GENERATOR_DAMAGE_BUFFS%/%GENERATOR_DEFENSE_BUFFS%/%GENERATOR_PENETRATION% lore placeholder lines in the default item_generator common.yml (each was listed twice).

Backward compatibility

The new generator config sections (list-damage-buffs, list-defense-buffs, list-penetration) follow the same addMissing-based auto-population pattern already used for every existing stat type, so custom item generator configs pick them up automatically like any other plugin update — no special migration needed.

One thing that's not auto-migrated, deliberately: the new lore placeholders only appear in the freshly-extracted default common.yml. A server with an already-extracted, hand-customized common.yml (or other item templates) won't get them injected automatically — lore arrays are admin-curated, and forcibly splicing into them risked corrupting existing formatting/ordering. Admins who want the new placeholders on existing templates need to add them manually (same as any other new lore placeholder added over the plugin's history).

…-noenchants

Item Generator UX built on the new damage/defense % buff and
penetration stats:
 - DuplicableStatGenerator rolls damage buffs, defense buffs, and
   penetrations independently (own config sections, auto-populated),
   mirroring how damage/defense types already roll.
 - StatCategoryGUI is a new intermediate editor menu (General /
   Damage% / Defense% / Penetration) so the item-stats editor doesn't
   have to cram every stat type into one flat list.
 - StatGUI/StatListGUI gain a per-entry "icon material" cosmetic field
   and support browsing arbitrary sub-sections (not just the default
   "list" path), which the new stat categories need.
 - New /<module> mobequip command (MMobEquipCmd) equips a generated
   item onto a mob, targeted by UUID or ray-trace — useful for gearing
   up bosses.
 - /<module> drop and /<module> give gain a "-noenchants" flag
   (LoreUT#removeEnchants strips enchants from both NBT and lore so
   the placeholder lore stays clean).

Also fixes an accidental duplicate of the %GENERATOR_DAMAGE_BUFFS%/
%GENERATOR_DEFENSE_BUFFS%/%GENERATOR_PENETRATION% lore placeholder
lines in the default item_generator common.yml (each was listed
twice).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants