Take On Mars

Take On Mars

Not enough ratings
HOW TO: Creating Mods or Addons
By Mr. Monochrome [Hood Certified]
A Step-By-Step Guide
   
Award
Favorite
Favorited
Unfavorite
Step 1 - Extract the game files
Configlists, vanilla scenario files and worlds are located here:

Steam\SteamApps\common\Take On Mars

A short explaination of each:

Configlists - These control what shows up in the printer list or editor.
'Vanilla' scenario files - The default scenarios you'll find like Mining site C-03.
Worlds - Provides several settings for changing all planets and their locations.


Fig. 1 - Main game files

However we will need to extract the remaining game files to have access to everything in-game.

Goto the Steam Library where all your games are listed. Left click the entry for 'Take on Mars' and on the right side click 'Play' and select 'Open Launcher'. On the launcher window left click the 'Developer' tab and then left click 'Extract Game Data'. (See Fig. 2)


Fig. 2 - TkoM Game Launcher showing 'Extract game data' button

Now assuming you've created a 'New Folder/Directory' on your hard drive and gave it a name like 'TKOM Game Files'. Locate this folder and left click on it to highlight it but we don't want to open the folder/directory. So be careful not to double click it! Then left click the 'Choose' button and the game files will extract to this folder. (See Fig. 3)


Fig. 3 - Selecting a directory we've created to extract the game files to

Now that we've extracted the remaining game files we can continue making a new mod/addon.


Fig. 4 - Our directory showing the extracted game files
Step 2 - Addons Menu

After the main menu has loaded left click on 'Addons'.
Step 3 - Create A New Mod/Addon

Left click on 'Create New Addon' from the 'Addons' menu.
Step 4 - Mod/Addon Properties

Filename - Enter the filename for your mod/addon, this will appear in 'My Computer' or similar file explorer when browsing your computer's drives.

Mod - Check this if you want to create a mod.
(Mods overwrite exisitng game files so be careful!! As this could cause an existing item in-game to disappear if your mod overwrites it or chages something.)

Addon - Check this if you want to create an Addon.
(This will 'add' new content to the game without overwriting existing files)

Total Conversion - Rarely used by the community, but check this if your creating a completely different game using the TKOM game files. This could be a FPS, RTS etc.

Display Title - Enter the title you want the mod/addon to display when viewing from the 'Addons' menu.

Dependency - This section is for making an addition to an existing Mod/Addon already on the workshop. Unless you want your mod to require another to be present for it to work just check 'Game' and leave the rest alone.

Click 'OK' when your done and the game will ask if you want to open the newly created mod/addon directory.
Step 5 - Mods
If you've followed the steps above we should be looking at the directory for our newly created mod. Now let's have some fun and try modding something in game.

MOD #1: CHANGING THE QUANTITY AND WEIGHT OF A BARREL (See Fig. 1)


Fig. 1 - Screenshot showing barrel quantity and weight locations on HUD.

Follow Steps 2-4 above to create a mod and enter the following:


Fig. 2 - Mod properties window.

After entering the filename, addon type, and display name shown in Fig. 2, go ahead and left click the 'Ok' button. The game will ask if you want to open the folder for the mod we've just created. Click 'Ok' or 'Yes' and we should get the following. (See Fig. 3 below)


Fig. 3 - The mod directory for the mod we just created.

If you're wondering where the folder for the mod is stored you can locate it here:

<Drive Letter>:\Steam\userdata\<Steam ID>\244030\local\addonpacks
<Drive Letter>:\Program Files\Steam\userdata\<Steam ID>\244030\local\addonpacks
<Drive Letter>:\Program Files(x86)\Steam\userdata\<Steam ID>\244030\local\addonpacks


So for this section we've called our mod qtyweightbarrel and we can find it here:

Steam\userdata\<Steam ID>\244030\local\addonpacks\qtyweightbarrel
Program Files\Steam\userdata\<Steam ID>\244030\local\addonpacks\qtyweightbarrel
Program Files(x86)\Steam\userdata\<Steam ID>\244030\local\addonpacks\qtyweightbarrel


If you gave your mod a different name the path in which to find it is the same but it won't be called qtyweightbarrel as we've done so in this guide.

PAT YOURSELF ON THE BACK!!!!
We've located the game files, extracted the rest of them, created a mod and know where we have to look for it. Now it's time to get into the nuts-n-bolts of the game and change how heavy our barrel is and how much it can hold. Ready?

CHANGING THE QUANTITY

Soon...

CHANGING THE WEIGHT


We need to open 2 file browser windows with the following paths. The first one is:

TKOM Data (Date Here)\scripts\entities\controllers\takemetomars\buildingblocks


The first directory opened.

When we extracted the game files we put them into a folder called TKOM Data Files (Date), If you labelled it something else look for that the rest of this guide is the same.

