Page 2 of 10

Re: Strife's Dialog System - UDMF Flavor

Posted: Tue Nov 15, 2016 3:26 pm
by Hidden Hands
Thanks Zergeant, much much appreciated.

Re: Strife's Dialog System - UDMF Flavor

Posted: Tue Nov 15, 2016 5:14 pm
by Zergeant
No problem, the more answered questions the better.

Re: Strife's Dialog System - UDMF Flavor

Posted: Thu Nov 17, 2016 8:18 pm
by Hidden Hands
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?

Re: Strife's Dialog System - UDMF Flavor

Posted: Fri Nov 18, 2016 6:09 am
by Zergeant
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.

Re: Strife's Dialog System - UDMF Flavor

Posted: Mon Mar 06, 2017 10:36 am
by Hidden Hands
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?

Re: Strife's Dialog System - UDMF Flavor

Posted: Tue Mar 07, 2017 1:01 am
by ramon.dexter
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 all

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
             }
         }
    }
}

Re: Strife's Dialog System - UDMF Flavor

Posted: Tue Mar 07, 2017 12:24 pm
by Zergeant
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.

Re: Strife's Dialog System - UDMF Flavor

Posted: Tue Mar 07, 2017 3:09 pm
by Hidden Hands
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.

Re: Strife's Dialog System - UDMF Flavor

Posted: Tue Mar 07, 2017 3:34 pm
by Zergeant
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.

Re: Strife's Dialog System - UDMF Flavor

Posted: Tue Mar 07, 2017 8:50 pm
by Hidden Hands
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.

Re: Strife's Dialog System - UDMF Flavor

Posted: Wed Mar 08, 2017 12:41 am
by ramon.dexter
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.

Re: Strife's Dialog System - UDMF Flavor

Posted: Wed Mar 08, 2017 7:34 pm
by Hidden Hands
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.

Re: Strife's Dialog System - UDMF Flavor

Posted: Wed Mar 08, 2017 8:53 pm
by Zergeant
Check Additional Content section, I'm sure both the If-Player-Carries-Item and Exclude Choice feature will achieve that effect.

Re: Strife's Dialog System - UDMF Flavor

Posted: Thu Mar 09, 2017 4:20 am
by ramon.dexter
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.

Re: Strife's Dialog System - UDMF Flavor

Posted: Tue Apr 18, 2017 7:34 am
by Leon_Portier
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: