Strife's Dialog System - UDMF Flavor

Handy guides on how to do things, written by users for users.

Moderators: GZDoom Developers, Raze Developers

Forum rules
Please don't start threads here asking for help. This forum is not for requesting guides, only for posting them. If you need help, the Editing forum is for you.

Re: Strife's Dialog System - UDMF Flavor

Postby Enjay » Mon Mar 30, 2020 9:42 am

Worth pointing out that the Wiki states that sounds intended for use with the Voice parameter should be in the "voices" namespace in a PK3 (or between V_* markers in a WAD).

I haven't actually actually checked that though with an actual example.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: Strife's Dialog System - UDMF Flavor

Postby Beatrice Fanstone » Tue Mar 31, 2020 2:54 am

Thank you very much Zergeant, such a cool feeling hearing a doom character say "TEST TEST TEST" with my own voice.

As Enjay pointed out though, you need to get the sound file into the /voices/ namespace, which in a WAD can easily be achieved by creating a SNDINFO file that contains the following line (for your audio file TEST.wav):

svox/TEST TEST
Beatrice Fanstone
 

Re: Strife's Dialog System - UDMF Flavor

Postby Zergeant » Sat Apr 18, 2020 11:24 am

Updated the OP with more goodies. The Voice property and the alternative way of defining your DIALOG file:
-Voices
-DIALOGUE in Map Lump
User avatar
Zergeant
 
Joined: 31 Aug 2010
Location: Sweden

Re: Strife's Dialog System - UDMF Flavor

Postby Molly Fundershaw » Mon Jun 08, 2020 3:34 pm

Is there a way to have dialog options effect things outside the "DIALOGUE" file?
For example picking a option increases a integer in "SCRIPTS"
Molly Fundershaw
 

Re: Strife's Dialog System - UDMF Flavor

Postby Molly Fundershaw » Tue Jun 09, 2020 5:53 pm

Can i restrict a dialog choice to be only selectable once?
Lets say i have a Imp give me a keycard via giveitem how would i make it to give the player only one?

