Difference between revisions of "HPL3/Launch Configuration"

From Frictional Wiki
Jump to navigation Jump to search
Line 69: Line 69:
  
 
===Attributes===
 
===Attributes===
 
+
----
 
==== ConfigFiles ====
 
==== ConfigFiles ====
 
{| class="wikitable"
 
{| class="wikitable"
 +
! Attribute !! Description
 +
|-
 
|Resources
 
|Resources
 
|Points to the [[HPL3/Resources Configuration|resources configuration]] file.
 
|Points to the [[HPL3/Resources Configuration|resources configuration]] file.
Line 102: Line 104:
 
==== Directories ====
 
==== Directories ====
 
{| class="wikitable"
 
{| class="wikitable"
 +
! Attribute !! Description
 +
|-
 
|MainSaveFolder
 
|MainSaveFolder
 
|
 
|
Line 114: Line 118:
 
==== Variables ====
 
==== Variables ====
 
{| class="wikitable"
 
{| class="wikitable"
 +
! Attribute !! Description
 +
|-
 
|GameName
 
|GameName
 
|
 
|
Line 120: Line 126:
 
==== StartMap ====
 
==== StartMap ====
 
{| class="wikitable"
 
{| class="wikitable"
 +
! Attribute !! Description
 +
|-
 
|File
 
|File
 
|
 
|

Revision as of 16:10, 25 August 2020

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

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" 
/>

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" 
/>
Note icon.png 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


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
BaseLanguageFolder
GameLanguageFolder

Variables

Attribute Description
GameName

StartMap

Attribute Description
File
Folder
Pos