Getting started

Disclaimer

For the beginning, you just need to fill the required fields in all forms - a required field ist marked with a '*' sign. You can ignore all fields that are not required, in order to make the mod technically work. This guide is just an example, how you create your own mod may differ.

Create the mod

To have a quick start just go to the 'My mods' section and create a mod by clicking the button 'new'. Enter a name, ignore all other fields, and press save.

Basically, the mod already works. But you did not any any changes to the vanilla game yet, inserting this into Avorion would not have any effect. So lets start modding the game.

Add a new good to the game (optional)

Go to the 'My mods' page and press the boxes icon (Goods list) to see an overview of all goods. You may modify a vanilla good, but in this example we create a new good.

Press the button 'New' at the top. A Goods editor will appear in a popup. Enter the desired name for the new good in the field 'Name [ingame]'.

Fields 'Price' and 'Size' need to be greater then 0.

Field 'Factory level': Chose any different from 'Other' or 'Mine'.

Field 'Icon': Chose an icon for that good. The icon will be visible in Avofactory and ingame in Avorion. There are more then 5000 icons available by default, use the tabbed navigation to switch between the different icon pools. My Icons will be empty if you did not create your custom icon yet.

Fields 'Tags' and 'Production chains': Select at least one in the field 'Production chains', if unsure use 'Basic'. Copy the same selection to the field 'Tags'.

Press the save button.

Add a new factory to the game

Go to the 'My mods' page and press the factory icon (Factory list) to see an overview of all factories. You may modify a vanilla factory, but in this example we create a new factory.

Press the button 'New' at the top. A new factory editor will appear in a popup. Enter the desired name of the factory in the field 'Name [ingame]'.

Field 'Factory Style': Chose any different from mine, if unsure select 'Factory'. 'Mine' is a special case.

Production / Consumption: You need at least one production. This will be the good the factory produces. Press the button 'Add production', select a good the factory should produce and insert the amount to be produced per production cycle. If the factory should consume goods in order to do the production, add consumptions.

Press the save button.

Insert mod into Avorion

Go to the 'My mods' page and in the list click the download icon. Your browser will download a .zip file containing just one folder. This folder is your mod.

Copy the folder into the mod folder of your Avorion user directory. On Windows:

C:\Users\USERNAME\AppData\Roaming\Avorion\mods

When you did this correctly there should exist the file 'modinfo.lua' in this path:

C:\Users\USERNAME\AppData\Roaming\Avorion\mods\YOURMODSNAME\modinfo.lua

Start Avorion, in the main menu go to Settings -> Mods. In the list of mods you will find your own mod: activate it. Now you are theoreticly ready to go. But I highly recommand testing your mod. See below.

Note: Your mod works in singleplayer, but it is not ready to be uploaded to the steam workshop yet. See upload to Steam workshop wiki page for more details.

Test your mod

For these tests I recommand using the EntityDBG mod. It adds the script 'entitydbg.lua' to all ships and stations (don't get confused if you do not know what this is, just subscribe the mod and activate it). Alernatively you may add entitydbg.lua by your own.

Create a new galaxy in gamemode creative and launch it. Having the entitydbg.lua enabled adds a new icon to the top right of your screen, that looks like a piece of a puzzle and is called '~dev'. Click this and in the menu navigate to 'Spawn' -> 'Spawn Factory'. The factory you created will appear in the list of factories, clicking it will make the factory spawn in your current sector. It will craft the good you selected in 'Production' and therefor consume the goods you selected in 'Consumption'.

Success

You just created your own mod without writing a single line of code. Congrats. You now know the basics of the mod manager. Just play around with it or see the other wiki pages for more details.

Example mod

I created an example mod that is available in the Steam workshop:

Pizza Factory