Currently, all references to pages are in integers. Consider the following script (sorry, it's a little long, but the full thing has to be shown to demonstrate my case). Don't have to follow and read the whole thing; I will explain in more detail after the code snippet.
namespace = "ZDoom";
Conversation
{
Actor = "FriendlyDude";
//=============================================================================
//
// Greetings
//
//=============================================================================
// 1
Page
{
Dialog = "Howdy stranger. Nice to see a new face around here.";
Choice
{
Text = "[Continue]";
NextPage = 3;
}
}
// 2
Page
{
Dialog = "Ah, you're back. Did you need something else?";
Choice
{
Text = "[Continue]";
NextPage = 3;
}
}
//=============================================================================
//
// Topics
//
//=============================================================================
// 3
Page
{
Choice
{
Text = "Tell me about this place.";
NextPage = 4;
Exclude
{
Item = "DialogToken_FriendlyDude_AskedAboutThisPlace";
Amount = 1;
}
}
Choice
{
Text = "Tell me about this place, again.";
NextPage = 4;
Require
{
Item = "DialogToken_FriendlyDude_AskedAboutThisPlace";
Amount = 1;
}
}
Choice
{
Text = "What's the word around here?";
NextPage = 5;
}
Choice
{
Text = "Christine?";
NextPage = 6;
Require
{
Item = "DialogToken_FriendlyDude_HeardAboutChristine";
Amount = 1;
}
}
Choice
{
Text = "Just passing through. Seeya.";
NextPage = 7;
}
}
//=============================================================================
//
// Replies
//
//=============================================================================
// 4
Page
{
Dialog = "Ain't much to do around here, really. Might wanna head over to Smitty's if you're looking to trade. The Desert Delight's got booze and girls; talk to Christine.";
Choice
{
Text = "[Continue]";
GiveItem = "DialogToken_FriendlyDude_AskedAboutThisPlace";
GiveItem = "DialogToken_FriendlyDude_HeardAboutChristine";
NextPage = 3;
}
}
// 5
Page
{
Dialog = "I think ol' Smitty at the junk shop is hiring. Not sure what about, though.";
Choice
{
Text = "[Continue]";
NextPage = 3;
}
}
// 6
Page
{
Dialog = "Pretty, successful, and dangerous. Don't fuck with her. Between you and me; I heard she was REALLY wild, heheheh... er, don't tell 'er I said that.";
Choice
{
Text = "[Continue]";
NextPage = 3;
}
}
//=============================================================================
//
// Goodbyes
//
//=============================================================================
// 7
Page
{
Dialog = "Stay safe, partner.";
Choice
{
Text = "[End]";
NextPage = 2;
CloseDialog = true;
}
}
}
Currently, there are 7 pages. Every time I add pages in the middle, I now have to keep track and update every page number because the links would be off by now. As characters grow more complex with more rich dialog and choices, this is going to be a maintenance nightmare. So what I'm proposing is the optional ability to use strings to name the pages something more useful.
conversation
{
page
{
// Assigns a name to the current page
pagename = <string>;
// Name of page to jump to if all ifitem conditions are satisfied
linkname = <string>;
choice
{
// Name of the next page.
nextpagename = <string>;
}
}
}
Sorry for the perceived impatience but I need a clear answer as soon as possible, as this is currently used for a large-scale commercial project, already in production. The amount of work here on the scripting/content side (from me) has the potential to blow up exponentially because of this limitation with using integers as page numbers.
Is there any chance of this even being considered, or will it be outright no'd because of breaking UDMF specifications or any non-code-related issue like that?
Going back to the first example, I added 2 new "greeting" pages (the NPC's greeting can change depending on whether they like you or not), and guess what? The entire conversation tree got completely obliterated because the page number references are no longer correct. Going through every page number to fix the links is clumsy, error-prone and non-intuitive. And this is only a simple test NPC with about 10 pages worth of dialogue!
I don't expect an immediate reply, feel free to take your time, but if this is not ever going to happen, then kindly shut this idea down soon, so that I do not waste my time trying to work with the Strife dialog system, and perhaps consider spending my time crafting a homebrew dialog system instead.
But to be honest, the Strife dialog system is already good enough for 95% of what my project needs so I'd rather not re-invent the wheel. Everything else about the built-in conversation menu is already perfect!
Nash wrote:as this is currently used for a large-scale commercial project,
Thanks for that piece of info. This is not anywhere near the top of my list of things to do, so if you absolutely want it you may pay for it so I can shift priorities.
I am most certainly not diverting my spare time to do stuff where others may make money from and I don't.
I apologize for the rude nature of the post, now that I re-read it, yes, it does look ridiculous. I haven't been running on enough sleep and I was excited to proceed with whatever is already available, then I discovered that adding dialogue pages forced me to go through the entire script to fix the page numbers. I might have gotten a little too frustrated and didn't word my post carefully, so, again, sorry about that. Did not mean to be rude.
That said, now that I think about this more, I think I can write an external editor that uses names for pages, and then it automatically outputs the ZSDF file automatically. Therefore, feel free to close this suggestion. Thanks and sorry again. :(
Please allow me to remind you again: reports are useless on dev threads unless they need actual moderator action. Developers do not have access to the reports system and moderators cannot attach tags, so if something needs closed, simply request it in the topic.
@ Graf: If I implement this feature, what do I have to do to ensure that the spec is up to date? Do I need to worry about standards for other ports since this is exclusively meant for ZSDF?
Rachael wrote:@ Graf: If I implement this feature, what do I have to do to ensure that the spec is up to date?
As this is a pretty big deviation from the standard I'd suggest a new namespace. Since Zandronum also uses ZSDF we cannot just make the spec incompatible.