Difference between revisions of "Info.xml"

From Serious Sam's Bogus Detour
Jump to: navigation, search
(Tags)
Line 2: Line 2:
  
 
== Tags ==
 
== Tags ==
 +
 +
=== Metadata ===
 
* '''Required''' <code>name</code> The name of the scenario that will show up in the scenario list.
 
* '''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.
 
* '''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 ===
 
* <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 26:
 
** <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.
* <code>disable-include</code> Set this to <code>true</code> to disallow this scenario from getting included by other scenarios. (Default: <code>false</code>)
+
 
 +
=== 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>modifiers="X" levels="X" classmaps="X" final="X"</code> An included scenario.
Line 33: Line 44:
 
*** 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>)
 
*** 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 ==

Revision as of 14:34, 3 July 2017

This XML file describes a scenario. All tags listed below must be within an <info></info> block.

Tags

Metadata

  • Required name The name of the scenario that will show up in the scenario list.
  • Required description The full description of the scenario that will show up when selecting the scenario in the scenario list.
  • tag A short tagline description of the scenario, which is shown above the description.

Options

  • multiplayer Whether the scenario is multiplayer-only or not. Either true or false. (Default: false)
  • saving The save mode to use. Either none where there are no saves at all, current where the current level is saved, or all which is like Hammerwatch, where you can go back to older levels without their progress getting reset. (Default: current)
  • players min="X" max="X" The amount of players allowed to play in multiplayer. (Default: unlimited)

Modifiers

  • modifiers A collection of switches for the scenario.
    • modifier forced="X" id="X" name="X" tooltip="X" locked-by="X" default-on="X" radio="X" multiplayer="X" A modifier.
      • The id attribute is the modifier ID. When the switch is turned on, in content, a preprocessor define called MOD_ID is defined. For more information, see Preprocessor.
      • The name attribute is the visible display name for the switch. It is displayed in the switches menu.
      • The tooltip attribute defines the text for an additional tooltip that should show when hovering over the switch in the switches menu. (Default: none)
      • The locked-by attribute defines which switches disable this one, separate by commas. (Default: none)
      • The default-on attribute sets this switch to be on by default. This value is either true or false. (Default: false)
      • The radio attribute 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 forced attribute defines whether this switch is always defined, and isn't listed in the switches menu. This value is either true or false. If you set this to true, the only other attribute you need to set is id. (Default: false)
      • The multiplayer attribute defines whether this switch is only available in multiplayer. This value is either true or false. (Default: false)
    • separator multiplayer="X" A separator line for the switch menu. The multiplayer attribute is the same as for the modifier tag.
    • header text="X" tooltip="X" multiplayer="X" A header text for the switch menu. The multiplayer attribute is the same as for the modifier tag.

Levels

  • start A collection of levels that the player will be able to start from.
    • level name="X" lvl="X" A level that the player will be able to start from. The name attribute is the name displayed in the list of levels, and the lvl attribute is the filename to the level.

Scripts

  • classmaps A collection of script classes to rewrite to other class names. See Rewriting Classes for detailed information.
    • behavior from="X" to="X" Overwrites a unit's behavior class.
    • script from="X" to="X" Overwrites a class created in-script with InstantiateClass().
    • gamemode from="X" to="X" Overwrites a level's gamemode class.

Includes

  • includes A collection of scenarios that this scenario includes.
    • include modifiers="X" levels="X" classmaps="X" final="X" An included scenario.
      • The modifiers attribute defines whether to include any modifiers from this scenario. (Default: false)
      • The levels attribute defines whether to include any start levels from this scenario. (Default: false)
      • The classmaps attribute defines whether to include any class map rewrites from this scenario. (Default: false)
      • The final 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: false)
  • disable-include Set this to true to 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>