User Tools

Site Tools


Sidebar

hpl3:tutorials:mod-creation:setting_up_a_mod_entry

Setting up a Mod Entry

When creating a mod, be it a simple add-on or a fully fledged total conversion, an entry file is needed so that the mod can be listed by the ModLauncher app or simply be started by the game.

This means that you need to create an XML file with name entry.hpc in the root directory for your mod, and its contents will depend on what kind of mod you are creating.

Common Attributes

Any valid entry.hpc file will have at least the following attributes:

  • 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)
  • 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.
  • UID: (String) A string in the form 'provider_name.mod_name'. This is used so other mods can reference this one as dependency.
  • 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.

Keep on reading for specifics on each Mod type.

Setting up an Add-on entry

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.

Here's a sample sample entry.hpc file for a minimal add-on entry (download mod here)

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

Setting up a StandAlone entry

This section explains the specifics for setting up entry.hpc files for Stand-alone mod type.

  • LauncherPic: (String) Points to an image file that will be displayed on the details column in the ModLauncher app. 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.

Here's a sample sample entry.hpc file for a minimal custom map entry (download mod here)

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

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”

  • 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:
soma.exe -mod C:\my_mod\entry.hpc
hpl3/tutorials/mod-creation/setting_up_a_mod_entry.txt · Last modified: 2016/07/06 11:41 by thomas