Also we need to open qtyweightbarrel which is the mod we just created. Which is located here:

Steam\userdata\<Steam ID>\244030\local\addonpacks\qtyweightbarrel
Program Files\Steam\userdata\<Steam ID>\244030\local\addonpacks\qtyweightbarrel
Program Files(x86)\Steam\userdata\<Steam ID>\244030\local\addonpacks\qtyweightbarrel




Go to the window showing the directories for our mod and create the following directories:

scripts -> entities -> controllers -> takemetomars -> buildingblocks

Go to the window showing the directories for the extracted game files and open the same path we just created in our mod directory. Are you starting to see where this is going?

Open this path:

<Drive Letter>:\TKOM Data (Date Here)\scripts\entities\controllers\takemetomars\buildingblocks

Copy machine_resourcebarrel.h from the above path and place it into:

<Drive Letter>:\steam....qtyweightbarrel\scripts\entities\controllers\takemetomars\buildingblocks

Go to the window showing the directories for our mod

We should be in the scripts\entities\controllers\takemetomars\buildingblocks directory the we created above but the directory should have the file machine_resourcebarrel.h which we just copied from the TKOM Data files (Date) folder.

Now open machine_resourcebarrel.h with notepad++ or wordpad and look for the following line:

const float RSCBARREL_MASSPERUNIT = 0.5;

A higher value means the more resource the barrel fills with the heavier it will be. So if we make it read:

const float RSCBARREL_MASSPERUNIT = 0.0;

Now the barrel will weigh nothing no mater how much we fill it with a resource. Pat yourself on the back we've now changed the barrel weight. Since we're just doing some simple modding I'm not going to get into how insane you can tweak this number. Just remember the more resource (O2, CO2, etc.) you fill the barrel with in game, the heavier the barrel will get based on this number.

Save the file and close it.



Step 6 - Addons
Now that we've mastered making a mod using step 5 above let's try adding something new to the game.
Step #: Uploading & Updating To Steam
Soon...
A few final words...
If any of the above seems too complicated or confusing feel free to leave a comment below or even start a disscussion. There are several veteran players standing by to help out. No questions is too stupid just try to be as precise as possible so we understand what it is you might be stuck on.

Another useful way of learning the difference between mods and addons is subscribing to one on the workshop, going into the 'addons' menu in-game, left clicking the mod/addon and then left clicking the 'copy and extract' button. This will extract the files to the same place your newly created mod or addon is created. This way you can look over how someone else made there mod/addon and get a general idea of where to start.

A word of caution though... looking at other's extracted mods/addons is fine... but robbing their code and then uploading it isn't. If your thinking of going that route I'd suggest asking the author first and give them credit on your workshop page if it includes their work.
Glossary
Short explanation of each folder/files:

anm
configlists
cutscenes
gui
materials
obj
particles
physics
scenarios
scripts
sounds
system
textures
worlds
addon.xml
12 Comments
Slimger 10 Aug, 2024 @ 4:02pm 
I can't figure out how to change the chemical ratios, the ConfigList folder contains lists, but where exactly do I change this?? Please tell me...
Mr. Monochrome [Hood Certified]  [author] 29 Sep, 2022 @ 12:40pm 
@Hiltz

Yes. If you don't remove that folder the sky in-game with a mod active will change it from 'space' to 'blue sky'.
Hiltz 29 Sep, 2022 @ 9:27am 
I have the blue sky glitch after creating a mod as well. Are you referring to the "skypreset" folder in the extracted game files?
ErikV70 21 Jun, 2022 @ 1:33pm 
Good stuff. Will play a bit with this. Fantastic game.
Olly 22 Apr, 2020 @ 4:14am 
This is really helpful. Looking forward to more updates about addons, if you're still updating this
Mr. Monochrome [Hood Certified]  [author] 7 Nov, 2019 @ 6:38pm 
@ryan_

You need to delete the files or folders located in the 'Skypreset' folder.
ryan_ 7 Nov, 2019 @ 8:47am 
The question is about creating a simple mod . Not addon.
Why, when I create it, upload it to the server, start the game with it, my Martian sky disappears. Instead of the yellowish sky of Mars, I have a blue earthly sky. What's wrong ?
Mr. Monochrome [Hood Certified]  [author] 7 Feb, 2019 @ 1:23am 
I've added more content to the 'Mods' section, I will be including screenshots showing the various steps ie. file copy, windows needing opened.. etc.

My life has become a bit hectic as of late and I've only been posting on the forums... kinda turn for the worst type life.
Shiftend 22 Nov, 2017 @ 9:06am 
How would one go about changing the pressure on a planet? From say 600 Pa to 100 kPa?
Harbingerman 12 Sep, 2017 @ 11:10am 
Thank you for the time to help !