ZSDF help

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
cypherphage
Posts: 213
Joined: Sun Feb 27, 2011 2:54 am

ZSDF help

Post by cypherphage »

Alright, let me preface this by saying that i have read the wiki and scoured the google and and the board search function, and found that the documentation for this feature is very lacking. Something along the line of a basic example would be very useful, so if anyone would be so kind as to dump some working snippets that'd be dandy and much thanked. Anyways...

To start, I want to use ZDSF to program an innkeeper. Here is what I have so far...
Spoiler:
The problem is that once I move off page 1, I can only seem to move back by choice blocks (iow, the link =1; doesn't work). How do I fix this?
User avatar
ChronoSeth
Posts: 1631
Joined: Mon Jul 05, 2010 2:04 pm
Location: British Columbia

Re: ZSDF help

Post by ChronoSeth »

I'm not sure what's wrong with the script, but keep in mind that ZSDF has exactly the same syntax as USDF, except for using actor names instead of ConevrsationIDs. All of the documentation for USDF is relevant to ZSDF as well.
User avatar
cypherphage
Posts: 213
Joined: Sun Feb 27, 2011 2:54 am

Re: ZSDF help

Post by cypherphage »

I figured that out, but I can't find many usdf code/examples other than the wiki and a handful of tiny snippets.
Blzut3
 
 
Posts: 3209
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: ZSDF help

Post by Blzut3 »

cypherphage wrote:The problem is that once I move off page 1, I can only seem to move back by choice blocks (iow, the link =1; doesn't work). How do I fix this?
Passively there isn't a real way to reset a dialog back to a starting point when the player closes a conversation. I suppose you could use [wiki]Thing_SetConversation[/wiki] and the id property of a conversation block and then have ACS force it back. This would rely on the dialogs pausing the game though which may not be ideal if you intend multiplayer support.

Another options might be to have the actor execute a special when used and call Thing_SetConversation before proceeding to call [wiki]StartConversation[/wiki] this might work in a more well defined manner.
User avatar
cypherphage
Posts: 213
Joined: Sun Feb 27, 2011 2:54 am

Re: ZSDF help

Post by cypherphage »

Why isn't this basic process control available? Can the specs be changed, because the ability to have a dialog define where it goes seems like a reasonable expectation...or a way to disable the 'bye' option so the choice block can be used instead. I guess I'll use the hack around, but this is just meh.
User avatar
amv2k9
Posts: 2178
Joined: Sun Jan 10, 2010 4:05 pm
Location: Southern California

Re: ZSDF help

Post by amv2k9 »

cypherphage wrote:(iow, the link =1; doesn't work)
The link property is used in tandem with an ifitem block; it's like the USDF/ZSDF equivalent of A_JumpIfInventory.
User avatar
Nash
 
 
Posts: 17500
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: ZSDF help

Post by Nash »

The "bye" option can't be removed because the dialogue engine is actually tied to the main menu code, so if it was removed, you couldn't access the main menu.

Though to be honest, if I had the ability, what I would have done is modify the main menu to account for such a thing:

1) Bye option is removed.
2) Pressing Escape will open the main menu as usual. Here's your chance to save/load/quit/whatever
3) Upon closing the main menu, game is returned to the last hanging dialog.

Therefore having situations where the player must make a choice instead of walking away (and leaving the dialog hanging at exactly that same spot) be a more realistic thing.

This is how it works in Morrowind.
User avatar
cypherphage
Posts: 213
Joined: Sun Feb 27, 2011 2:54 am

Re: ZSDF help

Post by cypherphage »

*sigh*... I was trying to do a custom inventory hack to get around this and then I realized, the player can only receive items and trigger scripts in the choice block so no dice. Why aren't there basic control structures in anything other than the choice block, it makes that 'bye' option worthless. IMO, something like:

Code: Select all

   ...
   page   //1
   {
      name = "Narrator";
      link = 2;
      dialog = "Our story beginth long ago...";
  }
     page   //2
   {
      name = "Narrator";
      link = 3;
      dialog = "When evil bad things dost happenedth...";
  }
or

Code: Select all

   ...
   page   //1
   {
      name = "Healing Cleric Dude";
      giveitem = "healingItem"
      dialog = "Let thine wounds be made mendethed.";
  }
These should be basic things a system should do, why is this feature so limited?

*edit* Well, ok, so the menu code cakes it up. Still, this lump doesn't work for anything more complex than the most basic of interactions.
User avatar
Nash
 
 
Posts: 17500
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: ZSDF help

Post by Nash »

There's always the Feature Suggestions forum... Randy just *might* consider implementing a workaround... he's been pretty active and nice in considering some long-due suggestions lately...

(And for the record, the option to remove "bye" has been suggested and [No]'ed before... there's a possibility it *might* be considered... perhaps if you had some content to show maybe...)
User avatar
cypherphage
Posts: 213
Joined: Sun Feb 27, 2011 2:54 am

Re: ZSDF help

Post by cypherphage »

I guess I am just going to ignore this lump. It doesn't contain the necessary features to do what I want (or much more than very basic things) and if I would have to bend over backwards using ACS to make this work, I don't see what the benefit of this is over plain ACS.
User avatar
Nash
 
 
Posts: 17500
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: ZSDF help

Post by Nash »

I guess if you want more, you'll just have to roll your own ACS-based dialog engine...
User avatar
FDARI
Posts: 1097
Joined: Tue Nov 03, 2009 9:19 am

Re: ZSDF help

Post by FDARI »

cypherphage wrote:Why isn't this basic process control available?
One significant reason: The state of a menu is not part of the gamestate. As long as the underlying dialogue provider is the menu system, it is unlikely that escaping the menu (bye) is going to be detectable from within the game.

(Other multiplayer nodes won't know the state of your menu, savegames will not include the state of your menu; and it is possible to have a savegame occur while a dialogue is displayed. You might need an unpaused dialogue and an ACS autosave, or it might be easier than that. However, closing the menu without making a selection cannot be allowed to impact the game with the existing solution.)

I have been thinking of building a dedicated dialogue system that does not depend on menu logic, to get more clarity, power and flexibility, but that's a huge undertaking, and I'd want it to be well integrated with Doomscript, so I've put the notion on hold and resorted to hyper-advanced ACS.
Locked

Return to “Editing (Archive)”