Jump to content


Photo

Why isn't this EXTEND_BOTTOM working?


  • Please log in to reply
5 replies to this topic

#1 temnix

temnix
  • Member
  • 983 posts

Posted 29 November 2017 - 06:59 PM

The tp2 runs and runs, early on I compile a D file that appends to DIVINE.DLG. Later I want to add a transition to state 1 there, pointing to my new dialogue text. So I write:

 

COPY_EXISTING ~DIVINE.DLG~ ~override~
EXTEND_BOTTOM DIVINE 1
IF ~OR(6) TriggerOverride(Player1,HaveKnownSpellRES("IMPSBA_#")) TriggerOverride(Player2,HaveKnownSpellRES("IMPSBA_#")) TriggerOverride(Player3,HaveKnownSpellRES("IMPSBA_#")) TriggerOverride(Player4,HaveKnownSpellRES("IMPSBA_#")) TriggerOverride(Player5,HaveKnownSpellRES("IMPSBA_#")) TriggerOverride(Player6,HaveKnownSpellRES("IMPSBA_#"))~ THEN REPLY ~Where can I find Liber Maculosus, the Splotched Book?~ GOTO LIBER
END

I think I've followed the Weidu instructions correctly, but I get a parsing error the line with IF. Anybody know why?



#2 jastey

jastey
  • Administrator
  • 3218 posts

Posted 29 November 2017 - 08:47 PM

What exactly is the error message? My assumption would be that the two instances are in separated d-files, thus the installer doesn't know which state would be the one the transaction links to ("LIBER").

For this to work, the d-files need to be compiled in one go, with COMPILE ~first.d~ ~decond.d~

 

EDIT: Ah, you are doing this insode the tp2? I don't know how to do EXTEND_BOTTOM inside the tp2. Principally, you could do it by using DECOMPILE_AND_PATCH BEGIN, but still the installer wouldn't know which state you refer to by "LIBER" (as all states compiled before now have an according number).


Edited by jastey, 29 November 2017 - 08:49 PM.


#3 temnix

temnix
  • Member
  • 983 posts

Posted 30 November 2017 - 01:36 AM

The EXTEND_BOTTOM function is for the tp2, isn't it? Like the rest of them? The error message is a long list of supposedly-required tags - what I should have. I thought it was a matter of missing ~~ somewhere, but no. About the states: well, in the original file they had numbers, but the APPEND adds the LIBER state earlier in the list. This d file, with APPEND, is processed together with all the other dialogues, they are all in the same folder. The tp2 file reads like this:

 

...

COMPILE ~Folder/DLG~

 

...

COPY_EXISTING ~DIVINE.DLG~ ~override~ /// At this point DIVINE.DLG should have been appended already
EXTEND_BOTTOM DIVINE 1 /// Now adding this transition to state 1
IF ~OR(6) TriggerOverride(Player1,HaveKnownSpellRES("IMPSBA_#")) TriggerOverride(Player2,HaveKnownSpellRES("IMPSBA_#")) TriggerOverride(Player3,HaveKnownSpellRES("IMPSBA_#")) TriggerOverride(Player4,HaveKnownSpellRES("IMPSBA_#")) TriggerOverride(Player5,HaveKnownSpellRES("IMPSBA_#")) TriggerOverride(Player6,HaveKnownSpellRES("IMPSBA_#"))~ THEN REPLY ~Where can I find Liber Maculosus, the Splotched Book?~ GOTO LIBER /// To the added state
END

 

I think the installer is troubled by something else, because this error is not during the installation - it's during the initial check-up of the tp2. I don't get to the point where the commands would be executed or fail to.



#4 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5150 posts

Posted 30 November 2017 - 02:50 AM

Have you copied the IMPSBA_#.spl file into the game ? It needs to happen before you compile the .dlg ... and you need to have the LIBER response also compiled/appended.

I think the installer is troubled by something else, because this error is not during the installation - it's during the initial check-up of the tp2. I don't get to the point where the commands would be executed or fail to.

And what's the difference ? Is it that you thought ? As it gives you an error message, does it not ?


Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#5 jastey

jastey
  • Administrator
  • 3218 posts

Posted 30 November 2017 - 05:45 AM

The EXTEND_BOTTOM has to be inside a d-file. You can access a d-file via the tp2 by using DECOMPILE_AND_PATCH, but even then it still wouldn't know what to do with the state "LIBER" as it doesn't exist any more after the other d-files are compiled.

 

EDIT: Is there a reason why you don't put the EXTEND_BOTTOM inside the d-file that contains the added state "LIBER"? That would be the easiest solution.

If that is not possible, what you could do is the following: Wrap the EXTEND_BOTTOM into a tp2-d-file ("inlined") and then compile it together with the respective d-file that contains the state "LIBER". Note that the "inlined" has to go first after the COMPILE as it is processed bottom to top (and otherwise the installer wouldn't know where the state "LIBER" is).
 

tp2-code:

<<<<<<<< ...inlined/divine_add.d
EXTEND_BOTTOM DIVINE 1 /// Now adding this transition to state 1
IF ~OR(6) TriggerOverride(Player1,HaveKnownSpellRES("IMPSBA_#")) TriggerOverride(Player2,HaveKnownSpellRES("IMPSBA_#")) TriggerOverride(Player3,HaveKnownSpellRES("IMPSBA_#")) TriggerOverride(Player4,HaveKnownSpellRES("IMPSBA_#")) TriggerOverride(Player5,HaveKnownSpellRES("IMPSBA_#")) TriggerOverride(Player6,HaveKnownSpellRES("IMPSBA_#"))~ THEN REPLY ~Where can I find Liber Maculosus, the Splotched Book?~ GOTO LIBER /// To the added state
>>>>>>>>

COMPILE ~...inlined/divine_add.d~
~Folder/DLG~

Edited by jastey, 30 November 2017 - 05:56 AM.


#6 temnix

temnix
  • Member
  • 983 posts

Posted 30 November 2017 - 07:44 AM

You are completely right, Jastey. The EXTEND_BOTTOM has to go in the d file. I've never used any commands other than APPEND in my dialogues, and extending for scripts goes right into the tp2 file, so I thought this was the same way with dialogues. As soon as I moved that block to the d, the installer declared itself ready to work. Thank you. Now to see how this will look...

 

Imp, spells not existing for a trigger would never let the trigger check true, but they couldn't cause a parsing error.


Edited by temnix, 30 November 2017 - 08:07 AM.