mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 04:22:34 +00:00
f31ddbc57c
- allow specifying a decal ID by name in UDMF.
122 lines
4.2 KiB
Text
122 lines
4.2 KiB
Text
===============================================================================
|
|
ZDoom Strife Dialog Format ZDoom v1.1 - 23.08.2010
|
|
based on Universal Strife Dialog Format v2.0
|
|
|
|
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. Changes to USDF spec
|
|
=======================================
|
|
|
|
ZDoom Strife Dialogue format implements the USDF 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.
|
|
The following fields are affected by this change:
|
|
|
|
conversation
|
|
{
|
|
actor = <string>;
|
|
|
|
page
|
|
{
|
|
drop = <string>;
|
|
userstring = <string>; New field which can be used to pass data to custom conversation menu classes.
|
|
ifitem
|
|
{
|
|
item = <string>;
|
|
}
|
|
|
|
choice
|
|
{
|
|
cost
|
|
{
|
|
item = <string>;
|
|
}
|
|
|
|
giveitem = <string>;
|
|
}
|
|
}
|
|
}
|
|
|
|
It should be noted that this change creates an incompatibility with USDF
|
|
so technically speaking the ZDoom format is no longer 'real' USDF.
|
|
To accomodate what is needed here this is unavoidable, unfortunately.
|
|
Any proper USDF implementation not supporting named actor classes should
|
|
either refuse loading dialogues with the 'ZDoom' namespace or if it does not
|
|
outright abort on incompatible namespaces fail with a type mismatch error on
|
|
one of the specified propeties.
|
|
|
|
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 a few
|
|
fields 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.
|
|
class = <string>; //Override the default conversation menu class for this conversation.
|
|
|
|
page
|
|
{
|
|
goodbye = <string>; // Custom goodbye message. If omitted then the
|
|
// generic goodbyes will be displayed instead.
|
|
|
|
choice
|
|
{
|
|
specialname = <string>; // Allows specifying a special by name.
|
|
|
|
// The amount of an item needed for this option to become available.
|
|
// You can have as many as needed. All require blocks must be satisfied
|
|
// to show this option.
|
|
require
|
|
{
|
|
item = <string>; // Item that is required to show this option.
|
|
amount = <integer>; // Minimum amount of the item needed.
|
|
}
|
|
|
|
// The undesired amount of an item. This option will become available
|
|
// if you have less than the specified amount. You can have as many
|
|
// as needed. All exclude blocks must be satisfied to show this option.
|
|
// Note: if both require and exclude are defined then all require
|
|
// and all exclude blocks must be satisfied to show this option.
|
|
exclude
|
|
{
|
|
item = <string>; // Item that is unwanted to show this option.
|
|
amount = <integer>; // Unwanted minimum amount of the item.
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
===============================================================================
|
|
EOF
|
|
===============================================================================
|