BGforgeNet / bg2-tweaks-and-tricks

Tweaks and Tricks mod for Baldur's Gate 2
https://forums.bgforge.net/viewforum.php?f=31
25 stars 4 forks source link

Toggle Find Traps automatically feature not 100% working #61

Closed WillScarlettOhara closed 1 year ago

WillScarlettOhara commented 2 years ago

On my current BG2EE run, the "Toggle Find Traps automatically" feature does not work. I must manually toggle find traps with Jan. I think it's not working with Hexxat and Nalia too.

I tried to re-install but still no success.

I tested and it's working with Imoen when I start a new game.

BG2EE_InstallSequence.txt WeiDU.log Setup-tnt.zip

Here my save just before a trap, southwest. 000000001-[Michel Michel]-Sauvegarde-Rapide-4.zip

Thanks

edit: wrong save upload

burner1024 commented 2 years ago

Do the rest of the intuition components work fine with Jan? Game pause, trap found sound?

WillScarlettOhara commented 2 years ago

Yep

burner1024 commented 2 years ago

Could you start a new game, cheat in Jan CreateCreature("jan10"), ctrl-q and test him the same way you tested Imoen? I can't reproduce on classic, maybe it's a EE thing.

WillScarlettOhara commented 2 years ago

It's working.

WillScarlettOhara commented 2 years ago

I found the culprit.

Turns out I modified the SCS Ease-Of-Use AI script with this code to allow me to auto-stealth out of combat.

IF
    !GlobalTimerNotExpired("P!_HIDE","LOCALS")
    ActionListEmpty()
    !Detect(NearestEnemyOf(Myself))
    OR(3)
        Class(Myself,THIEF_ALL)
        Class(Myself,RANGER_ALL)
        Class(Myself,MONK)
    !StateCheck(Myself,STATE_INVISIBLE)
    !ModalState(TURNUNDEAD)
    !ModalState(STEALTH)
    !ModalState(DETECTTRAPS)
    !ButtonDisabled(BUTTON_STEALTH)
THEN
    RESPONSE #100
        SetGlobalTimer("P!_HIDE","LOCALS",2)
        Hide()
END

Auto stealth script + your mod make it hard for the game to know what to do? Find traps or hide in shadows? Deeply sorry, it's all my fault. Sorry for the inconvenience. I hope you didn't take too much of your time.

burner1024 commented 2 years ago

Hm. Well, just by looking at your script, I'd say they should coexist fine still. You check for modal state, and TnT doesn't, so it should likely override the command. You can attach your full AI script, I'll try it sometime later.

WillScarlettOhara commented 2 years ago

bddefai.zip

I'm really bad at coding. It's just copy/pasting bit of code from there https://forums.beamdog.com/discussion/72379/convenience-script-instant-store-access-easy-prebuffing-bard-song to SCS Ease of Use AI. I like the auto bard song and the auto stealth features.

burner1024 commented 1 year ago

I tried your script on fresh bg2ee installation, and with AI enabled Imoen automatically switches to trap detection mode asap, she's not hiding in shadows. I then tried using the script with just the snippet that you provided. In that case, Imoen correctly hid in shadows, and once approached the first trap in Irenicus' dungeon, the script correctly detected the trap.

So, can't reproduce. Let me know if you find additional info for reproducing.