File Details
HyWeaponVariants-0.0.95.jar
- R
- Mar 15, 2026
- 338.37 KB
- 300
- Early Access
File Name
HyWeaponVariants-0.0.95.jar
Supported Versions
- Early Access
[0.0.95]
Salvager workbench behavior and cache handling improvements, Builder's Workbench fix, shield on-block/on-bash support, and new variants and special effects.
What we added (new features)
- Shield on-block and on-bash — Shields with variants now support separate on-bash (offensive hit when you bash) and on-block (counter when you block an attacker) triggers. Each rolled variant can be bash-only, block-only, or both; configurable via
shieldBashTriggerChanceandshieldBlockTriggerChance. Tooltips show "On bash (enemy):" and "On block (attacker):" for the relevant effects. - New variants and special effects — Additional variants and special attack options added to the pool; configurable in
variantPoolandspecialAttacksin config.
What we changed (behavior / improvements)
- Salvager cache — Cache entries are no longer removed when you restore a weapon (take it back). They are only removed when the weapon is fully salvaged (recipe completed and item no longer in your inventory), or after a short deferred cleanup.
- Deferred cleanup — When you close the Salvager, removal of “unused” cache entries is delayed by 2 seconds so inventory events (e.g. game returning the item) can run first and restore the variant before we decide the weapon was salvaged.
- usedKeys — Restored weapons are marked as “used” so the same cache entry is not applied twice; keys are cleared when appropriate (on close when nothing is deferred, or when a new weapon is placed in the same Salvager slot) so the next take-back or reopen works correctly.
What we fixed (bug fixes)
- Builder's Workbench — Fixed weapons and items losing or rerolling their variant when used in the Builder's Workbench. The mod now detects the Builder's Workbench window and suppresses variant application there; an
is_rolledsentinel prevents a fresh roll when the workbench returns or recreates the item stack. - Salvager take-back — Fixed weapons getting a different variant or being rerolled when you take them back from the Salvager (e.g. move from Salvager slot to hotbar or close the UI with the weapon in inventory). Variant is now restored from cache instead of triggering a new roll.
- “No cache match” after close — Fixed the cache being removed too early when the Salvager closed before the game had returned the item to your inventory; deferred removal gives tryRestore time to run and restore the variant.
- Move to hotbar — Fixed the weapon being rerolled when moving it from the Salvager workbench slot into a hotbar slot (same session or after reopening). Cache key is now matchable again when you put a (new) weapon in the same slot, and usedKeys are cleared when nothing is deferred on close.
- Shield bash and block — Fixed shield variant effects (damage scaling, on-hit-style effects) not applying correctly on bash and block; shield detection and trigger assignment (bash/block per variant) now work as intended so counter-attacks and bash damage use the shield's variant.