VoidExpanse/installing mods: Difference between revisions

From AtomicTorchWiki
(Created page with "== Mod files == There are two kinds of mod files: *.CPK and *.MPK. '''CPK''' - stands for Core Package. It contains essential game functionality, and without it game won't w...")
 
No edit summary
Line 1: Line 1:
== Mod files ==
== Mod files ==
This article mainly explains how to use already existing mods. If you are interested in creating mods please see: [[VoidExpanse/Modding|VoidExpanse Modding]].


There are two kinds of mod files: *.CPK and *.MPK.
There are two kinds of mod files: *.CPK and *.MPK.


'''CPK''' - stands for Core Package. It contains essential game functionality, and without it
'''CPK''' - stands for Core Package. It contains essential game functionality, and without it game won't work. There shouldn't be multiple CPK files loaded at the same time as it can cause galaxy-scale disasters (not really).
game won't work. There shouldn't be multiple CPK files loaded into one game, it can cause galaxy-scale
disasters.


'''MPK''' - stands for Mod Package. It contains additional files, that'll be added to game's virtual file system and overwrite
'''MPK''' - stands for Mod Package. It contains all additional files that a mod adds.
files with the same name and path, contained in CPK and previous MPK files.


For example, if we have CPK with file /content/readme.txt and MPK with file /content/readme.txt, then
the second one will be loaded, and first one ignored. This mechanism is created to make overriding core
functionality easy, without recompiling whole CPK.


== MPK structure ==
== Using mods ==
The recommended way to install and use mods is by using "AtomicTorch Game Launcher". If you have downloaded this launcher it will take care of the mods for you.


Each mod must have header.xml, or it won't be loaded.
'''To install a mod:''' just double click on the mod file and it will be automatically installed in the mod folder.
Structure of header.xml is in standart XML format:
 
<pre>
'''To activate a mod:''' just press on the cog icon next to "Play" button and press "Select Active Mods" where you can just put tick next to mods you want to load and reorder their loading list if needed.
<?xml version="1.0" encoding="utf-8"?>
 
<root>
 
<id>devmod</id>
== ModsConfig.xml ==
<title>Dev Mod</title>
To determine what mods should be loaded there is "ModsConfig.xml" file. It is usually located in the documents folder (documents/AtomicTorchStudio/VoidExpanse) and contains a list of mods that will be loaded the next time you start the game. Usually you don't have to edit this file by hands, but for the sake of completeness here is its structure:
<author>AtomicTorch Studio</author>
<description>Dev. mod for easier debugging for VoidExpanse.</description>
<version>0.1.0</version>
<updated>17.01.2014</updated>
<modtype>2</modtype> <!-- 1 - server, 2 - client-server, 3 - client -->
</root>
</pre>
For every mod, there's a unique ID formed: [id]_[version]. For instance, unique ID of this mod is '''devmod_0.1.0'''.


To add/remove mods from game, there's a file '''ModsConfig.xml'''. All mods, that should be loaded, should be listed in this file.
To add "devmod" mod, just add this line into "mods" tag:
<pre>
<pre>
<mod>devmod_0.1.1</mod>
<mod>core_1.0.0</mod>
<mod>some_awesome_mod_0.5.9</mod>
</pre>
</pre>


Modtype is a special parameter, defines whether mod should be loaded on server, on client, or both.
As you can see each mod specified as it's internal ID and it's version.
For example, if we want to create a mod, which just replaces some icons, this is a typical '''client''' mod.
Client-side mods will be ignored by server, if listed in ModsConfig.xml.
Mods, that contains only server-side alterations, like new topics or scriptis, are typical '''server''' mod.
If they are listed in ModsConfig.xml, server will load them, but it won't demand one of players. It means, that
if server has server-side mod, and client is not - it's okay.
Third type is client-server mod, complex type of mod, which is needed on both client and server. If server was created
with specific server-side mod, and client doesn't have the same one, server won't let client connect and will give a
warning.
 
== Virtual file system concepts ==
 
* All mods are loaded into one virtual file system, with overwrite rule (see in "mod files" section above).
* Mods can use each other files, so don't hesitate to use original game resources in your mods.
* If two MPK files have the same file (path+name), the last one (by order in ModsConfig.xml) will be taken.
* All file names are not case-sensitive. QwEr.xml and qwer.xml are considered the same.

Revision as of 08:06, 6 January 2015

Mod files

This article mainly explains how to use already existing mods. If you are interested in creating mods please see: VoidExpanse Modding.

There are two kinds of mod files: *.CPK and *.MPK.

CPK - stands for Core Package. It contains essential game functionality, and without it game won't work. There shouldn't be multiple CPK files loaded at the same time as it can cause galaxy-scale disasters (not really).

MPK - stands for Mod Package. It contains all additional files that a mod adds.


Using mods

The recommended way to install and use mods is by using "AtomicTorch Game Launcher". If you have downloaded this launcher it will take care of the mods for you.

To install a mod: just double click on the mod file and it will be automatically installed in the mod folder.

To activate a mod: just press on the cog icon next to "Play" button and press "Select Active Mods" where you can just put tick next to mods you want to load and reorder their loading list if needed.


ModsConfig.xml

To determine what mods should be loaded there is "ModsConfig.xml" file. It is usually located in the documents folder (documents/AtomicTorchStudio/VoidExpanse) and contains a list of mods that will be loaded the next time you start the game. Usually you don't have to edit this file by hands, but for the sake of completeness here is its structure:

<mod>core_1.0.0</mod>
<mod>some_awesome_mod_0.5.9</mod>

As you can see each mod specified as it's internal ID and it's version.