I suggest you review this guide to make yourself familiar with adding npc grids: https://steamcommunity.com/sharedfiles/filedetails/?id=435324259
You will need:
-A text editor (I recommend Notepad++ or something similar)
-About an hour
-Garlic Bread
Example Mod
An Example Mod can be downloaded here:
https://steamcommunity.com/sharedfiles/filedetails/?id=2421678827
1) Making Stations
Similar to adding Pirate Ships, One must build a station first to add it to their mod.
There are a few things to keep in mind when building a station.
Following these rough guidelines will help remove a lot of frustration:
-Add a store block and contract block (not having one might break contracts and will certainly limit one of the game mechanic’s key features)
-Do not have subgrids (I tried this, it will cause the station to spawn multiple times inside itself, causing a whole host of fun issues)
-Add connectors and set them to trading mode (so someone can’t steal station power)
-Connect connectors, store/contract blocks, and gas tanks via conveyors (makes trading easier)
-Set all doors and blocks the player will interact with to “Anyone can Use” (but not “share with all”)
Things that you do not need to do:
-add a safe zone: One is already provided by the game
-add weapons: the safe zone will keep the station safe
It may be helpful to use the Encounters Setup Mod:
https://steamcommunity.com/sharedfiles/filedetails/?id=1249647931
For the purposes of this tutorial, I will be using a station I have already built:
It is named “Trading Station 3”. We must remember this for later on when we add the station to the station list.
2) Building Vehicles
Just build a vehicle.
For the purposes of this guide I will be using a miner called the TC-201:
once again, remember this name.
3) Export your builds
The following process works for both vehicles and stations
1. copy your build to your clipboard
2. press F11 to enter the debug menu
3. click “Export Clipboard to File”
For most installations your exported file will be in the following location:
C:\Users\[Your Username Here]\AppData\Roaming\SpaceEngineers\Export
In this image, my two example builds are at the of the folder
4) Set up File Structure
Go to C:\Users\[Your Username Here]\AppData\Roaming\SpaceEngineers\Mods (it’s right next to your export folder)
In this folder, you can play around with locally stored mods.
create a new folder in your mods folder. The folder name determines the mod name.
Inside there, you should add:
-A folder named “Data”
-A image named “thumb”
like this:
The Data Folder will house all of the inner workings of the mod itself, while the image is just the thumbnail of the mod if it gets put on the workshop.
After doing this, add another folder named “Prefabs” inside your “Data” folder. This new folder contains all of your builds inside it.
While we are at it, we will stick in our exported files from earlier:
5) Adding Configuration Files
Now, we made our grids and moved them into our mod. All we have left is actually telling the game to let them into the party.
We will start by going to the local files of Space Engineers.
Upon selecting “Browse Local Files” in your steam library, you will be taken to a folder like this:
Open the “Content” Folder and then open the “Data” Folder
Inside “Data”, there will be a whole long list of folders and files. We want to copy two files to our mod:
-“FactionTypes.sbc”
-“Stations_Economy.sbc”
FactionTypes_Economy.sbc stores all of the trades that the player can make with stations (including vehicles.
Stations_Economy.sbc stores the names of all of the stations that can appear.
Copy these into the Data Folder of your mod like so:
6) The Fun Part: pointing SE to your builds
Now, take your text editor of choice and open the files for your builds and the two economy files you just added.
The process for adding grids will be different for stations and vehicles, to I will break up this section into two sub-sections
I. Stations
Look in your station’s export file.
On the 5th line it should have an area where it says
Take the station name in quotes and copy it…
Now take a look at Stations_Economy.sbc:
(it should look like this)
There are four main blocks of stations:
-Mining Stations
-Orbital Stations
-Outposts (planetary stations)
-Space Stations (Deep Space)
It is worth noting that modded planetary stations do not seem to work
You will also see lines of code that look like this in each block:
This line is from the Planetary station block
Follow these steps to add the station:
Find the block you want to place your station into.
Copy the example I gave and paste it into the chosen block.
replace Economy_Outpost_1 with the station name you copied from the station export file.
Like this:
And you are done!
II. Vehicles
If you haven’t read the part on stations beforehand, go read it. it will help.
Just like with stations, open the export file of your vehicle and locate the vehicle name in the file:
copy it.
Now open FactionTypes_Economy.sbc and scroll to the bottom. You will see a long list of all the purchasable vehicles:
add to the list
like so:
bam. It’s in.
But there is one last thing for vehicles…
7) Configuring Vehicles
Sadly, the little TC-201 is ion-only, meaning it can only function in space. However, we did not tell the game this, so it can spawn on planets!
To fix this, we need to add some extra information to the export file.
first, open the file and find the line:
directly underneath it, you can start adding extra data:
some examples include
changes the ship’s name in the store block to just “TC-201” rather than the ship name of “TC-201 Miner”
Sets the ship’s Description in the Store Block to “A little miner capable of helping out bases and larger ships in gathering resources”
Sets the ship’s icon on the store block’s list to a specified image
Sets the ship’s image when hovered on in the store block to a specified image
This set where the vehicle can spawn. [Location] can be replaced with “Space”, “PlanetWithAtmosphere”, etc.
A fixed version of our sample ship would look like:
8) Having a station automatically be set to faction colors
it’s easy.
anything painted in a red with hue of 0, max saturation, and max vibrance will automatically be set to faction colors
9) eat garlic bread
Garlic bread was a requirement…
anyway, you’re done!
The next few sections will show some of the other things you can do with economy modding.
enjoy your work!
Adding Custom Trades
Remember http://FactionTypes_Economy.sbc?
In here you can also add custom trade offers!
Just like how you copied lines to add vehicle offers, you can do the same with material offers.
Adding custom grids to Contracts
You also can add custom vehicles and items to contracts!
Contract Data can be found in ContractTypes_Economy.sbc. You will need to copy this into your mod just like with FactionTypes_Economy.sbc.
Just like with FactionTypes_Economy.sbc, you will need to copy and paste a line of code containing the name of your grid into the corresponding list.
Requirements for modded ships (per contract)
Repair Contracts
The grid just needs some damage. That’s it.
Search Contracts
The grid just needs to exist.
Escort: Pirates
Needs a running copy of a pirate drone script. I recommend installing this:
https://steamcommunity.com/sharedfiles/filedetails/?id=819391384
Escort: Ally
Just needs to be a working ship with a remote control block
I hope you enjoy the Guide we share about Space Engineers – How To Make Custom Economy Stations, Vehicles, and More!; if you think we forget to add or we should add more information, please let us know via commenting below! See you soon!
- All Space Engineers Posts List
Leave a Reply