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.
User avatar
Murix
Posts: 135
Joined: Wed Mar 30, 2016 11:10 pm
Location: On my chair

Re: Strife's Dialog System - UDMF Flavor

Post by Murix »

Murix wrote:
For now I've just got Thirty (god lord) Two of these files going from "DIALOG01.txt" to "DIALOG32.txt"
yeah that's what the solution is right now
ImpieTwo
Posts: 912
Joined: Sun Aug 16, 2015 11:52 pm

Re: Strife's Dialog System - UDMF Flavor

Post by ImpieTwo »

Is there a way to assign an npc with a specific random dialogue from the list once it's spawned on the map? Currently all of the generic npcs with random phrases pick a new one each time, and i'd rather they only get one for the whole session until you start a new game. Otherwise you can use one npc to cycle through all the dialogues.
User avatar
bitsy
Posts: 14
Joined: Fri Jan 11, 2019 2:13 pm

Re: Strife's Dialog System - UDMF Flavor

Post by bitsy »

hi ive a problem its looks like. when i put dialogue01 02 and so on between maps respectively. those maps wont show up in gzdoom builder. when i remove dialog files. then it will show up whats im doing wrong
User avatar
Mr.Enchanter
Posts: 481
Joined: Sat Mar 21, 2015 3:22 pm
Location: USA

Re: Strife's Dialog System - UDMF Flavor

Post by Mr.Enchanter »

Is there any way to change the text color and the menu cursor?
User avatar
Zergeant
Posts: 108
Joined: Tue Aug 31, 2010 7:19 am
Location: Sweden

Re: Strife's Dialog System - UDMF Flavor

Post by Zergeant »

I'll be making a very teensy update to the main post soonish. It'll just contain one feature, though there is another being implemented that lets you handle page numbers as page names instead for easier management, though after some testing it appears to be unfinished as of now.
ImpieTwo wrote:Is there a way to assign an npc with a specific random dialogue from the list once it's spawned on the map? Currently all of the generic npcs with random phrases pick a new one each time, and i'd rather they only get one for the whole session until you start a new game. Otherwise you can use one npc to cycle through all the dialogues.
Unfortunately I don't think there is an easy solution for that. You could make copies of a conversation, set them in a range of IDs like 9000 to 9005 or however many you have, and have ACS randomize in that range, math.random(9000,9005) I believe but I haven't touched ACS in years so don't quote me on that.
bitsy wrote:hi ive a problem its looks like. when i put dialogue01 02 and so on between maps respectively. those maps wont show up in gzdoom builder. when i remove dialog files. then it will show up whats im doing wrong
Quite an odd error, you might have missed defining a namespace or such. It would be easier to debug if you could upload and share your map here.
Mr.Enchanter wrote:Is there any way to change the text color and the menu cursor?
Nope, not easily accessible at least, you can perform some changes via ZScript but I'm not sure about those specific properties.

Also sorry for the late replies.
User avatar
Nash
 
 
Posts: 17465
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Strife's Dialog System - UDMF Flavor

Post by Nash »

Zergeant wrote:lets you handle page numbers as page names instead for easier management, though after some testing it appears to be unfinished as of now.
What do you mean? What's unfinished about it? I am already using it in full production for a game (I was the one who requested that feature), and it does everything I'd hope it'd do. Curious to know what you mean by "unfinished"...
User avatar
Zergeant
Posts: 108
Joined: Tue Aug 31, 2010 7:19 am
Location: Sweden

Re: Strife's Dialog System - UDMF Flavor

Post by Zergeant »

Nash wrote:
Zergeant wrote:lets you handle page numbers as page names instead for easier management, though after some testing it appears to be unfinished as of now.
What do you mean? What's unfinished about it? I am already using it in full production for a game (I was the one who requested that feature), and it does everything I'd hope it'd do. Curious to know what you mean by "unfinished"...
It doesn't go to the next page properly, I've double-checked the names and it will either spit out an invalid node xx error in the console or it will go to a completely unrelated page.

Code: Select all

conversation
{
	// A hotheaded boy with a story to tell.
	actor = "Archvile";
	
	// Intro
	page
	{
		name = "Hothead";
		pagename = "Hello";
		dialog = "I got a burning feelin'!";
		choice
		{
			text = "Really now?";
			nextpage = "MyFeels";
		}
	}
	
	// Second page
	page
	{
		name = "Hothead";
		pagename = "MyFeels";
		dialog = "Yeah... My fiancee just left me...";
		choice
		{
			text = "Sorry to hear...";
			nextpage = "Japed";
		}
	}
	
	// Third page
	page
	{
		name = "Hothead";
		pagename = "Japed";
		dialog = "That's okay, we weren't doing too hot anyway! Har har har!";
		choice
		{
			text = "I ought to shoot you for that pun...";
			nextpage = "Hello";
		}
	}
}
This will result in an invalid node 11 not found error, running on g3.8pre-757-g0ed847b51.
User avatar
Nash
 
 
Posts: 17465
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Strife's Dialog System - UDMF Flavor

Post by Nash »

Zergeant wrote:
Nash wrote:
Zergeant wrote:lets you handle page numbers as page names instead for easier management, though after some testing it appears to be unfinished as of now.
What do you mean? What's unfinished about it? I am already using it in full production for a game (I was the one who requested that feature), and it does everything I'd hope it'd do. Curious to know what you mean by "unfinished"...
It doesn't go to the next page properly, I've double-checked the names and it will either spit out an invalid node xx error in the console or it will go to a completely unrelated page.

