Page 8 of 9

Re: Strife's Dialog System - UDMF Flavor

PostPosted: Mon Mar 30, 2020 9:42 am
by Enjay
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.

Re: Strife's Dialog System - UDMF Flavor

PostPosted: Tue Mar 31, 2020 2:54 am
by Beatrice Fanstone
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

Re: Strife's Dialog System - UDMF Flavor

PostPosted: Sat Apr 18, 2020 11:24 am
by Zergeant
Updated the OP with more goodies. The Voice property and the alternative way of defining your DIALOG file:
-Voices
-DIALOGUE in Map Lump

Re: Strife's Dialog System - UDMF Flavor

PostPosted: Mon Jun 08, 2020 3:34 pm
by Molly Fundershaw
Is there a way to have dialog options effect things outside the "DIALOGUE" file?
For example picking a option increases a integer in "SCRIPTS"

Re: Strife's Dialog System - UDMF Flavor

PostPosted: Tue Jun 09, 2020 5:53 pm
by Molly Fundershaw
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?

Re: Strife's Dialog System - UDMF Flavor

PostPosted: Fri Jun 12, 2020 6:13 am
by Zergeant
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.

Re: Strife's Dialog System - UDMF Flavor

PostPosted: Mon Sep 21, 2020 6:37 am
by Hidden Hands
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?

Re: Strife's Dialog System - UDMF Flavor

PostPosted: Mon Sep 28, 2020 8:35 am
by Zergeant
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.

Re: Strife's Dialog System - UDMF Flavor

PostPosted: Sat Oct 03, 2020 4:34 am
by Vostyok
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.

Re: Strife's Dialog System - UDMF Flavor

PostPosted: Fri Oct 16, 2020 4:44 pm
by tetssian
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:

Re: Strife's Dialog System - UDMF Flavor

PostPosted: Fri Oct 16, 2020 5:11 pm
by Vostyok
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

Re: Strife's Dialog System - UDMF Flavor

PostPosted: Sat Oct 17, 2020 8:00 am
by tetssian
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

Re: Strife's Dialog System - UDMF Flavor

PostPosted: Sat Oct 17, 2020 5:48 pm
by Zergeant
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.

Re: Strife's Dialog System - UDMF Flavor

PostPosted: Sun Oct 18, 2020 11:30 am
by tetssian
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

Re: Strife's Dialog System - UDMF Flavor

PostPosted: Fri Nov 06, 2020 5:05 am
by Zergeant
tetssian wrote: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

You can try putting A_PlaySound in the Yes and No states, which respectively corresponds to a successful or failed transaction, see the Conversation States on the first page for more information.
I haven't experimented much with merchant actors so far, but I don't think there is a way to keep the dialog open when attempting to buy items currently.