Jump to content

Made another biggish BG2 install


Recommended Posts

On 10/14/2021 at 11:20 PM, subtledoctor said:

Oops, just spotted a somewhat nasty mod interaction: with @polytope's Revised Dispel Magic installed, a Remove Magic spell can remove my spell protections, even though they are set to be undispellable. If you use SR and/or SCS and especially with my "Magic Battles Revised" tweaks, you probably care about the 'mage duel' system and this is a pretty undesirable result.

 

It works fine with SCS, the interaction must be with either Spell Revisions or some subsequent mod in your order.

I suppose I'll download SR and see what's going on.

Link to comment
7 hours ago, polytope said:

It works fine with SCS, the interaction must be with either Spell Revisions or some subsequent mod in your order.

Now that I know the Dispel mod works by changing the spell school of spell protections, I can confidently say the adverse interaction is with any mod installed after PolyDisp that has to do with the spell school of spell protections. In this case that includes my "Magic Battles Revised" mod. It also has a less-serious adverse reaction with mods installed earlier, which set or modify spell schools. In this case that includes my "Rebalanced Spell Schools" mod, and Spell Revisions (which avowedly changes most instances of Dispel Magic into Remove Magic, but it seems that PolyDisp changes them back). I must say again that, since PolyDisp seems to carve out spell protections as a set requiring special treatment, and since they are already a set defined in the game by secondary type, it would make more sense to handle the dispelling by secondary type. The mod seems to require that the spell school and secondary type be aligned for this set of spells, or at least be aligned to a very particular extent; but this may be at odds with the intent of players game setup if for whatever reason they want the secondary type and spell school of those spells to not be in perfect alignment. At any rate, it's worth mentioning in the Readme that the mod requires spell schools to be a particular way. Now that I know, I can more easily warn about any such interactions.

For me personally, I'm working on turning my various adjustments to the spell protection system into a standalone mod, intended to be installed very late. If/when I get it up and running I'll just have to patch the PolyDisp subspell so things work properly.

In any event, for purposes of this game, I have changed up the spell protection systems by a bunch of manual adjustment in NI, among other things changing Dispel/Remove Magic into a miniature AoE Breach spell (where Breach removes all combat and specific protections, now Remove Magic removes one combat and one specific protection). I just played through the White Queen mod by Lava, which includes a lot of fights against low-level no-name mages, and I find I'm actually casting Remove Magic now. So the changes seem good! After I've played with them some more, like I say, I'll code them up as a proper mod.

Edited by subtledoctor
Link to comment

I can at least say that having examined Spell Revisions, their version of SI:Abjuration (SPWI590) rather than providing immunity to the entire abjuration school instead provides 101 vs opcode 58 (dispel effects) and 206 protection vs Breach and its relatives (from Wish), as well as 25% magic resistance disregard that, the in-game spell upon installation doesn't give MR, the version that actually does appears unused?

I'm not sure if the intention was to strengthen SI:Abjuration (even a beholder's anti-magic ray is unable to debuff you!) or weaken it, in that it no longer protects from Imprisonment. Either way, you're right that the SR version of Spell Immunity will not protect you from my tweaks to dispel magic.

I would edit SPWI590 to ensure it always has a 206 vs A^DISPE2.spl, although it's beyond me why they made such changes so that it doesn't actually protect against all abjurations and yet protects from other stuff which it never used to...

Edited by polytope
Link to comment

SR changes SI:Abjuration to "Dispelling Screen," which as you say is not meant to protect from all abjurations, but instead protects from Dispel/Remove Magic and Breach. And it only protects against one instance of Dispel/Breach, so it protects your combat buffs the way Spell Shield protects your spell protections. To make your Dispel work with SR should be fairly simple, I think. IIRC what I did was 1) add 206 vs. A^DISPE2 to both SPWI590 and SPWI510; and 2) have everything that casts the A^DISPE2 subspell also cast SPWI513C (this removes Dispelling Screen, so that it only works once - no need for a new subspell, your modified Dispel/Remove can piggyback on Breach and use its subspell.)

Link to comment

Ok, here is the code I will be using in an update to my modifications of dispel magic to provide compatibility with Spell Revisions, it's a fairly popular G3 mod, so I really should have considered that:

ACTION_IF  FILE_EXISTS_IN_GAME ~k1#scre.spl~ THEN BEGIN      
  COPY_EXISTING ~sppr303.spl~ ~override~
	      ~spwi302.spl~ ~override~
	      ~spwi326.spl~ ~override~
	      ~spcl231.spl~ ~override~
    LPF ADD_SPELL_EFFECT INT_VAR
	opcode	= 146
	target = 2
	power = 0    
	timing	= 3
	duration = 1
	parameter1 = 0
	parameter2 = 1
	STR_VAR
	resource = ~spwi513c~
	END

  COPY_EXISTING ~k1#scre.spl~ ~override~
    LPF ADD_SPELL_EFFECT
	INT_VAR
	opcode = 206
	target = 2
	power = 5
	timing = 0
	duration = 300
	resist_dispel = 2
	STR_VAR
	resource = ~a^dispe2~
	END

//There are multiple redundant power checks with the Breach
//shell spells, resulting in undesirable interaction with
//Spell Deflection for instance

  COPY_EXISTING ~spwi513c.spl~ ~override~
    LPF ALTER_SPELL_EFFECT
	INT_VAR
	opcode = 221
	power = 0
	END
    BUT_ONLY
  END

@Bartimaeus does this look fine to you, as I understand you maintain SR? My mod would need to go after it in the install order, obviously.

Installed Spell Revisions and trialed it briefly, "Dispelling Screen" vanishes on the first attempted dispel, level check notwithstanding, but this was the former (and presumably intended) behaviour. Spell Deflection unaffected, as is intended.

Link to comment
8 hours ago, polytope said:
There are multiple redundant power checks with the Breach
//shell spells, resulting in undesirable interaction with
//Spell Deflection for instance

Not sure what exactly you mean by this, but to be clear, but the intended design of SR is that Breach should not bypass spell deflections. So the effects of 513c - or the first effect, at least - should have a nonzero power level. I think?

(This is one of those places where life is easier on the EE engine, as you can simply specify 206 vs. 513c in deflection spells. But that is problematic in the old engine.)

Edited by subtledoctor
Link to comment

SR’s Breach, SPWI513 has two op146 effects with power = 0 so it bypasses deflections and then the subspells determine what happens.

- SPWI513B has two op221 effects removing all combat and specific protections. Dispelling Screen has op206 protection against 513B. These effects have power = 5 so that they are blocked by deflections and burn away 5 spell levels of deflection.* So you have to remove spell protections before you can breach combat and spell protections.

- SPWI513C has one op221 effect removing Dispelling Screen. If this effect has power = 0, it would bypass spell protections and you could Breach a Dispelling Screen without regard to Deflection or Trap. I think this is not desired behavior - it would let you cast Breach to remove Dispelling Screen, then Remove Magic to remove combat protections, all ignoring the target’s dpell protections. If the power of this effect is set to 5, then just like the other use of Breach, it wouldn't work until you strip the target’s spell protections.** 

* There is an issue in that casting teo subspells with power = 5 might burn away 10 levels of deflection, instead of just 5. I think? It needs testing to be sure. If this is an issue, you could add an empty opcode 0 effect to the beginning of 513B with power = 3, and one to the beginning of 513C with power = 2, and then together they would burn away the expected 5 levels of protection. I think. 

** Of course, there is an issue in that, even if spell protections block Breach, they don’t block Remove Magic. So you can just cast RM twice to remove Dispelling Screen and combat buffs, ignoring the target’s spell protections. This isn’t great, but AFAIK it’s how things work in both SR and SCS. This is something I am going to address in my spell battles mod. 

Edited by subtledoctor
Link to comment
2 hours ago, subtledoctor said:

SR’s Breach, SPWI513 has two op146 effects with power = 0 so it bypasses deflections and then the subspells determine what happens.

Looking at Spell Revisions v4 Beta 18 - which I installed yesterday - the SR version of SPWI513 use power 5 on the 146 to cast SPWI513B and SPWI513C, and also uses a power level of 5 on each shell spell; the spell's power level, like magic resistance, should surely only be checked once, with the initial spell and associated projectile. Have you changed this locally?

2 hours ago, subtledoctor said:

 If this effect has power = 0, it would bypass spell protections and you could Breach a Dispelling Screen without regard to Deflection or Trap. I think this is not desired behavior - it would let you cast Breach to remove Dispelling Screen, then Remove Magic to remove combat protections, all ignoring the target’s dpell protections. If the power of this effect is set to 5, then just like the other use of Breach, it wouldn't work until you strip the target’s spell protections.** 

...

** Of course, there is an issue in that, even if spell protections block Breach, they don’t block Remove Magic. So you can just cast RM twice to remove Dispelling Screen and combat buffs, ignoring the target’s spell protections. This isn’t great, but AFAIK it’s how things work in both SR and SCS. This is something I am going to address in my spell battles mod. 

This is not going to be an issue if the Breach spell uses power level 5 on the 146, which it appears to, in the most recent version of Spell Revisions.

Otherwise, yeah, the "exploit" of my compatibility fix is that the player can achieve the same thing by casting a 5th and a 3rd level wizard spell which they previously could have by casting two 3rd level spells... true, there are some battles where 3rd level slots are actually more valuable than 5th level slots but I really do not think I'm enabling cheese here. As for SCS enemy mages AI, they are unlikely to throw Breaches at a Spell Trap or Spell Shield.

Edited by polytope
Link to comment
45 minutes ago, polytope said:

Looking at Spell Revisions v4 Beta 18 - which I installed yesterday - the SR version of SPWI513 use power 5 on the 146 to cast SPWI513B and SPWI513C, and also uses a power level of 5 on each shell spell; the spell's power level, like magic resistance, should surely only be checked once, with the initial spell and associated projectile. Have you changed this locally?

