VoidExpanse/Adding Ships: Difference between revisions

From AtomicTorchWiki
(Created page with "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.")
 
No edit summary
Line 1: Line 1:
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.
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> <!-- 1 - server, 2 - client-server, 3 - client -->
  </root>
Make a copy of that ''headers.xml'' file, but don't change the name.
Now make a basic compressed file, let's say called ''testmod.mpk'' and edit your copy of headers.xml...
The only important thing to change is the ID, which should match your .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> <!-- 1 - server, 2 - client-server, 3 - client -->
  </root>
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.
Simple, right?
----
== 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.
The easiest way to begin is to make a copy of the starter shuttlecraft, since it costs nothing and is available immediately...

Revision as of 04:06, 21 May 2014

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. Now make a basic compressed file, let's say called testmod.mpk and edit your copy of headers.xml... The only important thing to change is the ID, which should match your .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, 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.

Simple, right?




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. The easiest way to begin is to make a copy of the starter shuttlecraft, since it costs nothing and is available immediately...