Checklist
- This works with version 1.0.6 and newer
- Use the wiki scripting section when making a mod
Getting started
To start, you'll need a name for your mod, I'll name mine My Awesome Mod. Now that you have a name, you can set up the folder structure:
- Find the assets directory and create a new folder without spaces or special characters. Mine would be assets/myawesomemod.
- In the directory you created, create a new, empty text file and name it import.txt.
Explanation of import.txt
You can skip this if you are not interested in technical details.
When Starfare is started, it attempts to load textures, sounds, meshes and so on. By default, the game looks for any loadable resources in assets/base unless you tell the game that you want to run a mod. If that is the case, the game simply looks for resources in assets/myawesomemod. But if you only want to add a campaign level, the game would only load your campaign script but no sounds, no ships, nothing.So the import.txt file tells the game what else to load aside from the files in your mod directory. The file is read line-wise. Each line should either be the path of a file to load, or an entire directory to load.
Importing necessary assets
The game absolutely requires some specific assets to be loaded. If you don't plan on modifying these, your import.txt for your mod should contain this:
base/images
base/meshes/minimap.png
base/meshes/skybox.jpg
base/meshes/ambient.png
base/meshes/cloudlayer.png
base/meshes/overlay_radon.png
base/meshes/overlay_silicea.png
base/meshes/asteroid.x
base/effects
base/strings
base/sfx
This will make the game load the standard interface textures and even sounds but no units or campaign levels.
Starting the game with a mod
Create either a .bat file or a shortcut (Batch files are preferred if you actually want to distribute your mod) to start Starfare.exe with two parameters:
starfare.exe -basedir -myawesomemod
Remember to enter your mod's folder name as second parameter.
Good luck & Have fun modding!
and what is with the animations like turrets?
Hm, I should post another tutorial on the details, eh? ;)
The blue box on the top of the unit is actually a turret (without a proper mesh loaded..)
If you want animated turrets, check out the scripting KB here: Starfare.eu
Whats the ideal model poly counts for creating custom ships??
I'm using not more than 500 per ship but I'm not really a professional 3d artist. The game can take 65k vertices per model but that's not recommendable ;)
does the -basedir have to be a file path or just leave it alone?