mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-05-31 00:51:21 +00:00
- merge USDF branch into trunk.
- add USDF spexs. SVN r2561 (trunk)
This commit is contained in:
parent
6f82db47b8
commit
b452bec0ee
23 changed files with 1227 additions and 274 deletions
158
specs/usdf.txt
Normal file
158
specs/usdf.txt
Normal file
|
@ -0,0 +1,158 @@
|
|||
===============================================================================
|
||||
Universal Strife Dialog Format Specification v2.0 - 08/20/10
|
||||
|
||||
Written by Braden "Blzut3" Obrzut - admin@maniacsvault.net
|
||||
|
||||
Defined with input from:
|
||||
|
||||
CodeImp
|
||||
Gez
|
||||
Graf Zahl
|
||||
Quasar
|
||||
et al.
|
||||
|
||||
Copyright (c) 2010 Braden Obrzut.
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.2
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
|
||||
|
||||
===============================================================================
|
||||
|
||||
=======================================
|
||||
I. Grammar / Syntax
|
||||
=======================================
|
||||
|
||||
The grammar and syntax is similar to that of UDMF. A compliant UDMF parser
|
||||
should be applyable to the USDF. However, it will need to be capable of
|
||||
handling sub-blocks. Unknown sub-blocks should be skipped.
|
||||
|
||||
=======================================
|
||||
II. Implementation Semantics
|
||||
=======================================
|
||||
|
||||
------------------------------------
|
||||
II.A : Storage and Retrieval of Data
|
||||
------------------------------------
|
||||
|
||||
This is the same as in UDMF.
|
||||
|
||||
-----------------------------------
|
||||
II.B : Storage Within Archive Files
|
||||
-----------------------------------
|
||||
|
||||
There are two options for the USDF lump placement. This can either be a part
|
||||
of the UDMF lump list or standalone. If used stand alone the lump name
|
||||
DIALOGXY is used corresponding with MAPXY. For UDMF the lump shall be called
|
||||
"DIALOGUE".
|
||||
|
||||
--------------------------------
|
||||
II.C : Implementation Dependence
|
||||
--------------------------------
|
||||
|
||||
USDF also implements the namespace statement. This has all the same
|
||||
requirements as UDMF.
|
||||
|
||||
=======================================
|
||||
III. Standardized Fields
|
||||
=======================================
|
||||
|
||||
The following are required for all USDF complient implementations. Like UDMF,
|
||||
any unknown field/function should be ignored and not treated as an error.
|
||||
|
||||
NOTE: "mobj" refers to Strife's conversationIDs and not doom editor numbers or
|
||||
Hexen's spawnids. A valid mobj value is any positive integer greater
|
||||
than or equal to 1.
|
||||
|
||||
---------------------
|
||||
III.A : Conversations
|
||||
---------------------
|
||||
|
||||
Conversations are groups of pages that can be assigned to a particular object.
|
||||
Implementors should preserve the IDs to allow for dynamic reassignment through
|
||||
scripting although this is not a requirement.
|
||||
|
||||
conversation // Starts a dialog.
|
||||
{
|
||||
actor = <integer>; // mobj for this conversation's actor. If previously
|
||||
// used, this will override the previous conversation.
|
||||
|
||||
page // Starts a new page. Pages are automatically numbered starting at 0.
|
||||
{
|
||||
name = <string>; // Name that goes in the upper left hand corner
|
||||
panel = <string>; // Name of lump to render as the background.
|
||||
voice = <string>; // Narration sound lump.
|
||||
dialog = <string>; // Dialog of the page.
|
||||
drop = <integer>; // mobj for the object to drop if the actor is
|
||||
// killed.
|
||||
link = <integer>; // Page to jump to if all ifitem conditions are
|
||||
// satisified.
|
||||
|
||||
// jumps to the specified page if the player has the specified amount
|
||||
// or more of item in their inventory. This can be repeated as many
|
||||
// times as the author wants, all conditions must be met for the
|
||||
// jump to occur.
|
||||
ifitem
|
||||
{
|
||||
item = <integer>; // mobj of item to check.
|
||||
amount = <integer>; // amount required to be in inventory.
|
||||
}
|
||||
|
||||
// Choices shall be automatically numbered.
|
||||
choice
|
||||
{
|
||||
text = <string>; // Name of the choice.
|
||||
|
||||
// The amount of an item needed to successfully pick this option.
|
||||
// This can be repeated, but only the first will be shown (provided
|
||||
// diaplaycost is true). All costs must be satisfied for success.
|
||||
cost
|
||||
{
|
||||
item = <integer>; // Item that is required for this option.
|
||||
amount = <integer>; // Minimum amount of the item needed.
|
||||
}
|
||||
|
||||
displaycost = <bool>; // Weather the cost should be
|
||||
// displayed with the option.
|
||||
// If no cost is specified this should
|
||||
// be ignored.
|
||||
yesmessage = <string>; // Text to add to console when choice
|
||||
// is accepted.
|
||||
nomessage = <string>; // Text to add to console when choice
|
||||
// is denied.
|
||||
|
||||
log = <string>; // LOG entry to use on success.
|
||||
giveitem = <integer>; // Gives the specified item upon
|
||||
// success.
|
||||
// The following are the same as the special for linedefs in UDMF.
|
||||
// They are executed on success.
|
||||
special = <integer>;
|
||||
arg0 = <integer>;
|
||||
arg1 = <integer>;
|
||||
arg2 = <integer>;
|
||||
arg3 = <integer>;
|
||||
arg4 = <integer>;
|
||||
|
||||
nextpage = <integer>; // Sets the next page.
|
||||
closedialog = <bool>; // Should the dialog be closed upon
|
||||
// selecting this choice?
|
||||
// Default: false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-------------------------------
|
||||
III.B : Including Other Dialogs
|
||||
-------------------------------
|
||||
|
||||
Unlike the original Strife dialog format. The lump "SCRIPT00" should not be
|
||||
included automatically. Instead the user must specify this behavior by using
|
||||
the include function, which takes the name of a lump to include. Include only
|
||||
needs to be available in the global scope and for compatibility reasons, must
|
||||
include the result of the script and not act like a preprocessor statement.
|
||||
|
||||
include = <string>;
|
||||
|
||||
===============================================================================
|
||||
EOF
|
||||
===============================================================================
|
56
specs/usdf_zdoom.txt
Normal file
56
specs/usdf_zdoom.txt
Normal file
|
@ -0,0 +1,56 @@
|
|||
===============================================================================
|
||||
Universal Strife Dialog Format ZDoom extensions v1.0 - 14.08.2010
|
||||
|
||||
Copyright (c) 2010 Christoph Oelckers.
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.2
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
|
||||
|
||||
===============================================================================
|
||||
|
||||
=======================================
|
||||
I. Grammar / Syntax
|
||||
=======================================
|
||||
|
||||
No changes.
|
||||
|
||||
=======================================
|
||||
II. Implementation Semantics
|
||||
=======================================
|
||||
|
||||
No changes.
|
||||
|
||||
=======================================
|
||||
III. Standardized Fields
|
||||
=======================================
|
||||
|
||||
ZDoom implements the base specification as described with one important change:
|
||||
To take advantage of named actor classes any field specifying an actor type
|
||||
by a conversationID takes a class name instead.
|
||||
This means that ZDoom dialogues are not forward-compatible with the 'Strife'
|
||||
namespace. Other ports should be aware of this.
|
||||
ZDoom-format dialogues need to start with the line:
|
||||
|
||||
namespace = "ZDoom";
|
||||
|
||||
|
||||
---------------------
|
||||
III.A : Conversations
|
||||
---------------------
|
||||
|
||||
This block only lists the newly added fields. Currently ZDoom only adds one
|
||||
field to the specification:
|
||||
|
||||
conversation // Starts a dialog.
|
||||
{
|
||||
id = <int>; // assigns an ID to a dialogue. IDs are used to dynamically assign
|
||||
// dialogues to actors. For 'Strife' namespace or binary dialogues
|
||||
// the standard conversation ID ('actor' property) is used instead
|
||||
// for this purpose but since 'ZDoom' namespace requires the actor
|
||||
// to be a class name it needs a separate field for this.
|
||||
}
|
||||
|
||||
===============================================================================
|
||||
EOF
|
||||
===============================================================================
|
Loading…
Add table
Add a link
Reference in a new issue