Code: Select all

conversation
{
	// A hotheaded boy with a story to tell.
	actor = "Archvile";
	
	// Intro
	page
	{
		name = "Hothead";
		pagename = "Hello";
		dialog = "I got a burning feelin'!";
		choice
		{
			text = "Really now?";
			nextpage = "MyFeels";
		}
	}
	
	// Second page
	page
	{
		name = "Hothead";
		pagename = "MyFeels";
		dialog = "Yeah... My fiancee just left me...";
		choice
		{
			text = "Sorry to hear...";
			nextpage = "Japed";
		}
	}
	
	// Third page
	page
	{
		name = "Hothead";
		pagename = "Japed";
		dialog = "That's okay, we weren't doing too hot anyway! Har har har!";
		choice
		{
			text = "I ought to shoot you for that pun...";
			nextpage = "Hello";
		}
	}
}
This will result in an invalid node 11 not found error, running on g3.8pre-757-g0ed847b51.
That sounds like a bug and should have been reported! Post your example mod too, in the report.

(Although I'm not sure why it works on my end but not yours)
User avatar
olzhas1one
Posts: 70
Joined: Sun Feb 26, 2017 6:29 am

Re: Strife's Dialog System - UDMF Flavor

Post by olzhas1one »

I have one question - can I use the same dialogue on different maps?
User avatar
Zergeant
Posts: 108
Joined: Tue Aug 31, 2010 7:19 am
Location: Sweden

Re: Strife's Dialog System - UDMF Flavor

Post by Zergeant »

Yes.

Code: Select all

include = "DIALOG01"
If you type that into the dialogue file for your map, you will include dialogue from the file DIALOG01.
Guest

Re: Strife's Dialog System - UDMF Flavor

Post by Guest »

Also, I found something important - While this tutorial should work in Zandronum, it turns out that Yesmessage, Nomessage and DisplayCost make the code unuseable in Zandronum (it simply won't start, no matter what). Not sure why this happens, but an important thing to know about when making these. Everything else seems to work fine
Guest

Re: Strife's Dialog System - UDMF Flavor

Post by Guest »

Hi, can you trigger animation through dialogue? Like, when you make a choice in reply, and actor has different sprite (yeah, like angry face or sad).

If it's not possible, then another question... can you put actor in death state after dialogue? So when you end dialogue "ok, bye" actor dies.

Thanks
User avatar
Zergeant
Posts: 108
Joined: Tue Aug 31, 2010 7:19 am
Location: Sweden

Re: Strife's Dialog System - UDMF Flavor

Post by Zergeant »

Esther Dallerpork wrote:Hi, can you trigger animation through dialogue? Like, when you make a choice in reply, and actor has different sprite (yeah, like angry face or sad).

If it's not possible, then another question... can you put actor in death state after dialogue? So when you end dialogue "ok, bye" actor dies.

Thanks
You can define states in the actor for Yes, No and Greetings, and depending on the player choices the actor will enter these states.

Yes state is entered when the player picks a choice that has a "yesmessage" property.
No state is similar except for "nomessage"
Greetings is always played when the player starts the conversation with the actor.

You can refer to the Merchant class in the ZDoom Wiki to see how it should be set up, but basically it's only the states you need. https://zdoom.org/wiki/Classes:Merchant

I don't think you can put an actor in death state with a Bye choice. I suppose you can put a No state right before the Death state and let it fall through. Either that or define a special to be activated in one of the choices that kills the actor.
User avatar
IwazaruK7
Posts: 6
Joined: Fri Oct 18, 2019 2:38 am

Re: Strife's Dialog System - UDMF Flavor

Post by IwazaruK7 »

This is nice, thanks. And if i understand correctly, you can assign different sound to each actor's yes or no state, so actor can play laughing or crying sound, for example?

p.s.
I was trying to add fog (in gzdoombuilder, through script editor, following tutorials) into a map, which had dialogue (created in slade, based on your method) and i noticed that messing with script editor in GZdoomBuilder basically... wipes out dialogue completely :o Is that a bug, could that be prevented?

EDIT:
I think i found the fix - opened wad in Slade and removed dummy dialogue lamp which GZDB added (it prevented dialog01 to happen)
User avatar
Zergeant
Posts: 108
Joined: Tue Aug 31, 2010 7:19 am
Location: Sweden

Re: Strife's Dialog System - UDMF Flavor

Post by Zergeant »

IwazaruK7 wrote:This is nice, thanks. And if i understand correctly, you can assign different sound to each actor's yes or no state, so actor can play laughing or crying sound, for example?

p.s.
I was trying to add fog (in gzdoombuilder, through script editor, following tutorials) into a map, which had dialogue (created in slade, based on your method) and i noticed that messing with script editor in GZdoomBuilder basically... wipes out dialogue completely :o Is that a bug, could that be prevented?

EDIT:
I think i found the fix - opened wad in Slade and removed dummy dialogue lamp which GZDB added (it prevented dialog01 to happen)
Yes, you can use A_PlaySound https://zdoom.org/wiki/A_PlaySound

I have never used GZDB's Dialogue Editor and using both programs at once may end up in some data loss on one end or the other. I'd say just use GZDB for mapping and Slade for everything else.

Return to “Tutorials”