jastey Posted October 27, 2006 Share Posted October 27, 2006 Seems BioWare didn't read the WeiDU-readme careful enough before coding up Anomen's AnomenJ.dlg dialogues. I scanned through the file and noticed, that all minus one dialogues are called by Triggger Variable=0 (!) and a bunch of other triggers, that happen to be valid at the time this dialogue should happen. For my mod I added several dialogues to the AnomenJ as I tend to put scripted dialogues there (i.e. dialogues that are called via script). During playtesting it occurred to me several times, that my script block called an original Anomen dialogue, leaving the mod dialogue in the pipeline, to be called some other time or via click-talk (which I found rather annoying). It doesn't make me wonder, looking at the way it is coded. Dealing with another knight of the Order some of the Anomen-dialogues are quite helpful for the plot of my mod, so I decided to change the way the AnomenJ dialogues are triggered. This is what I am planning to do: For every dialogue: Add unique trigger variables to the script block (setting the variable from 0 to 1 for triggering of the dialogue), adding the same trigger variable (=1) as state triggers (including A_T_A to increase this variable to "2"). This could be realised via "REPLACE_STATE_TRIGGER", "ADD_STATE_TRIGGER", and some "REPLACE_TEXTUALLY" etc. for the changes in the Anomen.bcs. This implies some severe changes to the appearance of the AnomenJ.dlg and the Anomen.baf, that obviously can only be made by one mod for every install. So I'd rather discuss this publically and would be very happy to hear your opinion concerning this. Is it necessary? Would there be a better, easier and nicer way to accomplish the result? And, most of all, please comment on my coding if I missed a neat new and more suitable WeiDU feature. I'll post examples soon, feel free to comment as I go along. Link to comment
jastey Posted October 27, 2006 Author Share Posted October 27, 2006 First example is the dialogue with state number "0": Anomen's commenting on the dead knights after the Windspear hills fight. IF WEIGHT #9 /* Triggers after states #: 28 32 89 101 110 150 205 207 282 even though they appear after this state */ ~Global("DomainPaladinBattle","GLOBAL",1) Global("AnomenMonsters","LOCALS",0)~ THEN BEGIN 0 // from: SAY #6187 /* ~Beim Barte Helms! Was haben wir getan? Eine üble List gegen uns! Unschuldige wurden getötet! Das Herzblut des Ordens ist über den Boden unter meinen Füßen vergossen worden! Was haben wir nur getan?~ [ANOMEN99] */ IF ~~ THEN REPLY #6188 /* ~Irgendetwas ist ganz offensichtlich falsch an dieser Situation. Was ist geschehen?~ */ GOTO 1 IF ~~ THEN REPLY #6249 /* ~Hört auf zu schwafeln! Wir wurden angegriffen und mussten uns verteidigen.~ */ GOTO 3 END The scriptblock by which this dialouge is triggered reads: IF InParty(Myself) Global("DomainPaladinBattle","GLOBAL",1) Global("AnomenMonsters","LOCALS",0) AreaCheck("ar1200") THEN RESPONSE #100 Wait(1) StartDialogueNoSet(Player1) SetGlobal("AnomenMonsters","LOCALS",1) END The "Global("DomainPaladinBattle","GLOBAL",1)" is the short time span after the last knight /monster illusion is killed until Garren's first appearance. If a mod tries to trigger an added dialogue in this time span, Anomen's commenting will appear instead. And best of all, since the incrementing of the variable is not performed in the dialogue, but in the script, theoretically this talk could be triggered several times - every time replacing a mod-dialogue. (Usually the time span for which "Global("DomainPaladinBattle","GLOBAL",1)" is valid is too short to trigger any of Anomen's commenting, but hey.) I would suggest changing this like the following: Replace the dialogue state trigger with ~Global("AnomenMonsters","LOCALS",1)~ (since this is the variable for this dialogue we do not have to invent a new one). Add transition actions ~SetGlobal("AnomenMonsters","LOCALS",2)~ to the reply options. In the Anomen.bcs, call the dialogue via ~SetGlobal("AnomenMonsters","LOCALS",1) StartDialogueNoSet(Player1)~ This would mean the changed script/ dialogue pair would look like this: IF WEIGHT #9 /* Triggers after states #: 28 32 89 101 110 150 205 207 282 even though they appear after this state */ ~Global("AnomenMonsters","LOCALS",1)~ THEN BEGIN 0 // from: SAY #6187 /* ~Beim Barte Helms! Was haben wir getan? Eine üble List gegen uns! Unschuldige wurden getötet! Das Herzblut des Ordens ist über den Boden unter meinen Füßen vergossen worden! Was haben wir nur getan?~ [ANOMEN99] */ IF ~~ THEN REPLY #6188 /* ~Irgendetwas ist ganz offensichtlich falsch an dieser Situation. Was ist geschehen?~ */ DO ~SetGlobal("AnomenMonsters","LOCALS",2)~ GOTO 1 IF ~~ THEN REPLY #6249 /* ~Hört auf zu schwafeln! Wir wurden angegriffen und mussten uns verteidigen.~ */ DO ~SetGlobal("AnomenMonsters","LOCALS",2)~ GOTO 3 END and IF InParty(Myself) Global("DomainPaladinBattle","GLOBAL",1) Global("AnomenMonsters","LOCALS",0) AreaCheck("ar1200") THEN RESPONSE #100 SetGlobal("AnomenMonsters","LOCALS",1) StartDialogueNoSet(Player1) END The used code would look like this: somewhere in a .d: REPLACE_STATE_TRIGGER ANOMENJ 0 ~Global("AnomenMonsters","LOCALS",1)~ ADD_TRANS_ACTION AnomenJ BEGIN 0 END BEGIN END ~SetGlobal("AnomenMonsters","LOCALS",2)~ And in the .tp2: COPY_EXISTING ~Anomen.bcs~ ~override~ DECOMPILE_BCS_TO_BAF REPLACE_TEXTUALLY ~Wait(1) StartDialogueNoSet(Player1) SetGlobal("AnomenMonsters","LOCALS",1)~ ~SetGlobal("AnomenMonsters","LOCALS",1) StartDialogueNoSet(Player1)~ COMPILE_BAF_TO_BCS BUT_ONLY_IF_IT_CHANGES Link to comment
berelinde Posted October 27, 2006 Share Posted October 27, 2006 Hey, that's pretty cool! With that bit of script in there, it looks like it would force Anomen's commentary to fire, regardless of mod input. Or I could be misreading it. Link to comment
jastey Posted October 27, 2006 Author Share Posted October 27, 2006 With that bit of script in there, it looks like it would force Anomen's commentary to fire, regardless of mod input.I haven't tried it out, but I skipped the "Wait(1)" in the hope that it gives Anomen a chance to make his comment before Garren appears. Another possibility to let Anomen speak in any case would be to include "Global("DomainPaladinBattle","GLOBAL",2)", which would allow the talk to trigger after the meeting with Garren, too (before the PC enters Garren's hut). Link to comment
jastey Posted October 27, 2006 Author Share Posted October 27, 2006 The second one is a real bugfix (which I haven't seen included in the fixpack yet). Anomen complains to spead up the Garren's kid quest. At least that's what he is supposed to do, but unless I read the coding wrong the talk cannot happen in an unmodded game: IF WEIGHT #12 /* Triggers after states #: 28 32 89 101 110 150 205 207 282 even though they appear after this state */ ~Global("ddAnomenWhine","LOCALS",1)~ THEN BEGIN 14 // from: SAY #6482 /* ~Ich protestiere gegen Euren offensichtlichen Mangel an Einfühlungsvermögen für diese Situation! Garren Windspeers Kind siecht in den Klauen des Bösen dahin. Wir müssen das Kind retten, wenn wir jemals unseren guten Ruf zurückerlangen wollen.~ [ANOMENB1] */ IF ~~ THEN REPLY #6499 /* ~Wir werden Garrens Kind bei der ersten Gelegenheit retten.~ */ DO ~SetGlobal("ddAnomenWhine","LOCALS",0)~ GOTO 15 IF ~~ THEN REPLY #6500 /* ~Ich bin mir Eurer Meinung diesbezüglich wohl bewusst. Seid still, und ich komme darauf zu sprechen.~ */ DO ~SetGlobal("ddAnomenWhine","LOCALS",0)~ GOTO 16 END The corresponding script block goes like this: IF InParty(Myself) GlobalTimerExpired("ddKidnapTimer","GLOBAL") Global("ddAnomenWhine","LOCALS",0) !GlobalGT("Kidnap","GLOBAL",3) THEN RESPONSE #100 StartDialogueNoSet(Player1) SetGlobal("ddAnomenWhine","LOCALS",1) SetGlobalTimer("ddKidnapTimer","GLOBAL",THREE_DAYS) END It seems the intention is to let Anomen only "whine" about the quest delay every third day, without any further consequences. To make it work, the setting of the variable should be before the dialogue gets triggered: IF InParty(Myself) GlobalTimerExpired("ddKidnapTimer","GLOBAL") Global("ddAnomenWhine","LOCALS",0) !GlobalGT("Kidnap","GLOBAL",3) THEN RESPONSE #100 SetGlobal("ddAnomenWhine","LOCALS",1) StartDialogueNoSet(Player1) SetGlobalTimer("ddKidnapTimer","GLOBAL",THREE_DAYS) END This would be done via COPY_EXISTING ~Anomen.bcs~ ~override~ DECOMPILE_BCS_TO_BAF REPLACE_TEXTUALLY ~StartDialogueNoSet(Player1) SetGlobal("ddAnomenWhine","LOCALS",1)~ ~SetGlobal("ddAnomenWhine","LOCALS",1) StartDialogueNoSet(Player1)~ COMPILE_BAF_TO_BCS BUT_ONLY_IF_IT_CHANGES Link to comment
jastey Posted October 27, 2006 Author Share Posted October 27, 2006 I just realised that this thread might be better placed in the "General mod discussion", oh well. The third case is Anomen's complaining after Moira's death if the PC lingers too long instead of going to Anomen's home. IF WEIGHT #0 ~GlobalTimerExpired("AnomenHome","GLOBAL") Global("AnomenComplain","LOCALS",0)~ THEN BEGIN 28 // from: SAY #7633 /* ~Der Leichnam meiner Schwester verrottet in der Erde, während Ihr ziellos umherstreift. Ich muss auf der Stelle nach Hause zurückkehren, damit meiner Schwester ein anständiges Begräbnis bekommt.~ [ANOMENA1] */ IF ~~ THEN REPLY #7634 /* ~Wir werden uns jetzt dorthin begeben.~ */ GOTO 29 IF ~~ THEN REPLY #7635 /* ~Ich werde uns dorthin führen, wenn ich so weit bin.~ */ GOTO 30 END This goes together with the second complaint, after which Anomen leaves the group to go there on his own. This one will never occurr, as the required variable ("Global("AnomenComplain","LOCALS",1)") never gets set. (I could have sworn I read somewhere that this was fixed but I couldn't find any references to it in the (G3) BGII fixpack or anywhere else.) So the first complaint in which Anomen can be convinced to stay would be repeated, until "Global("TalkedToCor","GLOBAL",1)" would be finally set after reaching Anomen's home and tlking to his father. IF WEIGHT #1 ~GlobalTimerExpired("AnomenHome","GLOBAL") Global("AnomenComplain","LOCALS",1) ~ THEN BEGIN 32 // from: SAY #7641 /* ~Fluch über Euch, dass Ihr mich hierher gebracht habt! Ich verlasse Euch jetzt und kehre nie mehr zurück! Das Gedenken an meine Schwester wird durch Eure verschlungenen Wege entehrt.~ [ANOMENA2] */ IF ~~ THEN REPLY #7642 /* ~Wir gehen sofort mit Euch.~ */ DO ~SetGlobal("AnomenComplain","LOCALS",2)~ GOTO 33 IF ~~ THEN REPLY #7643 /* ~Das kümmert mich nicht. Geht Euren Weg, hier seid Ihr nicht mehr willkommen.~ */ DO ~SetGlobal("AnomenComplain","LOCALS",2)~ GOTO 34 END This is the script block that triggers them both: IF InParty(Myself) GlobalTimerExpired("AnomenHome","GLOBAL") GlobalLT("AnomenComplain","LOCALS",2) Global("TalkedToCor","GLOBAL",0) CombatCounter(0) !Global("Chapter","GLOBAL",4) !Global("Chapter","GLOBAL",5) !Global("Chapter","GLOBAL",7) AreaType(OUTDOOR) See(Player1) THEN RESPONSE #100 StartDialogueNoSet(Player1) END To fix this I don't see a better solution than to replace the existing script block with the following, so the trigger variable can be set accordingly, and to add equivalent state triggers and actions: IF InParty(Myself) GlobalTimerExpired("AnomenHome","GLOBAL") OR(2) Global("AnomenComplain","LOCALS",0) Global("AnomenComplain","LOCALS",2) Global("TalkedToCor","GLOBAL",0) CombatCounter(0) !Global("Chapter","GLOBAL",4) !Global("Chapter","GLOBAL",5) !Global("Chapter","GLOBAL",7) AreaType(OUTDOOR) See(Player1) THEN RESPONSE #100 IncrementGlobal("AnomenComplain","LOCALS",1) StartDialogueNoSet(Player1) END The first complaint would look accordingly IF WEIGHT #0 ~Global("AnomenComplain","LOCALS",1)~ THEN BEGIN 28 // from: SAY #7633 /* ~Der Leichnam meiner Schwester verrottet in der Erde, während Ihr ziellos umherstreift. Ich muss auf der Stelle nach Hause zurückkehren, damit meiner Schwester ein anständiges Begräbnis bekommt.~ [ANOMENA1] */ IF ~~ THEN REPLY #7634 /* ~Wir werden uns jetzt dorthin begeben.~ */ DO ~SetGlobal("AnomenComplain","LOCALS",2)~ GOTO 29 IF ~~ THEN REPLY #7635 /* ~Ich werde uns dorthin führen, wenn ich so weit bin.~ */ DO ~SetGlobal("AnomenComplain","LOCALS",2)~ GOTO 30 END And the final one: IF WEIGHT #1 ~Global("AnomenComplain","LOCALS",3) ~ THEN BEGIN 32 // from: SAY #7641 /* ~Fluch über Euch, dass Ihr mich hierher gebracht habt! Ich verlasse Euch jetzt und kehre nie mehr zurück! Das Gedenken an meine Schwester wird durch Eure verschlungenen Wege entehrt.~ [ANOMENA2] */ IF ~~ THEN REPLY #7642 /* ~Wir gehen sofort mit Euch.~ */ DO ~SetGlobal("AnomenComplain","LOCALS",4)~ GOTO 33 IF ~~ THEN REPLY #7643 /* ~Das kümmert mich nicht. Geht Euren Weg, hier seid Ihr nicht mehr willkommen.~ */ DO ~SetGlobal("AnomenComplain","LOCALS",4)~ GOTO 34 END The necessary code would be REPLACE_STATE_TRIGGER ANOMENJ 28 ~Global("AnomenComplain","LOCALS",1)~ REPLACE_STATE_TRIGGER ANOMENJ 32 ~Global("AnomenComplain","LOCALS",3)~ ADD_TRANS_ACTION AnomenJ BEGIN 28 END BEGIN END ~SetGlobal("AnomenComplain","LOCALS",2)~ REPLACE_ACTION_TEXT ~AnomenJ~ ~SetGlobal("AnomenComplain","LOCALS",2)~ ~SetGlobal("AnomenComplain","LOCALS",4)~ For the script block I assume it would be REPLACE_BCS_BLOCK ~[.baf containing original bcs block]~ ~[.baf containing changed bcs block]~ , unless someone points me to a better fail-proof possibility. Link to comment
cmorgan Posted October 27, 2006 Share Posted October 27, 2006 I have been warned (and seen first hand) that the REPLACE_BCS_BLOCK is a very fragile method... if there is a way to use regexp and single line or several line R_T work, it would be less likely to fail. It might be better to try for single line BAF swaps or borrow the newline/regexp library from CamDawg/DR, or even just false out the block and EXTEND_BOTTOM on the BCS Link to comment
jastey Posted October 27, 2006 Author Share Posted October 27, 2006 Thank you, cmorgan, I noticed your trouble with REPLACE_BCS_BLOCK so that's why I am a bit nervous about it, but all the other things you mentioned are weiDU-Chinese to me. If any one of the experts would step foreward and explain a better way, that would be great! Especially as for the next case it would be needed, again. The next one are Anomen's complaints, if the PC lingers nstead of returning to the Order's headquarters for Anoman's knighting test. Again it's two complaining dialogues, the second one final as Anomen will leave the party to travel on his own. First talk: IF WEIGHT #14 /* Triggers after states #: 89 101 110 150 205 207 282 even though they appear after this state */ ~GlobalTimerExpired("AnomenTrial","GLOBAL") Global("AnomenComplainKnight","LOCALS",0)~ THEN BEGIN 84 // from: SAY #8056 /* ~Wie Ihr wisst, muss ich mich auf den Weg zum Orden in Atkatla machen, um meine Ritterwürde beurteilen zu lassen. Ich hätte schon dort sein müssen. Machen wir uns jetzt auf den Weg, oder bin ich gezwungen, die Gruppe zu verlassen?~ [ANOMENB2] */ IF ~~ THEN REPLY #8057 /* ~Wovon sprecht Ihr?~ */ DO ~SetGlobal("AnomenComplainKnight","LOCALS",1)~ GOTO 85 IF ~~ THEN REPLY #8059 /* ~Vielleicht ist es dann am besten, wenn Ihr uns verlasst. Ich habe keine Zeit, Euch nach Atkatla zu bringen.~ */ DO ~SetGlobal("AnomenComplainKnight","LOCALS",1)~ GOTO 86 IF ~~ THEN REPLY #8067 /* ~Es gibt keinen Grund für Euch, uns zu verlassen. Wir werden schnellstens dorthin reisen.~ */ DO ~SetGlobal("AnomenComplainKnight","LOCALS",1)~ GOTO 87 END Second talk: IF WEIGHT #15 /* Triggers after states #: 89 101 110 150 205 207 282 even though they appear after this state */ ~GlobalTimerExpired("AnomenTrial","GLOBAL") Global("AnomenComplainKnight","LOCALS",1) ~ THEN BEGIN 88 // from: SAY #8100 /* ~Ich brauche solchen Unsinn nicht. Ich werde mich allein auf den Weg zur Hohen Halle machen, da Ihr mich offenbar von meinen Verpflichtungen abhalten wollt. Euch habe ich es zu verdanken, dass ich zu meiner eigenen Beurteilung zu spät komme.~ [ANOMENB3] */ IF ~~ THEN DO ~SetGlobal("AnomenComplainKnight","LOCALS",2) EraseJournalEntry(10928) SetGlobal("AnomenTrialOnOwn","GLOBAL",1) ChangeAIScript("",DEFAULT) SetLeavePartyDialogFile() LeaveParty() EscapeAreaMove("AR0903",852,1235,7)~ SOLVED_JOURNAL #20939 /* ~Anomens Beurteilung Anomen hat die Gruppe verlassen, um allein zum Orden des Strahlenden Herzens zu reisen und sich dort seiner Prüfung zu stellen. Er war verärgert darüber, dass ich ihn nicht begleitet habe. Ich bezweifle, dass er in Zukunft wieder mit uns reisen wird.~ ~Anomens BeurteilungAnomen hat die Gruppe verlassen, um allein zum Orden des Strahlenden Herzens zu reisen und sich dort seiner Prüfung zu stellen. Er war verärgert darüber, dass ich ihn nicht begleitet habe. Ich bezweifle, dass er in Zukunft wieder mit uns reisen wird.~ */ EXIT END script block in Anomen.bcs: IF InParty(Myself) GlobalTimerExpired("AnomenTrial","GLOBAL") GlobalLT("AnomenComplainKnight","LOCALS",2) Global("AnomenGoesTrial","GLOBAL",1) Global("AnomenTrialOnOwn","GLOBAL",0) !Global("Chapter","GLOBAL",4) !Global("Chapter","GLOBAL",5) !Global("Chapter","GLOBAL",7) !AreaType(DUNGEON) CombatCounter(0) See(Player1) THEN RESPONSE #100 StartDialogueNoSet(Player1) END Changes would be similar to the ongoing; the variable "Global("AnomenComplainKnight","LOCALS",x)" would be (re-)used for all talks with different values (if someone spots a more consequent solution please tell me!): IF InParty(Myself) GlobalTimerExpired("AnomenTrial","GLOBAL") OR(2) Global("AnomenComplainKnight","LOCALS",0) Global("AnomenComplainKnight","LOCALS",2) Global("AnomenGoesTrial","GLOBAL",1) Global("AnomenTrialOnOwn","GLOBAL",0) !Global("Chapter","GLOBAL",4) !Global("Chapter","GLOBAL",5) !Global("Chapter","GLOBAL",7) !AreaType(DUNGEON) CombatCounter(0) See(Player1) THEN RESPONSE #100 IncrementGlobal("AnomenComplainKnight","LOCALS",1) StartDialogueNoSet(Player1) END REPLACE_STATE_TRIGGER ANOMENJ 84 ~Global("AnomenComplainKnight","LOCALS",1)~ REPLACE_STATE_TRIGGER ANOMENJ 88 ~Global("AnomenComplainKnight","LOCALS",3)~ REPLACE_ACTION_TEXT ~AnomenJ~ ~SetGlobal("AnomenComplainKnight","LOCALS",1)~ ~SetGlobal("AnomenComplainKnight","LOCALS",2)~ REPLACE_ACTION_TEXT ~AnomenJ~ ~SetGlobal("AnomenComplainKnight","LOCALS",2)~ ~SetGlobal("AnomenComplainKnight","LOCALS",4)~ REPLACE_BCS_BLOCK ~[.baf containing original bcs block]~ ~[.baf containing changed bcs block]~ //should be replaced by something more stable Link to comment
jastey Posted October 27, 2006 Author Share Posted October 27, 2006 The following are two talks, one for passed and one for failed knighting test: LG Anomen IF WEIGHT #4 ~Global("AnomenIsKnight","GLOBAL",1) Global("AnomenBanter","GLOBAL",0) !AreaCheck("AR0903") AreaType(OUTDOOR)~ THEN BEGIN 110 // from: SAY #8400 /* ~Dies ist wahrlich ein großer Tag, mein Freund!~ [ANOMENA5] */ IF ~~ THEN REPLY #8401 /* ~Ihr scheint sehr mit Euch zufrieden zu sein, Anomen. Ich sehe, dass das Rittertum Euch gut bekommt.~ */ GOTO 111 IF ~~ THEN REPLY #8402 /* ~Es ist nie ein großer Tag, Anomen.~ */ GOTO 112 IF ~~ THEN REPLY #8403 /* ~Dies ist kein guter Zeitpunkt für eine Unterhaltung.~ */ GOTO 113 END triggered by IF InParty(Myself) Global("AnomenIsKnight","GLOBAL",1) Global("AnomenBanter","GLOBAL",0) Global("AnomenSpeaksAfterTrial","LOCALS",0) !AreaCheck("AR0903") AreaType(OUTDOOR) TimeGT(DAWN_START) TimeLT(17) CombatCounter(0) See(Player1) !StateCheck(Player1,STATE_SLEEPING) THEN RESPONSE #100 SetGlobal("AnomenSpeaksAfterTrial","LOCALS",1) StartDialogueNoSet(Player1) END CN Anomen IF WEIGHT #3 ~Global("AnomenIsNotKnight","GLOBAL",1) Global("AnomenUpset","GLOBAL",1) Global("AnomenBlowsUp","LOCALS",0) !AreaCheck("AR0903")~ THEN BEGIN 101 // from: SAY #8351 /* ~Beim Barte Helms! Ich glaub' das einfach nicht! Mein ganzes Leben! Mein Leben lang habe ich dem Orden gedient, und nun lässt man mich fallen, als wäre ich Abfall. Verflucht sollt Ihr sein!~ [ANOMENA4] */ IF ~~ THEN REPLY #8355 /* ~Beruhigt euch, Anomen. So schlimm ist es nicht.~ */ DO ~SetGlobal("AnomenBlowsUp","LOCALS",1)~ GOTO 102 IF ~~ THEN REPLY #8357 /* ~Wen interessiert das schon? Das Leben ist schwierig. Akzeptiert das und lasst uns weiterziehen.~ */ DO ~SetGlobal("AnomenBlowsUp","LOCALS",1)~ GOTO 103 IF ~~ THEN REPLY #8359 /* ~Wenn Ihr Euch so benehmt wie jetzt, dann beweist das nur, dass Ihr tatsächlich nie würdig wart, ein Ritter zu werden. Der Prälat tat Recht daran, Euch abzulehnen.~ */ DO ~SetGlobal("AnomenBlowsUp","LOCALS",1)~ GOTO 104 END triggered by IF InParty(Myself) Global("AnomenIsNotKnight","GLOBAL",1) Global("AnomenUpset","GLOBAL",1) Global("AnomenSpeaksAfterTrial","LOCALS",0) !AreaCheck("AR0903") CombatCounter(0) See(Player1) !StateCheck(Player1,STATE_SLEEPING) THEN RESPONSE #100 SetGlobal("AnomenSpeaksAfterTrial","LOCALS",1) StartDialogueNoSet(Player1) END These ones are easy, as the trigger blocks use an own trigger variable that can be used for the dialogue blocks, too: A_S_T AnomenJ 110 ~Global("AnomenSpeaksAfterTrial","LOCALS",1)~ A_S_T AnomenJ 101 ~Global("AnomenSpeaksAfterTrial","LOCALS",1)~ Link to comment
jastey Posted October 27, 2006 Author Share Posted October 27, 2006 The next one is a warning (or, let's say, spoiler) Anomen gives upon entering the tanner's house. IF WEIGHT #6 ~AreaCheck("AR0502") Global("EnteredTanner","AR0502",0)~ THEN BEGIN 205 // from: SAY #48980 /* ~Helm beschütze uns ... Ich kann hier die Aura des Bösen spüren. Die Ermordeten verweilen hier ... Und zweifellos hat die Bestie an diesem Ort viele fallen aufgestellt. Geht vorsichtig weiter!~ */ IF ~Global("ToldInspector","GLOBAL",0)~ THEN DO ~SetGlobal("EnteredTanner","AR0502",1) ~ EXIT IF ~Global("ToldInspector","GLOBAL",1)~ THEN DO ~SetGlobal("EnteredTanner","AR0502",1) ~ GOTO 206 END triggered by the script block: IF InParty(Myself) Global("TannerWarning","AR0502",0) AreaCheck("AR0502") THEN RESPONSE #100 SetGlobal("TannerWarning","AR0502",1) StartDialogueNoSet(Player1) END So again there is a trigger variable that could be used as additional state trigger: A_S_T AnomenJ 205 ~Global("TannerWarning","AR0502",1)~ Link to comment
jastey Posted October 27, 2006 Author Share Posted October 27, 2006 Anomen's commenting on the dead officer (if Keldorn does not comment): IF WEIGHT #7 ~PartyHasItem("misc5m") OR(3) !InParty("Keldorn") Dead("Keldorn") !StateCheck("Keldorn",STATE_SLEEPING) See(Player1) Global("FoundAegis","GLOBAL",0) ~ THEN BEGIN 207 // from: SAY #48986 /* ~Eine grausige Entdeckung, denn der Leutnant schien ein ehrbarer Mann zu sein. Wenn möglich, sollten wir seinen Leichnam den Behörden im Regierungsviertel übergeben.~ */ IF ~~ THEN DO ~SetGlobal("FoundAegis","GLOBAL",1)~ EXIT END trigger script block: IF InParty(Myself) See(Player1) !StateCheck(Player1,STATE_SLEEPING) OR(3) !InParty("Keldorn") Dead("Keldorn") // Feuerschild StateCheck("Keldorn",STATE_SLEEPING) Global("FoundAegis","GLOBAL",0) Global("FoundAegis2","LOCALS",0) Delay(10) PartyHasItem("misc5m") // Leiche des Kommissar THEN RESPONSE #100 SetGlobal("FoundAegis2","LOCALS",1) StartDialogueNoSet(Player1) END Again this one is easy: A_S_T AnomenJ 207 ~Global("FoundAegis2","LOCALS",1)~ Link to comment
jastey Posted October 27, 2006 Author Share Posted October 27, 2006 The last one is to-be CN Anomen's comment after killing Saerk and his daughter. IF WEIGHT #8 ~Dead("saerk") !Dead("cor") Global("KillSaerk","GLOBAL",1) Global("SaerkRevengeDone","LOCALS",0)~ THEN BEGIN 282 // from: SAY #56473 /* ~So. Es ist erledigt. Ich will auch keine Kritik hören. Es war allein meine Entscheidung. Lasst uns zu meinem Vater zurückkehren und ihm berichten, was geschehen ist.~ [ANOMENA6] */ IF ~~ THEN DO ~SetGlobal("SaerkRevengeDone","LOCALS",1)~ UNSOLVED_JOURNAL #7686 /* ~Anomen kehrt nach dem Tod seiner Schwester heim. Anomen hat Saerks Tochter umgebracht, danach bekämpften wir Saerk, seinen Sohn und seine Wachen. Yusef, der Sohn, ist entkommen, aber Saerk ist tot. Anomen ist in düsterer Stimmung. Was noch zu tun bleibt, ist, Fürst Cor zu berichten, dass die Tat vollbracht wurde.~ ~Anomen kehrt nach dem Tod seiner Schwester heim.Anomen hat Saerks Tochter umgebracht, danach bekämpften wir Saerk, seinen Sohn und seine Wachen. Yusef, der Sohn, ist entkommen, aber Saerk ist tot. Anomen ist in düsterer Stimmung. Was noch zu tun bleibt, ist, Fürst Cor zu berichten, dass die Tat vollbracht wurde.~ */ EXIT END trigger script block: IF InParty(Myself) AreaCheck("AR0505") Global("KillSaerk","GLOBAL",1) Global("AnomenDecide","GLOBAL",2) CombatCounter(0) Dead("Saerk") // Saerk Farrahd !Dead("Cor") // Cor Delryn Global("SaerkRevengeDone","LOCALS",0) Global("TheBadManIsDead","LOCALS",0) THEN RESPONSE #100 SetGlobal("TheBadManIsDead","LOCALS",1) ActionOverride("Anomen",StartDialogueNoSet([PC])) END Again the trigger variable could be used: A_S_T AnomenJ 282 ~Global("TheBadManIsDead","LOCALS",1)~ Link to comment
jastey Posted October 27, 2006 Author Share Posted October 27, 2006 I know it's a lot to read, and sorry for the German version. But, would this be helpful as a kind of tweak / fix? Is anyone interested in having this available for his/her own mod? Or is it plain stupid and I should return to do some proper work? I'd appreciate your feedback. Link to comment
jastey Posted October 27, 2006 Author Share Posted October 27, 2006 First example is the dialogue with state number "0": Anomen's commenting on the dead knights after the Windspear hills fight. If the counting of the "AnomenMonsters" variable is chnaged here, the "happy" talk after Garren's return would be affected, too, so: //change the following "happy" talk REPLACE_STATE_TRIGGER ANOMENJ 9 ~Global("AnomenMonsters","LOCALS",2)~ ADD_TRANS_ACTION AnomenJ BEGIN 9 END BEGIN END ~SetGlobal("AnomenMonsters","LOCALS",4)~ COPY_EXISTING ~Anomen.bcs~ ~override~ DECOMPILE_BCS_TO_BAF REPLACE_TEXTUALLY ~InParty(Myself) Global("AnomenMonsters","LOCALS",1) Global("Kidnap","GLOBAL",3)~ ~InParty(Myself) Global("AnomenMonsters","LOCALS",2) Global("Kidnap","GLOBAL",3)~ REPLACE_TEXTUALLY ~StartDialogueNoSet(Player1) SetGlobal("AnomenMonsters","LOCALS",2)~ ~SetGlobal("AnomenMonsters","LOCALS",3) StartDialogueNoSet(Player1)~ Link to comment
berelinde Posted October 27, 2006 Share Posted October 27, 2006 I am highly interested in what you are doing, but I won't have time to think about it for a while. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.