Jump to content

How can I mimic specialist mage ability

Recommended Posts


I see that specialist mages have such ability, that enemies get -2 to their saving throw against specialist's magic school. Is it possible to create items that increase this ability? Sadly there is no CLAB with proper effect for specialists, so I can't just reuse existing files for that purpose.

I know that there exists #346 (0x15A) Save vs. school bonus opcode, but I am not sure if and how can I set values to achieve my goal.

Thank you very much for your help!

Link to comment

You haven't explained who you need this ability for. Just any character? You can channel the bonus through a Self-targeted Apply effects list using spell states. First you would need to patch all spells of the school you have in mind with this effect, use INT_VAR insert_point = 0 so that it goes on top of the list. In the filter menu for this effect choose some rarely encountered spell state, like STORM_SHELL. This effect will cast a secondary spell whose only effect will be again Apply, again to Self, filtering this time through another spell state. I go for combinations that can't be encountered normally, like the spell states for abilities from different kits. To be on the safe side, the secondary spell is going to cast a tertiary spell, and that one will lead to spell number 4 whose effect will be directed at Preset target with penalties to All saving throws. Use a very short duration, like 2-3 ticks. It's practically impossible that anything else should hit the target in that split second. Now it remains to make the character with this ability don those spell states. If this is an item, use Instant/While equipped, if a permanent ability, include them in a spell you put on the character.\

I wouldn't suggest a permanent spell state or several, though, there may be conflicts over the scope of the game. It's possible to use some unimportant character ability instead of a filter. One of the subspells can set the character's Charisma to 25, for example, for a few ticks, and target that stat. If this is for a kit, instead of spell states just use one subspell filtered through the kit of the character.

Link to comment
4 hours ago, SparrowJacek said:

maybe that original ability works some other way,

It’s not actually an ability, just a hard-coded effect. 

As for the other reply: I think the OP wants to make an item which causes enemies suffer a save penalty against say, Enchantment spells when cast by the caster wearing the item. I don’t think what you described would accomplish that... or if so, it’s a bit convoluted and I don’t follow it. 

The simplest way is to apply an aura such that all enemies suffer a penalty to saves vs. that school whenever they are near to the item. 

-> item equipping effect: opcode 177, timing mode 2, resource = effA

-> effA: opcode 232, target = 1 timing mode 2, condition = hp <102%, resource = spellB

-> spellB: ability target = 5, projectile = INAREANP; opcode 321, effect target = 2, resource = spellB; opcode 346, effect target = 2, timing mode 0, duration = 7

Done. But this means nearby enemies will suffer save penalties when the item-wearer’s allies cast spells of that school. Not exactly what you wanted... but maybe close enough to the item’s concept.


Link to comment

What Jacek wants is to lower saving throws against a specific spell school when spells of that school are cast by a specific character/kit (e.g., conjuration spells when cast by a conjurer). Solution proposed by subtledoctor is definitely easier and more straightforward, but the penalty to saving throws would apply no matter which character casts a spell from the relevant spell school.

If I understood correctly, Temnix proposes how to actually restrict this to a particular character/sub-set of characters via spell states. I haven't exactly figured out yet which opcodes are suggested to use. Is it #232, cast spell on condition?

Link to comment

Maybe I got thrown by all the talk of combining multiple existing spellstates... that seems unnecessary when you can simply make a new one. 

But the bigger issue is, I don’t think it would work. Of course embedding the penalty in spells was my first thought; but by the time the penalty is applied, all rolls such as saves have already been rolled. (That’s why, for instance, your single saving throw roll applies equally to all of a spell’s effects.)

That’s an assumption on my part; I could certainly be wrong. But even if I were, I would still worry about the method’s reliability. Would need pretty substantial testing before I would use it. 

Edited by subtledoctor
Link to comment

