The old ALTER_SPELL_EFFECT and CLONE_SPELL_EFFECT functions document this behavior - it's retained in the new ALTER_EFFECT and CLONE_EFFECT functions, just not documented:
ALTER_SPELL_EFFECT: patch effects on spells. This is a PATCH function. All integer variables except check_globals, check_headers, header and savebonus default to -1 and negative values result in no change to the corresponding field. The integer variables check_globals and header default to 0. The integer variable check_headers defaults to 1. The integer variable savebonus defaults to -11 and values lower than -10 result in no change to the corresponding field. The string variable resource defaults to the string "same", which results in no change to the corresponding field.
(it would break LOTS of mods that might not still be maintained).
Even if it did break old mods, Weidu reloads it's internal functions for every component, so if the new function was released in a *.tpa file, it could be INCLUDED in the ALWAYS block of any mod that wants to use it, and others would still default to the internal function.
I'm not sure how it would break old mods though - unless they were actually specifying useless negative values in the function call.
Allow me to petition you all for help in using op code 177. I don't know what i'm doing wrong but I can't get the effect to activate or properly target. the idea is a ring that will unsummon any creatures that the caster has summoned. I've posted a screen shot here of the creature im targeting, the IDS table im referencing, the effect im using, the item effect, and the item itself. send help.
P.S. I was successful in getting the unsummon effect to work on a single creature and even a group. (not w/ multiple actions) But, I ran into issues that other NPCs would get unsummoned as well, so Im using 177 to specify the targeting even more.
@Cirdan
There is no mechanic to target only the summons of a specific caster.
A summoned creature does know who summoned it, up until you save&reload, at which point the information is lost, but any interaction with this knowledge would have to run through the summon's AI scripts.
Other than that a summoned creature is either an "ALLY" or an "ENEMY", the game doesn't keep track of their ownership any further than that.
You could target all summons that are allies of the caster by giving the item ability the projectile "INAREAPA" #158.
Allow me to petition you all for help in using op code 177. I don't know what i'm doing wrong but I can't get the effect to activate or properly target. the idea is a ring that will unsummon any creatures that the caster has summoned. I've posted a screen shot here of the creature im targeting, the IDS table im referencing, the effect im using, the item effect, and the item itself. send help.
P.S. I was successful in getting the unsummon effect to work on a single creature and even a group. (not w/ multiple actions) But, I ran into issues that other NPCs would get unsummoned as well, so Im using 177 to specify the targeting even more.
I have a few non script ideas. My mod knowledge is a bit off, so I hope @kjeron let's me know if I utter an impossibility
Okay, let's start from the beginning. Sorry, I can't see the screen shots with my dumb phone so I'm not sure exactly what you are trying to do. I have a few interpretations and some ideas that should work for any of them, with suitable modifications. Just in case I'm grossly misinterpreting you, I'll set my cards on the table.
I'm assuming here that either 1) the ring unsummons creatures summoned by a particular npc (e.g. Jon Irenicus(sp)) Or 2) it unsummons creatures summoned by the wearer of the ring. Another 3) possibility that just occurred to me is that the ring may summon creatures and also allow the user to unsummon those specific creatures (would be pretty useful if the ring summoned a hostile demon, for example). All of these are possible, I think.
If, so, you could do something like this.
a) I'm designating "spell A" as the spell that unsummons the creatures (i.e. that will be cast by the ring).
b) The ring should cast spell A using effect 148 as it's unsummon ability
c) I'm designating "spell B" as the spell that protects against spell A (using say effect 318)
d) I'm designating "spell C" as the spell that removes spell B. It needs to be cast using a projectile that covers a large enough area that would affect all creatures just summoned in that area, but not much bigger. See note 2 after step two
Step one: regexp glob all summoned creatures and apply spell B to them (with timing permanent after death)
Step two: you need to alter all relevant summoning spells to cast spell C after summoning it's creatures, if and only if the relevant creature casts that spell (hopefully targeting just summoned creatures). The idea here is to remove that protection from Spell A from all creatures the relevant creatures summons just after they summon them (i.e. in the very spell that
Note 1: This is likely the most tricky step and how to proceed depends on what you want to do. I think that the easiest way to do it would be to create a unique spell state and apply it to that creature (either as an on equip effect of the ring, or by applying it to the specific npc or creature) and then set it( using 326) so that only creatures with the given unique spell state cast the subspell. . It's easier If the ring only unsummons cretures that it summons itself. In that case, you just need to it to cast a 148 that applies spell C after it casts the summoning spell.
Note 2: a problem with this method is that it will still affect summoned creatures that are nearby when the relevant creatures are summoned. You can protect from this somewhat (e.g. by adding 318 effects protecting enemies or allies of source to the beginning of spell C) but you likely can't protect against it completely. You should also try to be sure that the projectile you choose is only covers enough area to affect your just summoned creatures but not more than that.
Comments
How? I mean, apart from checking for STATE_CONFUSED separately (i.e., using 2 additional opcode[#318] just for 'STATE bit_eq STATE_CONFUSED'.....)
Anyway, isn't that equivalent to ?
I see, so ADD_SPELL|ITEM_EFFECT aren't affected by this issue, right? If so, I need to edit my bug report......
Yes, I created one here.....
Anyway, as you said, the problem is restricted to CLONE and ALTER (not ADD....)
I'm not sure how it would break old mods though - unless they were actually specifying useless negative values in the function call.
Will be documented......
P.S. I was successful in getting the unsummon effect to work on a single creature and even a group. (not w/ multiple actions) But, I ran into issues that other NPCs would get unsummoned as well, so Im using 177 to specify the targeting even more.
There is no mechanic to target only the summons of a specific caster.
A summoned creature does know who summoned it, up until you save&reload, at which point the information is lost, but any interaction with this knowledge would have to run through the summon's AI scripts.
Other than that a summoned creature is either an "ALLY" or an "ENEMY", the game doesn't keep track of their ownership any further than that.
You could target all summons that are allies of the caster by giving the item ability the projectile "INAREAPA" #158.
I have a few non script ideas. My mod knowledge is a bit off, so I hope @kjeron let's me know if I utter an impossibility
Okay, let's start from the beginning. Sorry, I can't see the screen shots with my dumb phone so I'm not sure exactly what you are trying to do. I have a few interpretations and some ideas that should work for any of them, with suitable modifications. Just in case I'm grossly misinterpreting you, I'll set my cards on the table.
I'm assuming here that either 1) the ring unsummons creatures summoned by a particular npc (e.g. Jon Irenicus(sp)) Or 2) it unsummons creatures summoned by the wearer of the ring. Another 3) possibility that just occurred to me is that the ring may summon creatures and also allow the user to unsummon those specific creatures (would be pretty useful if the ring summoned a hostile demon, for example). All of these are possible, I think.
If, so, you could do something like this.
a) I'm designating "spell A" as the spell that unsummons the creatures (i.e. that will be cast by the ring).
b) The ring should cast spell A using effect 148 as it's unsummon ability
c) I'm designating "spell B" as the spell that protects against spell A (using say effect 318)
d) I'm designating "spell C" as the spell that removes spell B. It needs to be cast using a projectile that covers a large enough area that would affect all creatures just summoned in that area, but not much bigger. See note 2 after step two
Step one: regexp glob all summoned creatures and apply spell B to them (with timing permanent after death)
Step two: you need to alter all relevant summoning spells to cast spell C after summoning it's creatures, if and only if the relevant creature casts that spell (hopefully targeting just summoned creatures). The idea here is to remove that protection from Spell A from all creatures the relevant creatures summons just after they summon them (i.e. in the very spell that
Note 1: This is likely the most tricky step and how to proceed depends on what you want to do. I think that the easiest way to do it would be to create a unique spell state and apply it to that creature (either as an on equip effect of the ring, or by applying it to the specific npc or creature) and then set it( using 326) so that only creatures with the given unique spell state cast the subspell. . It's easier If the ring only unsummons cretures that it summons itself. In that case, you just need to it to cast a 148 that applies spell C after it casts the summoning spell.
Note 2: a problem with this method is that it will still affect summoned creatures that are nearby when the relevant creatures are summoned. You can protect from this somewhat (e.g. by adding 318 effects protecting enemies or allies of source to the beginning of spell C) but you likely can't protect against it completely. You should also try to be sure that the projectile you choose is only covers enough area to affect your just summoned creatures but not more than that.