Strife's Dialog System - UDMF Flavor

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.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Strife's Dialog System - UDMF Flavor

Re: Strife's Dialog System - UDMF Flavor

by Zergeant » Mon Dec 25, 2023 9:28 am

Well it sure has been some time since I wrote this tutorial, but it is nice to see people are still getting use out of it.

Couple of notes:

PK3 is definitely preferred if you are working with several maps, custom actors, textures and what-else. If you are using UDMF you should take advantage of this format.

You can also absolutely use quotation marks inside of strings with the use of backslash, see the following:

Code: Select all

dialog = "I am \"THIS\" close to losing it!";
This also works in the LANGUAGE lump for randomized texts.

Quirks with Slade I unfortunately can't help with, but duplication of the dialog lump sounds odd though, are you sure it isn't UDB causing this?


I should probably update the OP with this information, along with colorized text, but it is in a pretty sorry state with all those broke imgur links so it might take a while.

Re: Strife's Dialog System - UDMF Flavor

by Niekitty » Sat Dec 23, 2023 1:03 pm

ramon.dexter wrote: Sat Dec 23, 2023 12:31 am Well, the dialogue includes go into dialogue tab in script editor in udb. I do t use slade, so take a look at my maps, open them in slade and see where the dialog lump is exactly placed. I use udb for mapping and scripting inside maps, vscode for any other code or text editing and slade for editing lumps. So I let udb to do the ordering inside wad.
Looking at your maps in Slade they are identical in file structure to mine, and as soon as they loaded through Slade they did the same thing with map loading failures until I recreated the exits from slade, so it LOOKS like that issue is something incompatible somehow between programs.... maybe?
Also, you keep your Dialogue files separate, but UDB appears to keep a complete copy of each of them, entirely commented out, inside your map files, underneath the #include.
As for my point 1 that I'd accepted and moved on from, I was looking up something entirely unrelated last night, noticed something about changing font colors, went on a mental tangent to look that up, and... eh... yes, you can have " marks in text, as long as it's written \".

So at this point, everything is working, including my dialogue, I just have to remember to go into the archive and delete all the extra dialogue lumps it creates when I save anything. THAT I am pretty sure is an editor bug, and I've reported it on their issue tracker.

Re: Strife's Dialog System - UDMF Flavor

by ramon.dexter » Sat Dec 23, 2023 12:31 am

Well, the dialogue includes go into dialogue tab in script editor in udb. I do t use slade, so take a look at my maps, open them in slade and see where the dialog lump is exactly placed. I use udb for mapping and scripting inside maps, vscode for any other code or text editing and slade for editing lumps. So I let udb to do the ordering inside wad.

Re: Strife's Dialog System - UDMF Flavor

by Niekitty » Sat Dec 23, 2023 12:24 am

ramon.dexter wrote: Sat Dec 23, 2023 12:02 am 2. Just take a look at the repo I posted, it pretty explains itself. Folder /Dialogs is for ... well ... dialogs, each of the files inside is later referenced in each map with include="" command. Download the repo and take a look at it.

When you use the pk3 with folders and place each separate map into /Maps folder, you can afterwards include text files from the pk3 itself, so you can have includes and imports inside the maps script files, etc.

2b: Heh, yeah, something like that. I've used slade for years like that, and always thought it's the best way of doing things. But when I moved to editing directory, and not a archive, I've found out how wrong I was. When you edit an archive, you're pretty limited with backuping and things like that, because you're always working with a single file. Not a problem when the contents of said file is counted in single numbers. It becomes a problem when the files inside grow to hundreds and thousands. When you work with a dirdctory, these problems are lowered because you're working with a proper directory, and not a content of a archive file. Also, you're not li ited to single editor and you can use any editor you want (aaand vscode with gzdoom support is super sweet, now I see slade's code editor as something like windows notepad compared to vscode, btw). Now I use slade only for lump editing - tinkering with textures lumps, editing sprite offsets, and acs compilation.
Yeah, keeping the dialogue separate pretty much solves about everything. Please pardon the keyboard keys stuck to my face.
You say to use an Include in the map. I've used include commands a few times, but as usual, people tell me to use something, but I don't know where to put it. Does the include go in the map data itself somewhere? I'll take a look at your project file and dig around a bit (have to leave for work in like... 10 minutes, and that's where I do most of my modding. it's a SLOW job.).

