User Tools

Site Tools


hpl3:tutorials:mod-creation:setting_up_a_mod_entry

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
hpl3:tutorials:mod-creation:setting_up_a_mod_entry [2015/10/13 23:03]
luis [Setting up a Mod Entry]
hpl3:tutorials:mod-creation:setting_up_a_mod_entry [2016/07/06 11:41] (current)
thomas [Running a Mod]
Line 9: Line 9:
 Any valid entry.hpc file will have at least the following attributes: Any valid entry.hpc file will have at least the following attributes:
  
-<code xml> +    ​* Version: The version for the entry file. Since new features might be added in the future, this attribute must be set according to the rest of attributes ​(so that for instance it is not 0.1 when there are attributes that are available in version 1.0) 
-<?xml version="​1.0"​ encoding="​UTF-8"?>​ +    * Type: (String) The type for the content the mod is offering. Possible values as of version 1.0 are "​AddOn"​ or "​StandAlone"​. 
-<Content Version="​1.0"​  +    * Title: (String) This sets the title for the mod. Should not be longer than 128 characters, especially if the mod is to be uploaded to Steam Workshop. 
-    Type=""​  +    * Author: (String) This will be shown below the title on the info column in the ModLauncher app. 
-    Title=""​  +    * Description:​ (String) A brief description of what the mod is about. Should not exceed 8000 characters for the same reason as title
-    Author=""​  +    * UID: (String) A string in the form '​provider_name.mod_name'​. This is used so other mods can reference this one as dependency. 
-    Description=""​ +    * Dependencies:​ (String) A list of UID's separated by commas. The resources in these mods will be available to the game when the current mod is run.
-/> +
-</​code>​ +
-  ​* Version: The version for the entry file. Since new features might be added in the future, this attribute must be set according to the rest of attributes. +
-  * Type: (String) The type for the content the mod is offering. Possible values as of version 1.0 are "​AddOn"​ or "​StandAlone"​. +
-  * Title: (String) This sets the title for the mod. Should not be longer than 128 characters, especially if the mod is to be uploaded to Steam Workshop. +
-  * Author: (String) This will be shown below the title on the info column in the ModLauncher app. +
-  * Description:​ (String) A brief description of what the mod is about. Should not exceed 8000 characters for the same reason as title.+
  
-Keep on reading for specifics on each Mod type:+Keep on reading for specifics on each Mod type.
  
 ===== Setting up an Add-on entry ===== ===== Setting up an Add-on entry =====
Line 30: Line 23:
 This section explains the specifics for setting up entry.hpc files for add-on mod type. This section explains the specifics for setting up entry.hpc files for add-on mod type.
  
 +  * ResourcesCfg:​ (String) This tells the game where to look for the additional resources configuration file. If not set, the default '​resources.cfg'​ file located in the mod root directory will be used. Note that this file must exist for the mod to work.
   * LanguageFolder:​ (String) This tells the game where to look for additional language files when the add-on is launched. Should be a path relative to the mod root directory. This value is optional: if your add-on does not add any language entries, then there'​s no need to have it.   * LanguageFolder:​ (String) This tells the game where to look for additional language files when the add-on is launched. Should be a path relative to the mod root directory. This value is optional: if your add-on does not add any language entries, then there'​s no need to have it.
  
-sample ​mod for a minimal add-on entry can be downloaded ​here. +Here's a sample ​sample entry.hpc file for a minimal add-on entry (download mod {{:​hpl3:​tutorials:​mod-creation:​minimaladdonmod.zip|here}}) 
 +<code xml> 
 +<?xml version="​1.0" encoding="​UTF-8"?>​ 
 +<Content Version="​1.0"​ 
 + Type="​AddOn"​ 
 + Title="​[SAMPLE] Minimal Add-on Mod" 
 + Author="​Your name here"​ 
 + Description="​This is a minimal setup for creating add-on mods."​ 
 +  
 + LanguageFolder="​config/​lang"​ 
 +/> 
 +</​code>​
 ===== Setting up a StandAlone entry ===== ===== Setting up a StandAlone entry =====
  
Line 41: Line 45:
   * InitCfg: (String) Points to a configuration XML file that will set a list of initialization values including save directory, script modules config, and so on. Should be a path relative to the mod root directory. ​   * InitCfg: (String) Points to a configuration XML file that will set a list of initialization values including save directory, script modules config, and so on. Should be a path relative to the mod root directory. ​
  
-sample ​stand-alone mod for a minimal custom map entry can be downloaded here.+Here's a sample ​sample entry.hpc file for a minimal custom map entry (download mod {{:​hpl3:​tutorials:​mod-creation:​minimalcustommapmod.zip|here}}) 
 +<code xml> 
 +<?xml version="​1.0"​ encoding="​UTF-8"?>​ 
 +<Content Version="​1.0"​ 
 + Type="​StandAlone"​ 
 + Title="​[SAMPLE] Minimal custom map mod" 
 + Author="​Your name here"​ 
 + Description="​This is a minimal setup for creating custom maps"​ 
 +  
 + LauncherPic="​LauncherPic.png"​ 
 + InitCfg="​config/​main_init.cfg"​ 
 +/> 
 +</​code>​ 
 + 
 +===== Running a Mod ===== 
 + 
 +There are two different ways to run a mod: 
 + 
 +  * Using the Mod Launcher app: there'​s a special Mod Launcher program that will scan subscribed content in SteamWorkshop (where applies) and the local "​redist\mods"​ directory. To make your mod entry appear in the launcher'​s list, it must be located in its own directory under the "​\mods"​ directory. For example, a mod for SOMA in a directory called "​my_mod"​ would need to have the path "​C:​\Program Files (x86)\Steam\steamapps\common\SOMA\mods\my_mod"​ 
 + 
 +{{:​hpl3:​tutorials:​mod-creation:​modlauncher.png?​nolink&​400}} 
 + 
 +  * Using the command line: to run a mod directly, you only need to run the game executable passing the "​-mod"​ option followed by the full path to the mod's "​entry.hpc"​ file as arguments. Using this method, the mod can be placed anywhere as long as the path to the "​entry.hpc"​ file passed is correct. For the previous example, given the full path for the mod "​my_mod"​ is "​C:​\my_mod\",​ the command line for running it should read like this: 
 + 
 +<​code>​ 
 +soma.exe -mod C:​\my_mod\entry.hpc 
 +</​code>​ 
hpl3/tutorials/mod-creation/setting_up_a_mod_entry.1444777406.txt.gz · Last modified: 2015/10/13 23:03 by luis