Jump to content


Photo

Noticed something weird with SRv4b14


11 replies to this topic

#1 Dorothy_Dorothy_

Dorothy_Dorothy_
  • Members
  • 6 posts

Posted 06 June 2018 - 01:55 PM

So, I was noodling around in DLTCEP the other day, correcting a lot of errors in various files that my latest mod list accumulated (just a few mods couldn't recognize others mods' items and spells and so their changes obviously didn't affect each other, but that's not important).

And I noticed something odd about how Spell Revisions (v4 beta 14) does its spells.

Area spells are usually formatted so that they just have an effect with opcode [146] (Cast Spell At Target), basically affecting all targets within the area with a second spell linked to within that effect.

This is where the potentially huge problem comes in: the save to avoid the effects of the spell is not here at this Cast Spell At Target effect, SRv4b14 apparently has put the save under the individual effects of the child spell called in the parent spell!

Here's an example of what I mean. Importantly, for this particular spell (SPWI507 which is still "Hold Monster" in this mod), I have already altered the effects in this screenshot so that the parent effect of SPWI507 allows the save and I've removed the save from the child spell's Hold effect (opcode 175). Whereas the original Spell Revisions version of the spell had the save placed within the child, rather than the parent.

b04k92jydqba.jpg

This seems really really odd for a number of reasons:

For example with the Slow spell, each of its individual component effects allows a save... which means that a target could attempt a save against each effect - only suffering those effects which it failed to save against, right? So then, virtually all of SR's area spells aren't actually written correctly because targets within those areas are likely saving against at least some of the effect-lines of each spell! This can become quite important in some cases that self-cure on a delay.

A good example of this was SR's version of Shadow Door: with SR's Shadow Door, adjacent creatures are supposed to be allowed a save to avoid being sucked into a "mini-Maze" effect. The problem here is that a separate effect on a time-delay was allowing a save when it shouldn't.

/*
If you'll recall, Maze has a duration dependent upon the target's Intelligence score, with a range of a few d4 rounds. Shadow Door being a lower level spell with other effects it provides as its main benefit was supposed to auto-liberate Maze victims on the 4th round if their intelligence didn't let them escape sooner.
*/

So the targets which were supposed to be liberated on the 4th round (poor 9-Int Korgan!) were failing their saves and staying in the maze for longer than they should have (as if by the original much higher level spell Maze).

I have to wonder if there's something I'm missing here. Is it supposed to be like this for some reason? For example, does the engine auto-magically understand that all the effects within a header are supposed to share the same saving throw result?


Edited by Dorothy_Dorothy_, 06 June 2018 - 01:58 PM.


#2 kjeron

kjeron
  • Members
  • 92 posts

Posted 06 June 2018 - 05:58 PM

I have to wonder if there's something I'm missing here. Is it supposed to be like this for some reason? For example, does the engine auto-magically understand that all the effects within a header are supposed to share the same saving throw result?

Every vanilla spell is setup this way, it is the only way to have multiple effects offer differing save bonuses/types.

All effects, regardless of source, use the same savingthrow roll, for any given moment.

As long as the effects are applied at the same time, they will use the same save roll.

Delayed effects are saved against when they are initially applied, not when their delay expires.

 

It's identical to seeing only a single instance of Magic Resistance against 5x Magic Missiles(occasionally, they don't always hit at the same time), or a single save against a 3x of the same spell in a chain contingency.

 

Auto-pause can disrupt this and other internal game mechanics, so it's best to never use the "Hit", "Injured", "Death", or "Spell Cast" auto-pause options.



#3 Dorothy_Dorothy_

Dorothy_Dorothy_
  • Members
  • 6 posts

Posted 06 June 2018 - 10:43 PM

Ugh... so it is exactly what I feared, then? Do you mean that the RNG only provides a single roll for a given frame or tick, and the designers are just sort of assuming that it will all happen so fast that it won't matter much?
 
I have another question if you can help:
 
