Difference between revisions of "Info.xml"
From Serious Sam's Bogus Detour
(→Tags) |
(→Modifiers) |
||
| Line 14: | Line 14: | ||
=== Modifiers === | === 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. | ||
Revision as of 14:45, 3 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.-
includemodifiers="X" levels="X" classmaps="X" final="X"An included scenario.- 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>