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

USDF Changes

Recommended Posts

I think it's about time to discuss a potential revision to the Strife dialog script spec. There are a few technical issues that should probably be addressed, but I mostly want to discuss if more, non-binary, features should be introduced into the base spec.

For reference, here is the latest spec: http://maniacsvault.net/usdf/usdf21.txt

First the technical. Strife has a feature to produce random dialogs by having the text of a page read "RANDOM_x" where x is "PEASANT", "REBEL", "AGUARD", "BEGGAR", or "PGUARD". What I would like to do is formally add this to the spec.

A page with a dialog string of more than 7 characters starting with the case sensitive sequence "RANDOM_" shall be substituted with a random string. The strings shall come from a group based on the the value of the string following the sequence. The source of these strings is implementation defined, as is the result if the lookup fails.

It probably would be wise to extend this feature to choice text and yes/no messages as some people have requested this.

Another common request is to have some sort of global dialog script. Strife has this as SCRIPT00, but since USDF makes the include explicit, there is no equivalent. I suggest modifying II.B to include.

If the map does not have a USDF script, either by DIALOGXY or DIALOGUE, then the DIALOG00 lump shall be loaded if present. DIALOG00 should be considered a replacement for SCRIPT00 if present.

This not only formalizes the current behavior of loading SCRIPT00, but allows it to exist in USDF format. This does bring up a question of if a map script including SCRIPT00 should only load SCRIPT00 or substitute DIALOG00 if present (my wording suggests that it should)? A truly global script isn't really needed since usually the people wanting this are making game play mods which already typically don't work with heavily scripted maps.

As for features. The first thing I would like to suggest including ZSDF's conversation id field. This just allows conversation scripts to be assigned an arbitrary integer so they can be reassigned to things via other scripting. If a port doesn't have any such features it would be acceptable to ignore the input, so it seems like a harmless addition to the base spec.

The other feature I would like to discuss is allowing the bye option to be customized and or hidden. Hiding the option would not prevent the user from backing out of the dialog, but there are times where it doesn't make sense to show the "Thanks, bye" option on screen. (On a related note, this is case where we would need random strings in choice text.)

My suggestion is to add a byechoice block which contains all the options of the current choice block except it can't have a cost (thus can't display one) and it would not have closedialog (always true). This would still allow mod authors to create "can't back out" situations by having the dialog switch the current page and/or execute a line special. Pressing escape should be equivalent to selecting this option. Hiding the option could be implied by the text being empty.


Share this post

Link to post

Draft spec: http://maniacsvault.net/usdf/usdf22-draft.txt

I'll give it a few more weeks in case anyone else would like to comment.

Edit: Oh and I remembered that ZDoom implements the id for binary and base USDF scripts by using the actor number. I've formalized this behavior since the 2.1 spec suggests that an id for external scripts exists, but doesn't mention anything about how it would work.

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