|This article is a draft and may contain incomplete or even incorrect information. You can help by expanding it.|
The easiest way to get a feel for modifying the available hulls within the game, is to look at the core game files and use them as examples/templates.
Core Game Mod
The game is designed to incorporate mods easily, and the single-player/main game is designed as a standard mod that is loaded by default. In the main VoidExpanse directory, there is a ModsConfig.xml file, which looks something like this...
<?xml version="1.0" encoding="utf-8" standalone="yes"?> <mods> <mod>core_0.1.0</mod> </mods>
You need to edit this file to include each mod you wish to add to your game, which I'll explain below.
Notice the only mod it loads by default is core_0.1.0; You can find this mod in your VoidExpanse main folder under /Mods/core.cpk
Core.cpk includes all of the basic game files, such as hulls, weapons, and devices, but also includes AI behavior and basic game scripts. The game package also provides two example 'mods' in the /Mods/ directory, but these are listed as .mpk files (devmod.mpk & masacre.mpk)
Both of these mod/pack files (.cpk and .mpk) are basically .zip files that contain the game information
Open the Core.cpk file as you would a .zip file, and you'll see two folders, plus a headers.xml
Your headers.xml file should look like this, straight out of core.cpk...
<?xml version="1.0" encoding="utf-8"?> <root> <id>core</id> <title>Core Game Data</title> <author>AtomicTorch Studio</author> <description>Base mod for VoidExpanse. Contains all required game data to play the game.</description> <version>0.1.0</version> <updated>20.08.2013</updated> <modtype>2</modtype> </root>
Make a copy of that headers.xml file, but don't change the name.
The only important thing to change is the ID, which should match your future .mpk filename. So, for this example it should look like this:
<?xml version="1.0" encoding="utf-8"?> <root> <id>testmod</id> <title>Core Game Data</title> <author>AtomicTorch Studio</author> <description>Base mod for VoidExpanse. Contains all required game data to play the game.</description> <version>0.1.0</version> <updated>20.08.2013</updated> <modtype>2</modtype> </root>
Now make a basic compressed file (with ZIP without any compression, we recommend using http://7-zip.org on Windows and similar software on OS X and Linux). IMPORTANT: the result archive file should should contain files directly, not in an extra subfolder! Please open it and check that you see "header.xml" right in the root of the archive together with content and data folders.
Let's say you called the archive file testmod.mpk (should match the id from headers.xml, should NOT have .zip extension - only .mpk). Now, when you place your testmod.mpk file into the /Mods directory with the rest of the game files (core.cpk and the other .mpk files), it will load when you begin the game. Right now, though, there is nothing inside the mod file to load!
The final step is making sure the mod gets loaded. Open up the ModsConfig.xml from the main game directory. We need that ID and VERSION here... If my mod file was testmod.mpk and I left the <version> at 0.1.0, my ModsConfig.xml should look like this:
<?xml version="1.0" encoding="utf-8" standalone="yes"?> <mods> <mod>core_0.1.0</mod> <mod>testmod_0.1.0</mod> </mods>
Don't forget the underscore between the id/filename and the version info.
Actually Adding a Ship
Now that you have an empty .mpk file (except for the headers.xml), you can start adding things like ships and weapons. There are three basic requirements for adding a ship item to the game:
1.Item Data 2.Model Data 3.Texture Data
If there was a 4th requirement, it might be the sound effects, but I'm not sure.
The easiest way to begin is to make a copy of the starter shuttlecraft, since it costs nothing and is available immediately. You can skip the last two(/three) requirements by just copying the basic Item Data file and making slight adjustments...
Open up core.cpk and you'll see two directories: Data and Content
For now, you just want Data...Go further, into /items, and you'll see the files for each usable item/cargo in the game. In this case, we want to just copy the hull_shuttle.xml file. Copy it somewhere, and rename it to something else...For these purposes, it will be renamed to hull_skiff.xml.
After renaming it, open up the file and you'll see quite a bit of stuff in there. Ignore it all for now, and focus on the top bit...It should look something like this:
<root> <header> <game_version>1.0.0</game_version> <id>hull_shuttle</id> <title>Civilian shuttle hull</title> <description>It would probably be a good idea to get rid of this as soon as you can...</description>
The important thing here is to rename the <id> like we did before, when creating the mod file. In this case, my <id> line would look like this:
And change the <title> to something else, so you can verify that it works later on
Save that .xml file (hull_skiff.xml), and open up your mod file .mpk... The game looks through your .mpk file the same way it looks through the core .cpk game files, so your new hull_skiff.xml needs to be placed in /data/items inside your mod file (the same file path where we got the original hull_shuttle.xml).
So finally, if you kept the same naming conventions as I did here, you should have:
1. A compressed/zip file named testmod.mpk 2. A modified headers.xml file inside testmod.mpk 3. A modified ModsConfig.xml file that includes your mod 4. A /data/items/hull_skiff.xml file inside your mod .mpk
This should be enough for the game to register and load your new Civilian Skiff, which is almost identical to the starter shuttle...except for the name. But hey, everything is in the brand, right?
Adding custom models
You can use blender or any other 3D editing software to create and export ships for VoidExpanse.
You can use the following export configuration in order for the ship to be properly displayed in the game.
To define physics for this ship you can use VE Physics Adjuster.
|VoidExpanse Modding (Edit template)|
Using mods: Installing and using mods