Jump to content

Maze Leaving Permanent Effects on Characters


Recommended Posts

I noticed certain characters were not being targeted by beholders and spellcasters properly.

I checked them out in eekeeper, and they both had a common effect.

mcMwzpR.jpg

 

I've known about Cernd's (though I couldn't remember when exactly he picked it up) for a while and have been playing along seeing how it affects the game. After Jaheira got mazed by a mind flayer, I immediately checked eekeeper (after the battle was done and she was back), and there it was.

I don't know if this is an SCS issue, but SCS is the only mod I have that changes anything relating to mind flayers, as far as I know anyway.

Here's my weidu log in any case.

WeiDU.log

Here's how it looks in game with the effect active:

https://streamable.com/ak8b3v

And here it is with it removed:

https://streamable.com/85p1wb

 

So it seems mind flayers (maybe all maze spells?) are leaving some sort of permanent maze flag on characters, that really mess with spellcaster ai.

ANyone know how/why/how to fix? Other than manually checking eekeeper every time I get mazed.

Edited by boof
Link to comment

That's the Maze animation that plays when the character's getting mazed. It's in the unmodded spell, spin774, as well, also as a permanent effect. I haven't looked at it, but something's obviously up with the ai scripts.

 

EDIT: I should add that I'm looking at the spell in BG2EE v2.6.6. I don't have v2.5 installed anymore so I don't know if the effect was changed from it. I do know that in classic BG2 (with fixpack), the visual effect on this spell has a duration of 5 seconds. If the AI messing up is somehow related to this effect, changing the timing of the effect on the spell to a duration might fix it.

Edited by Dan_P
Link to comment
1 hour ago, Dan_P said:

That's the Maze animation that plays when the character's getting mazed. It's in the unmodded spell, spin774, as well, also as a permanent effect. I haven't looked at it, but something's obviously up with the ai scripts.

 

EDIT: I should add that I'm looking at the spell in BG2EE v2.6.6. I don't have v2.5 installed anymore so I don't know if the effect was changed from it. I do know that in classic BG2 (with fixpack), the visual effect on this spell has a duration of 5 seconds. If the AI messing up is somehow related to this effect, changing the timing of the effect on the spell to a duration might fix it.

How would one go about changing this?

Link to comment

You can use Near Infinity to edit spell effects. Just search the spell file and edit the fields for the effects you want. Even with no knowledge, NI's pretty easy to learn for just editing basic things like items or spells. You can check the IESDP opcodes page if you're confused about any effects.

I'm not sure it's the visual effect that's causing the issue though. Someone smarter than me would know better. I did take a look at the spell file, spin774.spl, with SCS installed. It's setting the spell state DO_NOT_TARGET_SPELLS as permanent (until death). The script, BEHOLD01.BCS (for beholders obviously), then has lines like this:

!CheckSpellState(NearestEnemyOf(Myself),DO_NOT_TARGET_SPELLS)

So spells won't be cast at targets with the spell state DO_NOT_TARGET_SPELLS. Again, I haven't done any testing on this, but maybe try setting the spell state effect to a duration as well.

Link to comment
6 hours ago, Dan_P said:

I did take a look at the spell file, spin774.spl, with SCS installed. It's setting the spell state DO_NOT_TARGET_SPELLS as permanent

Sounds like you found the culprit.

In my current install with SCS v33, this effect has timing mode = 0 and duration = 5 seconds, so it sounds like this might be a bug that snuck into v34...?

Link to comment
16 hours ago, Dan_P said:

You can use Near Infinity to edit spell effects. Just search the spell file and edit the fields for the effects you want. Even with no knowledge, NI's pretty easy to learn for just editing basic things like items or spells. You can check the IESDP opcodes page if you're confused about any effects.

I'm not sure it's the visual effect that's causing the issue though. Someone smarter than me would know better. I did take a look at the spell file, spin774.spl, with SCS installed. It's setting the spell state DO_NOT_TARGET_SPELLS as permanent (until death). The script, BEHOLD01.BCS (for beholders obviously), then has lines like this:

!CheckSpellState(NearestEnemyOf(Myself),DO_NOT_TARGET_SPELLS)

So spells won't be cast at targets with the spell state DO_NOT_TARGET_SPELLS. Again, I haven't done any testing on this, but maybe try setting the spell state effect to a duration as well.

Thanks for the links.

I changed three of spin774's effects to mirror the regular maze spell's values, though it had five effects compared to regular maze's three, all with this permanent duration. You think I should change all five?

Link to comment
On 1/13/2022 at 7:35 PM, boof said:

Thanks for the links.

I changed three of spin774's effects to mirror the regular maze spell's values, though it had five effects compared to regular maze's three, all with this permanent duration. You think I should change all five?

So it's been a few days since I got mazed by a mind flayer after making these changes but it's just happened.

The result is... a permanent maze...

Time to change it back and just manually edit the save file every time I get mazed.

Edited by boof
Link to comment

 

7 hours ago, boof said:

The result is... a permanent maze...

I don't know what the exact issue is, but I'll just note that the spell state and visuals have nothing to do with the Maze duration. Visual is just visual. The spell state is a scripting thing. Editing just those 2 should have no effect on the Maze itself.

According to IESDP, Maze durations are normally set in intmod.2da, and the Maze removes itself after the duration with a Freedom effect. So possibly something went wrong with one of those, or with your settings on the Maze effect itself.

 

EDIT:

I tested it myself and it seems to work fine, using the same timings as the wizard Maze. I uploaded the file if you want to see if it works for your game. Just rename it to spin774. If you want, you can compare the effects in NearInfinity to see if some of our edits were different. Note that the way I tested it was to give the spell to a character and cast on other party members.

testmaze.zip

Edited by Dan_P
Link to comment
11 hours ago, Dan_P said:

 

I don't know what the exact issue is, but I'll just note that the spell state and visuals have nothing to do with the Maze duration. Visual is just visual. The spell state is a scripting thing. Editing just those 2 should have no effect on the Maze itself.

 

Turns out I made a mistake in editing the one effect that mattered. I had put all three effects at instant/limited and duration 5, but the last one needed to be delay/permanent with duration 4.

Luckily had a save right next to a bunch of githyanki and tested it out (assuming they use the same skill as the mind flayers, as the combat log also calls it psionic maze). Got mazed, got out, checked character effects in eekeeper and it didn't leave anything permanent. 

Thanks for the help.

Edited by boof
Link to comment

Hi everyone,

Thank you all for looking into this. I'm not fluent in programming, so I wanted to ask how you fixed this. Am I correct that if I download Dan_P's testmaze.zip, rename the file within to spin774, and drop it in my override folder, this will solve this maze issue in its entirety? And if this is the correct fix, do you do this after all other mods (including SCS) are installed?

Thanks, and best wishes,

~O

Link to comment
On 1/13/2022 at 5:43 PM, subtledoctor said:

Sounds like you found the culprit.

In my current install with SCS v33, this effect has timing mode = 0 and duration = 5 seconds, so it sounds like this might be a bug that snuck into v34...?

Can confirm, in v 33 same thing for me. Is it worth drawing @DavidW attention to this issue or probably he is aware of it already?

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