Strife's Dialog System - UDMF Flavor

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

Moderator: GZDoom 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 Hidden Hands » Tue Nov 15, 2016 4:26 pm

Thanks Zergeant, much much appreciated.
User avatar
Hidden Hands
Deadite
 
Joined: 20 Sep 2016
Location: London, England

Re: Strife's Dialog System - UDMF Flavor

Postby Zergeant » Tue Nov 15, 2016 6:14 pm

No problem, the more answered questions the better.
User avatar
Zergeant
 
Joined: 31 Aug 2010
Location: Sweden

Re: Strife's Dialog System - UDMF Flavor

Postby Hidden Hands » Thu Nov 17, 2016 9:18 pm

I've got a little problem here, hoping someone can help. My merchant is in perfect working order except for one thing..... he give you everything for free! It's making the second map of my game extremely easy, as if you run out of food or bullets you can just head back to the merchant and get lots of free stuff. I need currency, and I need a way to make it count. Any suggestions or help please?
User avatar
Hidden Hands
Deadite
 
Joined: 20 Sep 2016
Location: London, England

Re: Strife's Dialog System - UDMF Flavor

Postby Zergeant » Fri Nov 18, 2016 7:09 am

I might edit the tutorial to explain that, but for now you can visit the Zdoom Wiki (https://zdoom.org/wiki/Universal_Strife_Dialog_Format) which explains and contains a code example on how to do that.
User avatar
Zergeant
 
Joined: 31 Aug 2010
Location: Sweden

Re: Strife's Dialog System - UDMF Flavor

Postby Hidden Hands » Mon Mar 06, 2017 11:36 am

Any update on how to make merchants take currency for items instead of just giving them away for free? And how to program different levels of currency? IE; Some coins, paper notes which are worth more etc... think of the original Spyro the Dragon trilogy on PS1 with gems and their value... how do we program something like this into the merchants and the game as a whole?
User avatar
Hidden Hands
Deadite
 
Joined: 20 Sep 2016
Location: London, England

Re: Strife's Dialog System - UDMF Flavor

Postby ramon.dexter » Tue Mar 07, 2017 2:01 am

Well, I'm using my currency. Based on strife coins, but not inherited. You don't need to inherit coins - the coin itself does not have any kind of code in it, any code is pointing to it, so you really dont need to inherit it.

The merchant script is pretty clearly described here:

Code: Select allExpand view
conversation
{
    ID = 1; (ID is better, it is not directly connected to specified actor)
    page
    {
         name = "MY ACTOR";
         dialog = "Hello, what can I do for you?";
         choice
         {
             text = "I need a crossbow.";
             giveitem = <item sold by merchant>; "anyitem"
             nextpage = 1;
             cost
             {
                 item = <you item>; => "coin" / "bubble" / anything
                 amount = 10; =>the actual cost of item
             }
         }
    }
}
User avatar
ramon.dexter
rudebwoy
 
Joined: 20 Oct 2015
Location: Kozolupy, Bohemia

Re: Strife's Dialog System - UDMF Flavor

Postby Zergeant » Tue Mar 07, 2017 1:24 pm

Hidden Hands wrote:Any update on how to make merchants take currency for items instead of just giving them away for free? And how to program different levels of currency? IE; Some coins, paper notes which are worth more etc... think of the original Spyro the Dragon trilogy on PS1 with gems and their value... how do we program something like this into the merchants and the game as a whole?

Just like ramon.dexter mentioned, you just utilize the cost block to define a currency and the amount the player needs. If you need another example check the updated first post, I've updated the Additional Content section to cover how to make an item cost money or... well additional items.

And yes, I've updated the first post to cover 3 new features, including the much requested Bye responses!

One thing that I couldn't cover was the "drop" feature, causing the actor to drop an item via the conversation block instead of DECORATE/ZScript. It has changed from taking an integer pointing to a mObj into taking strings pointing to classnames. Curiously enough it broke the conversation for me, I will update my GZDoom and edit my reply if that fixes it. If not, I'll contact Graf and see what's up.
User avatar
Zergeant
 
Joined: 31 Aug 2010
Location: Sweden

Re: Strife's Dialog System - UDMF Flavor

Postby Hidden Hands » Tue Mar 07, 2017 4:09 pm

I'm having a serious problem with this currency LANGUAGE code. I've followed exactly what you have put (goodbye responses and also the cost code) but now, NPC's are not interactable, shopkeepers say that items cost something but still give the stuff away for free, goodbye responses are still showing up as the default ones and finally some items have been removed from the shop completely (ie; a gun that costs 40 currency).

What on Earth has happened to my code? Why isn't it working? I've attached a couple screenshots of my code.
Attachments
codeexample2.png
codeexample2.png (5.11 KiB) Viewed 701 times
codeexample.png
User avatar
Hidden Hands
Deadite
 
Joined: 20 Sep 2016
Location: London, England

Re: Strife's Dialog System - UDMF Flavor

Postby Zergeant » Tue Mar 07, 2017 4:34 pm

It's hard to tell from a few screenshots, but I'd recommend downloading the most recent build of GZDoom via Here and see if that fixes it.
User avatar
Zergeant
 
Joined: 31 Aug 2010
Location: Sweden

Re: Strife's Dialog System - UDMF Flavor

Postby Hidden Hands » Tue Mar 07, 2017 9:50 pm

Still have the problem. I'm actually in GZdoombuilder and Slade3 but ZDOOM II UDMF format. Does this work on this? All the other stuff has so far.
User avatar
Hidden Hands
Deadite
 
Joined: 20 Sep 2016
Location: London, England

Re: Strife's Dialog System - UDMF Flavor

Postby ramon.dexter » Wed Mar 08, 2017 1:41 am

Please, paste here your WHOLE dialog lump. I§s hard to tell what§s wrong.

Also, the language lump is best for randomized dialogues. If yu want something special, like the shopkeeper, I can advice you to not use the language lump. You just have to write down the whole dialogue as you want it.
User avatar
ramon.dexter
rudebwoy
 
Joined: 20 Oct 2015
Location: Kozolupy, Bohemia

Re: Strife's Dialog System - UDMF Flavor

Postby Hidden Hands » Wed Mar 08, 2017 8:34 pm

I just wanted to ask - out of interest - if you meet an NPC and they have a key that you need to get through a door for a price, and you buy it, how can you make that NPC stop trying to sell it to you again when you speak to them again? How can I change the dialog for after the transaction?

As for pasting the whole code, I will do that shortly. Thank you. It's very strange that the goodbyes aren't working out. Hopefully it will help.
User avatar
Hidden Hands
Deadite
 
Joined: 20 Sep 2016
Location: London, England

Re: Strife's Dialog System - UDMF Flavor

Postby Zergeant » Wed Mar 08, 2017 9:53 pm

Check Additional Content section, I'm sure both the If-Player-Carries-Item and Exclude Choice feature will achieve that effect.
User avatar
Zergeant
 
Joined: 31 Aug 2010
Location: Sweden

Re: Strife's Dialog System - UDMF Flavor

Postby ramon.dexter » Thu Mar 09, 2017 5:20 am

Wow, nice new features! I was aware of the iftem - link thing, but the include and exclude blocks are completely new to me, and it's nice! Also, the goodbye definition is a thing. now I can make fully localized content with full translation, no "bye" anymore.
User avatar
ramon.dexter
rudebwoy
 
Joined: 20 Oct 2015
Location: Kozolupy, Bohemia

Re: Strife's Dialog System - UDMF Flavor

Postby Leon_Portier » Tue Apr 18, 2017 8:34 am

Is the actor the classname, the Tid or something else?
I just cant get the conversation to innitiate, so I figured there must I have done wrong.
Help is very appreciated. :)

Non-working map + Screenshots:
https://www.dropbox.com/s/yrgl3x3kydozt ... d.zip?dl=0

Im using GZDooM 2.4.0x64, Slade 3.1.1.4 and GZDooMBuilder v2.3.02787
Code:
(Edit: added "conversation")
Spoiler:
Last edited by Leon_Portier on Tue Apr 18, 2017 12:11 pm, edited 2 times in total.
User avatar
Leon_Portier
 
Joined: 12 Feb 2017
Location: Dark side of Bavaria
Discord: Leon Portier#2527

PreviousNext

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest