How to modify Scrap Mechanic
English
So, there are few ways to modify your game for comfort / interesting gameplay.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
- Download uploaded mods
Go to "Community" -> "Workshop" -> in search type "Scrap Mechanic" -> search for needed mods in filter categories "Blocks and Parts" and "Custom Game".
This is the easiest way, but some mods like "craft-able component kits" and "custom crafting recipes" needed to be installed manually.
This means, that you need to rewrite some game files. Next way is about it.
-------------------------------------------------------------------------------- - Rewrite game files
----
Hard way, if you uncertain in your actions, don't do it.
----
==============================================
**IMPORTANT** --- I recommend to copy unchanged files you want to modify and save them for a backup, If game crashes after the changes. The same i recommend to do with changed files, because after update or uninstalling the game, files will return to their unmodified state and you will lose your changes. (items from increased stacks and extra slots)
==============================================
2.1 Crafting recipes
You need to go to your games directory. To do it, go to game page in your "Library" -> tap the settings button -> installed files (or so, i have steam on different language) -> show installed files (or so). if done right, you have File Explorer opened with game files. Next step, go to "Survival" folder -> "CraftingRecipes". You will see files in .json format. So, most of players don't need different cookbot or dressbot recipes (if you want to, you can modify them to), we skip other files and open the "craftbot" file with notepad or, if you have, visual studio.
*Important -- new recipes work only in fresh new worlds or before crafting a craftbot, so they won't appear in already existing worlds.
After opening, you will see this:
---------------------------------------------------------------------------------
// this file is generated
[
{
"itemId": "5530e6a0-4748-4926-b134-50ca9ecb9dcf",
"quantity": 5,
"craftTime": 7,
"ingredientList": [
{
"quantity": 1,
"itemId": "f152e4df-bc40-44fb-8d20-3b3ff70cdfe3"
},
{
"quantity": 1,
"itemId": "1c04327f-1de4-4b06-92a8-2c9b40e491aa"
}
]
},
{
"itemId": "8c7efc37-cd7c-4262-976e-39585f8527bf",
"quantity": 1,
"craftTime": 32,
"ingredientList": [
{
"quantity": 10,
"itemId": "1f7ac0bb-ad45-4246-9817-59bdf7f7ab39"
},
{
"quantity": 2,
"itemId": "f152e4df-bc40-44fb-8d20-3b3ff70cdfe3"
}
]
},
---------------------------------------------------------------------------------
and it will be long.
To make your own recipe, you need to type it in file like this:
---------------------------------------------------------------------------------
{
"itemId": "8c7efc37-cd7c-4262-976e-39585f8527bf",
"quantity": 1,
"craftTime": 32,
"ingredientList": [
{
"quantity": 10,
"itemId": "1f7ac0bb-ad45-4246-9817-59bdf7f7ab39"
},
{
"quantity": 2,
"itemId": "f152e4df-bc40-44fb-8d20-3b3ff70cdfe3"
}
]
},
---------------------------------------------------------------------------------
I'll explain it, so if you understand everything above, you can skip to next line (--------)
---------------------------------------------------------------------------------
{ -- this is our start of the recipe, without it, game won't think this is a recipe, or crash.
"itemId" -- it's the item codename, first Id used for main item ( that you receive after craft ), second and other Id's will be used to name secondary item( the one you use to craft ) or items, if it multi-item recipe.
"quantity" -- first quantity used for amount of items you will recipe after the craft. you can type any number you want after : , but don't go nuts and type "999999999", you won't be able to even pick it up from craftbot. Second quantity used for amount that you need to have to craft item. ( I just thought, i don't know what happens, if you type 0 in second quantity. Will it be free to craft or just crash the game? )
"craftTime" -- time the item need to craft
"ingredientList" -- list of items needed for craft, starts with [ and end with ] , each item typed in { } , if more than one item, add , after { } , last item don't need , after } .
} -- and this is our end.
I recommend to copy the example, paste between other recipes and just change what written after "itemId" : , "quantity" : , and "craftTime" :
---------------------------------------------------------------------------------
Item list with ID's you will find in "Survival" folder -> "Scripts" -> "game" -> survival_items.lua ( don't change anything in the file ).
Open file with notepad and search for needed items ( main and secondary ).
2.2 Game scripts
If you want to change your max amount of health or increase stacks, slots in chests you will need to rewrite next files
( same directory as survival_items.lua )
Max. health, food, water, stamina etc. -- SurvivalPlayer.lua
Duration of day and night -- SurvivalGame.lua
Damage from sledgehammer and spudgun -- "nameoftool".lua ( same directory, folder "tools")
Time of growth (crops), amount of given seeds and crops after harvest -- hvs_plantables ( different directory -- "Survival" -> "Harvestables" -> "Database" -> "HarvestableSets" )
Chance and amount of spawned hostiles and units, time of their respawn -- survival_spawns.lua
Health, damage etc. of hostiles and units -- survival_units.lua
Loot drop chances and quantity -- survival_loot.lua
Slots in chests -- Files -> ( interactive , interactive_shared ) ( different directory -- "Survival" -> "Objects" -> "Database" -> "ShapeSets" )
Increased stacks -- Files -> ( component , consumable , consumable_shared , plantables , resources ) (different directory -- "Survival" -> "Objects" -> "Database" -> "ShapeSets")
(I really didn't find where to change block stacks, if i find i will rewrite this part)
Increased stacks in specific containers ( gas , battery etc.) -- Files -> ( interactivecontainers , interactivecontainers_shared ) ( different directory -- "Survival" -> "Objects" -> "Database" -> "ShapeSets" )
Change block characteristics -- blocks ( different directory -- "Survival" -> "Objects" -> "Database" -> "ShapeSets" )
I won't explain whole process (for now). Just open files with notepad, find needed line ( for example | local SpawnMultiplier = { | in survival_spawns.lua ) and change some numbers.
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
It's all i know for now, if you want something that is not there, you can write in the comments
This guide was created by its original author on the Steam Community. Are you the author and want it removed? Request removal.