Skip to content

TobEx: 77

Ascension64Ascension64 Member Posts: 560
edited November 2012 in Fixed
May as well start posting some outstanding TobEx issues in separate threads here.

O: Action ChangeAnimation() does not transfer state flags to the creature replacing the old creature, resulting in the Islanne doppelganger occasionally being highlighted as Dead but the creature remains alive and remains unkillable
E: Action ChangeAnimation() transfers state flags to the creature replacing the old creature so that dead creatures stay dead

C: Issue is the dead creature inherits 0 hp but STATE_DEAD is not set.
You can reproduce this (although difficult!) by using a player script like this:
IF
HotKey(B)
THEN
RESPONSE #100
ActionOverride(NearestEnemyOf(Myself),ChangeAnimation("DOPKIE")) // Kiel the Legion Killer
END
summoning say DOPFUE.CRE, attack him with everybody in party, and occasionally pressing the B button. When the enemy gets hit while doing the ChangeAnimation() action, you get a "Dead" DOPKIE.CRE that is invincible.

TobEx fixed this in ACTIONRESULT CCreatureObject::ActionChangeAnimation(...) by adding the STATE_DEAD if creOld.hp
creNew.SetSaveName(ResRef(creOld.aCurrent.GetSName1()));
if (creOld.m_BaseStats.currentHP <= 0) creNew.m_BaseStats.stateFlags |= STATE_DEAD;</pre>
Post edited by Tanthalas on

