Elemental Belt Auto Equip - shastaxc/silver-libs GitHub Wiki

Handles all the logic you need to determine when to equip Hachirin-no-Obi or Orpheus's Sash. Calculates which option is better and equips it automatically when you cast a spell. Currently works for these actions:

  • Elemental WS
  • Elemental Magic (excluding Impact, Meteor, Helix, Elemental Enfeebles such as Burn)
  • Quick Draw (excluding Light Shot and Dark Shot)
  • Blue Magic (only these spells: 'Anvil Lightning','Blazing Bound','Bomb Toss','Cursed Sphere','Droning Whirlwind', 'Embalming Earth','Entomb','Firespit','Foul Waters','Ice Break','Leafstorm','Maelstrom', 'Molting Plumage','Nectarous Deluge','Regurgitation','Rending Deluge','Scouring Spate', 'Silent Storm','Spectral Floe','Subduction','Tem. Upheaval','Water Bomb')
  • Elemental Ninjutsu
  • Drain
  • Aspir

Implementation

See the Installation page for details on first steps if you have not yet installed SilverLibs into your job lua. To implement this specific feature:

If Using Mote Libs

If the specified functions already exist, just put the silibs part inside of it in the appropriate spot. Please add the following:

function job_setup()
  has_obi = true -- Change if you do or don't have Hachirin-no-Obi
  has_orpheus = true -- Change if you do or don't have Orpheus's Sash

  silibs.enable_elemental_belt_handling(has_obi, has_orpheus)
end

It is better if you set up the has_obi and has_orpheus variables in a global character file so you don't have to copy this into every job's file. Make sure to update the value from true to false if you don't actually own the item or it will not calculate properly.

If Using Selindrile Libs

If the specified functions already exist, just put the silibs part inside of it in the appropriate spot. Please add the following in your char_job_gear.lua file:

function user_job_setup()
  has_obi = true -- Change if you do or don't have Hachirin-no-Obi
  has_orpheus = true -- Change if you do or don't have Orpheus's Sash

  silibs.enable_elemental_belt_handling(has_obi, has_orpheus)
end

It is better if you set up the has_obi and has_orpheus variables in a global character file so you don't have to copy this into every job's file. Make sure to update the value from true to false if you don't actually own the item or it will not calculate properly.

Advanced Settings

Conditional Swap

You can specify an optional function that must evaluate to true in order for the belt swap to occur. For example, on a PLD if you only want swaps to occur when you have DefenseMode turned off:

silibs.enable_elemental_belt_handling(has_obi, has_orpheus, function()
  return state.DefenseMode.value == 'None'
end)

Known Limitations

Does not have any logic to handle the individual element obis such as Korin Obi, which can provide slightly more optimized results.

There is currently no way to make exceptions to the rule, so if you really need to ensure the belt does not swap to Hachirin-no-Obi or Orpheus's Sash for whatever reason, you may not want to use this feature. I am planning a future update where you can specify a list of spells to exclude from this belt auto-equip feature.