Difference between revisions of "HPL3/SOMA/Developer Commands"

From Frictional Wiki
< HPL3‎ | SOMA
Jump to navigation Jump to search
Line 1: Line 1:
{{wip}}
 
 
 
When launching your mod via a Command Prompt (CMD .bat file), you can pass optional arguments which will affect the way the mod is loaded by the game. It can be useful for mods which require custom assets and scripts, or if you want to customize it further than that.
 
When launching your mod via a Command Prompt (CMD .bat file), you can pass optional arguments which will affect the way the mod is loaded by the game. It can be useful for mods which require custom assets and scripts, or if you want to customize it further than that.
  
 
==Command Line Arguments==
 
==Command Line Arguments==
 +
{{Note|You can add multiple arguments and combine them when launching the mod. It doesn't have to be only one argument.}}
  
{{todo|Add example for each one of them and finish this list via https://wiki.frictionalgames.com/index.php/Hpl3:Game:commandline}}
+
==='''-user'''===
 +
This starts the mod with a different user name. This is useful for starting a mod with a different set of save files, as they are saved per-user.<br>Default value: <code>Default</code>.
  
==='''-user'''===
+
Example:<pre>
This starts the mod with a different user name. This is useful for starting a mod with a different set of save files, as they are saved per-user.
+
Soma.exe -user "Default_dev"
<br>
+
</pre>
Default value: <code>Default</code>.
 
  
 
==='''-cfg'''===
 
==='''-cfg'''===
This changes the main config file that is used when starting the mod. This is useful if the relative path of the config file inside your mod folder is different and you want to point to your file.
+
This changes the main config file that is used when starting the mod. This is useful if the relative path of the config file inside your mod folder is different and you want to point to your file.<br>Default value: <code>config/main_init.cfg</code>.
<br>
+
 
Default value: <code>config/main_init.cfg</code>.
+
Example:<pre>
 +
Soma.exe -cfg "config/main_init_dev.cfg"
 +
</pre>
  
 
==='''-map'''===
 
==='''-map'''===
This starts the mod and opens a specific map specific map.
+
The game loads a specific map after startup. This is useful if you want to load a specific map quickly or if you want to skip the "load map" option in the debug menu.<br>Default value: Stated at <code>MapFile</code> in <code>main_init.cfg</code>.
<br>
 
Default value: Stated at <code>StartMap</code> in <code>main_init.cfg</code>.
 
  
 +
Example:<pre>
 +
Soma.exe -map "mods/myMod/maps/myMap.hpm"
 +
</pre>
  
 
==='''-mapfolder'''===
 
==='''-mapfolder'''===
This changes the main config file that is used when starting the mod. This is useful if the relative path of the config file inside your mod folder is different and you want to point to your file.
+
This starts the game with a specific map folder.<br>Default value: Stated at <code>MapFolder</code> in <code>main_init.cfg</code>.
<br>
 
Default value: <code>config/main_init.cfg</code>.
 
  
 +
Example:<pre>
 +
Soma.exe -mapfolder "mods/myMod/maps"
 +
</pre>
  
 
==='''-mappos'''===
 
==='''-mappos'''===
This changes the main config file that is used when starting the game. This is useful if the relative path of the config file inside your mod folder is different and you want to point to your file.
+
Sets a specific start position to be used in a map. This can be useful if you want to test your map from a specific position or if you want to skip the "jump to start pos" option in the debug menu.<br>Default value: Stated at <code>StartPos</code> in <code>main_init.cfg</code>.
<br>
+
 
Default value: <code>config/main_init.cfg</code>.
+
{{Note|This argument is useful if you run it along with the -map argument.}}
 +
 
 +
Example:<pre>
 +
Soma.exe -map "mods/myMod/maps/myMap.hpm" -mappos "PlayerStartArea_3"
 +
</pre>
  
 
==='''-workdir'''===
 
==='''-workdir'''===
This changes the main config file that is used when starting the game. This is useful if the relative path of the config file inside your mod folder is different and you want to point to your file.
+
Which directory the game exe is located. Can be used to change between engine and main redist.
<br>
+
 
Default value: <code>config/main_init.cfg</code>.
+
{{Warning|This command line argument is useful for the engine developers only!}}

Revision as of 14:15, 28 July 2020

When launching your mod via a Command Prompt (CMD .bat file), you can pass optional arguments which will affect the way the mod is loaded by the game. It can be useful for mods which require custom assets and scripts, or if you want to customize it further than that.

Command Line Arguments

Note icon.png You can add multiple arguments and combine them when launching the mod. It doesn't have to be only one argument.

-user

This starts the mod with a different user name. This is useful for starting a mod with a different set of save files, as they are saved per-user.
Default value: Default.

Example:

Soma.exe -user "Default_dev"

-cfg

This changes the main config file that is used when starting the mod. This is useful if the relative path of the config file inside your mod folder is different and you want to point to your file.
Default value: config/main_init.cfg.

Example:

Soma.exe -cfg "config/main_init_dev.cfg"

-map

The game loads a specific map after startup. This is useful if you want to load a specific map quickly or if you want to skip the "load map" option in the debug menu.
Default value: Stated at MapFile in main_init.cfg.

Example:

Soma.exe -map "mods/myMod/maps/myMap.hpm"

-mapfolder

This starts the game with a specific map folder.
Default value: Stated at MapFolder in main_init.cfg.

Example:

Soma.exe -mapfolder "mods/myMod/maps"

-mappos

Sets a specific start position to be used in a map. This can be useful if you want to test your map from a specific position or if you want to skip the "jump to start pos" option in the debug menu.
Default value: Stated at StartPos in main_init.cfg.

Note icon.png This argument is useful if you run it along with the -map argument.

Example:

Soma.exe -map "mods/myMod/maps/myMap.hpm" -mappos "PlayerStartArea_3"

-workdir

Which directory the game exe is located. Can be used to change between engine and main redist.

Alert icon.png Warning: This command line argument is useful for the engine developers only!