Gibberlings3 / SpellRevisions

A mod for the Baldur's Gate 2 engine (BG2, Tutu, BGT, BGEE, BG2EE, EET)

Home Page:http://gibberlings3.github.io/SpellRevisions/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sleep appears to be broken

ChitownWillie opened this issue · comments

Installed :

SPELL_REV/SETUP-SPELL_REV.TP2~ #0 #0 // Spell Revisions: v4 Beta 19 Alpha

Combat log verifies "Unconscious":

image

Visually, creature displays "sleep" effects:

image

But then creature does not remain asleep and just immediately gets up.

Mods affecting SPWI116.SPL:
00000: /* created or unbiffed */ SPELL_REV/SETUP-SPELL_REV.TP2~ 0 0 // Spell Revisionsv4 Beta 19 Alpha
00001: STRATAGEMS/SETUP-STRATAGEMS.TP2~ 0 5900 // Initialise AI components (required for all tactical and AI components)34.3

I have just looked up the implementation of sleep and is a bit convoluted because it is designed to guarantee that if a sleeping creature is hit then it wakes up (this is much easier to set up in the EEs). So my question to you is: is the creature being hit between sleeping and awaking or taking any sort of damage (things like poison clouds, poison or bleed damage apply)?

Hmmm, I am out of ideas. I have not seen this issue, or something close to it, reported anywhere else, and it could be an Engine bug. Keeping it open; will compare with SRR implementation to see if there is anything I am missing.

I just tested and I see something similar:

  • create a scroll of Sleep
  • cast it at a gnoll
  • the gnoll falls over
  • about one second later the gnoll wakes up
  • the bit where they are Slowed for a second upon getting up is functioning

My guess is, either 1) the way SR codes it to enable that Slow effect is indadvertently triggering it to wake immediately, or 2) some mod like SCS or SoB is applying harmless background spells to the creatures, and the wake-on-hit option in EE opcode 39 is too sensitive and triggering when any spell effect is applied, regardless of damage or hostility. (I see this kind of sensitivity in SR Nishruu, for example, which constantly heal in my game because of some minor background spells.)

I can look at my files tomorrow to get a sense of how to fix.

EDIT - actually I just tried again on a mixed group of gnolls and xvarts, and the xvarts were affected and this time they stayed down. Weird. Maybe something to do with the projectile? I’m at a loss now.

Have just looked at the SRR implementation and it is basically the same as SR. SCS does some surgery on the spell, but I do not understand what it is trying to do so cannot say if it has any influence, but if you are willing to test it out could you please report the results? To test it, just go into the SR folder and copy spwi1##/spwi116*.* into override (using unix globbing that should also work on windows -- it should copy three files, 2 spl and one eff). These are the unpatched versions (I don't think SR does any post-copy patching to sleep but honestly, would have to double check).

Edit: yup, the behavior shown in the video is buggy behavior alright. You probably know this, but remember that sleep has a level constraint, meaning that cast at level 1 it will only affect level 1 creatures, etc. Although in that case, the creatures should not fall down asleep in the first place anyway.

With the new patch by subtledoctor, closing this issue. If it resurfaces, we can reopen or file a new one.

I cannot read: subtledoctor dropped the patch, not commit it. Re-opening the issue, if nothing else, as a reminder that there is a (potential) problem here.

Note that 9f67e4e was merged with including the sleep change proposal, so this got in (seems doc reused the same branch for two PRs).

New patch submitted and applied, so closing the issue. If the problem persists, re-open it.