I've noticed that the druid Avenger kit gets a few spells that other druids don't get. I think SR has swapped out Chaos (which my .tlk says they're supposed to get at spell level 5, but I think SR has removed it in favor of the higher level sphere of chaos -style spell) for Cone of Cold. And anyway, I wonder if there's an easier way to propagate the changes I make to the wizard version of Cone Of Cold. Can you call a wizard spell from within a priest/druid spell? Since both versions call a child spell which does the damage, can I alter the wizard version of the child spell and then have the druid parent spell just call that wizard child spell instead of its own? Will it properly detect the druid's caster level? Or will it screw up because caster levels are "typed"? Are they typed? The druid and wizard versions of cone of cold both reference the same .tlk description entry...

SPDR501 calls SPDR501D normally
SPWI503 calls both SPWI503D and SPWI312D normally

Have SPDR501 call SPWI503D and SPWI512D without creating new .spl files and tagging them as "druid" spells?

Edited by Dorothy_Dorothy_, 06 June 2018 - 10:44 PM.


#4 subtledoctor

subtledoctor
  • Modders
  • 2448 posts
  • Gender:Male

Posted 07 June 2018 - 09:04 PM

Yes, caster level is typed.

Your proposed solution to move saving throws out to the parent spell would not work well, I don't think. Consider your example of Hold Monster: it targets an individual but everyone near that individual is meant to save against the effect. You don't want the target's nearby associates to avoid the spell just because the target made his save, do you?

On the subject of Hold Monster: am I to understand correctly that AI casters cannot target spells at the floor, but must target an enemy creature?

I wonder how difficult it wpuld be to change every instance of targeting "at point" to "preset target?" Then the player would be bound by the same targeting rules as enemies...

Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE


#5 Jarno Mikkola

Jarno Mikkola

    The Imp

  • Modders
  • 6577 posts
  • Gender:Male
  • Location:The town where the dead haven't keeled over, yet. In Finland.

Posted 08 June 2018 - 08:50 AM

I wonder how difficult it wpuld be to change every instance of targeting "at point" to "preset target?" Then the player would be bound by the same targeting rules as enemies...

No. Sorry, but the fact that the AI can't use floor targeting is a non issue for them, while the player not being able to is a huge issue, see the enemy has this thing called "Invisibility detection" while the player doesn't, which means that you can't target a SCS lich with a PfMW even if you know it's there with your rules, while the AI creatures sure can (demons etc, via opcode #193).
Welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand.
Here's how to install all the ... mods you ever really could want to Infinity Engine games. I removed the stable word from there as Roxanne began to add BS mods that are likely to break compatibility from the BWS.

#6 Dorothy_Dorothy_

Dorothy_Dorothy_
  • Members
  • 6 posts

Posted 08 June 2018 - 04:15 PM

Your proposed solution to move saving throws out to the parent spell would not work well, I don't think. Consider your example of Hold Monster: it targets an individual but everyone near that individual is meant to save against the effect. You don't want the target's nearby associates to avoid the spell just because the target made his save, do you?

 

Are you sure that's how it would work? I thought it cast 507D on every target within the area?

 

Is 507D the .spl with the area defined?

 

For that matter, I didn't change the targeting field, so it looks like my version SR has either altered Hold Monster to only affect one creature regardless, or there's something else that's defining the area and number of targets of both spells.



#7 Jarno Mikkola

Jarno Mikkola

    The Imp

  • Modders
  • 6577 posts
  • Gender:Male
  • Location:The town where the dead haven't keeled over, yet. In Finland.

Posted 08 June 2018 - 11:52 PM

Are you sure that's how it would work? I thought it cast 507D on every target within the area?

That's at least within rules, as targeting individual creatures with similated area of effect effects is definitely NOT in the rules.
Welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand.
Here's how to install all the ... mods you ever really could want to Infinity Engine games. I removed the stable word from there as Roxanne began to add BS mods that are likely to break compatibility from the BWS.

#8 Dorothy_Dorothy_

Dorothy_Dorothy_
  • Members
  • 6 posts

Posted 09 June 2018 - 01:11 PM

 

Are you sure that's how it would work? I thought it cast 507D on every target within the area?

That's at least within rules, as targeting individual creatures with similated area of effect effects is definitely NOT in the rules.

 

 

I'm not sure I really understand what you mean.



#9 Jarno Mikkola

Jarno Mikkola

    The Imp

  • Modders
  • 6577 posts
  • Gender:Male
  • Location:The town where the dead haven't keeled over, yet. In Finland.

Posted 09 June 2018 - 01:56 PM

Well, let me clear this for you, no matter who is casting, if the target leaves the area of effect, before it's triggered, it CANNOT suffer the effect just because it was in the area of effect during casting of the spell.
Aka a casted fireball cannot retroactively hurt creatures that have left it's sphere of influence during it's flight (or it's casting, as that's actually longer), as haste etc. gives this option to be there during that time and get away from there before the effects land..
Welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand.
Here's how to install all the ... mods you ever really could want to Infinity Engine games. I removed the stable word from there as Roxanne began to add BS mods that are likely to break compatibility from the BWS.

#10 Dorothy_Dorothy_

Dorothy_Dorothy_
  • Members
  • 6 posts

Posted 09 June 2018 - 06:10 PM

But I don't really understand what that has to do with where the spell's save is invoked. You mean that if the save were on the parent effect that it would be called before the projectile lands at its target location?



#11 kjeron

kjeron
  • Members
  • 92 posts

Posted 09 June 2018 - 06:26 PM

Area of Effect is defined by the projectile.
The projectile in SPWI507 (HOLD.pro) hits every (enemy) creature within (vanilla is 4 feet, don't know SR's value).
The effects of SPWI507 (Cast Spell) is applied to every creature hit by the projectile, casting SPWI507D on each target individually.
This particular spell has no primary/secondary targets, everyone is equal.

For the purpose of Spell Deflection, if the save were on the parent spell, the target would get to save against the spell before spell deflection was checked, saving them deflection charges if they were successful, which would be inconsistent with how single target spells work.

Edited by kjeron, 09 June 2018 - 06:27 PM.


#12 Dorothy_Dorothy_

Dorothy_Dorothy_
  • Members
  • 6 posts

Posted 09 June 2018 - 09:10 PM

Area of Effect is defined by the projectile.
The projectile in SPWI507 (HOLD.pro) hits every (enemy) creature within (vanilla is 4 feet, don't know SR's value).
The effects of SPWI507 (Cast Spell) is applied to every creature hit by the projectile, casting SPWI507D on each target individually.
This particular spell has no primary/secondary targets, everyone is equal.

For the purpose of Spell Deflection, if the save were on the parent spell, the target would get to save against the spell before spell deflection was checked, saving them deflection charges if they were successful, which would be inconsistent with how single target spells work.

 

Oh! That solves a mystery. I suspected that the area of effect information must be encoded in the projectile, but I didn't know for sure - thanks for clearing that up!

 

As for Spell Deflection, I think the way that family of spells works in NWN1/2 is that the benefactor of the Spell Deflection wasn't supposed to be able to avoid area spells at all if he wasn't the direct specific target of the spell. Which I'm not even sure I would want to try doing with how limited my knowledge is of BG2EE's workings. I can see how you would want Hold Person to eat SD charges, but I'm not sure that something like Fireball or Cloudkill should. For that matter, does each "tick" of Cloudkill and Icestorm eat a charge? Or just once per casting? Because I think both Cloudkill and Icestorm (and for that matter other spells like Stinking Cloud and Call Lightning) cast a child spell once each tick within the area...





Reply to this topic



  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users