I think I'm kind of doing part of what you're saying already. I do a ton of my code-writing work so far with Notepad++ and I do keep everything in a folder structure before tipping it all into Slade. Usually it works just fine, and I do all my map editing with it, but this was... a more jarring problem than I'd run into so far. And so far my map is a pile of textures, 8 maps, and some zscript files. I have a horrible feeling that by the time I actually have this mod done it's going to look like a governmental authority diagram.

Thank you for the help. =^^=
Been beating my head against all this for a few days now and my deranged pixel maid is getting exasperated that her voice doesn't always work. :D

Re: Strife's Dialog System - UDMF Flavor

by ramon.dexter » Sat Dec 23, 2023 12:02 am

Niekitty wrote: Fri Dec 22, 2023 11:55 pm
ramon.dexter wrote: Fri Dec 22, 2023 11:19 pm 1. Writer or not, now you're programming and things behave different here. You have to use either of my example, or write your own dialogue system. Basically, you cannot use double quotes inside double quotes, that's just impossible.

2. If you're using pk3, I dont understand why you're asking about placement of dialogue lump. Use UDB, create a dialogue through script editor and include dialogue .txts placed anywhere inside your pk3. The point of using pk3 is to not place anything inside map.wad. When using pk3, you dont place anything besides the map itself into .wad file. Wad file in pk3 is for map only.

2b: well, you're doing it the wrong way. Slade is not the stablest one, and it had screwed my pk3s a lot, so I moved to folder structure. The point with folders is that you can load folders into gzdoom and udb and slade, so the method of editing pk/wad directly leads only to loss of files. Your choice, but I've made the same mistake before and will not effectively return. Once you try that, you dont want to go back. But you wont believe this experience before you try it yourself.

Here, take a look on how I've organized one of my projects:
https://github.com/ramonDexter/WorldOfStrife
1. I get that, but I HAVE messed with other programming languages and there were always ways to display quotation marks. If there isn't here I'll just find a way around that, but now I know there ISN'T a way to do it I'll feel a little less frazzled cooking up a workaround.

2. I actually had no freaking clue that I could put the Dialogue lump somewhere other than the map. ALL the tutorials and explanations I've found ALL said it had to be placed in with the map "below the marker but above the end map" (If I missed something, I missed it. Half the time I'm looking this stuff up on my phone since half the time I have not internet connection available. Makes things a LITTLE hard to read). Nothing I had seen or heard of in anything so far even hinted to me that I COULD put it somewhere else. That would actually solve a metric truckload of issues, though. How the heckers do I set that up?

2b. I'm... what? Breathing the wrong way? :? UDB crashes on my laptop. Not my desktop so much, but on the laptop, where I do most of my mod work, it crashes repeatedly. Sometimes before it finishes opening. Slade has never caused me a problem on either computer, and the interface makes more sense to me. I always keep backups, but it hasn't scrambled any PK3s on me yet. *shrug* I will keep a closer eye on it though, so thank you.
2. Just take a look at the repo I posted, it pretty explains itself. Folder /Dialogs is for ... well ... dialogs, each of the files inside is later referenced in each map with include="" command. Download the repo and take a look at it.

When you use the pk3 with folders and place each separate map into /Maps folder, you can afterwards include text files from the pk3 itself, so you can have includes and imports inside the maps script files, etc.

2b: Heh, yeah, something like that. I've used slade for years like that, and always thought it's the best way of doing things. But when I moved to editing directory, and not a archive, I've found out how wrong I was. When you edit an archive, you're pretty limited with backuping and things like that, because you're always working with a single file. Not a problem when the contents of said file is counted in single numbers. It becomes a problem when the files inside grow to hundreds and thousands. When you work with a dirdctory, these problems are lowered because you're working with a proper directory, and not a content of a archive file. Also, you're not li ited to single editor and you can use any editor you want (aaand vscode with gzdoom support is super sweet, now I see slade's code editor as something like windows notepad compared to vscode, btw). Now I use slade only for lump editing - tinkering with textures lumps, editing sprite offsets, and acs compilation.

Re: Strife's Dialog System - UDMF Flavor

by Niekitty » Fri Dec 22, 2023 11:55 pm

