Jump to content


AR1500 script loop



No replies to this topic

#1 aVENGER_(RR)

    Sneaksie!

  • Fixpackers
  • 1008 posts
  • Gender:Male

Posted 07 January 2012 - 02:55 AM

The Spellhold outdoors area script has this block at the bottom:

IF
	GlobalGT("AsylumPlot","GLOBAL",55)
THEN
	RESPONSE #100
		Unlock("Door1501")
		OpenDoor("Door1501")
END

As you can see, this block will always return true after the confrontation with Irenicus which will prevent any script blocks placed below it from executing. In the unmodded game, there are no script blocks below this one so the bug is barely noticeable. However, several mods do extend the area script with their own blocks which will never trigger due to this bug. The fix is simple, we introduce a variable which ensures that the door unlocking/opening only occurs once:

// The Spellhold Asylum door should be unlocked and opened once

COPY_EXISTING ~ar1500.bcs~ ~override~
DECOMPILE_BCS_TO_BAF
  REPLACE_TEXTUALLY EXACT_MATCH ~GlobalGT("AsylumPlot","GLOBAL",55)~ ~GlobalGT("AsylumPlot","GLOBAL",55) Global("RR#Door1501","AR1500",0)~
  REPLACE_TEXTUALLY EXACT_MATCH ~Unlock("Door1501")~ ~SetGlobal("RR#Door1501","AR1500",1) Unlock("Door1501")~
COMPILE_BAF_TO_BCS
BUT_ONLY_IF_IT_CHANGES

Retired modder

Rogue Rebalancing - Author
aTweaks - Author
Wizard Slayer Rebalancing - Co-Author
BG2 Fixpack - Contributor




Reply to this topic



  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users