Difference between revisions of "HPL3/SOMA/Modding/Creating a Mod"
m |
|||
Line 33: | Line 33: | ||
*<u>LauncherPic</u>: The file to be used as a thumbnail picture for the ModLauncher application. | *<u>LauncherPic</u>: The file to be used as a thumbnail picture for the ModLauncher application. | ||
*<u>InitCfg</u>: The relative path to the file which information when initializing the mod. The default value is <code>"config/main_init.cfg"</code> and usually shouldn't be changed. | *<u>InitCfg</u>: The relative path to the file which information when initializing the mod. The default value is <code>"config/main_init.cfg"</code> and usually shouldn't be changed. | ||
− | + | ||
+ | ===Special Attributes=== | ||
+ | There are special attributes when can be added to a mod entry file in order to enable optional functionalities: | ||
+ | |||
*<u>UID</u>: A string in the form <code>"provider_name.mod_name"</code>. This is used so other mods can reference your mod as a [[HPL3/Mod Dependencies|Mod Dependency]] | *<u>UID</u>: A string in the form <code>"provider_name.mod_name"</code>. This is used so other mods can reference your mod as a [[HPL3/Mod Dependencies|Mod Dependency]] | ||
*<u>Dependencies</u>: A list of UIDs separated by commas. The resources in these mods will be available to the game when the current mod is running. | *<u>Dependencies</u>: A list of UIDs separated by commas. The resources in these mods will be available to the game when the current mod is running. | ||
− | ==Setting up the Entry File== | + | ===Setting up the Entry File=== |
There are two ways to set up the entry file. Either use the [[HPL3/SOMA Mod Manager|SOMA Mod Manager]] to easily create or edit the file, or set up the file manually: | There are two ways to set up the entry file. Either use the [[HPL3/SOMA Mod Manager|SOMA Mod Manager]] to easily create or edit the file, or set up the file manually: | ||
Line 44: | Line 47: | ||
<?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||
<Content Version="1.0" | <Content Version="1.0" | ||
− | Type="StandAlone" | + | Type="StandAlone" |
Title="Your mod name here" | Title="Your mod name here" | ||
Author="Your name here" | Author="Your name here" | ||
Line 53: | Line 56: | ||
/> | /> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | Change <code>Type</code> to <code>AddOn</code> if necessary. |
Revision as of 14:42, 29 July 2020
This article is actively undergoing a major edit. The user who added this notice will be listed in its edit history should you wish to contact them. |
This article describes how to create, setup and run a basic SOMA mod.
![Icon tip.png](/nsfr_img_auth.php/b/be/Icon_tip.png)
MinimalAddOnMod
and MinimalCustomMapMod
. You can copy them or use them as reference for creating your own modContents
Mod Types
SOMA has two mod types: Stand-Alone mod and Add-On. Technically speaking, the only difference between them is that an Add-On can be run along with a Stand-Alone mod. However, a mod type shall be picked according to the nature of the mod you make, for contentions sake.
Stand-Alone Mod
A Stand-Alone mod describes a mod of extensive game modification: Custom assets, Custom scripts and even overrides of existing game scripts. If your mod is going to have any maps in it, it's probably a Stand-Alone mod.
Add-On Mod
A Add-On mod describes a mod with of specific or limited game modification: Minor config, graphical or script changes that tweaks an existing feature of the game. If your mod touches on small feature, it's probably an Add-On mod. For example: An Add-On that adds a russian translation to the game.
Mod Entry File
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 application or simply be started by the game.
This means that an XML file with name entry.hpc
needs to be created in the root directory of the mod, and its contents will depend on what kind of mod you are creating.
![Note icon.png](/nsfr_img_auth.php/d/d5/Note_icon.png)
Common Attributes
Any valid entry.hpc
file will have at least the following attributes:
- Version: The version for the mod, since the mod might get updated in the future.
- Type: The type for the content the mod is offering. Possible values are
"AddOn"
or"StandAlone"
. - Title: This sets the title for the mod. It should not be longer than 128 characters, especially if the mod is to be uploaded to the Steam Workshop.
- Author: The creator(s) of the mod. This will be shown below the title on the info column in the ModLauncher application.
- Description: The description of the mod. Should not exceed 8000 characters for the same reason as the title.
- LauncherPic: The file to be used as a thumbnail picture for the ModLauncher application.
- InitCfg: The relative path to the file which information when initializing the mod. The default value is
"config/main_init.cfg"
and usually shouldn't be changed.
Special Attributes
There are special attributes when can be added to a mod entry file in order to enable optional functionalities:
- UID: A string in the form
"provider_name.mod_name"
. This is used so other mods can reference your mod as a Mod Dependency - Dependencies: A list of UIDs separated by commas. The resources in these mods will be available to the game when the current mod is running.
Setting up the Entry File
There are two ways to set up the entry file. Either use the SOMA Mod Manager to easily create or edit the file, or set up the file manually:
- Create a file named
entry.hpc
in your mod's root folder. - Paste the following content into the file and save:
<?xml version="1.0" encoding="UTF-8"?> <Content Version="1.0" Type="StandAlone" Title="Your mod name here" Author="Your name here" Description="Mod description here" LauncherPic="LauncherPic.png" InitCfg="config/main_init.cfg" />
Change Type
to AddOn
if necessary.