This article will guide you through the necessary steps to set your levels up for use in Launcher. Information about your level needs to be stored in one or more XML files for the engine to read and display back to the user.
Adding and Editing the Level XML File
After exporting your level to the engine, you can also add an .xml file called LevelName.xml (where "LevelName" is the name of your level).
This file can be created with a text document editor, such as notepad as it's similar to a standard .txt file and the extension can be renamed to .xml.
In this example we'll use the existing Forest.xml:
Every level can have an XML file containing metadata, the XML file is named the same as the level name.
e.g. Levels/Singleplayer/Forest/... contains Levels/Singleplayer/Forest/Forest.xml
This file gets automatically generated if you use the minimap functionality under the terrain section in the rollup-bar, but you can manually add it too if you want.
Currently it supports the following metadata:
|Gamerules||Here you can set the gamemode your map is designed for. If your map supports more than one gamemode just continue with MP2, MP3 and so on.|
|Minimap Data||Outputted by the Minimap tool in Sandbox.|
|Leveltype Data||See below.|
|Header Text||DEPRECATED - Should be the map name. This will be displayed on top of the loading screen.|
|Loading Image/Video||Loading image and video for this level (shown when loading screen is active).|
|Description Text||The description of your map. Write a short description about your map. Can also be a short story about your map.|
|Display Name||DEPRECATED - This name will be displayed in the server browser.|
You can set a loading_video, loading_image and unloading_image. they will show up when loading or unloading a level. In case there is no unloading image set it will use the loading image by default.
Inside the MetaData block you can add children that have the XML tag LevelType.
e.g. <LevelType value="Menu"/>
These tags are stored as string in the level info when a level is loaded. The file containing the possible tags is:
So first you define all your leveltypes in the
Libs/Levels/LevelTypes.xml file, then you can add leveltype tags to all your levels and use the flownode Game:IsLevelOfType to check if your level is of this type and trigger specific logic off the back of it.
Common practices for this can be special levels that are tagged as menu levels, here you want to have different UIAction logic triggered (no in-game menu for example). or you can make global flowgraphs that react different depending on the type of level you are in.
Localization XML Setup
To get the Launcher to correctly display your level name you need to add your level information into the localization file(s).
For English (default), the file that needs to be updated is located in:
This .xml file is setup as an Excel spreadsheet so open it in Excel for the content to be readable.
Continuing on the previous example, if your level is called "Forest" you should add the entry as follows: