Hpl3:Tutorials:mod-creation

From Frictional Wiki
Revision as of 14:47, 9 July 2020 by Maintenance script (talk | contribs) (Upload from wiki)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

You can create 2 different types of mods for now.

- Add-ons: these items are meant to replace stuff on the main game. If you want to make the monsters sound differently, replace some textures or change some scripts, then you should make this an add-on. Keep in mind that, while it might sound basic, you can change pretty much anything in the main game. You could add different events, add new objects to interact with or even change the ending or add an alternate one of your own!

- Stand-alone content: these items are pretty much the equivalent to Amnesia's custom stories, with extra ease for adding custom assets and gameplay elements without breaking the main game installation. You can create custom maps, campaigns and total conversions going this way,even completely new games that don't have much to do with the original SOMA.

Creating and setting up an Add-on mod:

An add-on mod for SOMA is basically comprised of replacement/additional assets, a resources configuration file and (optionally) language files. The resources configuration file should look like the 'resources.cfg' file that's in the main game directory, but only including the relative paths of the directories in the mod you want to add to the game file system.

For the replacement assets to work, you need to include the replacement files in your mod folder so the relative path to them looks exactly like the one in the game.

For example, if we are developing a mod that is saved in "C:\MyMod" and we want to replace the game file with path "graphics/menu/background.tga", then we should have a file named "background.tga" in "C:\MyMod\graphics\menu" (this "graphics" directory should also be added to the add-on resource config file)

Worth noting is that several mods can be used at the same time, but it's required that they don't conflict (as in having more than one replacing the same file).

To set the mod up as an add-on, in addition to what has been explained above, we need to configure our entry.hpc file as follows:

<Content Type="AddOn" ResourcesCfg="path_to_resource_config_file" LanguageFolder="" />

Creating and setting up a Stand-alone mod:

A stand alone mod needs to have custom maps, language files, custom assets (optionally) and initialization and game configuration files. How these last two should look will depend greatly on what the scope of the mod is. For example, to simply make a custom map mod, then only the StartMap setting in the Init.cfg file will be required. Examples of what can be accomplished with these will come.

Running a mod

For running a mod, there's a special launcher application that helps the end user to run the game with the mod that they will pick from a graphical user interface. The mods will be displayed in the two different listings presented earlier (add-ons and stand alone)

One can also manually start a mod with the command line parameters -mod (for standalone mods or single add-ons) or -addonbatch (for add-on packs). When using the -addonbatch parameter, an add-on batch file must be passed as argument. This basically is an XML file with a list of the add-ons that the user wishes to activate.