ramon.dexter wrote: Fri Dec 22, 2023 11:19 pm 1. Writer or not, now you're programming and things behave different here. You have to use either of my example, or write your own dialogue system. Basically, you cannot use double quotes inside double quotes, that's just impossible.

2. If you're using pk3, I dont understand why you're asking about placement of dialogue lump. Use UDB, create a dialogue through script editor and include dialogue .txts placed anywhere inside your pk3. The point of using pk3 is to not place anything inside map.wad. When using pk3, you dont place anything besides the map itself into .wad file. Wad file in pk3 is for map only.

2b: well, you're doing it the wrong way. Slade is not the stablest one, and it had screwed my pk3s a lot, so I moved to folder structure. The point with folders is that you can load folders into gzdoom and udb and slade, so the method of editing pk/wad directly leads only to loss of files. Your choice, but I've made the same mistake before and will not effectively return. Once you try that, you dont want to go back. But you wont believe this experience before you try it yourself.

Here, take a look on how I've organized one of my projects:
https://github.com/ramonDexter/WorldOfStrife
1. I get that, but I HAVE messed with other programming languages and there were always ways to display quotation marks. If there isn't here I'll just find a way around that, but now I know there ISN'T a way to do it I'll feel a little less frazzled cooking up a workaround.

2. I actually had no freaking clue that I could put the Dialogue lump somewhere other than the map. ALL the tutorials and explanations I've found ALL said it had to be placed in with the map "below the marker but above the end map" (If I missed something, I missed it. Half the time I'm looking this stuff up on my phone since half the time I have not internet connection available. Makes things a LITTLE hard to read). Nothing I had seen or heard of in anything so far even hinted to me that I COULD put it somewhere else. That would actually solve a metric truckload of issues, though.

2b. I'm... what? Breathing the wrong way? :? UDB crashes on my laptop. Not my desktop so much, but on the laptop, where I do most of my mod work, it crashes repeatedly. Sometimes before it finishes opening. Slade has never caused me a problem on either computer, and the interface makes more sense to me. I always keep backups, but it hasn't scrambled any PK3s on me yet. *shrug* I will keep a closer eye on it though, so thank you.

Re: Strife's Dialog System - UDMF Flavor

by ramon.dexter » Fri Dec 22, 2023 11:19 pm

Niekitty wrote: Fri Dec 22, 2023 1:20 pm
ramon.dexter wrote: Fri Dec 22, 2023 11:05 am 1. You need to decide which marks use and where. So, the common solution is to enclose the text string inside double quotes, like "this text", and if you want to quote anything specifically, do it like this: "you 'specify' the text like this".

2. Cannot really help here, as I use pk3 for my projects.

2b. Well, don't use slade. The best solution is to move to pk3 from wad, as pk3 allows you to use a directory structure and use an IDE to write the code. I personally use vs code, the directory as archive and when I'm done, I just pack the directory into pk3, which is only renamed zip.

More info here:
https://zdoom.org/wiki/Using_ZIPs_as_WAD_replacement
1. I'm actually a writer, so when I say quotation marks I mean "s. I was trying to write a technically correct piece of dialogue with character speech denoted by the quotation marks. Apostrophes usually have drastically different meanings in traditional writing, and even then, those aren't showing up either, so my text has serious punctuation issues.

2. I use PK3 already. That's part of the whole thing: the dialogue is working outside of the PK3 with just the map on its own with code, but as soon as it's all packed into the PK3 it has issues. I HAVE narrowed it down: the issues ONLY happen with maps where I tried to do any of my editing using Ultimate Doom Builder to correct scripting errors since almost all the tutorials use UDB for everything.

2b. I use Slade because it's the most stable editor I've found for this engine, and I have problems with UDBs interface. Also, with Slade, I can just work directly with the PK3 from the start and not worry about a bunch of packing and unpacking. I'm not inherently a programmer, I'm an artist and writer, I take on technical challenges like this to stretch myself and learn... and have some fun. Map-making is fun. Especially with odd engine-based limits to find ways around.

I spent a good chunk of last night fighting with it again and at this point dialog and map transitions within my PK3 are working, I just have to close everything after all my edits, re-open it all, and delete all the extra Dialogue lumps that are spawning like lust demons and dust bunnies.
1. Writer or not, now you're programming and things behave different here. You have to use either of my example, or write your own dialogue system. Basically, you cannot use double quotes inside double quotes, that's just impossible.

