Difference between revisions of "Info.xml"
From Serious Sam's Bogus Detour
(→Includes) |
|||
| (4 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
== Tags == | == Tags == | ||
| − | * <code>name</code> The name of the scenario that will show up in the scenario list. | + | |
| − | * <code>description</code> The full description of the scenario that will show up when selecting the scenario in the scenario list. | + | === Metadata === |
| + | * '''Required''' <code>name</code> The name of the scenario that will show up in the scenario list. | ||
| + | * '''Required''' <code>description</code> The full description of the scenario that will show up when selecting the scenario in the scenario list. | ||
* <code>tag</code> A short tagline description of the scenario, which is shown above the description. | * <code>tag</code> A short tagline description of the scenario, which is shown above the description. | ||
| + | |||
| + | === Options === | ||
* <code>multiplayer</code> Whether the scenario is multiplayer-only or not. Either <code>true</code> or <code>false</code>. (Default: <code>false</code>) | * <code>multiplayer</code> Whether the scenario is multiplayer-only or not. Either <code>true</code> or <code>false</code>. (Default: <code>false</code>) | ||
* <code>saving</code> The save mode to use. Either <code>none</code> where there are no saves at all, <code>current</code> where the current level is saved, or <code>all</code> which is like Hammerwatch, where you can go back to older levels without their progress getting reset. (Default: <code>current</code>) | * <code>saving</code> The save mode to use. Either <code>none</code> where there are no saves at all, <code>current</code> where the current level is saved, or <code>all</code> which is like Hammerwatch, where you can go back to older levels without their progress getting reset. (Default: <code>current</code>) | ||
* <code>players</code> <code>min="X" max="X"</code> The amount of players allowed to play in multiplayer. (Default: unlimited) | * <code>players</code> <code>min="X" max="X"</code> The amount of players allowed to play in multiplayer. (Default: unlimited) | ||
| + | |||
| + | === Modifiers === | ||
| + | [[File:Modifiers.png|thumb]] | ||
| + | |||
* <code>modifiers</code> A collection of switches for the scenario. | * <code>modifiers</code> A collection of switches for the scenario. | ||
** <code>modifier</code> <code>forced="X" id="X" name="X" tooltip="X" locked-by="X" default-on="X" radio="X" multiplayer="X"</code> A modifier. | ** <code>modifier</code> <code>forced="X" id="X" name="X" tooltip="X" locked-by="X" default-on="X" radio="X" multiplayer="X"</code> A modifier. | ||
| Line 20: | Line 28: | ||
** <code>separator</code> <code>multiplayer="X"</code> A separator line for the switch menu. The <code>multiplayer</code> attribute is the same as for the <code>modifier</code> tag. | ** <code>separator</code> <code>multiplayer="X"</code> A separator line for the switch menu. The <code>multiplayer</code> attribute is the same as for the <code>modifier</code> tag. | ||
** <code>header</code> <code>text="X" tooltip="X" multiplayer="X"</code> A header text for the switch menu. The <code>multiplayer</code> attribute is the same as for the <code>modifier</code> tag. | ** <code>header</code> <code>text="X" tooltip="X" multiplayer="X"</code> A header text for the switch menu. The <code>multiplayer</code> attribute is the same as for the <code>modifier</code> tag. | ||
| + | |||
| + | === Levels === | ||
* <code>start</code> A collection of levels that the player will be able to start from. | * <code>start</code> A collection of levels that the player will be able to start from. | ||
** <code>level</code> <code>name="X" lvl="X"</code> A level that the player will be able to start from. The <code>name</code> attribute is the name displayed in the list of levels, and the <code>lvl</code> attribute is the filename to the level. | ** <code>level</code> <code>name="X" lvl="X"</code> A level that the player will be able to start from. The <code>name</code> attribute is the name displayed in the list of levels, and the <code>lvl</code> attribute is the filename to the level. | ||
| + | |||
| + | === Scripts === | ||
* <code>classmaps</code> A collection of script classes to rewrite to other class names. See [[Rewriting Classes]] for detailed information. | * <code>classmaps</code> A collection of script classes to rewrite to other class names. See [[Rewriting Classes]] for detailed information. | ||
** <code>behavior</code> <code>from="X" to="X"</code> Overwrites a unit's behavior class. | ** <code>behavior</code> <code>from="X" to="X"</code> Overwrites a unit's behavior class. | ||
** <code>script</code> <code>from="X" to="X"</code> Overwrites a class created in-script with <code>InstantiateClass()</code>. | ** <code>script</code> <code>from="X" to="X"</code> Overwrites a class created in-script with <code>InstantiateClass()</code>. | ||
** <code>gamemode</code> <code>from="X" to="X"</code> Overwrites a level's gamemode class. | ** <code>gamemode</code> <code>from="X" to="X"</code> Overwrites a level's gamemode class. | ||
| − | + | ||
| + | === Includes === | ||
* <code>includes</code> A collection of scenarios that this scenario includes. | * <code>includes</code> A collection of scenarios that this scenario includes. | ||
| − | ** <code>include</code> <code>modifiers="X" levels="X" classmaps="X" final="X"</code> An included scenario. | + | ** <code>include</code> <code>name="X" modifiers="X" levels="X" classmaps="X" final="X"</code> An included scenario. |
| + | *** The <code>name</code> attribute defines the name of the scenario to include. Required. | ||
*** The <code>modifiers</code> attribute defines whether to include any modifiers from this scenario. (Default: <code>false</code>) | *** The <code>modifiers</code> attribute defines whether to include any modifiers from this scenario. (Default: <code>false</code>) | ||
*** The <code>levels</code> attribute defines whether to include any start levels from this scenario. (Default: <code>false</code>) | *** The <code>levels</code> attribute defines whether to include any start levels from this scenario. (Default: <code>false</code>) | ||
*** The <code>classmaps</code> attribute defines whether to include any class map rewrites from this scenario. (Default: <code>false</code>) | *** The <code>classmaps</code> attribute defines whether to include any class map rewrites from this scenario. (Default: <code>false</code>) | ||
| − | *** | + | *** The <code>final</code> attribute defines whether inclusion shouldn't go any deeper than the one you're including. This means that any included scenarios in the scenario you're including will not be included if this is true. (Default: <code>false</code>) |
| + | * <code>disable-include</code> Set this to <code>true</code> to disallow this scenario from getting included by other scenarios. (Default: <code>false</code>) | ||
== Example == | == Example == | ||
Latest revision as of 11:51, 27 July 2017
This XML file describes a scenario. All tags listed below must be within an <info></info> block.
Contents
Tags
Metadata
- Required
nameThe name of the scenario that will show up in the scenario list. - Required
descriptionThe full description of the scenario that will show up when selecting the scenario in the scenario list. -
tagA short tagline description of the scenario, which is shown above the description.
Options
-
multiplayerWhether the scenario is multiplayer-only or not. Eithertrueorfalse. (Default:false) -
savingThe save mode to use. Eithernonewhere there are no saves at all,currentwhere the current level is saved, orallwhich is like Hammerwatch, where you can go back to older levels without their progress getting reset. (Default:current) -
playersmin="X" max="X"The amount of players allowed to play in multiplayer. (Default: unlimited)
Modifiers
-
modifiersA collection of switches for the scenario.-
modifierforced="X" id="X" name="X" tooltip="X" locked-by="X" default-on="X" radio="X" multiplayer="X"A modifier.- The
idattribute is the modifier ID. When the switch is turned on, in content, a preprocessor define calledMOD_IDis defined. For more information, see Preprocessor. - The
nameattribute is the visible display name for the switch. It is displayed in the switches menu. - The
tooltipattribute defines the text for an additional tooltip that should show when hovering over the switch in the switches menu. (Default: none) - The
locked-byattribute defines which switches disable this one, separate by commas. (Default: none) - The
default-onattribute sets this switch to be on by default. This value is eithertrueorfalse. (Default:false) - The
radioattribute sets whether this switch is part of a group. Setting this value together with multiple switches turns them into a "radiobox" instead of a checkbox, where only 1 switch of a group can be selected at a time. (Default: none) - The
forcedattribute defines whether this switch is always defined, and isn't listed in the switches menu. This value is eithertrueorfalse. If you set this to true, the only other attribute you need to set isid. (Default:false) - The
multiplayerattribute defines whether this switch is only available in multiplayer. This value is eithertrueorfalse. (Default:false)
- The
-
separatormultiplayer="X"A separator line for the switch menu. Themultiplayerattribute is the same as for themodifiertag. -
headertext="X" tooltip="X" multiplayer="X"A header text for the switch menu. Themultiplayerattribute is the same as for themodifiertag.
-
Levels
-
startA collection of levels that the player will be able to start from.-
levelname="X" lvl="X"A level that the player will be able to start from. Thenameattribute is the name displayed in the list of levels, and thelvlattribute is the filename to the level.
-
Scripts
-
classmapsA collection of script classes to rewrite to other class names. See Rewriting Classes for detailed information.-
behaviorfrom="X" to="X"Overwrites a unit's behavior class. -
scriptfrom="X" to="X"Overwrites a class created in-script withInstantiateClass(). -
gamemodefrom="X" to="X"Overwrites a level's gamemode class.
-
Includes
-
includesA collection of scenarios that this scenario includes.-
includename="X" modifiers="X" levels="X" classmaps="X" final="X"An included scenario.- The
nameattribute defines the name of the scenario to include. Required. - The
modifiersattribute defines whether to include any modifiers from this scenario. (Default:false) - The
levelsattribute defines whether to include any start levels from this scenario. (Default:false) - The
classmapsattribute defines whether to include any class map rewrites from this scenario. (Default:false) - The
finalattribute defines whether inclusion shouldn't go any deeper than the one you're including. This means that any included scenarios in the scenario you're including will not be included if this is true. (Default:false)
- The
-
-
disable-includeSet this totrueto disallow this scenario from getting included by other scenarios. (Default:false)
Example
Below is the info.xml file for the Payload gamemode on the Workshop:
<info>
<name>Payload</name>
<description>Bring the payload to the other side.</description>
<multiplayer>true</multiplayer>
<players min="2" max="12" />
<start>
<level name="Over the Mountain" lvl="levels/payload01.lvl" />
<level name="That belongs in a Museum" lvl="levels/payload02.lvl" />
</start>
<modifiers>
<modifier forced="true" id="VERSUS" />
<modifier forced="true" id="PICKUP_RESPAWN" />
</modifiers>
</info>