Post reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.
Name:
Email:
Subject:
Message icon:

Verification:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?:

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: jastey
« on: August 11, 2017, 01:12:18 AM »

It didn't occur to me that the order of files could be the problem. This was very helpful information. And indeed, if I compile it as "COMPILE ~second.d~ ~first.d~" with "second.d" being the patches, it works.
Thank you very much! I am very happy.
Posted by: Wisp
« on: August 10, 2017, 12:19:22 PM »

COMPILE does not treat several files as a single one, it maintains state between each (it's not quite the same thing, as we see here). It just so happens that files are compiled in reverse order. You can also use APPEND_EARLY to make the append action order-independent, which is the intended way to append states which are to be targetted by actions in other D files.
Posted by: jastey
« on: August 10, 2017, 08:33:23 AM »

If I compile two .d-files with one COMPILE they are treated as if the content would be in the same .d-file - or so I thought?
 
This doesn't seem to be true for INTERJECT or ADD_TRANS_TRIGGER, at least not if I try to do it into a mod/custom dialogue state.
 
What I mean is, the following works if it is inside the same .d file:
 
 
Code: (auto:0) [Select]
APPEND SENIYA
IF ~~ THEN BEGIN JA#SENIYA_07
SAY @17
IF ~~ THEN DO ~AddexperienceParty(600)SetGlobal("SeniyadXP","GLOBAL",1)Shout(3)EscapeArea()~ EXIT
END
END

ADD_TRANS_TRIGGER SENIYA JA#SENIYA_07
~OR(3) !InParty("jaheira") !InMyArea("jaheira") StateCheck("jaheira",CD_STATE_NOTVALID)~
DO 0

 
But if it is separated into two .d-files and compiled as one via COMPILE ~first.d~ ~second.d~, the error message is that it cannot resolve dlg state "JA#SENIYA_07". Same if I try INTERJECT SENIYA JA#SENIYA_07 etc.
 
Is this intended behavior / something we have to live with or could it be changed so that both cases work?