BG1:
I have a weird behaviour. If I make a quick save before talking to Prism the first time, and then load the save, Prism doesn't have the custom emeralds. I know he had them for the game I saved, because I played the quest. When I load that save, he gives his "You! You took my emerlads" speech. This is really weird.
The "Prism initiates dialogue to prevent the player to open container" doesn't work 100% for me. Sometimes, the party thief remains in a greater distance ("hangs") but the container still opens. I tried adding a "Clicked([ANYONE])" ot the container script but either I did it wrong or it doesn't work: IF Clicked([Anyone])
Range([PC],15)
!Global("abgf_GemInEye","GLOBAL",1)
!Global("abgf_GemInEye","GLOBAL",2)
THEN
RESPONSE #100
ActionOverride("prism",Dialogue([PC]))
END
I have the following:
oublek.d
//OublekBounty1 is for brage
//OublekBounty2 is for prism
//the oublekbounty globals will prevent any exploits by dropping a second item and trying to get the full reward again
ADD_TRANS_TRIGGER ~%tutu_var%oublek~ 9 ~Global("OublekBounty1","GLOBAL",0)~ DO 0 UNLESS ~Global("OublekBounty1","GLOBAL",0)~
ADD_TRANS_TRIGGER ~%tutu_var%oublek~ 9 ~Global("OublekBounty2","GLOBAL",0)~ DO 1 UNLESS ~Global("OublekBounty2","GLOBAL",0)~
ADD_TRANS_TRIGGER ~%tutu_var%oublek~ 9 ~Global("OublekBounty1","GLOBAL",0) Global("OublekBounty2","GLOBAL",0)~ DO 4 UNLESS ~Global("OublekBounty2","GLOBAL",0)~
ADD_TRANS_TRIGGER ~%tutu_var%oublek~ 10 ~Global("OublekBounty1","GLOBAL",0)~ DO 1 5 UNLESS ~Global("OublekBounty1","GLOBAL",0)~
ADD_TRANS_TRIGGER ~%tutu_var%oublek~ 10 ~Global("OublekBounty2","GLOBAL",0)~ DO 9 5 UNLESS ~Global("OublekBounty2","GLOBAL",0)~
//changing from one item to two ensures that players can not take advantage of dropping one item and trying to get the full reward twice
REPLACE_TRANS_TRIGGER %tutu_var%oublek BEGIN 9 END BEGIN 1 END ~PartyHasItem("%tutu_var%MISC43")~ ~PartyHasItem("abgfEyeL")
PartyHasItem("abgfEyeR")~
REPLACE_TRANS_TRIGGER %tutu_var%oublek BEGIN 9 END BEGIN 4 END ~!PartyHasItem("%tutu_var%MISC43")~ ~!PartyHasItem("abgfEyeL")
!PartyHasItem("abgfEyeR")~
REPLACE_TRANS_TRIGGER %tutu_var%oublek BEGIN 10 END BEGIN 9 END ~PartyHasItem("%tutu_var%MISC43")~ ~PartyHasItem("abgfEyeL")
PartyHasItem("abgfEyeR")~
REPLACE_TRANS_TRIGGER %tutu_var%oublek BEGIN 10 END BEGIN 5 END ~!PartyHasItem("%tutu_var%MISC43")~ ~!PartyHasItem("abgfEyeL")
!PartyHasItem("abgfEyeR")~
REPLACE_TRANS_ACTION %tutu_var%oublek BEGIN 14 END BEGIN 0 END ~TakePartyItem("%tutu_var%MISC43")~ ~TakePartyItem("abgfEyeL")
TakePartyItem("abgfEyeR")~
REPLACE_TRANS_ACTION oublek BEGIN 4 END BEGIN 0 END ~TakePartyItem("MISC43")~ ~~
REPLACE_TRANS_ACTION oublek BEGIN 4 END BEGIN 0 END ~GivePartyGold(300)~ ~GivePartyGold(300) TakePartyItem("abgfEyeL") TakePartyItem("abgfEyeR")~
//adding new states that give half the reward when only one item gets turned in
APPEND %tutu_var%oublek
IF ~~ THEN BEGIN abLeftEye
SAY ~One of the Emeralds! That will be a 150 gold bounty for you. Be sure to bring the other if you should find it.~//this is custom text
IF ~~ THEN DO ~AddexperienceParty(100)
GivePartyGold(150)
TakePartyItem("abgfEyeL")
SetGlobal("abgf_LeftEyeBounty","GLOBAL",1)~ EXIT
END
IF ~~ THEN BEGIN abRightEye
SAY ~One of the Emeralds! That will be a 150 gold bounty for you. Be sure to bring the other if you should find it.~//this is custom text
IF ~~ THEN DO ~AddexperienceParty(100)
GivePartyGold(150)
TakePartyItem("abgfEyeR")
SetGlobal("abgf_RightEyeBounty","GLOBAL",1)~ EXIT
END
IF ~~ THEN BEGIN abLeftEyeLast
SAY ~The last of the Emeralds! That will be another 150 gold bounty for you. Well, you'll make quite a name for yourself among the bounty hunters if you keep this up. Whether it is for better or worse, I do not know.~//this is custom text
IF ~~ THEN DO ~AddexperienceParty(100)
GivePartyGold(150)
TakePartyItem("abgfEyeL")
SetGlobal("abgf_LeftEyeBounty","GLOBAL",1)~ EXIT
END
IF ~~ THEN BEGIN abRightEyeLast
SAY ~The last of the Emeralds! That will be another 150 gold bounty for you. Well, you'll make quite a name for yourself among the bounty hunters if you keep this up. Whether it is for better or worse, I do not know.~//this is custom text
IF ~~ THEN DO ~AddexperienceParty(100)
GivePartyGold(150)
TakePartyItem("abgfEyeR")
SetGlobal("abgf_RightEyeBounty","GLOBAL",1) ~ EXIT
END
END //end the append
//adding additional transitions that allow the player to turn in only one of the two required items for good boy
EXTEND_BOTTOM %tutu_var%oublek 9
IF ~PartyHasItem("abgfEyeL")
!PartyHasItem("abgfEyeR")
Global("abgf_LeftEyeBounty","GLOBAL",0)
Global("abgf_RightEyeBounty","GLOBAL",0)~ THEN REPLY ~I've come to turn in a bounty, and collect the reward that is duly mine.~ GOTO abLeftEye
IF ~!PartyHasItem("abgfEyeL")
PartyHasItem("abgfEyeR")
Global("abgf_LeftEyeBounty","GLOBAL",0)
Global("abgf_RightEyeBounty","GLOBAL",0)~ THEN REPLY ~I've come to turn in a bounty, and collect the reward that is duly mine.~ GOTO abRightEye
IF ~PartyHasItem("abgfEyeL")
!PartyHasItem("abgfEyeR")
Global("abgf_RightEyeBounty","GLOBAL",1)~ THEN REPLY ~I've come to turn in a bounty, and collect the reward that is duly mine.~ GOTO abLeftEyeLast
IF ~!PartyHasItem("abgfEyeL")
PartyHasItem("abgfEyeR")
Global("abgf_LeftEyeBounty","GLOBAL",1)~ THEN REPLY ~I've come to turn in a bounty, and collect the reward that is duly mine.~ GOTO abRightEyeLast
END //end the extend bottom
//adding additional transitions that continue to keep 'bad boy' player from getting full reward. If they turn in only one gem, they get rewarded but can't turn in the other or resolve brage issue with oublek. It is an overall punishment when compared to 'good boy' rewards.
EXTEND_BOTTOM %tutu_var%oublek 10
IF ~Global("OublekBounty2","GLOBAL",0)
PartyHasItem("abgfEyeL")
!PartyHasItem("abgfEyeR")
Global("BroughtBounty","GLOBAL",1)~ THEN REPLY ~I've come to turn in a bounty, and collect the reward that is duly mine.~ GOTO 14
IF ~Global("OublekBounty2","GLOBAL",0)
!PartyHasItem("abgfEyeL")
PartyHasItem("abgfEyeR")
Global("BroughtBounty","GLOBAL",1)~ THEN REPLY ~I've come to turn in a bounty, and collect the reward that is duly mine.~ GOTO 14
END //end the extend bottom
//adjustments needed for prism to work with the rest of the component
ADD_STATE_TRIGGER %tutu_var%prism 0 ~HasItem("abgfEyeL",Myself)
HasItem("abgfEyeR",Myself)~
//REPLACE_TRANS_ACTION prism BEGIN 7 END BEGIN 0 moved to separate files for BGT+Tutu / BG
ADD_STATE_TRIGGER %tutu_var%prism 8 ~Global("ab_GemStoleResolve","GLOBAL",1)~
REPLACE_TRANS_ACTION %tutu_var%prism BEGIN 9 END BEGIN 0 END ~GiveItem("%tutu_var%MISC43","GREYWOLF")~
~GiveItem("abgfEyeL","GREYWOLF")
GiveItem("abgfEyeR","GREYWOLF")
SetGlobal("abgf_GemInEye","GLOBAL",3)~ //anything not one means that either the gems were not in container when obtained OR the penalty was applied
//only way to get items if player allowed greywolf to attack prism is to attack greywolf before prism is dead and hopefully kill him before he runs away.
APPEND %tutu_var%prism
IF ~NumTimesTalkedTo(0)
!HasItem("abgfEyeL",Myself)
!HasItem("abgfEyeR",Myself)
PartyHasItem("abgfEyeL")
PartyHasItem("abgfEyeR")
Global("ab_GemStoleResolve","GLOBAL",0)~ THEN BEGIN abBothStole
SAY ~My Emeralds! You! You took them! I must have them back. I need them to finish this epiphany. Please, please return them. I will give you all else that is mine.~
IF ~~ THEN REPLY #4750 DO ~SetGlobal("ab_GemStoleResolve","GLOBAL",1)~ GOTO abRelent
IF ~~ THEN REPLY #4751 DO ~SetGlobal("ab_GemStoleResolve","GLOBAL",1)~ GOTO 3
END
IF ~~ THEN BEGIN abRelent
SAY #678
IF ~~ THEN DO ~TakePartyItem("abgfEyeL")
TakePartyItem("abgfEyeR")
CreateCreature("GREYWO",[1267.2579],0)
ClearAllActions()
StartCutSceneMode()
StartCutScene("Prismcut")~ EXIT
END
IF ~HasItem("abgfEyeL",Myself)
!HasItem("abgfEyeR",Myself)
PartyHasItem("abgfEyeR")
Global("ab_GemStoleResolve","GLOBAL",0)~ THEN BEGIN abRightStole
SAY ~My Emerald! You! You took it! I must have it back. I need it to finish this epiphany. Please, please return it. I will give you all else that is mine.~
IF ~~ THEN REPLY ~All that is yours, eh? So be it.~ DO ~SetGlobal("ab_GemStoleResolve","GLOBAL",1)~ GOTO abRelent
IF ~~ THEN REPLY ~"All else that is yours" does not concern me. I'm taking you and the gems to the guard, where I shall get a hefty reward.~ DO ~SetGlobal("ab_GemStoleResolve","GLOBAL",1)~ GOTO 3
END
IF ~!HasItem("abgfEyeL",Myself)
HasItem("abgfEyeR",Myself)
PartyHasItem("abgfEyeL")
Global("ab_GemStoleResolve","GLOBAL",0)~ THEN BEGIN abLeftStole
SAY ~My Emerald! You! You took it! I must have it back. I need it to finish this epiphany. Please, please return it. I will give you all else that is mine.~
IF ~~ THEN REPLY ~All that is yours, eh? So be it.~ DO ~SetGlobal("ab_GemStoleResolve","GLOBAL",1)~ GOTO abRelent
IF ~~ THEN REPLY ~"All else that is yours" does not concern me. I'm taking you and the gems to the guard, where I shall get a hefty reward.~ DO ~SetGlobal("ab_GemStoleResolve","GLOBAL",1)~ GOTO 3
END
IF ~!HasItem("abgfEyeL",Myself)
!HasItem("abgfEyeR",Myself)
!PartyHasItem("abgfEyeL")
!PartyHasItem("abgfEyeR")
Global("ab_GemStoleResolve","GLOBAL",0)~ THEN BEGIN abBothStoleButGone
SAY ~My Emeralds! You! You took them! I must have them back. I need them to finish this epiphany. Please, please return them. I will give you all else that is mine.~
IF ~Global("OublekBounty2","GLOBAL",1)~ THEN REPLY ~They are gone. Given to the authorities. You will never finish that lump of stone now.~ DO ~SetGlobal("ab_GemStoleResolve","GLOBAL",1)~ GOTO 8
IF ~Global("OublekBounty2","GLOBAL",0)~ THEN REPLY ~They are gone. Sold by now to hang on the neck as some fat woman's trinket.~ DO ~SetGlobal("ab_GemStoleResolve","GLOBAL",1)~ GOTO 8
END
IF ~HasItem("abgfEyeL",Myself)
HasItem("abgfEyeR",Myself)~ THEN stillworking
SAY ~I've much work to do. But mayhaps you would help a foolish sculptor finish this epiphany now? Please, guard this place, for surely Greywolf will come. I will pay with my last possessions!~
COPY_TRANS %tutu_var%prism 1
END
END//end the append
oublek_addBG.d (can be out into oublek.d for a BG-only install):
REPLACE_TRANS_ACTION prism BEGIN 7 END BEGIN 0 END ~DropInventory()~
~DestroyItem("abgfEyeL") DestroyItem("abgfEyeR") SetGlobal("abgf_GemInEye","GLOBAL",1)~
//Make sure the containers are empty if Prism can't put in the gems any more.
//ONLY apply if the emeralds really cannot be returned to Prism
ADD_TRANS_ACTION prism BEGIN 3 8 END BEGIN 0 END ~Unlock("A6StatueRightEye") Unlock("A6StatueLeftEye") ActionOverride("A6StatueRightEye",DestroyItem("abgfEyeR")) ActionOverride("A6StatueLeftEye",DestroyItem("abgfEyeL"))~