Comments

  • AndreaColomboAndreaColombo Member Posts: 5,533
    Dropping @SethDavis' name as your namedrop wasn't successful.
  • BalquoBalquo Member, Developer Posts: 2,746
    I may or may not have seen the remaining TobEx fixes under pending release (along with pending news) when the devs were giving us beta moderation and accidently opened up the entire forum for a short time - stuff only the devs should have access to. They quickly fixed it though ;) Anyway, would need clarification. I never actually opened the threads - I just saw the subjects for the TobEx fixes.
  • TanthalasTanthalas Member Posts: 6,738
    edited August 2012
    @Balquo

    I heard there was a snitch that told the developers that we had access to their private forums.
    Post edited by Tanthalas on
  • BalquoBalquo Member, Developer Posts: 2,746
    haha - when i saw it i thought they just uploaded all the new content for testing - then when it was closed i released what had happened and swore at myself for not reading all the pending news haha :P
  • SethDavisSethDavis Member Posts: 1,812
    Potentially fixed - @Ascension64's fix has been applied.

    I put it under the hp set because I'm not sure that SetSaveName == SetName
  • lansounetlansounet Member Posts: 1,182
    Nice I hope that's fixed for good. I've had this happen a couple times with Durlag family in the "bridge above lava room" next to "fire death room"
  • Ascension64Ascension64 Member Posts: 560
    lansounet said:

    Nice I hope that's fixed for good. I've had this happen a couple times with Durlag family in the "bridge above lava room" next to "fire death room"

    That is where the bug occurs in-game.

  • BhryaenBhryaen Member Posts: 2,874
    Just tried CLUAConsoling in DOPKIE. I killed it- *poof* nothing. So I CLUAd it in again, but this time it immediately changed to a doppleganger. I killed it- *poof* nothing. So I CLUAd it in again, and this time it immediately changed to a doppleganger, but when I killed it, it went up in a puff of magic, and some sort of invisible creature inhabits the space it was in because I'm constantly routed by pathfinding around it. Each new CLUA in was just a dead Kiel after that.

    I tried also CLUAing in DOPFUE and using the script above. It did change him to DOPKIE, but then he died. Subsequent CLUAing in DOPFUE had Fuernebol there only a moment before he converted to a doppleganger, and at that point it wouldn't become DOPKIE. I tried this a few times trying to do the animation change during damage, but the invulnerable DOPKIE never arrived.

    Went to AR0512 hunting for the problem to occur... Didn't.

    Went to vBG1's AR0512 to see if I could reproduce it there. Transported the .BS script and used it on DOPFUE again. Couldn't reproduce it... *sigh*

    Inconclusive tests, sorry...
  • Ascension64Ascension64 Member Posts: 560
    It is a hard one to reproduce, because you have to kill the dude right when the ChangeAnimation() action is firing - what you probably will see is that when the dude dies, he will drop whatever he is supposed to change to, and the dead animation on the ground also reflects what he will change to.
    I will get on to it.
  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    You can probably create a script/spell combo that performs the necessary transformation/kill fast enough to cause problem.
  • BhryaenBhryaen Member Posts: 2,874
    I know for a fact that I reproduced this in vBG1 a few weeks ago by accident by just spawning in one of the Durlag buggers and trying to CTRL-Y it or something. It became impossible to get rid of it. I just haven't been able to reproduce it now... which, mind you, is a good sign in BGEE... but not conclusive...
  • Ascension64Ascension64 Member Posts: 560
    I found it a lot easier to test the TobEx fix on a BGT game with an overpowered ToB-rolled imported char with the frame rate set to 90.
  • Ascension64Ascension64 Member Posts: 560
    edited September 2012
    @SethDavis:
    Tested by repetitively firing this script:
    IF
    HotKey(B)
    THEN
    RESPONSE #100
    ActionOverride(NearestEnemyOf(Myself),ChangeAnimation("dopisl")) // Islanne
    END
    then summoning CLUAConsole:CreateCreature("dopfue"), and hacking him with all my might while pressing B continuously...

    On ChangeAnimation() during death, the dude dies, and drops the target animation's items (compare the two piles of loot in the screenshot). However, the area search map bits aren't being updated correctly, so I can't actually walk on top of the dead dude. Where you put the code, probably needs to go somewhere else. I'm not sure if my SetSaveName() == your SetName() either.

    I placed the code after something like:
    CGameSprite* pCreNew = new CGameSprite(...);
    if (pCreNew) {
    g_pChitin->pGame-> GetObject(pCreNew->e, THREAD_ASYNCH, &pCreNew, INFINITE); //approximate
    if ( OBJECT_SUCCESS ) {
    ResRef rName(sName);
    void_CCreatureObject::SetSaveName(&rName);

    //code does need to be around here because the subsequent flow control depends on whether STATE_DEAD is set
    if (creOld.m_BaseStats.currentHP <= 0) pCreNew->m_BaseStats.m_dwStateFlags |= STATE_DEAD;

    if ( !pCreNew->m_BaseStats.m_dwStateFlags & STATE_DEAD) ) ...
    In summary, not quite fixed.
  • TanthalasTanthalas Member Posts: 6,738
    @SethDavis

    Looks like this one still needs to be fiddled with.
  • Ascension64Ascension64 Member Posts: 560
    I feel like we are talking in different languages because our vars are so different lol. However, I think you have the right spot.
  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    So all in all, i think this might be fixed, if the above code is in the 0914 release.
  • Ascension64Ascension64 Member Posts: 560
    Double-checked now that I have some rare access to computer this week.
    Yes, slowly stepped through my and your code and the position of the fix correctly corresponds, so should be fixed.
  • TanthalasTanthalas Member Posts: 6,738
    Moved it to Unconfirmed to see if someone can test this in-game, but it sounds complicated.
  • Ascension64Ascension64 Member Posts: 560
    edited September 2012
    Once I finish downloading the new build, and get back from my work-related travel, I will test again. However, you can follow my method that I posted above if you want to try yourself.
  • SethDavisSethDavis Member Posts: 1,812
    my fixes yesterday didn't make it into the build, so this wont be in the new one.
  • Ascension64Ascension64 Member Posts: 560
    Thanks for the info @SethDavis, will delay testing until next build.
  • Ascension64Ascension64 Member Posts: 560
    Confirmed fixed in build 1012, I can walk over the Durlag Trollkiller corpse with the Islanne inventory dropped without problems.
  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    You mean we gotta offer our souls or firstborn?
  • Ascension64Ascension64 Member Posts: 560
    edited October 2012
    I still get images of my face melting...
Sign In or Register to comment.