In regards to power levels: if the base spell is set to a power level of 5 and gets absorbed by e.g. a Spell Deflection, the secondary spells never fire anyways since the opcodes casting them effectively get deleted - no secondary spells are ever cast. If the base spell isn't absorbed by a Spell Deflection, then...it doesn't matter, since they won't get absorbed since there is no Spell Deflection. If there are multiple magic resistance and saving throw checks, that's a different matter, but that doesn't seem to be the case. I'm trying to think of what possible risk there might be in keeping sub-spells at the same power level as the base spell, but I'm failing to come up with anything...whereas I can think of a specific problem off the top of my head that might arise if you change the power levels for sub-spells, although it's admittedly a rare edge-case to do with AoE effects and spell level immunities which wouldn't apply in this specific example of Breach.

Edited by Bartimaeus
Link to comment
1 hour ago, polytope said:

Looking at Spell Revisions v4 Beta 18 - which I installed yesterday - the SR version of SPWI513 use power 5 on the 146 to cast SPWI513B and SPWI513C

Ah, okay. That makes sense - and it means Breach cannot affect liches/rakshasa/etc. SCS allows Breach to affect liches by giving them specific spell immunities, while my mod allows Breach to affect liches by setting the power of those two 146 effects to 0... which is why I saw the power set to 0 when I looked. All good then, as far as power levels go. 

2 hours ago, polytope said:

Otherwise, yeah, the "exploit" of my compatibility fix is that the player can achieve the same thing by casting a 5th and a 3rd level wizard spell which they previously could have by casting two 3rd level spells... true, there are some battles where 3rd level slots are actually more valuable than 5th level slots but I really do not think I'm enabling cheese here.

It’s not a question of enabling cheese, it’s only a question of what players expect. When playing with SR, they expect Breach not to bypass spell protections, while Remove Magic can. Whether that’s cheesy is immaterial; what matters is whether the game behaves as the mod’s readme suggested it would. If another mod disturbs that behavior, it just needs to be 1) understood (not always easy), and 2) communicated. Then expectations can be set accordingly. 

Link to comment

Aand, not great news.

I went through the extra Windspear Hills content to save the paladins stuck in the illusion realm, then went to Porthpentych, then went tot eh Gov't West district. Some stuff came up with Isra's family and I finally found out where Sirene is. Isra bailed out of my party with no notice, taking all the nice stuff she had equipped (not cool!), so Sirene joined to be my tank. Frankly I kind of like her company better, so when I returned to play the old game of party-membership-musical-chairs, and -

Side note: if you make NPC mods, please hear this advice: don't have your NPC hold a grudge for being booted from the party. I know the Bioware NPCs are guilty of this (looking at you Jaheira) but that is not a good example to follow. the disposition of an NPC toward Charname is part of the story that plays out in the game; how we shuffle those portraits on the right side of the screen is solely a matter of logistics. I know it sounds natural that "I think this person would take umbrage at being asked to leave the party" but half the time we ask NPCs to leave the party it is not a matter of roleplaying, just inventory management! Don't code your NPC to take umbrage over my attempts at inventory management! 

Like, here I am, with six party members and I need to get Daystar back from Isra because I'm about to clear out a vampire nest. So I have to move someone far away, dismiss them, take in Isra before that person walks over to me, get my stuff from Isra, then talk to the person I booted and tell them "no, no, I don't really want you to leave, I actually want Isra to leave."  But I'm never 100% certain who I can safely do that with. In this case I chose Yeslick, which was mostly fine... except when he returned to his place in the party, the Symbol of Amaunator had disappeared from his inventory!  Dammit. Good thing I enabled the console.

Another example: I was going to use Yvette as my cleric, but she popped out of her painting while I was trapped in the Planar Sphere, in the Abyss, about to fight Tolgerias, probably the hardest mage fight in the game until Irenicus himself. She is 3rd level and has no spells memorized. Sorry Yvette, I need you to sit on the sidelines for an hour and let me take care of this. As soon as we get this rust bucket back to the Prime Material you can join my party and Aerie can go home to the circus, okay? Apparently not okay - miffed at my perceived rejection, Yvette wandered off into the Abyss and told me she would never be back. Well, good for you Yvette. Modders, I know you are trying to achieve something like characterization with very limited narrative resources. But stuff like that is more annoying than anything else. I'm playing a game here. If you want me to play through the content you've created, don't make it harder than it needs to be.

Anyhoo, I'm about to go after Bodhi's 'guild," and I need to release a child vampire from its state with a special sword in order to progress in the Fishing for Trouble mod. I know from having played Lava's Innershade mod that Beamdog has hard-coded the EE game to make it impossible to harm a creature with a child animation, so I proactively changed the animation of the child vampire to an elf, figuring it will look like a teenage vampire and allow me to move ahead.

Unfortunately, after I transferred the modified file to my iPad, when I tried to load my savegame... the app crashed. I can start a new game but I can't load any of my last three saves in the existing game. :wallbash: This might be the end of this playthrough... :(   I'll see if I can change the file back and load it up. Not sure though.

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.

Guest
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...