Jump to content

[Disregard] Why is opcode 272 used for auras instead of using opcode 146 in EE games?


Ulb

Recommended Posts

*edit* To answer my own question: You can't do that because opcode146 will disrupt any spells your character casts, you incredibly dimwitted moron, you just used that effect to stop a character from singing its bard song!

Also, note to self: Stop posting before coffee..

 

So when ever I wanted to build a passive aura or an other repeating effect I've been using opcode 272 to do that. But in the other thread Argent mentioned that opcode 272 is affected by slow/haste and it got me thinking; why not just use opcode 146 instead and have it loop itself?

 

I understand that this kind of stuff was probably a bit straining on the classic engine and that back then the only way to stop the loop would probably have been protection from spell. On the EEs however that seems not to apply anymore.

 

Here is an example for a healing aura:

spell <party only area projectile> with melee effects:
-cast spell <the same spell> <delay/permanent 6s > <target self>
-current hp bonus <x> <instant p.u.d.> <preset target>

The aura is canceled with another spell which you get via the old give/remove switcheroo at the spell effect level.

 

I did some quick testing and this seems to work just fine. So am I missing something or is doing it this indeed a good way to do it in the EE engine?

Link to comment

I'm quite certain that instant casting (param2=1) doesn't interrupt anything? In that case, no particular reason I can think of immediately.

Except, you gotta be careful with infinite nesting like that. I once made a mistake of looping 146 that used multi hit projectile, that was rather amusing to watch for several rounds until I had to close the program in task manager :D.

Link to comment

A delayed 146 is fine for a duration spell, but it cannot be used for permanent auras. Death, Export, Ctrl+R, and (Opcode 17, Param2 BIT16) will all remove it. 272 and 232 can be used with timing mode 9, which is not removed by such. I prefer 232 only because 272 still has stacking issues.

Link to comment

I'm quite certain that instant casting (param2=1) doesn't interrupt anything? In that case, no particular reason I can think of immediately.

Except, you gotta be careful with infinite nesting like that. I once made a mistake of looping 146 that used multi hit projectile, that was rather amusing to watch for several rounds until I had to close the program in task manager :D.

 

Hm, I'll give it a try later and see if it works.

 

A delayed 146 is fine for a duration spell, but it cannot be used for permanent auras. Death, Export, Ctrl+R, and (Opcode 17, Param2 BIT16) will all remove it.

 

That wouldn't be a problem since the character would have the “turn aura off” spell. So you would just have to cast that one once and could then re-cast the aura spell.

Link to comment

After a LOT of experimentation over the last 2 years, I've found that 232 is the way to go for this kind of thing. No stacking issues, no interruption issues, no worries about some condition ending it or causing it to be impossible to end when you need it to, etc. Works for toggleable effects, permanent effects, item equipping effects, whatever. It's very reliable, no-muss-no-fuss.

 

I've been in the process of switching all of my aura-like abilities over to opcode 232, soon they will all use it. (Except for the improved bonus spell slot items, they need to use a different mechanic.)

Link to comment

After a LOT of experimentation over the last 2 years, I've found that 232 is the way to go for this kind of thing. No stacking issues, no interruption issues, no worries about some condition ending it or causing it to be impossible to end when you need it to, etc. Works for toggleable effects, permanent effects, item equipping effects, whatever. It's very reliable, no-muss-no-fuss.

 

I've been in the process of switching all of my aura-like abilities over to opcode 232, soon they will all use it. (Except for the improved bonus spell slot items, they need to use a different mechanic.)

 

In that case I'll take your word for it and do the same. Thanks for the advice :)

Link to comment

All credit goes to kjeron, who helped me make it work really seemlessly:

- 177 effect targeting EA/all

- .eff has 232 effect with condition = "hp < spelcial" and special = "102" and offsets 0x90 and 0x94 left blank

- the resulting .spl has the targeting information and begins with a 321 effect canceling itself. (In pre-EE there is no opcode 321, so you would have to create a custom secondary type and then the first effect would be the opcode that cancels spells with that seccondary type.)

 

It works like a bard song - it kicks in at the end of a round, so there might be a 1-5 second delay the first time you enable it, or when targets come into range if it has a range. But aside from that it's been working great. (And, since I use it to replicate bard songs, this could actually be considered a bonus for being extra faithful in the reproduction. ;) )

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...