Ascension64 Posted August 28, 2010 Share Posted August 28, 2010 The combination of BGT and BG1NPC currently breaks Gerde's quest. This is because different death variables are used for ANKHEGG.CRE bg1npc.tp2 COPY_EXISTING ~%tutu_var%ankheg.cre~ ~override~ ~%tutu_var%ankhegg.cre~ ~override~ ~%tutu_var%ankhegq.cre~ ~override~ WRITE_ASCII 0x280 ~ankheg~ #32 // death variable BUT_ONLY_IF_IT_CHANGES Setup-BGT.tp2 COPY + ~override/ANKHEGG.CRE~ ~override~ WRITE_ASCII 0x250 ~~ #8 //class script WRITE_ASCII 0x280 ~AnkhegG~ #32 //script name I am not sure how this can be fixed at the moment. BGT relies on this death variable for the unique area kills to complete Gerde's quest. This was a fix for the Die() triggers not working all the time. AR1400.BCS(BG1)/AR8300.BCS(BGT) IF NumDeadGT("AnkhegG",0) Global("HelpGerde","GLOBAL",0) THEN RESPONSE #100 SetGlobal("HelpGerde","GLOBAL",1) END I understand that Kivan has some kind of comment/interjection (quest?) when a certain number of ankhegs are killed. x#kiint2.baf /* Kivan Ankhegs */ IF %BGT_VAR% AreaCheck("%FishingVillage%") Global("AnkhegCount","%FishingVillage%",1) Global("P#KivanAnkheg","GLOBAL",0) NumDead("ankheg",10) InParty(Myself) !StateCheck(Myself,CD_STATE_NOTVALID) InMyArea(Player1) !StateCheck(Player1,CD_STATE_NOTVALID) CombatCounter(0) !See([ENEMY]) THEN RESPONSE #100 SetGlobal("P#KivanAnkheg","GLOBAL",1) END Any ideas on how to correct this incompatibility? My requirements for BGT are: i) ensure Gerde's quest can always be completed; and ii) ensure that the player must kill ankhegs in the same area as Gerde for her quest to be completed. Link to comment
cmorgan Posted August 28, 2010 Share Posted August 28, 2010 Is there any reason why BG1NPC can't just use the g DV? As I understood it, most of the project-added DVs attempted to use a standardized DV=creature_file_name, but it was never really systematized/standardized. I will search my ton of mod tp2s and check, but I don't think many folks touch this. Unless you see a problem, I can just add the G. Link to comment
cmorgan Posted August 28, 2010 Share Posted August 28, 2010 Hold on - Faldorn uses this too, I think - let me investigate... OK, D:\ie_checkfiles\bg1npc-v18\bg1npc.tp2 Line 230: ~%tutu_var%ankheg.cre~ Line 2866: COPY_EXISTING ~%tutu_var%ankheg.cre~ ~override~ Line 2867: ~%tutu_var%ankhegg.cre~ ~override~ Line 2868: ~%tutu_var%ankhegq.cre~ ~override~ Line 2869: WRITE_ASCII 0x280 ~ankheg~ #32 // death variable Line 4669: EXTEND_BOTTOM ~%FV_AnkhegPit_BCS%.bcs~ ~BG1NPC/Phase2/baf/P#FW1401.BAF~ D:\ie_checkfiles\BGT108-Install\Setup-BGT.tp2 Line 8273: COPY + ~override/ANKHEGG.CRE~ ~override~ Line 8275: WRITE_ASCII 0x280 ~AnkhegG~ #32 //script name D:\ie_checkfiles\BPv179e\Setup-BPv179.tp2 (2 hits) Line 8145: COPY_EXISTING ~ANKHEG01.CRE~ ~override~ Line 8146: WRITE_ASCII 0x248 ~ANKHEG~ #8 The BP reference doesn't concern us, as it hits ANKHEG01.cre, so it is just BGT and BG1NPC. Faldorn's materials add this to both Tutu and BGT. D:\ie_checkfiles\bg1npc-v18\bg1npc\phase2\baf\p#fw1400.baf IF %BGT_VAR% Global("AnkhegCount","%FishingVillage%",0) GlobalGT("HelpGerde","GLOBAL",1) THEN RESPONSE #100 SetGlobal("AnkhegCount","%FishingVillage%",1) SetGlobal("SPRITE_IS_DEADANKHEG","GLOBAL",0) END IF %BGT_VAR% InParty("faldorn") !StateCheck("faldorn",CD_STATE_NOTVALID) AreaCheck("%FishingVillage%") Global("AnkhegCount","%FishingVillage%",1) Global("X#FaldornAn10","%FishingVillage%",0) NumDead("ankheg",10) THEN RESPONSE #100 SetGlobal("X#FaldornAn10","%FishingVillage%",1) END IF %BGT_VAR% AreaCheck("%FishingVillage%") InParty("faldorn") !StateCheck("faldorn",CD_STATE_NOTVALID) Global("AnkhegCount","%FishingVillage%",1) Global("X#FaldornAn11","%FishingVillage%",0) NumDead("ankheg",11) THEN RESPONSE #100 SetGlobal("X#FaldornAn11","%FishingVillage%",1) END IF %BGT_VAR% InParty("faldorn") AreaCheck("%FishingVillage%") Global("AnkhegCount","%FishingVillage%",1) Global("X#FaldornAn12","%FishingVillage%",0) NumDead("ankheg",12) THEN RESPONSE #100 SetGlobal("X#FaldornAn12","%FishingVillage%",1) END IF %BGT_VAR% Global("X#FaldornAn10","%FishingVillage%",1) InParty("faldorn") !StateCheck("faldorn",CD_STATE_NOTVALID) AreaCheck("%FishingVillage%") THEN RESPONSE #100 ActionOverride("faldorn",Dialogue(Player1)) END IF %BGT_VAR% Global("X#FaldornAn11","%FishingVillage%",1) InParty("faldorn") !StateCheck("faldorn",CD_STATE_NOTVALID) AreaCheck("%FishingVillage%") THEN RESPONSE #100 ActionOverride("faldorn",Dialogue(Player1)) END IF %BGT_VAR% Global("X#FaldornAn12","%FishingVillage%",1) InParty("faldorn") !StateCheck("faldorn",CD_STATE_NOTVALID) AreaCheck("%FishingVillage%") THEN RESPONSE #100 ActionOverride("faldorn",Dialogue(Player1)) END And you have Kivan's stuff up above already. It looks like Faldorn's addition to the areascript is set up to make sure abuses of the quest do not go unremarked, but also to complain about shell-farming. The Kivan stuff is much more specific to the quest - the sample line from Kivan is /* Kivan 10 Ankhegs */ IF WEIGHT #-2 ~%BGT_VAR% Global("P#KivanAnkheg","GLOBAL",1)~ THEN BEGIN KivanAnkheg2 SAY @129 /* ~That’s enough, <CHARNAME>. We will endanger the colony, if we continue hunting.~ */ IF ~~ THEN DO ~SetGlobal("P#KivanAnkheg","GLOBAL",2)~ EXIT END So the only question is are there specific ankhegs in that area all just with ankhegg.cre, in which case we should adopt BGT code, or is it possible to get other ankheg variants in the same area, in which case it makes it a PITA (unless we manipulate the spawns and area the way we did jointly for Coran's wyverns). I suspect we could do an OR() bl;ock with the two DVs, spearating them out - perhaps leveraging 255 AddGlobals(S:Name*,S:Name2*) This action will add the variable specified by parameter 2 onto the variable specified by parameter 1. An example script is below. IF Global("Var1","GLOBAL",0) THEN RESPONSE #100 SetGlobal("Var1","GLOBAL",75) //Var1 = 75 SetGlobal("Var2","GLOBAL",25) //Var2 = 25 AddGlobals("Var1","Var2") //Var1 = 100 END I'll take your advice, Ascension64. Link to comment
Ascension64 Posted August 29, 2010 Author Share Posted August 29, 2010 All of Gerde's specific ankhegs are AnkhegG (6 of them). so you could leverage it if you maul the script blocks up with combinations! OR(2) NumDead("AnkhegG",0) NumDead("Ankheg",10) OR(2) NumDead("AnkhegG",1) NumDead("Ankheg",9) OR(2) NumDead("AnkhegG",2) NumDead("Ankheg",8) OR(2) NumDead("AnkhegG",3) NumDead("Ankheg",7) OR(2) NumDead("AnkhegG",4) NumDead("Ankheg",6) ... I am not sure of the most efficient way to AddGlobals(). Somehow you would need to detect when an AnkhegG dies to add the global. Die() has already proved unreliable. You may be able to use NumDead() but I don't know what happens if multiple AnkhegG die at once. If you do figure out a method, all AnkhegG reside in FW1400/AR8300, so you could simply add blocks to the area script. Link to comment
Miloch Posted September 1, 2010 Share Posted September 1, 2010 OR(2) NumDead("AnkhegG",4) NumDead("Ankheg",6) ... Dunno about all that, though that's what I was actually thinking when I first read this. You could have them all use the same DV, but give the specific ankhegg.cre a script block that increments a different variable when it dies, and check that one for Gerde's quest instead, aye? Link to comment
Ascension64 Posted September 1, 2010 Author Share Posted September 1, 2010 but give the specific ankhegg.cre a script block that increments a different variable when it dies, and check that one for Gerde's quest instead, aye? This is exactly what Die() should do, but doesn't do with 100% efficacy. If life were that simple, this fix wouldn't need to be used. One solution is to transfer the death count over to ankheg (put in the area script)... IF NumDeadGT("AnkhegG",0) THEN RESPONSE #100 DecrementGlobal("SPRITE_IS_DEADANKHEGG","GLOBAL") IncrementGlobal("SPRITE_IS_DEADANKHEG","GLOBAL") SetGlobal("A6GerdeAnkheg","GLOBAL",1) END This creates a recursive loop transferring the AnkhegG death counter to the Ankheg one. Instead of using this as the global that Gerde's dialogue checks, A6GerdeAnkheg is set instead. You would then need to patch GERDE.DLG directly with: REPLACE_TRIGGER_TEXT ~GERDE~ ~NumDeadGT("AnkhegG",0)~ ~Global("A6GerdeAnkheg","GLOBAL",1)~ Please check the actual GERDE.DLG trigger for this, since I don't have BGT installed on my laptop, and I am away from home. Link to comment
Turambar90 Posted September 1, 2010 Share Posted September 1, 2010 REPLACE_TRIGGER_TEXT ~GERDE~ ~NumDeadGT("AnkhegG",0)~ ~Global("A6GerdeAnkheg","GLOBAL",1)~ Please check the actual GERDE.DLG trigger for this, since I don't have BGT installed on my laptop, and I am away from home. The original trigger is actually Global("HelpGerde","GLOBAL",1) The block IF NumDeadGT("AnkhegG",0) // Ankheg Global("HelpGerde","GLOBAL",0) THEN RESPONSE #100 SetGlobal("HelpGerde","GLOBAL",1) END is in the area script (ar8300.bcs) Anyway, I guess Faldorn and Kivan count both the ankheg outside (which are ankhegg) and inside the cave (which are normal ankheg), don't they? Otherwise, NumDead("ankheg",10) there are not so many ankhegs here. Link to comment
Ascension64 Posted September 2, 2010 Author Share Posted September 2, 2010 Oh OK. Then you don't need to worry about Gerde's dialogue, just change that line in the area script NumDeadGT("AnkhegG",0) // Ankheg to Global("A6GerdeAnkheg","GLOBAL",1) Link to comment
Turambar90 Posted September 8, 2010 Share Posted September 8, 2010 I've added a component to my fixpack that should fix this issue; moreover, it should make sure that faldorn warns the player at least once, before leaving, even if many ankhegs are killed together. this is the script it uses; there are some other slight changes as well; for example, when faldorn complains about the 10th ankheg being killed, the TuFaldornAnkheg variable is set to 10; moreover, I've changed the ankhegs in the cave into tuankheg to prevent ankhegs being killed somewhere else to make faldorn get angry when I re-enter this area. IF GlobalGT("SPRITE_IS_DEADANKHEGG","GLOBAL",0) THEN RESPONSE #100 IncrementGlobal("SPRITE_IS_DEADANKHEGG","GLOBAL",-1) IncrementGlobal("SPRITE_IS_DEADTUANKHEG","GLOBAL",1) IncrementGlobal("TuGerde","GLOBAL",1) Continue() END IF GlobalGT("TuGerde","GLOBAL",0) Global("HelpGerde","GLOBAL",0) THEN RESPONSE #100 SetGlobal("HelpGerde","GLOBAL",1) Continue() END IF GlobalGT("TuGerde","GLOBAL",4) GlobalLT("HelpGerde","GLOBAL",2) THEN RESPONSE #100 SetGlobal("HelpGerde","GLOBAL",4) Continue() END IF GlobalGT("SPRITE_IS_DEADTUANKHEG","GLOBAL",0) InParty("faldorn") InParty("kivan") !Dead("kivan") !Dead("faldorn") THEN RESPONSE #100 IncrementGlobal("SPRITE_IS_DEADTUANKHEG","GLOBAL",-1) IncrementGlobal("SPRITE_IS_DEADANKHEG","GLOBAL",1) IncrementGlobal("TuFaldornAnkheg","GLOBAL",1) IncrementGlobal("TuKivanAnkheg","GLOBAL",1) END IF GlobalGT("SPRITE_IS_DEADTUANKHEG","GLOBAL",0) InParty("faldorn") !Dead("faldorn") THEN RESPONSE #100 IncrementGlobal("SPRITE_IS_DEADTUANKHEG","GLOBAL",-1) IncrementGlobal("SPRITE_IS_DEADANKHEG","GLOBAL",1) IncrementGlobal("TuFaldornAnkheg","GLOBAL",1) END IF GlobalGT("SPRITE_IS_DEADTUANKHEG","GLOBAL",0) InParty("kivan") !Dead("kivan") THEN RESPONSE #100 IncrementGlobal("SPRITE_IS_DEADTUANKHEG","GLOBAL",-1) IncrementGlobal("SPRITE_IS_DEADANKHEG","GLOBAL",1) IncrementGlobal("TuKivanAnkheg","GLOBAL",1) END IF GlobalGT("SPRITE_IS_DEADTUANKHEG","GLOBAL",0) THEN RESPONSE #100 IncrementGlobal("SPRITE_IS_DEADTUANKHEG","GLOBAL",-1) IncrementGlobal("SPRITE_IS_DEADANKHEG","GLOBAL",1) Continue() END Link to comment
cmorgan Posted September 17, 2011 Share Posted September 17, 2011 Need to recheck and test fixes before integrating this (it works great, but we need to make sure the dialog triggers correctly before putting it into play). Saved for BG1NPC v20. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.