Jump to content


Photo

Dispelling an item's effects


  • Please log in to reply
8 replies to this topic

#1 temnix

temnix
  • Member
  • 983 posts

Posted 24 March 2018 - 05:31 AM

I came across a useful bug recently. It turns out one can remove an item's effects just like a spell's with the Remove Effects by Resource. For this you need to make a spell with the same name as the item, then configure your effects-removing source - spell or item - to target that spell. The spell does not have to be cast, it can be empty. All you need is a matching name for the menu, and the item's effects will be dispelled. This goes for both the abilities of an item and its equipped effects. For example, if you make a spell with the same name as a set of armor, removal will take away the AC bonus and the coloring until the armor is reequipped (though wizard spells stay disabled).



#2 -kjeron-

-kjeron-
  • Guest

Posted 24 March 2018 - 06:36 PM

None of the new immunity/removal by resource opcodes discriminate among source types (318/321/324), nor have opcodes 258/260 ever discriminated among source types.
If you had NI up to date, you would see all spell and item resources in the list, so you would not need to create those empty spell resources.

#3 temnix

temnix
  • Member
  • 983 posts

Posted 25 March 2018 - 04:39 AM

Really? I thought I had the last version. Well, at least I know that Protection from Spell doesn't work if used the same way, I've tried it.



#4 subtledoctor

subtledoctor
  • Modder
  • 656 posts

Posted 25 March 2018 - 06:15 AM

BUT an item's equipping effects can (with a bit of effort) be converted to while-equipped .EFFs. And then opcode 206 works just fine.

#5 temnix

temnix
  • Member
  • 983 posts

Posted 26 March 2018 - 11:03 AM

I didn't mean protection from equipped effects. That seems pointless. If you are making an item, you can just remove the effects or not include them in the first place, but why would you want protection from what you wear? I meant item abilities. I would make an antiwand spell, if wands of sleep and heaven could be blocked.



#6 subtledoctor

subtledoctor
  • Modder
  • 656 posts

Posted 26 March 2018 - 08:32 PM

That seems pointless. If you are making an item, you can just remove the effects or not include them in the first place, but why would you want protection from what you wear?
As I mentioned elsewhere, it can give you a pretty easy way to implement stuff like armored arcane casting according to kit/feat/level/whatever, or "armor proficiency" more generally. Without resorting to mucking about with new itemtypes or opcode 183.
 
I meant item abilities. I would make an antiwand spell, if wands of sleep and heaven could be blocked.
Oh. Well the obvious answer there is to simply change the wand to cast a spell instead of using an item ability.

Edited by subtledoctor, 26 March 2018 - 08:32 PM.


#7 temnix

temnix
  • Member
  • 983 posts

Posted 28 March 2018 - 09:38 AM

Even if you could make someone immune to an item's equipped effects, it still changes their appearance. They still wear a plate mail, only for some reason colored not as steel and leather but as their major color. And if that's okay with you, you could just as well cast an effects-removing spell instead of setting up an immunity.



#8 subtledoctor

subtledoctor
  • Modder
  • 656 posts

Posted 28 March 2018 - 02:27 PM

Well I suppose the equipped apearance is probably hard-coded to happen. Or anyway that's what I would expect.

But converting equipped effects lets you provide immunity selectively. Say,
- Allow bards to be unaffected by the "prevent arcane spellcasting" effects, for leather armors only.
- Give Dragon Disciples the same benefit, and for chain armor as well, but only when they hit 10th level.
- Allow certain characters or kits or whatever to be immune to the effects of this or that cursed item, as appropriate.
- Add special bonuses to armors, but make everybody immune to the bonuses, and then use 321 to selectively cancel the immunity when you get a level/feat/proficiency, so players can get progressively better at using armor.
- Do it with weapons to create proficiency-based bonuses beyond what you can mod with wspecial.2da or stylbonu.2da.

...there's all sorts of stuff you can do.

Edited by subtledoctor, 28 March 2018 - 02:52 PM.


#9 subtledoctor

subtledoctor
  • Modder
  • 656 posts

Posted 03 April 2018 - 08:49 AM

Wait so 321 can cancel, say, the invisibility caused by the Ring of Invisbility?

Excellent.