
Well, that finally annoyed me enough to motivate me to put together a new addon, creatively named Swap Equipment Sets (that's the v1 node page for downloading purposes, since the addon's main page on te4.org, as apparently continues to be case for all recently added addons, is b0rken; here's the Steam page for reference [edit 2025-02-16: The issue has now been resolved.]). Here's how it works:
- Tag all the equipment you want to swap in together with e.g. SET:SetName (for whatever SetName you want your equipment set to be named). You can have as many different sets as your inventory allows.
- In the Swap Equipment Sets dialog (bound by default to <Alt-Shift-X>), your tagged sets should be listed, each with a list of what's in each set. Select your desired swap-in set and click "OK" (or select twice, which is quicker if you're selecting by keyboard).
- And we're off! This will take one turn per item wielded, as usual, so if you're swapping in a lot of stuff at once, make sure you're somewhere safe.
- When swapping is done, check your inventory; you should find that all your tagged stuff is now worn, and the stuff you were previously wearing is in your inventory, tagged with SET:SwapBack (about which more below). Also, if you've enabled the new game option "Gameplay | Show marker for swapped-in equipment", you should now have a status indicator in your buffs display to remind you that you'ee wearing swap-in equipment.
- When you're done with your swap-in equipment and want to put your original equipment back on… well, remember above that all the equipment you swapped out is tagged with SET:SwapBack? That means it's all in the special swap-in set SwapBack, and you can swap it all back in by selecting that set from the dialog. The special tag on your original equipment will be cleared automatically when it's re-wielded.
[And as noted above, I'm filing this in my "experimental" addons category until I'm more confident in its functioning, but once that's sorted out, I don't see any reason why this couldn't go into ZOmnibus or ZOmnibus Lite.]
[Implementation notes:]
Code: Select all
Hooks:
ToME:load [to load our effects and add our keybinding]
GameOptions:generateList [to add our game option]
Superload:
mod.class.Player:
onWear() [to update our tracker effect]
onTakeoff() [to update our tracker effect]
mod.class.Game:
setupCommands() [to add our action to the keybinding]