Jump to content

APPENDing to the start of a file?


Recommended Posts

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.



Link to comment

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.





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

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
DO ~SetGlobal("X#AlAJ1","LOCALS",1)~
== ~%ALORA_BANTER%~ @73
== ~%ALORA_BANTER%~ @75


watch out you haven't put an extra BEGIN or some such thing... and check termination, would be my guesses.

Link to comment

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!





Link to comment

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 :thumbsup:


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


This topic is now archived and is closed to further replies.

  • Create New...