A few questions for those who write dialogues
chimeric
Member Posts: 1,163
Hello.
1) How do I handle journal entries? Is there a tutorial? I know about the Add... and Erase... actions, but there is more.
2) How to introduce randomness in dialogues? I can use a RandomNum trigger, but it doesn't work within SetGlobal, you have to give a definite number there. But what if I want to set a Global to 1 or 2, randomly? That's one thing; and just directly - random. mutually exclusive display options for reply lines? If I put a RandomNum(2,1) in front of one, a RandomNum(2,2) in front of another reply line, is it a common check for both or will the engine roll separately to see if the first one appears, then to see if the second one appears?
3) Just to make sure: no way to color or emphasize the lines, is there?
4) I get a compile problem in Weidu with COMPILE EVALUATE_BUFFER with a dialogue that does compile in DLTC and works in the game. I can import the .d file in DLTC, it makes a .dlg out of it, but if I click "Check Dialogue," it gives me this window:
That points to a particular node, but there is nothing wrong or special about it - it just sets a variable, gives a couple of items, the same functions that work elsewhere in the dialogue. Have you run into this error? What's up?
1) How do I handle journal entries? Is there a tutorial? I know about the Add... and Erase... actions, but there is more.
2) How to introduce randomness in dialogues? I can use a RandomNum trigger, but it doesn't work within SetGlobal, you have to give a definite number there. But what if I want to set a Global to 1 or 2, randomly? That's one thing; and just directly - random. mutually exclusive display options for reply lines? If I put a RandomNum(2,1) in front of one, a RandomNum(2,2) in front of another reply line, is it a common check for both or will the engine roll separately to see if the first one appears, then to see if the second one appears?
3) Just to make sure: no way to color or emphasize the lines, is there?
4) I get a compile problem in Weidu with COMPILE EVALUATE_BUFFER with a dialogue that does compile in DLTC and works in the game. I can import the .d file in DLTC, it makes a .dlg out of it, but if I click "Check Dialogue," it gives me this window:
That points to a particular node, but there is nothing wrong or special about it - it just sets a variable, gives a couple of items, the same functions that work elsewhere in the dialogue. Have you run into this error? What's up?
0
Comments
2) SetGlobalRandom()
3) If you have SoD, check strref 69033. Colors are defined in bgee.lua
4) That really depends on what exactly you're trying to complie
@Ardanis Is it possible to change font styles as well (bold, italic, underlined)? Something like this would be even more useful.
2) Thanks!
3) Only SoD?
4) Well, that's the problem. It's nothing special in that branch - it ends the dialogue, sets one global, which is set, gives two items, which are given, and 50 XP. No parsing errors, syntax problems, just that odd message.
Incorrect variable: GLOBALSPRITE_IS_DEAD (block #2:Action object #1(1)) Incorrect variable: GLOBALSPRITE_IS_DEAD (block #2:Action object #2(2)) Incorrect variable: GLOBALSPRITE_IS_DEAD (block #3:Action object #0(0)) Incorrect variable: GLOBALSPRITE_IS_DEAD (block #3:Action object #1(1)) Incorrect variable: GLOBALSPRITE_IS_DEAD (block #3:Action object #2(2)) Incorrect variable: GLOBALSPRITE_IS_DEAD (block #4:Action object #0(0)) Incorrect variable: GLOBALSPRITE_IS_DEAD (block #4:Action object #1(1)) Incorrect variable: GLOBALSPRITE_IS_DEAD (block #4:Action object #2(2)) Titleless journal string reference: 0 for block #4:EraseJournalEntry(I:STRREF*)(263) Action was: EraseJournalEntry(0) Incorrect variable: GLOBALSPRITE_IS_DEAD (block #5:Action object #0(0)) Incorrect variable: GLOBALSPRITE_IS_DEAD (block #5:Action object #1(1)) Incorrect variable: GLOBALSPRITE_IS_DEAD (block #5:Action object #2(2)) Titleless journal string reference: 0 for block #5:AddJournalEntry(I:Entry*,I:Type*JourType)(173) Action was: AddJournalEntry(0,QUEST_DONE) Incorrect variable: GLOBALSPRITE_IS_DEAD (block #6:Action object #0(0)) Incorrect variable: GLOBALSPRITE_IS_DEAD (block #6:Action object #1(1)) Incorrect variable: GLOBALSPRITE_IS_DEAD (block #6:Action object #2(2)) Incorrect variable: GLOBALQEEBIELUCK (block #0:SetGlobalRandomPlus(S:Name*,S:Area*,I:Count*,I:Size*,I:Plus*)(364)) Incorrect variable: GLOBALSPRITE_IS_DEAD (block #0:Action object #0(0))
A sample from a long list of complaints. The journal entry I haven't done right yet, but I will. This GLOBALSPRITE_IS_DEAD thing is mysterious, though. And Incorrect variable: GLOBALQEEBIELUCK (block #0:SetGlobalRandomPlus(S:Name*,S:Area*,I:Count*,I:Size*,I:Plus*)(364)) is probably DLTCEP's way of saying that it doesn't recognize one of the newer functions @Ardanis suggested (thanks), SetGlobalRandom(). I don't know why it writes it as ...Plus. Anyway, DLTCEP is an old tool, but everything works in the game, so how do I figure out just why Weidu refuses to do COMPILE on this .d file?
That error is the worst part, but about the colored text: I hear it can be done in basic BGEE after 2.0. How?
Wrap the part of the string you want coloured in tags ^X text goes here ^- where X is the font color code defined in bgee.lua file.
P.S. The hex code worked to color the message the right way, but it's still for the whole text block. The other ^ doesn't do anything. Maybe it's supposed to be a whole-text function?