I think I've tried testing whether these extra effects, passed through Apply effects list, Self, and put on top of the effects stack with "insert_point = 0" so that they are cast first, really do apply first, and I think that is the case. But it was a long time ago. To test one would need something like this: take Magic Missile, put Apply... on top, before damage, and in the subspell as the effect put Display String for some number, it doesn't matter which string. Then cast MM at someone and see if the message appears in the bottom window before or after the damage report. If before, then the save penalty would also come earlier, but you would need to test for secondary and tertiary subspells in the chain to see if the whole linkage still precedes the main effect.

Link to comment

Some opcodes can certainly apply before others; if you add opcode 318 at the top of the order then, if its conditions are satisfied, it can block the rest of the spell containing it.  In fact opcodes 318 and 324 (and 206, I think) can be put in the middle of the list of effects, and they will block only the effects that come after them.

But that's not the question.  The question is whether saving throw rolls wait patiently for such things to be sorted out, or whether the roll gets calculated immediately as soon as the spell is applied, and then passes the result to each effect as it comes. If the latter happens, then no application of a saving throw adjustment could possibly affect its own spell, regardless of whether it is applied directly by opcode 346, or by opcode 146 or 326 or whatever.

And of course even if it might work, I would worry about its reliability.  Would it still work when under Improved Alacrity?  Improved Alacrity plus a sizable casting speed bonus?  All that plus Improved Haste?  Etc.

My best guess to make it really reliable would be to apply the save penalty in a subspell at the top of the order, using opcode 326 conditioned on the caster's spellstate; and then move all of the remaining spell effects into a subspell cast by opcode 146.  If two separate spells are being applied to the target, that would (speculatively) maximize the chance that adjustments to saves or the like from the first subspell would affect the working of the second subspell.

Tagging @Bubb and @kjeron who might actually know the answer, instead of us philosophizing all day.

(Side note, if that did work you could do all kinds of stuff with it.  Use different spellstate conditions, briefly change the caster level or the target's characteristics, and apply... whatever precursor effects you want.  Sky's the limit.  Would be an interesting way to approach metamagic, or allow spellcasters to take feats to apply their magic in different ways.  You could decide to improve you caster level, to make your effects more durable in the face of Dispels, or you could impose save penalties on targets, or increase the duration of effects or even apply wholly additional effects to every spell.  (And of course since this would all be based on spellstates or stats, it would be simple to give such feats to enemy mages as well... :devlook: )

Tagging @Aquadrizzt and @Grammarsalad to log the idea.)

Link to comment

Normal specialist bonuses directly modify the save bonus of outgoing effects, but I think I've got an on-target method working:

1) All spells that acknowledge this bonus should have an Opcode #326 (as the first effect) that invokes a subspell.

2) The subspell ability projectile must be '0', else the engine uses an internal projectile that delays the effect application.

3) Put one of the saving throw bonus opcodes (#33-37) in the subspell, using Param2 = 3. The IESDP doesn't list this parameter value, but it is an INCREMENT variant that allows the saving throw to be updated within the current spell application, (normally this cannot be done with stats).

4) To prevent multiple spells that use this mechanism from stacking their modifications if they hit at the same time, another subspell needs to be applied at the end of the top-level spell which reverses the saving throw bonus, (using the same #33-37 opcode, just with an inverted value).

The #326 and #33-37 opcodes should all be Instant/Limited, Duration=0. From my limited testing, the above seems to achieve the desired effect.

Edit: I just checked - the IESDP lists Param2 = 3 for Opcode #325, but it also applies to the individual ones I listed.

Edited by Bubb
Link to comment

Too many precautions and additions. *shrug* If your saving throw penalty is only 2-3 ticks long, there is no need for blocking at the end. But - so long as it works...

Link to comment

@Bubb: that's ingenious but there's a bit I don't follow. The original 326 presumably needs to be keyed to some parameter of the caster, e.g. a spellstate set by the item that increases the save difficulty. But can that be done if the save effect needs to be targetted on the spell target, not the caster?

(I had similar issues with some summoning spells in SCS that I wanted to have different effects keyed to a 326-type check, and ended up making them target=self to get around the issue.)

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...