Added sanity checks to _SAG_PlayCards_MainScript to fix errors preventing the quest from proper cleanup

This commit is contained in:
Eddoursul 2025-08-12 01:57:39 +02:00
parent 231b661cd0
commit 57e7549f51
5 changed files with 54 additions and 13 deletions

View File

@ -17,6 +17,7 @@ Beware, spoilers ahead!
- Fixed scripts causing black screen during starting quests with SkyParkour and possibly some other mods.
- Updated LOD with xLODGen beta 132 and DynDOLOD 3.00 alpha 194 by sheson. Fixed the stitched object LOD warning showing up on TexGen start.
- Restored Tharael's forehead tattoo lost during the initial facegen conversion.
- Fixed Battle of Treomar opponents permanently disappearing after a game if no dice were cast.
- Entropic Blood: fixed inability to select a strong enemy as an attack target, fixed not working in god mode.
- Revised alchemy. Consistency and distribution changes across the board due to lack of a coherent alchemy system prior to this patch, such as:

View File

@ -84,7 +84,10 @@ Function StartGoldenQueensCourtGame()
akOpponent = Self.GetLinkedRef(_00E_TavernGames_Opponent_01) as Actor
_SAG_LetsPlayCards_Quest_Opponent.ForceRefTo(akOpponent)
_SAG_LetsPlayCards_Quest_Opponent_Thief.ForceRefTo(Self.GetLinkedRef(_00E_TavernGames_OpponentThief) as Actor)
if Self.GetLinkedRef(_00E_TavernGames_OpponentThief) as Actor
_SAG_LetsPlayCards_Quest_Opponent_Thief.ForceRefTo(Self.GetLinkedRef(_00E_TavernGames_OpponentThief) as Actor)
endif
TransferGoldToNPC()

View File

@ -236,10 +236,22 @@ Function FinishGameNoGold()
Opponent.GetReference().Enable()
endif
PlayerDiceGroup01[PlayerDice01+(-1)].Disable(false)
PlayerDiceGroup02[PlayerDice02+(-1)].Disable(false)
OpponentDiceGroup01[OpponentDice01+(-1)].Disable(false)
OpponentDiceGroup02[OpponentDice02+(-1)].Disable(false)
if PlayerDice01 > 0
PlayerDiceGroup01[PlayerDice01+(-1)].Disable(false)
endif
if PlayerDice02 > 0
PlayerDiceGroup02[PlayerDice02+(-1)].Disable(false)
endif
if OpponentDice01 > 0
OpponentDiceGroup01[OpponentDice01+(-1)].Disable(false)
endif
if OpponentDice02 > 0
OpponentDiceGroup02[OpponentDice02+(-1)].Disable(false)
endif
PlayersLeft[PCardLeft].Disable(FALSE)
PlayersRight[PCardRight].Disable(false)
PlayersMiddle[PCardMiddle].Disable(false)
@ -276,10 +288,23 @@ Function ResetGame()
if Opponent.GetReference().IsDisabled()
Opponent.GetReference().Enable()
endif
PlayerDiceGroup01[PlayerDice01+(-1)].Disable(false)
PlayerDiceGroup02[PlayerDice02+(-1)].Disable(false)
OpponentDiceGroup01[OpponentDice01+(-1)].Disable(false)
OpponentDiceGroup02[OpponentDice02+(-1)].Disable(false)
if PlayerDice01 > 0
PlayerDiceGroup01[PlayerDice01+(-1)].Disable(false)
endif
if PlayerDice02 > 0
PlayerDiceGroup02[PlayerDice02+(-1)].Disable(false)
endif
if OpponentDice01 > 0
OpponentDiceGroup01[OpponentDice01+(-1)].Disable(false)
endif
if OpponentDice02 > 0
OpponentDiceGroup02[OpponentDice02+(-1)].Disable(false)
endif
PlayersLeft[PCardLeft].Disable(FALSE)
PlayersRight[PCardRight].Disable(false)
PlayersMiddle[PCardMiddle].Disable(false)
@ -310,10 +335,22 @@ Function FinishGameAndClearUp()
Opponent.GetReference().Enable()
endif
PlayerDiceGroup01[PlayerDice01+(-1)].Disable(false)
PlayerDiceGroup02[PlayerDice02+(-1)].Disable(false)
OpponentDiceGroup01[OpponentDice01+(-1)].Disable(false)
OpponentDiceGroup02[OpponentDice02+(-1)].Disable(false)
if PlayerDice01 > 0
PlayerDiceGroup01[PlayerDice01+(-1)].Disable(false)
endif
if PlayerDice02 > 0
PlayerDiceGroup02[PlayerDice02+(-1)].Disable(false)
endif
if OpponentDice01 > 0
OpponentDiceGroup01[OpponentDice01+(-1)].Disable(false)
endif
if OpponentDice02 > 0
OpponentDiceGroup02[OpponentDice02+(-1)].Disable(false)
endif
PlayersLeft[PCardLeft].Disable(FALSE)
PlayersRight[PCardRight].Disable(false)
PlayersMiddle[PCardMiddle].Disable(false)