Icendoan Posted November 6, 2008 Share Posted November 6, 2008 I have a new starting dialogue for Yoshimo, when he joins, which triggers on conditions that are placed well. If I try to use the TP2 EXTEND_TOP with a .d file, it complains because I don't want to BEGIN it, and overwrite everything else. Using the .D APPEND works, but it is at the end of a file, not where I want it. The .D EXTEND_TOP is not what I need for this. Another method is simply overwriting it, unless there is a method using INSERT_FILE, but I don't know enough about the .dlg file format to make it work. Icen Link to comment
Ardanis Posted November 7, 2008 Share Posted November 7, 2008 IF WEIGHT #-1 ~trigger~ THEN BEGIN blah SAY ~blah-blah~ END Link to comment
Guest Guest Posted November 7, 2008 Share Posted November 7, 2008 As Ardanis said: WEIGHT will result the dialogue to be executed first although it is at the bottom of the dlg-file. Everything else would lead to a great mess, since the dlg-state numbers could not be changed and compatibility kept without adjusting all references to them - including the ones from mods the player might not have installed yet, which would be infeasable, to say the least. (Plus, the state being at the top of the files doesn't mean it gets executed first, if weights are used elsewehre.) Another option that might work is adding more trigger conditions to the existing states. Or, to replace the existing ones with "false()". But before replacing I'd prefer the weighted one. -jastey The generated code did not match the one displayed, a new code has been generated, please try again I so hate this! Link to comment
Icendoan Posted November 30, 2008 Author Share Posted November 30, 2008 @ Bigg: Necroposting time! How do I weight a CHAIN? CHAIN WEIGHT #X and CHAIN IF WEIGHT #X both get errors. Icen Link to comment
cmorgan Posted December 1, 2008 Share Posted December 1, 2008 CHAIN IF WEIGHT #-1 puts the state on the top of the stack. Some folks use #-5 or some such, but generally a straightforward #-1 should do the trick. CHAIN IF WEIGHT #-1 ~%BGT_VAR% CombatCounter(0) InParty("ajantis") !Class(Player1,PALADIN) Global("X#AlAJ1","LOCALS",0) !See([ENEMY]) See("ajantis") !StateCheck(Myself,CD_STATE_NOTVALID) !StateCheck("ajantis",CD_STATE_NOTVALID)~ THEN ~%ALORA_BANTER%~ ALAJ1 @71 DO ~SetGlobal("X#AlAJ1","LOCALS",1)~ == ~%AJANTIS_BANTER%~ @72 == ~%ALORA_BANTER%~ @73 == ~%AJANTIS_BANTER%~ @74 == ~%ALORA_BANTER%~ @75 == ~%AJANTIS_BANTER%~ @76 EXIT watch out you haven't put an extra BEGIN or some such thing... and check termination, would be my guesses. Link to comment
Icendoan Posted December 1, 2008 Author Share Posted December 1, 2008 Aha, so that DOES work. Anyway, I took the very long way round, and used opening dialogue blocks for weights and then externed to the chain. Annoying, but I was trying to get it to work for the end of BG's Birthday (I am GMT, it ended 10 mins ago), so I had no real time for investigation! Thanks! Icen Link to comment
cmorgan Posted December 1, 2008 Share Posted December 1, 2008 Actually, I like the way you did it better - setting your initial dialog block and EXTERN-ing to a CHAIN for things that include multiple NPCs I always wondered if there was better processing time if you put all the weighted/conditioned dialog up front, and all your unweighted/direct-called states at the end. Probably no real difference. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.