Just starting out? This page covers a small tutorial on the basics of modding. Getting yourself organised and providing a brief covering of the basics on files including images and the flux.ini.

The .ini File Et Al - by This email address is being protected from spambots. You need JavaScript enabled to view it.

OK, let's make this a small tutorial/guide for modding .ini file and a few other things.

Unless we have a way to include new stuff in packages files (maybe with the Dev Kit, who knows) the modification are limited changing existing files not creating brand new ones (there are a few exceptions).

As always, comments, suggestions and contributions are welcome and will be put inside this post (with credits of course) for easy reference.


Right now I have enough material to describe the entire process for modding ship templates and ship systems for single player games.

I guess that all of these things will still be valid for multiplayer game but if someone having done some modding of ships for multiplayer mode could post the files to modify and the procedure (I think that that same mods has to be on every computer that is connected to the net session, but that's only a guess) that would be a great help.

If someone played with .lws (avatar) files, his comments are welcome since I only played with naming, positioning and orientation of components.

Lastest update: only general stuff in this first post, no specifics about ship templates and ship systems (next time I update this, promise).

Note: Since detailing the allowed options for the various Ship systems is quite long, I'll add it to this post as I write the stuff down.

on to the guide...

1. Mods management (files priority)

Priority for game files selection:

Folders that are looked into for files are specified in the flux.ini file under the [FcResourceManager] section by the "search_path[priority number]=" entries. The lower the number , the higher the priority is.

In the general case (that is everything except graphics) priorities are:

  1. look for file in hard drive folder
  2. look for file in .zip file with same name as folder
  3. if file hasn't been found, go back to 1. on next folder specified in the FcResourceManager section of flux.ini file

In the case of graphic files:

  • look for .ftu and .ftc files in hard drive folder.
  • look for .iff file in hard drive folder.
  • look for .ftu and .ftc files in .zip file with same name as the folder.
  • look for .iff file in .zip file with same name as the folder.
  • if file hasn't been found, go back to 1. on next folder specified in the FcResourceManager section of flux.ini file

Note: zip files have to keep record of the folder structure.

Using search folders:

The flux.ini file has a handy [FcResourceManager] section in which you can specify the order the search_paths (paths that the game will explore in order to find a file). You can add one before the other existing path (don't forget to change the numbers between brackets).

If you add your own folders in under the FcResourceManager section, you'll keep your mods independent from the game files which is useful to keep original files untouched and to avoid your stuff being overwritten by patch or an over-enthusiastic extraction of the resource.zip file.

As an example here is how I organized things for myself:

The flux.ini file:

search_paths[0] = .\mymods <=; for my personal mods
search_paths[1] = .\3rdmods <=; for third party mods
search_paths[2] = .\resource <=; for a future patch (empty moved everything to other folders)
search_paths[3] = .\resourceF12 <=; for resources updated by F12 european patch
search_paths[4] = .\oresource <=; for original resources shipping with the game
search_paths[5] = .\streams <=; as per original flux.ini file

On hard drive the folder tree looks like this:

[EoC install dir] ==> that the root folder

You can replace folders by .zip files with the same name or have both .zip file and folder (just remember the priorities).

Then you can put your mods inside that folder (or zip file if you prefer) respecting the access path in the original resource folder/zip and it will overide the game files.

For the starmap mod, I have something like:

[EoC install dir]
starmap_mod files (index.html, map folder, etc.)

The index.html in the mymods\html\encyclopedia folder overide the one in the all the search_path entries specifies after mymods which is the first entry in the list.

2. Graphic files format.

Images (FTU/FTC files) are in raw format with a header, here are the details to specify (from somewhere on the Independence War US Forum) [open the .ftu file for best result]:
  • change the extention to .raw (or open as raw image format)
  • open as raw image (with PSP for example).
  • width 256, height 256 (or more if it's bigger, see note 2 below)
  • Three channel RGB
  • header size 48 bits
  • Interleaved (RGB RGBG ...)
  • Order RGB.

Note 1: with these values the image can sometime be a little off-center.
Note 2: if the image doesn't look right just use another set of width and height (keep to 16x16, 32x32, 64x64, 128x128, 256x256, 512x512, etc., I could be wrong on this but images seems distorted in-game when using other number for size).
Note 3: the minimum size of a picture that can be put in the encyclopedia is 16x16, I've tried at up to 512x512 (which covers almost all the width of the encyclopedia screen), if including images in the encyclopedia you have to keep in mind that it will look different at different screen resolutions.

For mods, using files in iff format (just like the reticle crosshair mod) will do (and is probably more practical).

Note: just keep in mind that the .iff files have lower priority than the ftc/ftu files in your current search_paths (so if you have the 3 of them in the same folder, the ftu/ftc files will be selected instead of the .iff).

3. Ship/systems .ini files

A few things on the moment that these files are loaded by the the game.

Ship systems files are loaded when:

  • loading a savegame (from the game resource);
  • launching from base.

Ship templates are loaded when:

  • loading a savegame (from the savegame itself)
  • changing ship in the loadout screen
  • going to the customize loadout screen (but only for component section).
  • launching from base (at which point the connections with the avatar file is made for the display).

That means that if you are modifying a ship template, you should make sure that you have the one you just modified by selecting another ship in the Loadout section and selecting back the ship you're working on.

Note: running the game with the developer_mode option set to 1 in the flux.ini file is useful as you can see where the components installed on your ship are positioned in the current ship template.

Note on T-fighter Loadout screen:

The T-fighters loadout screen is hardcoded, so there's no way to add more selectable stuff in the game loadout section, though other components can be changed.

Add comment