jastey Posted June 16, 2015 Share Posted June 16, 2015 First let me say these:- the dialogue file in the game is a dlg. The ".d" file is the file in your mod that is to be compiled. This can contain any kind of syntax, not necessarily a new dlg name.- don't call your custom dialogue states in your .d-file with plain numbers. Give them unique names, in my example, it is "mod_x". WeiDU will transform them into numbers upon compilation. This way, you prevent existing state numbers to be overwritten (for compatibility reasons - just in case there will be another mod adding to this chrarcter). Then, there is an example in the weidu readme, in section 8.3. Searching for the term inside the document will bring it up (it is in the section for COPY_TRANS, which is also an important thing to know.)The EXTEND_BOTTOM syntax would be like this. After that, you would use APPEND to add your custom dialogue states. I recommend looking at Kulyok's Branwen NPC mod, which is coded as an example, with explanations to see the syntax in action. EXTEND_BOTTOM DEREVAIN 10IF ~[your triggers, if any]~ THEN REPLY ~Erevain. I think you should join us.~ GOTO mod_12ENDAPPEND DEREVAINIF ~~ THEN mod_12SAY ~blabla~IF ~~ THEN DO ~[your actions, if any]~ EXITENDEND //APPEND Link to comment
Bill Bisco Posted June 17, 2015 Author Share Posted June 17, 2015 Alright I tried to interpret these instructions as best I can: I have a folder named Dialogfile I have three items within this folder DEREVAIN.D Dialogfile.TP2 setup-Dialogfile.exe (renamed Weidu file) DEREVAIN.D looks like this EXTEND_BOTTOM DEREVAIN 10IF ~~ THEN REPLY ~Erevain, you're an able adventurer, you should join us.~ GOTO mod_12ENDAPPEND DEREVAINIF ~~ THEN mod_12SAY ~I think that's an interesting proposal. Let me think about it.~~ EXITEND//APPEND Dialogfile.TP2 looks like this: BACKUP ~Dialogfile/backup~AUTHOR ~Bill Bisco~ COMPILE ~Dialogfile/DEREVAIN.D~ Is there anything I missed or have wrong syntax with? I assume because I want to affect the DEREVAIN.DLG file, I by default the .D file must be named DEREVAIN.D correct? Link to comment
Jarno Mikkola Posted June 17, 2015 Share Posted June 17, 2015 Alright I tried to interpret these instructions as best I can: I have a folder named Dialogfile I have three items within this folder ... setup-Dialogfile.exe (renamed Weidu file) The .exe needs to be outside, so when you move it and the folder, you can run the .exe in the game folder and the folder itself keeps the mods custom content inside itself, and the backup folder and so forth. Link to comment
Bill Bisco Posted June 17, 2015 Author Share Posted June 17, 2015 Thank you. I'll move the .exe. How does everything else look? Link to comment
jastey Posted June 17, 2015 Share Posted June 17, 2015 I assume because I want to affect the DEREVAIN.DLG file, I by default the .D file must be named DEREVAIN.D correct?no. The name of your .d file is unimportant. The result of a .d file is only dependent of what is inside. You specified inside that the derevain.dlg should be affected, the .d file can have whatever name you want. Link to comment
Bill Bisco Posted June 17, 2015 Author Share Posted June 17, 2015 I assume because I want to affect the DEREVAIN.DLG file, I by default the .D file must be named DEREVAIN.D correct?no. The name of your .d file is unimportant. The result of a .d file is only dependent of what is inside. You specified inside that the derevain.dlg should be affected, the .d file can have whatever name you want. My only reference to the derevain.dlg was by: EXTEND_BOTTOM DEREVAIN 10 Is that good enough? Weidu automatically knows that DEREVAIN is the DEREVAIN.DLG file to EXTEND_BOTTOM with? Thank you much for your replies. Link to comment
Thimblerig Posted June 17, 2015 Share Posted June 17, 2015 Yes, that's good enough. The ".DLG" part is implied when you call EXTEND_BOTTOM from a .d file, and there's only ever going to be one DEREVAIN dialogue. Link to comment
Bill Bisco Posted June 18, 2015 Author Share Posted June 18, 2015 I got got some earlier errors and made some modifications. My files look like this now: DialogFile.TP2 FIle BACKUP ~Dialogfile/backup~ AUTHOR ~Bill Bisco~ BEGIN ~Dialogfile Mod v1.0~ COMPILE ~Dialogfile/DEREVAIN.D~ DEREVAIN.D File BEGIN EXTEND_BOTTOM DEREVAIN 10 IF ~~ THEN REPLY ~Erevain, you're an able adventurer, you should join us.~ GOTO mod_12 END APPEND DEREVAIN IF ~~ THEN mod_12 SAY ~I think that's an interesting proposal. Let me think about it.~ ~ EXIT END I got this error message from Weidu: It doesn't like this Extend_Bottom Code for some reason. Any help would truly be appreciated. Link to comment
Thimblerig Posted June 18, 2015 Share Posted June 18, 2015 Try this: // You don't need a BEGIN unless you're starting or overwriting a new dialogue file. EXTEND_BOTTOM DEREVAIN 10 ++ ~Erevain, you're an able adventurer, you should join us.~ + mod_12 END APPEND DEREVAIN IF ~~ mod_12 SAY ~I think that's an interesting proposal. Let me think about it.~ IF ~~ EXIT END END // closes the APPEND command // (I used slightly more streamlined code - saves typing when you have a large .d file to create.) Link to comment
Bill Bisco Posted June 18, 2015 Author Share Posted June 18, 2015 Woo! That worked! I feel empowered now! Thanks to all of you! Out of curiousity, is there a way to add in a new dialogue option between dialogue options rather than just at the bottom? For example, in Erevain's default dialogue you say goodbye to him as the last option, but with this new extend_bottom dialogue, we're prodding for more information. Ideally, We would Extend us between option 2 and 3 as opposed to becoming 4. Link to comment
Thimblerig Posted June 18, 2015 Share Posted June 18, 2015 w00t! Out of curiousity, is there a way to add in a new dialogue option between dialogue options rather than just at the bottom? There is indeed: EXTEND_BOTTOM DEREVAIN 10 #2 // this tells the compiler to put the new transition after Existing Transition 2. ++ ~Erevain, you're an able adventurer, you should join us.~ + mod_12 END There's a fuller explanation here: http://www.weidu.org/~thebigg/README-WeiDU.html#EXTEND_BOTTOM (the language can be intimidating, but it's a very worthwhile read). Link to comment
jastey Posted June 18, 2015 Share Posted June 18, 2015 (But doing that is bad practice, as it shoves the existing reply option numbering and breaks other mods that e.g. ADD_TRANS_ACTION to a specific reply option, so for compatibility reasons you just add your reply option to the bottom, unless it's ToB Fate of Spirit Call for companions where all mods do EXTEND_TOP, more or less.) Link to comment
Bill Bisco Posted June 20, 2015 Author Share Posted June 20, 2015 Very well, I shall seek to refrain from using that, ugliness and obvious moddiness aside How does the streamlined code work with options? I want to put in two conditional lines of dialogue. How would you code those with the pluses? ++ IF ~!Race(Player1, ELF)~ THEN REPLY ~What in the Nine Hells is an elf doing up here?~ + GOTO 2 ++ IF ~Race(Player1, ELF)~ THEN REPLY ~Well met again brother. How goes your journey?~ DO ~SetGlobal("Erevain_Met","GLOBAL", 1)~ GOTO 1 Thanks. Link to comment
Thimblerig Posted June 20, 2015 Share Posted June 20, 2015 + ~!Race(Player1, ELF)~ + ~What in the Nine Hells is an elf doing up here?~ + 2 + ~Race(Player1, ELF)~ + ~Well met again brother. How goes your journey?~ DO ~SetGlobal("Erevain_Met","GLOBAL", 1)~ + 1 Link to comment
Bill Bisco Posted June 20, 2015 Author Share Posted June 20, 2015 Thank you so much! That ++ + format is not found at: http://www.weidu.org/~thebigg/README-WeiDU.html#EXTEND_BOTTOM Also, is there a reason why in this first example you used ++ and in the previous example you gave, you only used + Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.