Unselecting weapon abilities... or unequipping weapons
chimeric
Member Posts: 1,163
I think this deserves a separate topic. I'd like to hear what people have to say about making a weapon harmless and not used, even though it's equipped, or about unequipping it with a reference to a slot rather than a specific Strref. I'm interested in a universal solution, something to make characters not hold their weapons, by hook or by crook. And I'm interested because I'm working on a mechanic that makes characters do something in certain situations if they have a weapon equipped and selected. I've patched weapons with while-equipped spell states to let the engine know just what a character is wielding. But it's important to give players a way to quickly "disable" the weapon if they want to avoid the automated response at a particular time. Turning the whole ability off from the special bar is going to take an action, it's going to take time - mostly because anything counts towards the one spell per round limit, unless the character is constantly under "Aura Cleared." It's quite necessary to have some on-the-go weapons-off mechanic, but, as you know, weapons can't be "unselected" except by going to the inventory to drop them by hand (too bothersome) or by switching to a fist (which forces a character to keep one weapon slot empty, and many classes only have two to begin with). I don't care if the weapons still show, so long as they are not considered held.
I don't know if that's possible. But I've tried running a script on Minsc with a throwing axe. Those axes have two abilities, so probably 0 and 1. I thought that if I told the engine to use a non-existing ability, the weapon might be tucked away somehow. I've seen something like that happen after spells that create magical weapons; after they wear off, none of the character's arms are selected.
This gave me some hope, because no weapon seemed to be selected, but Minsc attacked Shar-Teel for slashing damage, so the axe was there... Now I'm leaning towards creating a blank magical weapon for 1 second, to eclipse what's actually equipped with its spell state, but maybe you know a better way? Also I don't understand why the axe shows in the game as having two abilities, and they can be selected, and the axe somehow reacts to this script, but the edited quarterstaff with an added Melee ability does none of that.
I don't know if that's possible. But I've tried running a script on Minsc with a throwing axe. Those axes have two abilities, so probably 0 and 1. I thought that if I told the engine to use a non-existing ability, the weapon might be tucked away somehow. I've seen something like that happen after spells that create magical weapons; after they wear off, none of the character's arms are selected.
SelectWeaponAbility(SLOT_WEAPON0,1)
Wait(1)
SelectWeaponAbility(SLOT_WEAPON0,1)
Wait(1)
SelectWeaponAbility(SLOT_WEAPON1,1)
Wait(1)
SelectWeaponAbility(SLOT_WEAPON2,1)
Wait(1)
SelectWeaponAbility(SLOT_WEAPON0,2)
Wait(1)
SelectWeaponAbility(SLOT_WEAPON0,2)
Wait(1)
SelectWeaponAbility(SLOT_WEAPON1,2)
Wait(1)
SelectWeaponAbility(SLOT_WEAPON2,2)
Wait(1)
Attack("sharteel")
This gave me some hope, because no weapon seemed to be selected, but Minsc attacked Shar-Teel for slashing damage, so the axe was there... Now I'm leaning towards creating a blank magical weapon for 1 second, to eclipse what's actually equipped with its spell state, but maybe you know a better way? Also I don't understand why the axe shows in the game as having two abilities, and they can be selected, and the axe somehow reacts to this script, but the edited quarterstaff with an added Melee ability does none of that.
0
Comments
OR
SelectWeaponAbility(SLOT_FIST,0)
Ability target 7, you mean Caster-no-animation? I use it sometimes... So I can cast those any number of times in a row?
One limitation of SelectWeaponAbility() is that it will not work if you have a Magically Created or Cursed weapon equipped, as those cannot be switched out, but I don't think that is an issue given what your trying to accomplish, or at least one that can be worked around. Yes, even while the game is paused.
Monks have "MFIST1.ITM" through "MFIST8.ITM" in their SLOT_FIST.
Every empty quick-weapon slot (SLOT_WEAPON0 - SLOT_WEAPON3) defaults to using whatever item is in SLOT_FIST.