grogerson Posted December 24, 2008 Author Share Posted December 24, 2008 Thanks, all. I'll remove the DestroyGold() from the code. That only leaves one problem to deal with, and it's not dealing with IDS codes. From the DEBUG: Processing 1 dialogues/scripts ...Adding X#LP1REP to internal list of available DLGs ERROR locating resource for 'CHAIN3' Resource [%SAFANA_BANTER%.DLG] not found in KEY file: [./chitin.key] ERROR: preprocessing APPEND_EARLY [tb#_compile_eval_buffer/NewTweaks/dlg/X#LP1REP.D]: Failure("resource [%SAFANA_BANTER%.DLG] not found for 'CHAIN3'") Stopping installation because of error. This will probably be the most difficult part of the conversion. Is there a simple way to replace == ~%SAFANA_BANTER%~ (for all NPC's), or will it require an APPEND to their DLG files? Or is there another way I'm not yet aware of? Link to comment
cmorgan Posted December 24, 2008 Share Posted December 24, 2008 @Mike1072 - thanks for the heads up - I'll put it on my list to fix As for the LastTalkedToBy, it makes sense. A scan of all readily available BG2 NPCs shows only Amber regularly using this the way you describe, but it makes a good deal of sense. example: Amber, cool usage: IF ~~ THEN BEGIN M#19 SAY @4322 /* @4322 = ~A very special price just for you, my friend - 700 gold pieces.~ */ IF ~PartyGoldGT(699)~ THEN REPLY @4323 /* @4323 = ~OK, it's a deal.~ */ DO ~TakePartyGold(700) SetGlobal("M#JillBracelet","GLOBAL",8) SetGlobal("M#AmberQuestRemind","Locals",0) ActionOverride("M#Amber",SetDialog("m#ambern")~ GOTO M#BMThiefA IF ~PartyGoldGT(699) CheckStatLT(LastTalkedToBy(),15,CHR)~ THEN REPLY @4324 /* @4324 = ~Come on, surely you can do better than that? It's not even in mint condition; look at all those scratches.~ */ GOTO M#23 IF ~PartyGoldGT(699) CheckStatGT(LastTalkedToBy(),14,CHR)~ THEN REPLY @4324 /* @4324 = ~Come on, surely you can do better than that? It's not even in mint condition; look at all those scratches.~ */ GOTO M#20 IF ~PartyGoldLT(700) CheckStatLT(LastTalkedToBy(),15,CHR)~ THEN REPLY @4325 /* @4325 = ~No can do, my friend. Can't you go any lower?~ */ GOTO M#23 IF ~PartyGoldLT(700) CheckStatGT(LastTalkedToBy(),14,CHR)~ THEN REPLY @4325 /* @4325 = ~No can do, my friend. Can't you go any lower?~ */ GOTO M#20 END in Keto, using it the way you suggest, BEGIN PGPENNY IF ~Global("PGPennyChat1","LOCALS", 0) TimeOfDay(DAY)~ THEN BEGIN PennyIntro1 SAY @3502 ++ @3503 DO ~SetGlobal("PGPennyChat1","LOCALS", 1)~ GOTO HiImPenny ++ @3504 DO ~SetGlobal("PGPennyChat1","LOCALS", 1)~ GOTO PennySureIsNice ++ @3505 DO ~SetGlobal("PGPennyChat1","LOCALS", 1)~ GOTO PennySureIsJovial IF ~Class(LastTalkedToBy(Myself), BARD_ALL)~ THEN REPLY @3506 DO ~SetGlobal("PGPennyChat1","LOCALS", 1)~ GOTO PennyBard IF ~OR(2) Class(LastTalkedToBy(Myself), FIGHTER_ALL) Class(LastTalkedToBy(Myself), PALADIN_ALL)~ THEN REPLY @3507 DO ~SetGlobal("PGPennyChat1","LOCALS", 1)~ GOTO PennyFighter IF ~Class(LastTalkedToBy(Myself), CLERIC_ALL)~ THEN REPLY @3508 DO ~SetGlobal("PGPennyChat1","LOCALS", 1)~ GOTO PennyPriest IF ~Class(LastTalkedToBy(Myself), THIEF_ALL)~ THEN REPLY @3509 DO ~SetGlobal("PGPennyChat1","LOCALS", 1)~ GOTO PennyThief IF ~OR(2) Class(LastTalkedToBy(Myself), DRUID_ALL) Class(LastTalkedToBy(Myself), RANGER_ALL)~ THEN REPLY @3510 DO ~SetGlobal("PGPennyChat1","LOCALS", 1)~ GOTO PennyRanger IF ~Class(LastTalkedToBy(Myself), MONK)~ THEN REPLY @3511 DO ~SetGlobal("PGPennyChat1","LOCALS", 1)~ GOTO PennyMonk IF ~OR(2) Class(LastTalkedToBy(Myself), MAGE_ALL) Class(LastTalkedToBy(Myself), SORCERER)~ THEN REPLY @3512 DO ~SetGlobal("PGPennyChat1","LOCALS", 1)~ GOTO PennyMage END in Nathaniel, APPEND ARNGRL01 IF WEIGHT #-1 ~!NumberOfTimesTalkedTo(0) !InPartySlot(LastTalkedToBy,0) Name("Nath",LastTalkedToBy) Global("FHMissy","LOCALS",0)~ THEN BEGIN FHNathMissy SAY @397 /* ~What is it now?! Who the hell d'ya think you are, swanning in here and turning your nose up at my coats?! Do you got a coat to check or not?~ */ IF ~~ THEN DO ~SetGlobal("FHMissy","LOCALS",1)~ EXTERN FHNATJ FHMissy END in BTL, a cool way of splitting via "who last talked to the NPC" - I just gotta steal this one - EXTEND_BOTTOM TRGYP02 2 IF ~!InPartySlot(LastTalkedToBy,0) Name("Kiyone",LastTalkedToBy)~ THEN GOTO kiyofortune IF ~!InPartySlot(LastTalkedToBy,0) Name("Kova",LastTalkedToBy)~ THEN GOTO kovafortune END but by far the most common usage is like Saerileth - starting a store. IF ~~ THEN DO ~StartStore("nsgdbar",LastTalkedToBy(Myself))~ EXIT i think it would require some dialog rewriting, like you indicated (some token stuff, nothing big), but I will take a look . @grogerson - if you are checking for BG only (and I know you are from the WeiDU/WeiDU Dev postings) then you can set all those up in your .tp2. They are all just variables, set based on the instal;l (tutu/bgt) detected. I thought you could grab them from Jastey's Ajandtis Modification, which installs on BG, Tutu, and BGT (she has really clear code in that tp2 for showing how to set that stuff up for SPRINT ing variables) but it is simple to set up yourself, too. They have to be declared at the top of the .tp2, and then you have to use EVALUATE_BUFFER: /* Set Joined Dialogue Files */ OUTER_SPRINT "AJANTIS_BANTER" "BAJANT" OUTER_SPRINT "ALORA_BANTER" "BALORA" etc. /* Compile Dialog */ COMPILE EVALUATE_BUFFER ~myMod/myDialogThatUsesVariables.d~ with info from the BG interdia.2da and weidu does all the replacements. If you want, you can just text replace those %MYNPC_BANTER% with the real values, too. The only reason to set them up that way is so that you can install on multiple platforms, where Ajantis's file might look like BAJANT vs _BAJANT vs BBAJAN or something. Link to comment
grogerson Posted December 25, 2008 Author Share Posted December 25, 2008 @grogerson - if you are checking for BG only (and I know you are from the WeiDU/WeiDU Dev postings) then you can set all those up in your .tp2. They are all just variables, set based on the instal;l (tutu/bgt) detected. I thought you could grab them from Jastey's Ajandtis Modification, which installs on BG, Tutu, and BGT (she has really clear code in that tp2 for showing how to set that stuff up for SPRINT ing variables) but it is simple to set up yourself, too. They have to be declared at the top of the .tp2, and then you have to use EVALUATE_BUFFER: /* Set Joined Dialogue Files */ OUTER_SPRINT "AJANTIS_BANTER" "BAJANT" OUTER_SPRINT "ALORA_BANTER" "BALORA" etc. /* Compile Dialog */ COMPILE EVALUATE_BUFFER ~myMod/myDialogThatUsesVariables.d~ with info from the BG interdia.2da and weidu does all the replacements. If you want, you can just text replace those %MYNPC_BANTER% with the real values, too. The only reason to set them up that way is so that you can install on multiple platforms, where Ajantis's file might look like BAJANT vs _BAJANT vs BBAJAN or something. BG1 Tweaks now has a check for BG1 and TotSC. Dialog files did not change between the versions. I wouldn't think I'd need to use the OUTER_SPRINT. Are you saying that, instead of: == ~%SAFANA_BANTER%~ IF ~InParty("safana") Detect("safana") !StateCheck("safana",CD_STATE_NOTVALID) Global("X#SafanaRep","GLOBAL",0)~ THEN @17 DO ~IncrementGlobal("X#SafanaRep","GLOBAL",1)~ I could use: == ~BSAFAN~ IF ~InParty("safana") Detect("safana") !StateCheck("safana",CD_STATE_NOTVALID) Global("X#SafanaRep","GLOBAL",0)~ THEN @17 DO ~IncrementGlobal("X#SafanaRep","GLOBAL",1)~ Would I still need to COMPILE EVALUATE_BUFFER? edit: OUTER_SPRINT has one minor problem - Imoen doesn't have a BIMOEN dialog file. This makes it a bit more of a problem, unless it's the IMOEN2 file being modified. Link to comment
grogerson Posted December 30, 2008 Author Share Posted December 30, 2008 @cmorgan - I've used imoen2.dlg in the OUTER_SPRINT for Imoen, since bimoen.dlg doesn't exist. I've run into a problem with dialogs, though. From the DEBUG: [tb#_compile_eval_buffer/NewTweaks/dlg/X#LP1REP.D] PARSE ERROR at line 78 column 1-2Near Text: == syntax error [tb#_compile_eval_buffer/NewTweaks/dlg/X#LP1REP.D] ERROR at line 78 column 1-2 Near Text: == Parsing.Parse_error ERROR: parsing [tb#_compile_eval_buffer/NewTweaks/dlg/X#LP1REP.D]: Parsing.Parse_error ERROR: compiling [NewTweaks/dlg/X#LP1REP.D]! Stopping installation because of error. From the x#lp1rep.d file (lines 75-78): IF ~X#LP1REP~ X#Troubador1OfferInterested // CHAIN ~X#LP1REP~ X#Troubador1OfferInterested SAY @16 == ~%SAFANA_BANTER%~ IF ~InParty("safana") Detect("safana") !StateCheck("safana",CD_STATE_NOTVALID) Global("X#SafanaRep","GLOBAL",0)~ THEN @17 DO ~IncrementGlobal("X#SafanaRep","GLOBAL",1)~ Is it because I'm using GOTO instead of CHAIN coding, or do I need to change the coding on the BANTER lines? If you can get me going in the right direction, I should be able to do the rest. Link to comment
cmorgan Posted December 31, 2008 Share Posted December 31, 2008 Well you have two choices; to CHAIN or not to CHAIN, that is the question. IF ~<<condition>>~ THEN BEGIN <<statename>> SAY ~text string~ IF ~~ THEN EXIT END does not support declaring dialog files using "==". You would have a zillion tons of work setting up those lines. I'd use CHAIN for anything that brings other speakers in, and APPEND<>END for anything that is pretty much one speaker. I know the thing I coded with things like CHAIN ~myDialog~ <<myStatename>> ~Hi, I am an unnessesarily complicated piece of code, because I could be a simple IF<>THEN<>END blockl, but hey, that's life~ END ++ ~Option1~ EXTERN ~otherDialog1~ <<NewmyStatename1>> ++ ~Option2~ EXTERN ~otherDialog2~ <<NewmyStatename2>> but it is better to move that stuff to APPEND ~myDialog~ IF ~~ <<myStatename>> SAY ~Hi, I am an uncomplictaed piece of code, because I am a simple IF<>THEN<>END block~ ++ ~Option1~ EXTERN ~otherDialog1~ <<NewmyStatename1>> ++ ~Option2~ EXTERN ~otherDialog2~ <<NewmyStatename2>> END END but the CHAIN stuff like /* Sales pitch - NPCs interject here and meeting globals get set here */ CHAIN ~X#LP1REP~ X#Troubador1OfferInterested @16 == ~%SAFANA_BANTER%~ IF ~InParty("safana") InMyArea("safana") !StateCheck("safana",CD_STATE_NOTVALID) Global("X#SafanaRep","GLOBAL",0)~ THEN @17 DO ~IncrementGlobal("X#SafanaRep","GLOBAL",1)~ == ~%SAFANA_BANTER%~ IF ~InParty("safana") InMyArea("safana") !StateCheck("safana",CD_STATE_NOTVALID) Global("X#SafanaRep","GLOBAL",1)~ THEN @18 DO ~IncrementGlobal("X#SafanaRep","GLOBAL",1)~ == ~%SAFANA_BANTER%~ IF ~InParty("safana") InMyArea("safana") !StateCheck("safana",CD_STATE_NOTVALID) Global("X#SafanaRep","GLOBAL",2)~ THEN @19 DO ~IncrementGlobal("X#SafanaRep","GLOBAL",1)~ == ~%JAHEIRA_BANTER%~ IF ~InParty("jaheira") InMyArea("jaheira") !StateCheck("jaheira",CD_STATE_NOTVALID) Global("X#JaheiraRep","GLOBAL",0)~ THEN @20 DO ~IncrementGlobal("X#JaheiraRep","GLOBAL",1)~ == ~%JAHEIRA_BANTER%~ IF ~InParty("jaheira") InMyArea("jaheira") !StateCheck("jaheira",CD_STATE_NOTVALID) Global("X#JaheiraRep","GLOBAL",1)~ THEN @21 DO ~IncrementGlobal("X#JaheiraRep","GLOBAL",1)~ == ~%JAHEIRA_BANTER%~ IF ~InParty("jaheira") InMyArea("jaheira") !StateCheck("jaheira",CD_STATE_NOTVALID) Global("X#JaheiraRep","GLOBAL",2)~ THEN @22 DO ~IncrementGlobal("X#JaheiraRep","GLOBAL",1)~ == ~%KHALID_BANTER%~ IF ~InParty("khalid") InMyArea("khalid") !StateCheck("khalid",CD_STATE_NOTVALID) Global("X#KhalidRep","GLOBAL",0)~ THEN @23 DO ~IncrementGlobal("X#KhalidRep","GLOBAL",1)~ == ~%KHALID_BANTER%~ IF ~InParty("khalid") InMyArea("khalid") !StateCheck("khalid",CD_STATE_NOTVALID) Global("X#KhalidRep","GLOBAL",1)~ THEN @24 DO ~IncrementGlobal("X#KhalidRep","GLOBAL",1)~ == ~%KHALID_BANTER%~ IF ~InParty("khalid") InMyArea("khalid") !StateCheck("khalid",CD_STATE_NOTVALID) Global("X#KhalidRep","GLOBAL",2)~ THEN @25 DO ~IncrementGlobal("X#KhalidRep","GLOBAL",1)~ == ~%MONTARON_BANTER%~ IF ~InParty("montaron") InMyArea("montaron") !StateCheck("montaron",CD_STATE_NOTVALID) Global("X#MontaronRep","GLOBAL",0)~ THEN @26 DO ~IncrementGlobal("X#MontaronRep","GLOBAL",1)~ == ~%MONTARON_BANTER%~ IF ~InParty("montaron") InMyArea("montaron") !StateCheck("montaron",CD_STATE_NOTVALID) Global("X#MontaronRep","GLOBAL",1)~ THEN @27 DO ~IncrementGlobal("X#MontaronRep","GLOBAL",1)~ == ~%MONTARON_BANTER%~ IF ~InParty("montaron") InMyArea("montaron") !StateCheck("montaron",CD_STATE_NOTVALID) Global("X#MontaronRep","GLOBAL",2)~ THEN @28 DO ~IncrementGlobal("X#MontaronRep","GLOBAL",1)~ == ~%XZAR_BANTER%~ IF ~InParty("xzar") InMyArea("xzar") !StateCheck("xzar",CD_STATE_NOTVALID) Global("X#XzarRep","GLOBAL",0)~ THEN @29 DO ~IncrementGlobal("X#XzarRep","GLOBAL",1)~ == ~%XZAR_BANTER%~ IF ~InParty("xzar") InMyArea("xzar") !StateCheck("xzar",CD_STATE_NOTVALID) Global("X#XzarRep","GLOBAL",1)~ THEN @30 DO ~IncrementGlobal("X#XzarRep","GLOBAL",1)~ == ~%XZAR_BANTER%~ IF ~InParty("xzar") InMyArea("xzar") !StateCheck("xzar",CD_STATE_NOTVALID) Global("X#XzarRep","GLOBAL",2)~ THEN @31 DO ~IncrementGlobal("X#XzarRep","GLOBAL",1)~ == ~%GARRICK_BANTER%~ IF ~InParty("garrick") InMyArea("garrick") !StateCheck("garrick",CD_STATE_NOTVALID) Global("X#GarrickRep","GLOBAL",0)~ THEN @32 DO ~IncrementGlobal("X#GarrickRep","GLOBAL",1)~ == ~%GARRICK_BANTER%~ IF ~InParty("garrick") InMyArea("garrick") !StateCheck("garrick",CD_STATE_NOTVALID) Global("X#GarrickRep","GLOBAL",1)~ THEN @33 DO ~IncrementGlobal("X#GarrickRep","GLOBAL",1)~ == ~%GARRICK_BANTER%~ IF ~InParty("garrick") InMyArea("garrick") !StateCheck("garrick",CD_STATE_NOTVALID) Global("X#GarrickRep","GLOBAL",2)~ THEN @34 == ~X#LP1REP~ IF ~InParty("garrick") InMyArea("garrick") !StateCheck("garrick",CD_STATE_NOTVALID) Global("X#GarrickRep","GLOBAL",2)~ THEN @35 DO ~IncrementGlobal("X#GarrickRep","GLOBAL",1)~ == ~%ELDOTH_BANTER%~ IF ~InParty("eldoth") InMyArea("eldoth") !StateCheck("eldoth",CD_STATE_NOTVALID) Global("X#EldothRep","GLOBAL",0)~ THEN @36 DO ~IncrementGlobal("X#EldothRep","GLOBAL",1)~ == ~%ELDOTH_BANTER%~ IF ~InParty("eldoth") InMyArea("eldoth") !StateCheck("eldoth",CD_STATE_NOTVALID) Global("X#EldothRep","GLOBAL",1)~ THEN @37 DO ~IncrementGlobal("X#EldothRep","GLOBAL",1)~ == ~%ELDOTH_BANTER%~ IF ~InParty("eldoth") InMyArea("eldoth") !StateCheck("eldoth",CD_STATE_NOTVALID) Global("X#EldothRep","GLOBAL",2)~ THEN @38 DO ~IncrementGlobal("X#EldothRep","GLOBAL",1)~ == ~%AJANTIS_BANTER%~ IF ~InParty("ajantis") InMyArea("ajantis") !StateCheck("ajantis",CD_STATE_NOTVALID) Global("X#AjantisRep","GLOBAL",0)~ THEN @39 DO ~IncrementGlobal("X#AjantisRep","GLOBAL",1)~ == ~%AJANTIS_BANTER%~ IF ~InParty("ajantis") InMyArea("ajantis") !StateCheck("ajantis",CD_STATE_NOTVALID) Global("X#AjantisRep","GLOBAL",1)~ THEN @40 DO ~IncrementGlobal("X#AjantisRep","GLOBAL",1)~ == ~%AJANTIS_BANTER%~ IF ~InParty("ajantis") InMyArea("ajantis") !StateCheck("ajantis",CD_STATE_NOTVALID) Global("X#AjantisRep","GLOBAL",2)~ THEN @41 DO ~IncrementGlobal("X#AjantisRep","GLOBAL",1)~ == ~%IMOEN_BANTER%~ IF ~InParty("%IMOEN_DV%") InMyArea("%IMOEN_DV%") !StateCheck("%IMOEN_DV%",CD_STATE_NOTVALID) Global("X#ImoenRep","GLOBAL",0)~ THEN @42 DO ~IncrementGlobal("X#ImoenRep","GLOBAL",1)~ == ~%IMOEN_BANTER%~ IF ~InParty("%IMOEN_DV%") InMyArea("%IMOEN_DV%") !StateCheck("%IMOEN_DV%",CD_STATE_NOTVALID) Global("X#ImoenRep","GLOBAL",1)~ THEN @43 DO ~IncrementGlobal("X#ImoenRep","GLOBAL",1)~ == ~%IMOEN_BANTER%~ IF ~InParty("%IMOEN_DV%") InMyArea("%IMOEN_DV%") !StateCheck("%IMOEN_DV%",CD_STATE_NOTVALID) Global("X#ImoenRep","GLOBAL",2)~ THEN @44 DO ~IncrementGlobal("X#ImoenRep","GLOBAL",1)~ == ~%FALDORN_BANTER%~ IF ~InParty("faldorn") InMyArea("faldorn") !StateCheck("faldorn",CD_STATE_NOTVALID) Global("X#FaldornRep","GLOBAL",0)~ THEN @45 DO ~IncrementGlobal("X#FaldornRep","GLOBAL",1)~ == ~%FALDORN_BANTER%~ IF ~InParty("faldorn") InMyArea("faldorn") !StateCheck("faldorn",CD_STATE_NOTVALID) Global("X#FaldornRep","GLOBAL",1)~ THEN @46 DO ~IncrementGlobal("X#FaldornRep","GLOBAL",1)~ == ~%FALDORN_BANTER%~ IF ~InParty("faldorn") InMyArea("faldorn") !StateCheck("faldorn",CD_STATE_NOTVALID) Global("X#FaldornRep","GLOBAL",2)~ THEN @47 DO ~IncrementGlobal("X#FaldornRep","GLOBAL",1)~ == ~%XAN_BANTER%~ IF ~InParty("xan") InMyArea("xan") !StateCheck("xan",CD_STATE_NOTVALID) Global("X#XanRep","GLOBAL",0)~ THEN @48 DO ~IncrementGlobal("X#XanRep","GLOBAL",1)~ == ~%XAN_BANTER%~ IF ~InParty("xan") InMyArea("xan") !StateCheck("xan",CD_STATE_NOTVALID) Global("X#XanRep","GLOBAL",1)~ THEN @49 DO ~IncrementGlobal("X#XanRep","GLOBAL",1)~ == ~%XAN_BANTER%~ IF ~InParty("xan") InMyArea("xan") !StateCheck("xan",CD_STATE_NOTVALID) Global("X#XanRep","GLOBAL",2)~ THEN @50 DO ~IncrementGlobal("X#XanRep","GLOBAL",1)~ == ~%KAGAIN_BANTER%~ IF ~InParty("kagain") InMyArea("kagain") !StateCheck("kagain",CD_STATE_NOTVALID) Global("X#KagainRep","GLOBAL",0)~ THEN @51 DO ~IncrementGlobal("X#KagainRep","GLOBAL",1)~ == ~%KAGAIN_BANTER%~ IF ~InParty("kagain") InMyArea("kagain") !StateCheck("kagain",CD_STATE_NOTVALID) Global("X#KagainRep","GLOBAL",1)~ THEN @52 DO ~IncrementGlobal("X#KagainRep","GLOBAL",1)~ == ~%KAGAIN_BANTER%~ IF ~InParty("kagain") InMyArea("kagain") !StateCheck("kagain",CD_STATE_NOTVALID) Global("X#KagainRep","GLOBAL",2)~ THEN @53 DO ~IncrementGlobal("X#KagainRep","GLOBAL",1)~ == ~%KIVAN_BANTER%~ IF ~InParty("kivan") InMyArea("kivan") !StateCheck("kivan",CD_STATE_NOTVALID) Global("X#KivanRep","GLOBAL",0)~ THEN @54 DO ~IncrementGlobal("X#KivanRep","GLOBAL",1)~ == ~%KIVAN_BANTER%~ IF ~InParty("kivan") InMyArea("kivan") !StateCheck("kivan",CD_STATE_NOTVALID) Global("X#KivanRep","GLOBAL",1)~ THEN @55 DO ~IncrementGlobal("X#KivanRep","GLOBAL",1)~ == ~%KIVAN_BANTER%~ IF ~InParty("kivan") InMyArea("kivan") !StateCheck("kivan",CD_STATE_NOTVALID) Global("X#KivanRep","GLOBAL",2)~ THEN @56 DO ~IncrementGlobal("X#KivanRep","GLOBAL",1)~ == ~%YESLICK_BANTER%~ IF ~InParty("yeslick") InMyArea("yeslick") !StateCheck("yeslick",CD_STATE_NOTVALID) Global("X#YeslickRep","GLOBAL",0)~ THEN @57 DO ~IncrementGlobal("X#YeslickRep","GLOBAL",1)~ == ~%YESLICK_BANTER%~ IF ~InParty("yeslick") InMyArea("yeslick") !StateCheck("yeslick",CD_STATE_NOTVALID) Global("X#YeslickRep","GLOBAL",1)~ THEN @58 DO ~IncrementGlobal("X#YeslickRep","GLOBAL",1)~ == ~%YESLICK_BANTER%~ IF ~InParty("yeslick") InMyArea("yeslick") !StateCheck("yeslick",CD_STATE_NOTVALID) Global("X#YeslickRep","GLOBAL",2)~ THEN @59 DO ~IncrementGlobal("X#YeslickRep","GLOBAL",1)~ == ~%QUAYLE_BANTER%~ IF ~InParty("quayle") InMyArea("quayle") !StateCheck("quayle",CD_STATE_NOTVALID) Global("X#QuayleRep","GLOBAL",0)~ THEN @60 DO ~IncrementGlobal("X#QuayleRep","GLOBAL",1)~ == ~%QUAYLE_BANTER%~ IF ~InParty("quayle") InMyArea("quayle") !StateCheck("quayle",CD_STATE_NOTVALID) Global("X#QuayleRep","GLOBAL",1)~ THEN @61 DO ~IncrementGlobal("X#QuayleRep","GLOBAL",1)~ == ~%QUAYLE_BANTER%~ IF ~InParty("quayle") InMyArea("quayle") !StateCheck("quayle",CD_STATE_NOTVALID) Global("X#QuayleRep","GLOBAL",2)~ THEN @62 DO ~IncrementGlobal("X#QuayleRep","GLOBAL",1)~ == ~%SKIE_BANTER%~ IF ~InParty("skie") InMyArea("skie") !StateCheck("skie",CD_STATE_NOTVALID) Global("X#SkieRep","GLOBAL",0)~ THEN @63 DO ~IncrementGlobal("X#SkieRep","GLOBAL",1)~ == ~%SKIE_BANTER%~ IF ~InParty("skie") InMyArea("skie") !StateCheck("skie",CD_STATE_NOTVALID) Global("X#SkieRep","GLOBAL",1)~ THEN @64 DO ~IncrementGlobal("X#SkieRep","GLOBAL",1)~ == ~%SKIE_BANTER%~ IF ~InParty("skie") InMyArea("skie") !StateCheck("skie",CD_STATE_NOTVALID) Global("X#SkieRep","GLOBAL",2)~ THEN @65 DO ~IncrementGlobal("X#SkieRep","GLOBAL",1)~ == ~%CORAN_BANTER%~ IF ~InParty("coran") InMyArea("coran") !StateCheck("coran",CD_STATE_NOTVALID) Global("X#CoranRep","GLOBAL",0)~ THEN @66 DO ~IncrementGlobal("X#CoranRep","GLOBAL",1)~ == ~%CORAN_BANTER%~ IF ~InParty("coran") InMyArea("coran") !StateCheck("coran",CD_STATE_NOTVALID) Global("X#CoranRep","GLOBAL",1)~ THEN @67 DO ~IncrementGlobal("X#CoranRep","GLOBAL",1)~ == ~%CORAN_BANTER%~ IF ~InParty("coran") InMyArea("coran") !StateCheck("coran",CD_STATE_NOTVALID) Global("X#CoranRep","GLOBAL",2)~ THEN @68 DO ~IncrementGlobal("X#CoranRep","GLOBAL",1)~ == ~%MINSC_BANTER%~ IF ~InParty("minsc") InMyArea("minsc") !StateCheck("minsc",CD_STATE_NOTVALID) Global("X#MinscRep","GLOBAL",0)~ THEN @69 DO ~IncrementGlobal("X#MinscRep","GLOBAL",1)~ == ~%MINSC_BANTER%~ IF ~InParty("minsc") InMyArea("minsc") !StateCheck("minsc",CD_STATE_NOTVALID) Global("X#MinscRep","GLOBAL",1)~ THEN @70 DO ~IncrementGlobal("X#MinscRep","GLOBAL",1)~ == ~%MINSC_BANTER%~ IF ~InParty("minsc") InMyArea("minsc") !StateCheck("minsc",CD_STATE_NOTVALID) Global("X#MinscRep","GLOBAL",2)~ THEN @71 DO ~IncrementGlobal("X#MinscRep","GLOBAL",1)~ == ~%DYNAHEIR_BANTER%~ IF ~InParty("dynaheir") InMyArea("dynaheir") !StateCheck("dynaheir",CD_STATE_NOTVALID) InParty("minsc") !StateCheck("minsc",CD_STATE_NOTVALID) Global("X#DynaMinscRep","GLOBAL",0)~ THEN @72 DO ~IncrementGlobal("X#DynaMinscRep","GLOBAL",1)~ == ~%DYNAHEIR_BANTER%~ IF ~InParty("dynaheir") InMyArea("dynaheir") !StateCheck("dynaheir",CD_STATE_NOTVALID) InParty("minsc") !StateCheck("minsc",CD_STATE_NOTVALID) Global("X#DynaMinscRep","GLOBAL",1)~ THEN @73 DO ~IncrementGlobal("X#DynaMinscRep","GLOBAL",1)~ == ~%DYNAHEIR_BANTER%~ IF ~InParty("dynaheir") InMyArea("dynaheir") !StateCheck("dynaheir",CD_STATE_NOTVALID) InParty("minsc") !StateCheck("minsc",CD_STATE_NOTVALID) Global("X#DynaMinscRep","GLOBAL",2)~ THEN @74 DO ~IncrementGlobal("X#DynaMinscRep","GLOBAL",1)~ == ~%DYNAHEIR_BANTER%~ IF ~!InParty("minsc") InParty("dynaheir") InMyArea("dynaheir") !StateCheck("dynaheir",CD_STATE_NOTVALID) Global("X#DynaheirRep","GLOBAL",0)~ THEN @75 DO ~IncrementGlobal("X#DynaheirRep","GLOBAL",1)~ == ~%DYNAHEIR_BANTER%~ IF ~!InParty("minsc") InParty("dynaheir") InMyArea("dynaheir") !StateCheck("dynaheir",CD_STATE_NOTVALID) Global("X#DynaheirRep","GLOBAL",1)~ THEN @76 DO ~IncrementGlobal("X#DynaheirRep","GLOBAL",1)~ == ~%DYNAHEIR_BANTER%~ IF ~!InParty("minsc") InParty("dynaheir") InMyArea("dynaheir") !StateCheck("dynaheir",CD_STATE_NOTVALID) Global("X#DynaheirRep","GLOBAL",2)~ THEN @74 DO ~IncrementGlobal("X#DynaheirRep","GLOBAL",1)~ == ~%EDWIN_BANTER%~ IF ~InParty("edwin") InMyArea("edwin") !StateCheck("edwin",CD_STATE_NOTVALID) Global("X#EdwinRep","GLOBAL",0)~ THEN @77 DO ~IncrementGlobal("X#EdwinRep","GLOBAL",1)~ == ~%EDWIN_BANTER%~ IF ~InParty("edwin") InMyArea("edwin") !StateCheck("edwin",CD_STATE_NOTVALID) Global("X#EdwinRep","GLOBAL",1)~ THEN @78 DO ~IncrementGlobal("X#EdwinRep","GLOBAL",1)~ == ~%EDWIN_BANTER%~ IF ~InParty("edwin") InMyArea("edwin") !StateCheck("edwin",CD_STATE_NOTVALID) Global("X#EdwinRep","GLOBAL",2)~ THEN @79 DO ~IncrementGlobal("X#EdwinRep","GLOBAL",1)~ == ~%BRANWEN_BANTER%~ IF ~InParty("branwen") InMyArea("branwen") !StateCheck("branwen",CD_STATE_NOTVALID) Global("P#BranwenRep","GLOBAL",0)~ THEN @80 DO ~IncrementGlobal("P#BranwenRep","GLOBAL",1)~ == ~%BRANWEN_BANTER%~ IF ~InParty("branwen") InMyArea("branwen") !StateCheck("branwen",CD_STATE_NOTVALID) Global("P#BranwenRep","GLOBAL",1)~ THEN @81 DO ~IncrementGlobal("P#BranwenRep","GLOBAL",1)~ == ~%BRANWEN_BANTER%~ IF ~InParty("branwen") InMyArea("branwen") !StateCheck("branwen",CD_STATE_NOTVALID) Global("P#BranwenRep","GLOBAL",2)~ THEN @82 DO ~IncrementGlobal("P#BranwenRep","GLOBAL",1)~ == ~%TIAX_BANTER%~ IF ~InParty("tiax") InMyArea("tiax") !StateCheck("tiax",CD_STATE_NOTVALID) Global("X#TiaxRep","GLOBAL",0)~ THEN @83 DO ~IncrementGlobal("X#TiaxRep","GLOBAL",1)~ == ~%TIAX_BANTER%~ IF ~InParty("tiax") InMyArea("tiax") !StateCheck("tiax",CD_STATE_NOTVALID) Global("X#TiaxRep","GLOBAL",1)~ THEN @84 DO ~IncrementGlobal("X#TiaxRep","GLOBAL",1)~ == ~%TIAX_BANTER%~ IF ~InParty("tiax") InMyArea("tiax") !StateCheck("tiax",CD_STATE_NOTVALID) Global("X#TiaxRep","GLOBAL",2)~ THEN @85 DO ~IncrementGlobal("X#TiaxRep","GLOBAL",1)~ == ~%VICONIA_BANTER%~ IF ~InParty("viconia") InMyArea("viconia") !StateCheck("viconia",CD_STATE_NOTVALID) Global("X#ViconiaRep","GLOBAL",0)~ THEN @86 DO ~IncrementGlobal("X#ViconiaRep","GLOBAL",1)~ == ~%VICONIA_BANTER%~ IF ~InParty("viconia") InMyArea("viconia") !StateCheck("viconia",CD_STATE_NOTVALID) Global("X#ViconiaRep","GLOBAL",1)~ THEN @87 DO ~IncrementGlobal("X#ViconiaRep","GLOBAL",1)~ == ~%VICONIA_BANTER%~ IF ~InParty("viconia") InMyArea("viconia") !StateCheck("viconia",CD_STATE_NOTVALID) Global("X#ViconiaRep","GLOBAL",2)~ THEN @88 DO ~IncrementGlobal("X#ViconiaRep","GLOBAL",1)~ == ~%SHARTEEL_BANTER%~ IF ~InParty("sharteel") InMyArea("sharteel") !StateCheck("sharteel",CD_STATE_NOTVALID) Global("X#SharTeelRep","GLOBAL",0)~ THEN @89 DO ~IncrementGlobal("X#SharTeelRep","GLOBAL",1)~ == ~%SHARTEEL_BANTER%~ IF ~InParty("sharteel") InMyArea("sharteel") !StateCheck("sharteel",CD_STATE_NOTVALID) Global("X#SharTeelRep","GLOBAL",1)~ THEN @90 DO ~IncrementGlobal("X#SharTeelRep","GLOBAL",1)~ == ~%SHARTEEL_BANTER%~ IF ~InParty("sharteel") InMyArea("sharteel") !StateCheck("sharteel",CD_STATE_NOTVALID) Global("X#SharTeelRep","GLOBAL",2)~ THEN @91 DO ~IncrementGlobal("X#SharTeelRep","GLOBAL",1)~ == ~%ALORA_BANTER%~ IF ~InParty("alora") InMyArea("alora") !StateCheck("alora",CD_STATE_NOTVALID) Global("X#AloraRep","GLOBAL",0)~ THEN @92 DO ~IncrementGlobal("X#AloraRep","GLOBAL",1)~ == ~%ALORA_BANTER%~ IF ~InParty("alora") InMyArea("alora") !StateCheck("alora",CD_STATE_NOTVALID) Global("X#AloraRep","GLOBAL",1)~ THEN @93 DO ~IncrementGlobal("X#AloraRep","GLOBAL",1)~ == ~%ALORA_BANTER%~ IF ~InParty("alora") InMyArea("alora") !StateCheck("alora",CD_STATE_NOTVALID) Global("X#AloraRep","GLOBAL",2)~ THEN @94 DO ~IncrementGlobal("X#AloraRep","GLOBAL",1)~ == ~X#LP1REP~ @95 END IF ~ReputationGT(Player1,10)~ THEN REPLY @96 DO ~SetGlobal("X#TroubadorRep","GLOBAL",1) SetGlobal("X#LakeP1RepTalk","GLOBAL",1)~ EXTERN ~X#LP1REP~ X#Troubador1WhyBadGood IF ~ReputationLT(Player1,11)~ THEN REPLY @96 DO ~SetGlobal("X#TroubadorRep","GLOBAL",1) SetGlobal("X#LakeP1RepTalk","GLOBAL",1)~ EXTERN ~X#LP1REP~ X#Troubador1WhyBadEvil IF ~~ THEN REPLY @97 DO ~SetGlobal("X#TroubadorRep","GLOBAL",1) SetGlobal("X#LakeP1RepTalk","GLOBAL",1) IncrementGlobal("X#UseTroubadorRep","GLOBAL",1)~ EXTERN ~X#LP1REP~ X#Troubador1MakeBad IF ~Class(Player1,PALADIN_ALL)~ THEN REPLY @98 DO ~SetGlobal("X#TroubadorRep","GLOBAL",1) SetGlobal("X#LakeP1RepTalk","GLOBAL",1)~ EXIT IF ~Class(Player1,THIEF_ALL)~ THEN REPLY @99 DO ~SetGlobal("X#TroubadorRep","GLOBAL",1) SetGlobal("X#LakeP1RepTalk","GLOBAL",1)~ EXIT IF ~GlobalGT("X#TroubadorRep","GLOBAL",0) GlobalGT("X#LakeP1RepTalk","GLOBAL",0)~ THEN REPLY @100 EXTERN ~X#LP1REP~ X#Troubador1RepAlready is written that way because it would be an exercise in frustration to try to code it any other way. Link to comment
grogerson Posted December 31, 2008 Author Share Posted December 31, 2008 Thanks, cmorgan. I wondered if I'd have to use chain. I'll have to check tonight if I can get past the CHAIN and @ lines (it hung up there). I'll have to double-check my COMPILE commands for this as well... Link to comment
grogerson Posted January 1, 2009 Author Share Posted January 1, 2009 Using CHAIN fails with: [NewTweaks/languages/english/X#LP1REP.TRA] has 182 translation strings[NewTweaks/dlg/X#LP1REP.D] loaded, 31586 bytes [tb#_compile_eval_buffer/NewTweaks/dlg/X#LP1REP.D] PARSE ERROR at line 75 column 1-5 Near Text: CHAIN syntax error [tb#_compile_eval_buffer/NewTweaks/dlg/X#LP1REP.D] ERROR at line 75 column 1-5 Near Text: CHAIN Parsing.Parse_error ERROR: parsing [tb#_compile_eval_buffer/NewTweaks/dlg/X#LP1REP.D]: Parsing.Parse_error ERROR: compiling [NewTweaks/dlg/X#LP1REP.D]! Stopping installation because of error. x#lp1rep.d coded now as (lines 75 & 76): CHAIN ~X#LP1REP~ X#Troubador1OfferInterested @16 Clearly the CHAIN is not connecting the .d and .tra files. To even get this far I had to modify the .tp2 with USING, otherwise it stops at the first @: /* dialogue */ COMPILE EVALUATE_BUFFER ~NewTweaks/dlg/X#LP1REP.D~ USING ~NewTweaks/languages/english/X#LP1REP.TRA~ COMPILE EVALUATE_BUFFER ~NewTweaks/dlg/X#LP2REP.D~ USING ~NewTweaks/languages/english/X#LP1REP.TRA~ COMPILE EVALUATE_BUFFER ~NewTweaks/dlg/X#LP3REP.D~ USING ~NewTweaks/languages/english/X#LP1REP.TRA~ By the DEBUG the scripts (just previous to this) run fine, and everything before line 75 connects. Have I done something wrong here? Link to comment
cmorgan Posted January 1, 2009 Share Posted January 1, 2009 Toss me the full package at cmorganbg at gmail dot com and I will take a look and report back Link to comment
grogerson Posted January 6, 2009 Author Share Posted January 6, 2009 Toss me the full package at cmorganbg at gmail dot com and I will take a look and report back FYI, I sent it to you the afternoon you asked for it. Sorry it took so long to reply. Let me know if you didn't get it. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.