Jump to content


Photo

Use EFF File While on Type (effect 183)


  • Please log in to reply
8 replies to this topic

#1 temnix

temnix
  • Member
  • 983 posts

Posted 15 February 2018 - 10:45 AM

The G3 guide says this effect is non-functional, but it worked for me the second time I tried to use it. The first time I entered NYMPHSU.EFF, the nymph-summoning EFF, and the item type chosen was Small swords, just what I had equipped. This crashed the game. Then I gave it a custom EFF that played a visual, and that did play. Rather than test every nuance, though, I want to ask if others have used this effect and how it works?



#2 -kjeron-

-kjeron-
  • Guest

Posted 15 February 2018 - 01:23 PM

The effect is applied while an item of the specified type is equipped (weapon slots must be selected, but all other equipment slots just need to be filled, "ammo", and I think the "offhand", are always considered "equipped" to this opcode, quick-items slots are never equipped).

The called effect is still limited by it's specific timing mode aspects.  Effects that are always Instantaneous, will still be instantaneous, and end the 183 effect as soon as they trigger.

Called effects that can carry a duration will remain active while the itemtype is equipped. Unequipping the item will terminate the called effect but not 183 effect itself.  Called effects that have early termination conditions (invisibility, deflection, relfection) will be instantly reapplied while the 183 effect is still present.  Using it for invisibility is about the same as the constant invisibility from mislead.

The timing/duration specified in the called effect will not be used in most cases, usually defaulting to 1/0 or 2/0.

Not sure why summoning crashed your game, it doesn't mine.

 

Since it's likely related to your other question about armor: Yes you can assign them new item types, in the EE's.  I combine the two to create penalties when equipping an armor type without proficiency in it, while taking proficiency in them removes the 183 effects that cause the penalties.  Like all new itemtypes, you will need to populate all stores with the new itemtypes so they can buy them.



#3 temnix

temnix
  • Member
  • 983 posts

Posted 16 February 2018 - 12:31 PM

Thanks, kjeron. I had to figure out how this opcode works myself, because there is no telling whether there'll be an answer to one's question here, but that's very informative. I made Heat Metal yesterday. :coolthumb: Are you sure instantaneous secondary effects end 183? Won't they be applied again if the item is put on a second time? And what about the duration of 183 itself? I had the condition "wearing armor" at Instant/Limited, 1 second, because I was only interested in people wearing armor at the time of the casting. I thought that putting 183 at Instant/Permanent etc. would doom them to get in trouble forever if they ever tried wearing armor. Or wasn't it necessary?

 

Speaking of durations, an interesting possibility is to put a Use EFF on Condition inside the first EFF. That's what I had the first time around with summoning, pointing to my tried creature-summoning EFF. Every 6 seconds. But it was weird... creatures flashing into existence but not seen, their footsteps somewhere off-screen...

 

As for armor, it will be easier to patch leather and mage robes to give immunity to Heat Metal.



#4 -kjeron-

-kjeron-
  • Guest

Posted 16 February 2018 - 01:06 PM

I'm sure about Instantaneous effects, but yes opcode 272 can be used to get around some of that limitation.
As for the issue you are seeing with opcode 272: The game is losing track of the "caster/target" and defaulting to spawning them at point [0.0] on the map.  This issue is likely limited to opcodes that can indirectly target a location, as the summoning opcodes do.  For opcode 67, you can set it's (parameter2 = 3) to prevent this.
 
For a spell like Heat Metal, that duration is correct for instantaneous effects (like damage), I think you can even use a 0 duration.  For a durational effect, like a thaco penalty from the pain, you want the 183 effect to have a proper duration (X rounds), not either of the instant/permanent modes, as that will determine the length of the effect - particularly in the case of armor, as you cannot equip/unequip it in combat.



#5 subtledoctor

subtledoctor
  • Modder
  • 656 posts

Posted 16 February 2018 - 01:31 PM

Since it's likely related to your other question about armor: Yes you can assign them new item types, in the EE's.  I combine the two to create penalties when equipping an armor type without proficiency in it, while taking proficiency in them removes the 183 effects that cause the penalties. 

I vaguely recall that several mods look for itemtype 2 to identify armor generally, so changing that could cause incompatibilities.

For armor proficiencies: wouldn't it be simpler to apply the penalties as while-equipped .EFFs and have the proficiency grant 206 protection against the .EFFs? I just implemented an armored casting system that way and it has seemed to be both simple and reliable.

#6 temnix

temnix
  • Member
  • 983 posts

Posted 16 February 2018 - 02:34 PM

For a spell like Heat Metal, that duration is correct for instantaneous effects (like damage), I think you can even use a 0 duration.  For a durational effect, like a thaco penalty from the pain, you want the 183 effect to have a proper duration (X rounds), not either of the instant/permanent modes, as that will determine the length of the effect - particularly in the case of armor, as you cannot equip/unequip it in combat.

 

I found a way to unequip armor. That's going to be an ability for everyone, aside from Heat Metal. To take it off and drop it, but not put anything on. With 183, though, why have a long duration when it's only a trigger/gateway for the actual effects? A THAC0 penalty would be in the EFF and would last some seconds, the 183 that started it doesn't have to remain. At least, I think so. I actually make the EFF do Cast Spell, and then I can make its contents last however long I want.



#7 -kjeron-

-kjeron-
  • Guest

Posted 16 February 2018 - 02:58 PM

I found a way to unequip armor. That's going to be an ability for everyone, aside from Heat Metal. To take it off and drop it, but not put anything on. With 183, though, why have a long duration when it's only a trigger/gateway for the actual effects? A THAC0 penalty would be in the EFF and would last some seconds, the 183 that started it doesn't have to remain. At least, I think so. I actually make the EFF do Cast Spell, and then I can make its contents last however long I want.
You'd only give the 183 a proper duration if the called EFF had the effect itself, as the duration in the EFF is ignored.
If your having the EFF Cast another spell, then you would treat it the same as an instantaneous effect, giving it an instant/limited 0 or 1s duration.

#8 temnix

temnix
  • Member
  • 983 posts

Posted 17 February 2018 - 08:49 AM

All right, thanks.



#9 temnix

temnix
  • Member
  • 983 posts

Posted 24 February 2018 - 12:37 PM

I was told that to make a new item type I'd need a line in ITEMTYPE.2DA. I added a new line with references to the pick-up and drop sounds. I chose a number well below the current end of the line, which is 70-something, hoping it would work. And I chose a slot, too. But apparently I need something more, like another file with a reference to the category name here. Which other file do I also need to extend?