Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Makazi

Dialogue trees possible?

Recommended Posts

As the thread title states, dialogue trees, where an NPC says something and you get a bunch of reply options, then each option takes you to a unique response; is something like that possible in Doom? If so, how would one go about implementing it?

Stronghold seems to have a very basic dialogue tree system in place where you can talk to NPCs and either say "Goodbye!", which closes the dialogue, or "...", which also closes the dialogue. I've tried looking at the code in Slade, but I can't really make heads or tails of it.

Share this post


Link to post
Linguica said:


Hey, thanks for the reply! the ZKVN I can't figure out; when I try to load it with Zandronum I get the error
Script error, "zkvn.pk3:decorate.txt" line 61:
Invalid state parameter acs_namedexecutewithresult

When I load with GZDoom 2.1 pre-1159, it works, the room is there, the imp is there; but when I try to talk to him I get flooded with "p_startscript: unknown script "choicedone". So! I'm presuming that's out of the question.

Your other link, with the dialogue example.wad, works just fine. So thanks, I'll look it over and see what I can figure out ^^

Share this post


Link to post

If you cannot have dialogs in stronghold, that's because you are playing it online. In a singleplayer game, there are lots of dialog trees with many NPC's, they tell the story and give you a lot of hints.

The dialog system is taken from Strife, a game that a was a sort of action rpg made in doom engine back in the days.

So yeah, you can do it. Ask me not how to though.

Share this post


Link to post

This is something I am also interested in.

Now, I haven't done too much in the realm of dialogue; I've only experimented with walking up to npc's, pressing "use," and having text displayed on the screen. So to be honest, what I will say here could be a goose chase. Having said that, a bit of trickery comes to mind here. The ACS script should be very easy to incorporate multiple options for dialogue. What the problem (seemingly) would be is implementation. How to trigger the differing options when "use" is your only means of interaction and it can only be used in 2D. This makes things tricky as one line cannot have multiple triggers, except through script, but then you still run into the problem of how to choose different speeches.

So my thought on how to jury rig/trickery this up: create custom textures, invisible except for the text that is needed. Put your character next to the line that will hold the "floating" text, and possibly force a cinematic of the player backing up to put everything within field of view (if that's possible, havent messed with that yet). After that, with the player being in a set spot, or at least a relative area, you can then put triggers on the walls behind the text that activate when shot. You could, say, have 3 options for the player to choose, listed vertically as they are in most games, each corresponding to a different 2D line that makes up the wall. Only space the lines apart by 1 pixel so nobody notices them.

This may or may not work, depending on how much text you can fit into a 128-pixel tall space, assuming it would even look good that high up. You may be limited to only 64-pixels high, as the text would not be appearing in the HUD, but in the world.

A side note, if you do this you could also do... speech bubbles! And suddenly I'm liking the thought better, lol.

Another side note, instead of custom textures for the text itself, you could do something similar that might look better, though might break the switches on the wall idea. You could design actors to have extra images that include speech bubbles and speech options in the actors drawing. You wouldn't need but one for each as the character would clearly continue to face you as they talk to you.

I'm not sure if any of this will help, but hopefully it leads to some good ideas :)

*Edit* spell check >.<

Share this post


Link to post
Fonze said:

This is something I am also interested in.

Now, I haven't done too much in the realm of dialogue; I've only experimented with walking up to npc's, pressing "use," and having text displayed on the screen. So to be honest, what I will say here could be a goose chase. Having said that, a bit of trickery comes to mind here. The ACS script should be very easy to incorporate multiple options for dialogue. What the problem (seemingly) would be is implementation. How to trigger the differing options when "use" is your only means of interaction and it can only be used in 2D. This makes things tricky as one line cannot have multiple triggers, except through script, but then you still run into the problem of how to choose different speeches.

So my thought on how to jury rig/trickery this up: create custom textures, invisible except for the text that is needed. Put your character next to the line that will hold the "floating" text, and possibly force a cinematic of the player backing up to put everything within field of view (if that's possible, havent messed with that yet). After that, with the player being in a set spot, or at least a relative area, you can then put triggers on the walls behind the text that activate when shot. You could, say, have 3 options for the player to choose, listed vertically as they are in most games, each corresponding to a different 2D line that makes up the wall. Only space the lines apart by 1 pixel so nobody notices them.

This may or may not work, depending on how much text you can fit into a 128-pixel tall space, assuming it would even look good that high up. You may be limited to only 64-pixels high, as the text would not be appearing in the HUD, but in the world.

A side note, if you do this you could also do... speech bubbles! And suddenly I'm liking the thought better, lol.

Another side note, instead of custom textures for the text itself, you could do something similar that might look better, though might break the switches on the wall idea. You could design actors to have extra images that include speech bubbles and speech options in the actors drawing. You wouldn't need but one for each as the character would clearly continue to face you as they talk to you.

I'm not sure if any of this will help, but hopefully it leads to some good ideas :)

*Edit* spell check >.<


Interesting! Seems like a really roundabout way of doing it, but it could potentially work. Check Linguica's doomworld link; the wad given there has more or less exactly what I'm looking for. The issue is I tried incorporating it into my WAD and then when I opened it up with GZDoom Builder it told me there wasn't any valid map formats to load, lmao. It's entirely possible that I messed something up when converting from zandronum to GZDoom; ah well. I'll keep plying at it and see how it goes!

Share this post


Link to post

Hmmm... Lotta good info on that thread. Unfortunately I'm not at my computer (man I wish I had a laptop) so I cannot open that wad to take a look. But even if I could, idk if I could help you with that problem, it sounds like an error in the ordering of files in the wad to me, or possibly something to do with its identifier (name) or something else you did right before closing the previous program, but I'm no programmer... Just a retarded MacGyver.

As for my extremely roundabout way to do it, I'm sure it's not the most efficient method, but I guess that my brain just likes to find workarounds to problems that I encounter.

I hope you manage to fix your problem, as I may just have some questions for you later (months).

Good luck bro :)

Share this post


Link to post

The problem in your second post is that Zandronum does not yet fully support named scripts. And an annoying issue with Strife dialogues is that you must have an option to exit the dialogue, leaving you unable to have RPG-esq cinematics.

What you want to do is make use of ACS, specifically GetPlayerInput and HUDMessage.

Using HUDMessage you can print text or an image (i.e. a text box) to the screen. There's even the option to have each letter of the text string appear one at a time, like most games with these kind of things. As for dialogue trees, it'll be a bit of a mess but the provided number combo script in GetPlayerInput should serve as enough of a basis to Frankenstein something together.

Share this post


Link to post
Jaxxoon R said:

The problem in your second post is that Zandronum does not yet fully support named scripts. And an annoying issue with Strife dialogues is that you must have an option to exit the dialogue, leaving you unable to have RPG-esq cinematics.

What you want to do is make use of ACS, specifically GetPlayerInput and HUDMessage.

Using HUDMessage you can print text or an image (i.e. a text box) to the screen. There's even the option to have each letter of the text string appear one at a time, like most games with these kind of things. As for dialogue trees, it'll be a bit of a mess but the provided number combo script in GetPlayerInput should serve as enough of a basis to Frankenstein something together.


Huh, interesting! I'll definitely look into it, thanks.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×