Also what does putting "log" in a choice (referenced below choices here: http://maniacsvault.net/usdf/usdf22-draft.txt) do?
Molly Fundershaw
 

Re: Strife's Dialog System - UDMF Flavor

Postby Zergeant » Fri Jun 12, 2020 6:13 am

Molly Fundershaw wrote:Is there a way to have dialog options effect things outside the "DIALOGUE" file?
For example picking a option increases a integer in "SCRIPTS"

Not sure what you mean by this, but you can add the special property to a choice in the conversation of your actor and set it to execute an ACS script to increase an integer somewhere. See the FAQ for an example and check the Zdoom Wiki for what number id the ACS_Execute action has.
Molly Fundershaw wrote:Can i restrict a dialog choice to be only selectable once?
Lets say i have a Imp give me a keycard via giveitem how would i make it to give the player only one?

Also what does putting "log" in a choice (referenced below choices here: http://maniacsvault.net/usdf/usdf22-draft.txt) do?

Yes. Check the section for Include/Exclude Choices on the first page, and give the player a dummy item after the choice has been selected.

The Log property is most likely used by Strife to update a panel you can bring up to see what quest you're currently doing. Probably does nothing in Doom but I haven't done any experiments with it yet.
User avatar
Zergeant
 
Joined: 31 Aug 2010
Location: Sweden

Re: Strife's Dialog System - UDMF Flavor

Postby Hidden Hands » Mon Sep 21, 2020 6:37 am

How can I write out a dialog that has responses to a choice of things to say? Ie; noc says something. A list if three choices to respond with come up. The npc then has another thing to say depending on what you responded with... basically a dialog tree?
User avatar
Hidden Hands
Deadite
 
Joined: 21 Sep 2016
Location: London, England

Re: Strife's Dialog System - UDMF Flavor

Postby Zergeant » Mon Sep 28, 2020 8:35 am

Hidden Hands wrote:How can I write out a dialog that has responses to a choice of things to say? Ie; noc says something. A list if three choices to respond with come up. The npc then has another thing to say depending on what you responded with... basically a dialog tree?

Yes, basically that.
User avatar
Zergeant
 
Joined: 31 Aug 2010
Location: Sweden

Re: Strife's Dialog System - UDMF Flavor

Postby Vostyok » Sat Oct 03, 2020 4:34 am

I've done something similar to this^

Totally not Fallout inspired. Totally.
I used Dialog Tokens (invisible inventory items) that are used as keys to unlock conversation topics, and there is even a script that initiates combat should the player take a more aggressive approach to the discussion.
User avatar
Vostyok
WARNING - SPOOPY MODE ACTIVE
 
Joined: 17 Jan 2015
Location: May vary
Discord: Vostyok#3164

Re: Strife's Dialog System - UDMF Flavor

Postby tetssian » Fri Oct 16, 2020 4:44 pm

I have a question, beforehand great guide it works wonderful for everything i try to do, well, almost cause i cant seem to figure out how to make when you make a choice, you call another choice, since i want to make a shopkeeper that not only sell stuff but also buy it, i know how to make both things but how can i make that when you select a choice the result open more choices?

If someone could make a little example or explain it to me it would be great cause i cant seem to manage it D:
tetssian
 
Joined: 30 May 2012

Re: Strife's Dialog System - UDMF Flavor

Postby Vostyok » Fri Oct 16, 2020 5:11 pm

tetssian wrote:I have a question, beforehand great guide it works wonderful for everything i try to do, well, almost cause i cant seem to figure out how to make when you make a choice, you call another choice, since i want to make a shopkeeper that not only sell stuff but also buy it, i know how to make both things but how can i make that when you select a choice the result open more choices?

If someone could make a little example or explain it to me it would be great cause i cant seem to manage it D:


I can do exactly that!

This guide was very helpful but I've done some experimenting in order to have different categories of buying and selling. See below for a small snippet of dialogue, where a trader offers and accepts different wares, as well as offering paths back to story/quest stuff:
Spoiler:


You'll notice that I've added a page number which is commented out to each page entry ("Page //2" for example). The code ignores this of course, but it helps to organize things better for yourself. Oh, don't forget you are limited to FIVE choice options per page, unless you lock off any depending on inventory, etc.

Edit: Final note. To get around the limitations of the dialog system, I've made it so money is separated into bunches in the code. Not a problem if you don't mind trading one thing for another (a shotgun for a chaingun) but otherwise, giveitem only seems to work in batches of one. So create custom inventory items ("fortybucks") that give the corresponding number to circumvent this.
Oh, and feel free to just chop and change what I wrote to suit your needs :D
User avatar
Vostyok
WARNING - SPOOPY MODE ACTIVE
 
Joined: 17 Jan 2015
Location: May vary
Discord: Vostyok#3164

Re: Strife's Dialog System - UDMF Flavor

Postby tetssian » Sat Oct 17, 2020 8:00 am

thank you so much this is exactly what i needed i was actually to make the stuff works with the option but it was bugged and never returned to the original page, ty again vostyok now i see what i made wrong lol
tetssian
 
Joined: 30 May 2012

Re: Strife's Dialog System - UDMF Flavor

Postby Zergeant » Sat Oct 17, 2020 5:48 pm

There's also pagename property which lets you use a string ID instead of a number ID, makes it a bit easier to organize. Just remember to use GZDoom namespace instead of ZDoom.
User avatar
Zergeant
 
Joined: 31 Aug 2010
Location: Sweden

Re: Strife's Dialog System - UDMF Flavor

Postby tetssian » Sun Oct 18, 2020 11:30 am

hello again and thanks again for the help Vostyok, but now i was wondering is it possible to play a sound when you dont have the neccesary item or you end a dilog, im making the RE4 merchant just for fun but well i cant seem to put a sound when the transaction ends or fail and second is it possible that even if you fail or end the transaction the dialog doesnt close and return to the fist dialog? cause i try to put the closedialog in false or true but it doesnt make anything it just close the dialog and dont call the page i ask for, even if closedialog doesnt show at all it just end the dialog instead of continue it. BTW thank youy zeargent for the advice in named dialogs
tetssian
 
Joined: 30 May 2012

Previous

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 0 guests