Domi Posted July 18, 2007 Share Posted July 18, 2007 This keeps being reported over and over form Kivan. Kivan apparently interjects before Arat gives him arrows. But when I look at the code, the line seems to go very definetly after. What gives? I_C_T2 KPCAPT01 11 P#KivanArat == P#KIVJ IF ~InParty("P#kivan") InMyArea("P#KIVAN")~ THEN @651 END Where: IF ~~ THEN BEGIN 11 // from: 49.1 SAY #39798 /* ~Just be sure you've acid or fire at your disposal. Trolls will not fall to anything else. May the gods go with you. Take these arrows, they might help.~ */ IF ~~ THEN DO ~GiveItemCreate("arow08",[PC],20,0,0)~ JOURNAL #20986 /* ~The de'Arnise Keep has been invaded. I've been told that to kill a troll you must use fire against them when they fall down. Otherwise they'll get up again.~ */ FLAGS 128 EXIT END Link to comment
CamDawg Posted July 18, 2007 Share Posted July 18, 2007 To fix the infinite arrow exploit, Fixpack moves the actual arrow giving into a new state. State 11 is "Just be sure you've acid or fire at your disposal. Trolls will not fall to anything else. May the gods go with you." If arrows have been given, the dialogue ends, if not the next state is "Take these arrows, they might help." Link to comment
Domi Posted July 18, 2007 Author Share Posted July 18, 2007 Thank you, that explains things. I'll just throw the interjection out. I don't want to do some code-arounds because of a single line. Link to comment
Kulyok Posted July 18, 2007 Share Posted July 18, 2007 Please, tell me, where could I find info on changing game dialogue states, if any? I'm just afraid I might have similar problems in Xan. http://www.gibberlings3.net/bg2fixpack/docs_core.php doesn't seem to have it, and I'm not sure .tp2 is exactly what I need - search for KPCAPT01 in .tp2 doesn't reveal anything. Link to comment
CamDawg Posted July 18, 2007 Share Posted July 18, 2007 It's in soa-dlg.d in the compile folder. I think this is the lone place we add a dialogue state. Link to comment
Domi Posted July 18, 2007 Author Share Posted July 18, 2007 Any chance you wouldn't separate those lines, keeping the "Here're some arrows" within the original state 11 and adding something innocent like "Good luck!" in the new state? As long as Arat mentions arrows in State 11, my interjection should make sense. Link to comment
CamDawg Posted July 18, 2007 Share Posted July 18, 2007 The problem is then he'll say he's giving arrows when you speak to him again, even though he's not. Link to comment
Domi Posted July 18, 2007 Author Share Posted July 18, 2007 Any chance you can introduce a brand-new state that says something like "I hope the arrows I gave you previously are helpful blah, blah, blah..." and leaving the original state alone? There is only one reply that leads to State 11, it should not be too difficult to patch it for GivenArrows,0/GivenArrows,1 and EXTEND_BOTTOM redirecting to a new state if GA=1. I understand I might be the only person in the whole modding world who patches this state, but it kind of alters the game text, and ADD_TRIGGER/EXTEND_BOTTOM will eliminate altering the game's text. Link to comment
CamDawg Posted July 18, 2007 Share Posted July 18, 2007 I'm going to move this to the Fixpack forums so I won't forget it for the next version. Link to comment
CamDawg Posted December 10, 2007 Share Posted December 10, 2007 Fixed entirely in d code: // eliminates Captain Arat's flame arrow exploit, part 1/4 // intercept externs/gotos to state 11, redirect if arrows already given (see also naliaj, state 177) EXTEND_BOTTOM KPCAPT01 49 IF ~!IsValidForPartyDialog("Nalia") Global("CDAratGaveArrows","GLOBAL",1)~ THEN UNSOLVED_JOURNAL #49487 GOTO CDAratGaveArrows END // eliminates Captain Arat's flame arrow exploit, part 2/4 // new, arrows-already-given state APPEND KPCAPT01 IF ~~ THEN BEGIN CDAratGaveArrows SAY @107 IF ~~ THEN JOURNAL #20986 FLAGS 128 EXIT END END // eliminates Captain Arat's flame arrow exploit, part 3/4 // make sure arrows only given once; set tracking var ADD_TRANS_ACTION KPCAPT01 BEGIN 11 END BEGIN END ~SetGlobal("CDAratGaveArrows","GLOBAL",1)~ // eliminates Captain Arat's flame arrow exploit, part 4/4 // intercept externs/gotos to state 11, redirect if arrows already given (see also kpcapt01, state 49) EXTEND_BOTTOM NALIAJ 177 IF ~Global("CDAratGaveArrows","GLOBAL",1)~ THEN EXTERN KPCAPT01 CDAratGaveArrows END This deprecates the previous fix, so this code is removed: // eliminates Captain Arat's flame arrow exploit, part 1/2 EXTEND_BOTTOM KPCAPT01 11 IF ~!HasItem("arow08","kpcapt01")~ THEN JOURNAL #20986 FLAGS 128 EXIT IF ~HasItem("arow08","kpcapt01")~ THEN DO ~GiveItemCreate("arow08",[PC],20,0,0) DestroyItem("arow08")~ JOURNAL #20986 FLAGS 128 GOTO CDAratGaveArrows END // eliminates Captain Arat's flame arrow exploit, part 2/2 APPEND KPCAPT01 IF ~~ THEN BEGIN CDAratGaveArrows SAY @108 IF ~~ THEN EXIT END END STRING_SET 39798 @107 // captain arat Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.