The basic template for adding a new recipe with two ingredients then becomes: We just need to copy this piece of code, change the item ID referers, quantity, and time, and we got a whole new recipe! That means we can add any recipe we want! Cool. Modifying any of these numbers means the recipe will be changed in the game! So if we change the “crafTime” to 6, it will only take 6 seconds to craft. Also, it will take us 12 sec to craft, and we will only get 1 cone as a result.
#Scrap mechanic commands code#
This piece of code tells us that in order to make a crafting cone, we will need 10 metal and 1 ink ammo. In fact, it does so quite clearly! So let’s dissect a recipe.īelow, we see the recipe to craft a “Cone”. We can see that this garbage refers to some of the codes we have seen before. So that’s another YIKES! But let’s focus on what’s important.
#Scrap mechanic commands how to#
So now that we know how to look up item names, let’s take a look at how recipes are stored in our beloved crafting stations / craftbots. So, now we know that if we want to refer to basic metal, we have to use the code:Īnd for the pink chemical, we have to use the code:īottom line: if you want to work with items, look up their code in the item_names.json file! Understanding Crafting Templates We can check the same examples for the objects “MetalBlock1” – basic metal, and for “Chemical” – the nice pink stuff. This image shows that if we want the game code to understand what we mean by a “battery” we have to make it refer to Let’s try to find the infamous “battery”:
And we will need these codes to make our own recipes. So that’s a big oof! But what all this basically means is that each item has a unique code assigned. Now when opening the file, it’ll look something like this: So let us take a look at the following file first: Luckily, there is one file which contains the translations between ‘our language’ and ‘computer language’. The game assigns each object/item in the game to a code, which is pretty unreadable for most of us.
To do this, we will learn from the existing code and utilise this information to synthesize our new code. In order to start modifying the code of the game, we need to understand a little bit how it is built and what we can modify. Reading The Recipe Code Learn To Modify It You can open these files in normal Notepad, but it will be a bit more difficult. Now the important files we need to focus on are the following two (for now):įor the following section, I suggest you open both files in a program like Notepad++.
#Scrap mechanic commands full#
We are going to Survival and then CraftingRecipes, making your full path as follows: Now that you’ve found this folder, let’s head up to the right folder needed here.