Skip to end of metadata
Go to start of metadata

Overview

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:

Forest.xml
<MetaData>
 <LevelType value="Menu"/>
 <LevelType value="PracticeRoom"/>
 <MiniMap Filename="MinimapForest.dds" startX="331.76276" startY="173.65878" endX="891.76276" endY="733.65881" width="2048" height="2048"/>
 <Attributes>
	<loading_video value=""/>
	<loading_image value="Levels/Singleplayer/Forest/LoadingForest.dds"/>
	<unloading_image value="Levels/Singleplayer/Forest/LoadingForest.dds"/>
	<DescriptionText text="@Loading_screen_info_forest"/>
 </Attributes>
</MetaData>

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:

ParameterDescription
GamerulesHere 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 DataOutputted by the Minimap tool in Sandbox.
Leveltype DataSee below.
Header TextDEPRECATED - Should be the map name. This will be displayed on top of the loading screen.
Loading Image/VideoLoading image and video for this level (shown when loading screen is active).
Description TextThe description of your map. Write a short description about your map. Can also be a short story about your map.
Display NameDEPRECATED - This name will be displayed in the server browser.

Gamerules

<>

Loading image

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.

Texture Preloading

On consoles, you need to add the images to the texture preload file: GameSDK/Libs/UI/TexturePreload.xml

Leveltype data

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: Game/Libs/Levels/LevelTypes.xml

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: <root>\Localization\English_xml.pak\text_ui_levels.xml

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:

  • No labels