Difference between revisions of "HPL3/Launch Configuration"
(Created page with "When a mod is launched, some initialization occurs and the game is configured before the mod shows up. This article explains how to configure the startup of a mod. == Launch...") |
(Added new Amnesia: The Bunker StartMap syntax) |
||
(7 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
+ | {{shortPageTitle}} | ||
When a mod is launched, some initialization occurs and the game is configured before the mod shows up. This article explains how to configure the startup of a mod. | When a mod is launched, some initialization occurs and the game is configured before the mod shows up. This article explains how to configure the startup of a mod. | ||
− | == Launch Configuration File == | + | ==Launch Configuration File== |
In order to make the mod launch, we need to list some configurations and settings that affect the initialization of the mod. All of the configurations are listed inside a single XML file, called <code>main_init.cfg</code>. The file should be located inside the <code>config</code> folder of the mod. When launching a mod, either via debug mode or via the game, the mod will first read the data from this file. | In order to make the mod launch, we need to list some configurations and settings that affect the initialization of the mod. All of the configurations are listed inside a single XML file, called <code>main_init.cfg</code>. The file should be located inside the <code>config</code> folder of the mod. When launching a mod, either via debug mode or via the game, the mod will first read the data from this file. | ||
− | === Minimal Configuration === | + | ===Minimal Configuration=== |
These are the minimal settings that should be inside a <code>main_init.cfg</code> file: | These are the minimal settings that should be inside a <code>main_init.cfg</code> file: | ||
− | |||
<syntaxhighlight lang="xml"> | <syntaxhighlight lang="xml"> | ||
<Directories | <Directories | ||
Line 22: | Line 22: | ||
Folder = "maps/" | Folder = "maps/" | ||
Pos = "PlayerStartArea_1" | Pos = "PlayerStartArea_1" | ||
+ | /> | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | {{Note|'''Note:''' Amnesia: The Bunker has different syntax for the StartMap key. | ||
+ | <syntaxhighlight lang="xml"> | ||
+ | <StartMap | ||
+ | File = "Main:intro_map.hpm, PostIntro:main_map.hpm" | ||
+ | Folder = "maps/" | ||
+ | Pos = "PlayerStartArea_1" | ||
/> | /> | ||
</syntaxhighlight>}} | </syntaxhighlight>}} | ||
− | === Extended Configuration === | + | ===Extended Configuration=== |
These are the full settings that can be inside a <code>main_init.cfg</code> file in order to apply further customization: | These are the full settings that can be inside a <code>main_init.cfg</code> file in order to apply further customization: | ||
Line 33: | Line 42: | ||
Materials = "materials.cfg" | Materials = "materials.cfg" | ||
SoundData = "sounddata.cfg" | SoundData = "sounddata.cfg" | ||
− | |||
− | |||
− | |||
− | |||
− | |||
DefaultBaseLanguage = "base_english.lang" | DefaultBaseLanguage = "base_english.lang" | ||
Line 56: | Line 60: | ||
<Variables | <Variables | ||
− | GameName = " | + | GameName = "Mod Name" |
/> | /> | ||
Line 66: | Line 70: | ||
<StartMap | <StartMap | ||
− | File = " | + | File = "map_name.hpm" |
Folder = "maps/" | Folder = "maps/" | ||
Pos = "PlayerStartArea_1" | Pos = "PlayerStartArea_1" | ||
Line 74: | Line 78: | ||
{{Note|it is recommended to not change most of the settings, and only edit things that should really be customized for your mod, such as mod name, save folder name, etc.}} | {{Note|it is recommended to not change most of the settings, and only edit things that should really be customized for your mod, such as mod name, save folder name, etc.}} | ||
− | === Attributes === | + | ===Attributes=== |
+ | ---- | ||
+ | ====ConfigFiles==== | ||
+ | {| class="wikitable" | ||
+ | !Attribute!!Description | ||
+ | |- | ||
+ | |Resources | ||
+ | |Points to the [[HPL3/Resources Configuration|resources configuration]] file. | ||
+ | |- | ||
+ | |Materials | ||
+ | |Points to the material configuration file. | ||
+ | |- | ||
+ | |SoundData | ||
+ | |Points to the sound data configuration file. | ||
+ | |- | ||
+ | |DefaultBaseLanguage | ||
+ | |Points to the default base [[HPL3/Language Configuration|language file]]. | ||
+ | |- | ||
+ | |DefaultGameLanguage | ||
+ | |Points to the default game [[HPL3/Language Configuration|language file]]. | ||
+ | |- | ||
+ | |Modules | ||
+ | |Points to the [[HPL3/Modules Configuration|modules file]]. | ||
+ | |- | ||
+ | |EntityTypes | ||
+ | |Points to [[HPL3/Entities/Entity Types|entity types]] configuration file. | ||
+ | |- | ||
+ | |Effects | ||
+ | |Points to the effects configuration file. | ||
+ | |- | ||
+ | |PlayerStates | ||
+ | |Points to the player states configuration file. | ||
+ | |} | ||
+ | |||
+ | ====Directories==== | ||
+ | {| class="wikitable" | ||
+ | !Attribute!!Description | ||
+ | |- | ||
+ | |MainSaveFolder | ||
+ | |The name of the folder which the save files will be placed into. | ||
+ | |- | ||
+ | |BaseLanguageFolder | ||
+ | |The name of the folder where [[HPL3/Language Configuration|base_english.lang]] is located at. | ||
+ | |- | ||
+ | |GameLanguageFolder | ||
+ | |The name of the folder where [[HPL3/Language Configuration|english.lang]] is located at. | ||
+ | |} | ||
+ | |||
+ | ====Variables==== | ||
+ | {| class="wikitable" | ||
+ | !Attribute!!Description | ||
+ | |- | ||
+ | |GameName | ||
+ | |The name of the mod. Will appear at the title of the game and at the task bar. | ||
+ | |} | ||
+ | |||
+ | ====StartMap==== | ||
+ | {| class="wikitable" | ||
+ | !Attribute!!Description | ||
+ | |- | ||
+ | |File | ||
+ | |The name of the map file + file extension (<code>.hpm</code>). | ||
+ | |- | ||
+ | |Folder | ||
+ | |The name of the map folder. | ||
+ | |- | ||
+ | |Pos | ||
+ | |The [[HPL3/Areas/PlayerStart Area|primary start position]] of the map. | ||
+ | |} | ||
+ | |||
+ | [[Category:Modding]] | ||
+ | [[Category:English]] |
Latest revision as of 19:31, 15 July 2023
When a mod is launched, some initialization occurs and the game is configured before the mod shows up. This article explains how to configure the startup of a mod.
Contents
Launch Configuration File
In order to make the mod launch, we need to list some configurations and settings that affect the initialization of the mod. All of the configurations are listed inside a single XML file, called main_init.cfg
. The file should be located inside the config
folder of the mod. When launching a mod, either via debug mode or via the game, the mod will first read the data from this file.
Minimal Configuration
These are the minimal settings that should be inside a main_init.cfg
file:
<Directories
MainSaveFolder = "Save Folder Name"
GameLanguageFolder = "config/lang/"
/>
<Variables
GameName = "Mod Name"
/>
<StartMap
File = "map_name.hpm"
Folder = "maps/"
Pos = "PlayerStartArea_1"
/>
Note: Amnesia: The Bunker has different syntax for the StartMap key.
<StartMap
File = "Main:intro_map.hpm, PostIntro:main_map.hpm"
Folder = "maps/"
Pos = "PlayerStartArea_1"
/>
Extended Configuration
These are the full settings that can be inside a main_init.cfg
file in order to apply further customization:
<ConfigFiles
Resources = "resources.cfg"
Materials = "materials.cfg"
SoundData = "sounddata.cfg"
DefaultBaseLanguage = "base_english.lang"
DefaultGameLanguage = "english.lang"
Modules = "config/Modules.cfg"
EntityTypes = "config/EntityTypes.cfg"
Effects = "config/Effects.cfg"
PlayerStates = "config/PlayerStates.cfg"
/>
<Directories
MainSaveFolder = "Main"
BaseLanguageFolder = "config/"
GameLanguageFolder = "config/lang_main/"
/>
<Variables
GameName = "Mod Name"
/>
<MainMenu
File="main_menu.hpm"
Folder="maps/"
Pos=""
/>
<StartMap
File = "map_name.hpm"
Folder = "maps/"
Pos = "PlayerStartArea_1"
/>
Attributes
ConfigFiles
Attribute | Description |
---|---|
Resources | Points to the resources configuration file. |
Materials | Points to the material configuration file. |
SoundData | Points to the sound data configuration file. |
DefaultBaseLanguage | Points to the default base language file. |
DefaultGameLanguage | Points to the default game language file. |
Modules | Points to the modules file. |
EntityTypes | Points to entity types configuration file. |
Effects | Points to the effects configuration file. |
PlayerStates | Points to the player states configuration file. |
Directories
Attribute | Description |
---|---|
MainSaveFolder | The name of the folder which the save files will be placed into. |
BaseLanguageFolder | The name of the folder where base_english.lang is located at. |
GameLanguageFolder | The name of the folder where english.lang is located at. |
Variables
Attribute | Description |
---|---|
GameName | The name of the mod. Will appear at the title of the game and at the task bar. |
StartMap
Attribute | Description |
---|---|
File | The name of the map file + file extension (.hpm ).
|
Folder | The name of the map folder. |
Pos | The primary start position of the map. |