2. If you're using pk3, I dont understand why you're asking about placement of dialogue lump. Use UDB, create a dialogue through script editor and include dialogue .txts placed anywhere inside your pk3. The point of using pk3 is to not place anything inside map.wad. When using pk3, you dont place anything besides the map itself into .wad file. Wad file in pk3 is for map only.

2b: well, you're doing it the wrong way. Slade is not the stablest one, and it had screwed my pk3s a lot, so I moved to folder structure. The point with folders is that you can load folders into gzdoom and udb and slade, so the method of editing pk/wad directly leads only to loss of files. Your choice, but I've made the same mistake before and will not effectively return. Once you try that, you dont want to go back. But you wont believe this experience before you try it yourself.

Here, take a look on how I've organized one of my projects:
https://github.com/ramonDexter/WorldOfStrife

Re: Strife's Dialog System - UDMF Flavor

by Niekitty » Fri Dec 22, 2023 1:20 pm

ramon.dexter wrote: Fri Dec 22, 2023 11:05 am 1. You need to decide which marks use and where. So, the common solution is to enclose the text string inside double quotes, like "this text", and if you want to quote anything specifically, do it like this: "you 'specify' the text like this".

2. Cannot really help here, as I use pk3 for my projects.

2b. Well, don't use slade. The best solution is to move to pk3 from wad, as pk3 allows you to use a directory structure and use an IDE to write the code. I personally use vs code, the directory as archive and when I'm done, I just pack the directory into pk3, which is only renamed zip.

More info here:
https://zdoom.org/wiki/Using_ZIPs_as_WAD_replacement
1. I'm actually a writer, so when I say quotation marks I mean "s. I was trying to write a technically correct piece of dialogue with character speech denoted by the quotation marks. Apostrophes usually have drastically different meanings in traditional writing, and even then, those aren't showing up either, so my text has serious punctuation issues.

2. I use PK3 already. That's part of the whole thing: the dialogue is working outside of the PK3 with just the map on its own with code, but as soon as it's all packed into the PK3 it has issues. I HAVE narrowed it down: the issues ONLY happen with maps where I tried to do any of my editing using Ultimate Doom Builder to correct scripting errors since almost all the tutorials use UDB for everything.

2b. I use Slade because it's the most stable editor I've found for this engine, and I have problems with UDBs interface. Also, with Slade, I can just work directly with the PK3 from the start and not worry about a bunch of packing and unpacking. I'm not inherently a programmer, I'm an artist and writer, I take on technical challenges like this to stretch myself and learn... and have some fun. Map-making is fun. Especially with odd engine-based limits to find ways around.

I spent a good chunk of last night fighting with it again and at this point dialog and map transitions within my PK3 are working, I just have to close everything after all my edits, re-open it all, and delete all the extra Dialogue lumps that are spawning like lust demons and dust bunnies.

Re: Strife's Dialog System - UDMF Flavor

by ramon.dexter » Fri Dec 22, 2023 11:05 am

Niekitty wrote: Thu Dec 21, 2023 2:18 pm Okay. I actually got Dialog working. Love the way it turns out. Mmmmmmostly. Two Problems, if anybody is still poking around this stuff over here.

1. When I do have my dialog working, how do I include Quotation marks " and Apostrophes ' in the displayed text?

2. If I place the Dialogue lump above the Map Marker in the Wad, the dialog simply does nothing at all, but if I place the lump anywhere below the map marker the Dialog works just fine, but the editor starts creating duplicates of the lump inside the Wad every time I edit anything. My brain damaged demon maid is even starting to notice that her dialog is doing something weird, and that's saying something.

2b: I'm mostly using Slade 3.2.5. UDB tends to crash on my laptop (A lot). And anything I create in it has a tendency to refuse to load from exit or newmap specials on other maps after it's all into the PK3. (also, I just kinda like the Slade editor interface a lot more. the UI clicks with my whackadoodle brain more)

I'm hoping this is all just some tiny little Derp on my part with file placement or something, especially after spending 7 hours just getting it to say one line of test text (hooray for slow, unsupervised, pointless employment!).
1. You need to decide which marks use and where. So, the common solution is to enclose the text string inside double quotes, like "this text", and if you want to quote anything specifically, do it like this: "you 'specify' the text like this".

2. Cannot really help here, as I use pk3 for my projects.

2b. Well, don't use slade. The best solution is to move to pk3 from wad, as pk3 allows you to use a directory structure and use an IDE to write the code. I personally use vs code, the directory as archive and when I'm done, I just pack the directory into pk3, which is only renamed zip.

More info here:
https://zdoom.org/wiki/Using_ZIPs_as_WAD_replacement

Re: Strife's Dialog System - UDMF Flavor

by Niekitty » Thu Dec 21, 2023 2:18 pm

Okay. I actually got Dialog working. Love the way it turns out. Mmmmmmostly. Two Problems, if anybody is still poking around this stuff over here.

1. When I do have my dialog working, how do I include Quotation marks " and Apostrophes ' in the displayed text?

2. If I place the Dialogue lump above the Map Marker in the Wad, the dialog simply does nothing at all, but if I place the lump anywhere below the map marker the Dialog works just fine, but the editor starts creating duplicates of the lump inside the Wad every time I edit anything. My brain damaged demon maid is even starting to notice that her dialog is doing something weird, and that's saying something.

2b: I'm mostly using Slade 3.2.5. UDB tends to crash on my laptop (A lot). And anything I create in it has a tendency to refuse to load from exit or newmap specials on other maps after it's all into the PK3. (also, I just kinda like the Slade editor interface a lot more. the UI clicks with my whackadoodle brain more)

I'm hoping this is all just some tiny little Derp on my part with file placement or something, especially after spending 7 hours just getting it to say one line of test text (hooray for slow, unsupervised, pointless employment!).

Re: Strife's Dialog System - UDMF Flavor

by ramon.dexter » Sun Nov 27, 2022 1:09 am

peepoopoo wrote: Sat Nov 26, 2022 10:04 am hey uh it doesnt seem to work , i press e talk and it doesnt work, do you perhaps have a tutorial VIDEO on how to do it ? :)
What exactly doesnt work? You're not providing us enough information to give you any advice.

Re: Strife's Dialog System - UDMF Flavor

by peepoopoo » Sat Nov 26, 2022 10:04 am

hey uh it doesnt seem to work , i press e talk and it doesnt work, do you perhaps have a tutorial VIDEO on how to do it ? :)

Re: Strife's Dialog System - UDMF Flavor

by Mush256 » Sat Jul 23, 2022 2:20 am

Okay, thank you so much for the help!

Re: Strife's Dialog System - UDMF Flavor

by Vostyok » Thu Jul 21, 2022 9:14 am

Mush256 wrote:Hello, I just wanted to ask if it's possible for the dialog to activate a script that uses mapspots, so I can make a store where the item spawns in front of the player first.
Yes! I do this stuff all the time. Take a look, it's easy:

Here is what such a choice would look like in the DIALOG lump

Code: Select all

choice
		{
			text = "No, I wanted orange!";  //player's dialogue choice
			special = 80; // special code to activate execute ACS script.
                        arg0 = 30; // number of the script in the map's ACS.
			arg1 = 12; // the number of the map this script number will be active.
			nextpage = 30; 
		}
With the above, special = 80 automatically looks for an ACS script to activate, using the ARG0 as the script number it will look for. arg1 will determine on which map that script number will be looked for. Here, we are activating script 30, in map 12, and then progressing to page 30 of the dialogue tree.

Then, it would be simply a case of adding the following to your map ACS:

Code: Select all

script 30 (void) //vendor option orange
{
	if (Orange < 0)
	{
	SpawnSpotForced("LemonLime",44,32,0);
	}
	}
}
See the spawnspotforced entry on the zdoom wiki for more info on how to use this one if you haven't already. (You could also go straight to Thing_spawn in the dialogue tree, using Special = 135, arg0= tid of map spot, arg1 = spawn number of item, arg2= angle, arg3 = tid of spawned item) but imho this method is a lot more reliable and lets you do other things such as add extra special effects, checks and such.

Hope this helps.

Re: Strife's Dialog System - UDMF Flavor

by Mush256 » Wed Jul 20, 2022 3:40 pm

Hello, I just wanted to ask if it's possible for the dialog to activate a script that uses mapspots, so I can make a store where the item spawns in front of the player first.

Top