svj Posted October 28, 2023 Author Share Posted October 28, 2023 rq3temo1.d BEGIN rq3temo1 IF ~~ THEN BEGIN rq3tempamb1 SAY ~These two surely could have used to cooling down in jail.~ IF ~~ THEN EXTERN ~rq3temm1~ rq3tempamb2 END rq3temm1.d BEGIN rq3temm1 IF ~~ THEN BEGIN rq3tempamb2 SAY ~Could you ask this good for nothing flea bitten excuse for merchant to leave this place. I and High priest came to understanding that only i will have the right to be merchant near the temple.~ IF ~~ THEN EXTERN ~rq3temm2~ rq3tempamb3 END ERROR: Cannot resolve external symbolic label [rq3tempamb2] for DLG [RQ3TEMM1] ERROR: postprocessing [RQ3TEMO1]: Failure("cannot resolve label") Stopping installation because of error. Any ideas this is as simple as i can get the code why is it not compiling? Quote Link to comment
CamDawg Posted October 28, 2023 Share Posted October 28, 2023 Are you compiling them in the same COMPILE statement? Quote Link to comment
svj Posted October 28, 2023 Author Share Posted October 28, 2023 No in TP2 i have it separated // Temple Ambush no3 COMPILE ~revan/d/rq3temo1.d~ COMPILE ~revan/d/rq3temm1.d~ COMPILE ~revan/d/rq3temm2.d~ COMPILE ~revan/d/rq3temo2.d~ Quote Link to comment
jmerry Posted October 28, 2023 Share Posted October 28, 2023 And that's the problem. The symbolic labels only exist in the .D environment. Once it's compiled, state labels in the .DLG are strictly numerical. If you want to use a symbolic label for a state, every reference you make to it must be in the same batch that created the label. The same .D file, if you're doing things the normal way. Quote Link to comment
svj Posted October 29, 2023 Author Share Posted October 29, 2023 Thank you Mr. Smith i have converted my alfanumeric string labels to numbers and now it compiles Quote Link to comment
jmerry Posted October 29, 2023 Share Posted October 29, 2023 5 hours ago, svj said: Thank you Mr. Smith i have converted my alfanumeric string labels to numbers and now it compiles Mr. Smith? Who's that? Anyway, simply using numbers in place of labels ... how do you know you have the right ones? The state labels in a compiled DLG are strictly order-based; if you just substituted arbitrary numbers into your code in place of those labels, you'll now have dialogue that jumps to random arbitrary places. Quote Link to comment
svj Posted October 29, 2023 Author Share Posted October 29, 2023 2 hours ago, jmerry said: Mr. Smith? Who's that? Anyway, simply using numbers in place of labels ... how do you know you have the right ones? The state labels in a compiled DLG are strictly order-based; if you just substituted arbitrary numbers into your code in place of those labels, you'll now have dialogue that jumps to random arbitrary places. If you would notice Mr. Jmerry i postfixed every label with number in order of an appearance in the dialogue. IF ~~ THEN BEGIN rq3tempamb1 IF ~~ THEN BEGIN rq3tempamb2 Quote Link to comment
jmerry Posted October 29, 2023 Share Posted October 29, 2023 And you've also said that you didn't do that in the new version which compiled. You've posted tons of snippets, but the current state of your code as a whole, and whether it works or just compiles into a broken mess? There's no way for any of us to tell. My post above was a warning; I could see a way you might have broken things, but I didn't know whether you'd actually done that. Quote Link to comment
svj Posted October 29, 2023 Author Share Posted October 29, 2023 (edited) This would be the code of four separate files Mr. Jmerry BEGIN rq3temo1 IF ~~ THEN BEGIN 1 SAY ~These two surely could have used to cooling down in jail.~ IF ~~ THEN EXTERN ~rq3temm1~ 2 END BEGIN rq3temm1 IF ~~ THEN BEGIN 2 SAY ~Could you ask this good for nothing flea bitten excuse for merchant to leave this place. I and High priest came to understanding that only i will have the right to be merchant near the temple.~ IF ~~ THEN EXTERN ~rq3temm2~ 3 END BEGIN rq3temm2 IF ~~ THEN BEGIN 3 SAY ~And where is parchment or document of some kind to prove this? Hmm??? why don't you show me your supposed right on paper?~ IF ~~ THEN EXTERN ~rq3temo2~ 4 END BEGIN rq3temo2 IF ~~ THEN BEGIN 4 SAY ~Alright you and me lets go!~ IF ~~ THEN DO ~SetGlobal("rq3AmbushBattle","GLOBAL",1) ActionOverride("rq3temm1",EscapeArea()) ActionOverride("rq3temm2",EscapeArea()) ActionOverride("rq3temob1",EscapeArea()) ActionOverride("rq3temon1",EscapeArea())~ EXIT END Edited October 29, 2023 by svj Quote Link to comment
jmerry Posted October 31, 2023 Share Posted October 31, 2023 A bit of a belated response here... Uh ... yeah. That looks like it'll compile, and do things that are fundamentally weird and possibly broken. What does a dialogue look like if states 0, 1, 2, and 3 are empty but state 4 has stuff in it? I genuinely don't know if that works or not. Your original symbolic labels were a good thing. The only bad thing you did was to break them up into multiple .D files so that the system would forget about the labels by the time you needed to reference the states. You could have - and should have - fixed it by simply doing all of the dialogues in one file. Quote Link to comment
Jarno Mikkola Posted October 31, 2023 Share Posted October 31, 2023 The action overwrites are creatures... while the IF THEN EXTERN's are dialog states to which they link into. Uuh. Quote Link to comment
jmerry Posted October 31, 2023 Share Posted October 31, 2023 No overwriting going on. ActionOverride is just "tell this other creature to do something". On that note, if one of those actions is "tell this creature that's speaking to do something", then you shouldn't use an ActionOverride for it. I don't know whether it breaks in dialogues, but it certainly does in scripts; ActionOverride([active creature], [do something]) in a script fails and causes any further actions to not be executed either. If this happens to be a cutscene, it's likely to leave you hanging and unable to do anything but force quit. Quote Link to comment
svj Posted October 31, 2023 Author Share Posted October 31, 2023 (edited) So how do you do dialogue of four different NPCs in one file? Edited October 31, 2023 by svj Quote Link to comment
jastey Posted October 31, 2023 Share Posted October 31, 2023 1 hour ago, jmerry said: I don't know whether it breaks in dialogues, but it certainly does in scripts; ActionOverride([active creature], [do something]) in a script fails and causes any further actions to not be executed either. If this happens to be a cutscene, it's likely to leave you hanging and unable to do anything but force quit. It should work in dialogues. I changed all actions in e.g.bgqe to "ActionOverride("active speaking character", do something)" to be able to add NPC interjections without needing the stupid passback lines. 30 minutes ago, svj said: So how do you do dialogue of four different NPCs in one file? You could use what you posted above (here) into one d-file and call it whatever you want. (The name of a d-file is not important.) Or, you leave it 4 different d files and compile then in one go: COMPILE ~first.d~ ~second.d~ ~third.d~ fourth.d~ It should work that way, if not, you need to shift the order the files are listed in. Quote Link to comment
svj Posted October 31, 2023 Author Share Posted October 31, 2023 Including BEGIN right? Quote Link to comment
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.