Scrap Mechanic

Scrap Mechanic

Not enough ratings
Creations inside Tiles
By Donyti_Qramixy
This guide describes workarounds for putting blueprints inside tiles.
No third party programs are required.
I tried to make this guide fairly accessible to many player.

Руководство на русском
   
Award
Favorite
Favorited
Unfavorite
Introduction
Generally speaking, in Scrap Mechanic's Tile Editor you can't directly put blueprint inside a tile.

But it is possible in Scrap Mechanic Mod Tool's Tile Editor for Custom Game. When you edit tiles here, blueprints are referred to the Custom Game ID. Then we have to replace the tile ID with the Custom Game ID. This is to reference the blueprints in the tile, not the blueprints in the Custom Game.

The guide describes multiple ID swaps. In theory this should help when you have already posted a tile in workshop and want to add blueprints to an existing tile. If you change the original UUID of a tile, you will lose the connection between it and the worlds containing this tile.

Careful! Resaving tile in normal Tile Editor will result in loss of blueprints.
Detailed Guide Contents
1. Preparation
1.1. Create a tile
1.2. Write down your tile UUID
1.3. Temporary change tile UUID
1.4. Launch Scrap Mechanic Mod Tool
1.5. Create Survival Template custom game
1.6. Change custom game UUID to tile's original UUID
1.7. Create "Blueprints" folder in custom game
1.8. Terrain Assets from Workshop
2. Blueprints
2.1. Find your blueprints
2.2. Copy your blueprint
2.3. Change .json to .blueprint
2.4. Rotation and Position (Recommended)
2.5. Blocks and Parts from Workshop
3. Tile Editor
3.1. Open Tile Editor in Mod Tool
3.2. Open your tile
3.3. Open blueprints tab
3.4. Place your blueprint
3.5. Duplicates of blueprints (Recommended)
3.6. Tile rotation (Optional)
3.7. Save the tile with "Save"
4. Completing the Tile
4.1. Change tile UUID back to original
4.2. Copy "Blueprints" to tile folder
4.3. Blueprints Correction
4.4. New UUID for custom game
4.5. Create a world with your tile
4.6. Upload to Workshop (Optional)
1. Preparation
1.1. Create a tile
If you don't have a tile, create one.



1.2. Write down your tile UUID
Your tiles are located at the path "C:\Users\[YourUser]\AppData\Roaming\Axolot Games\Scrap Mechanic\User\User_[YourSteamID]\Tiles".
Find your tile and open its folder. Open "description.json". "localId" is the tile's UUID. Write it down for the steps 1.6 and 4.1.



1.3. Temporary change tile UUID
In tile's "description.json" temporarily change the tile UUID. You may replace the last symbol of the tile UUID with any digit. Tile UUID must be restored to its original UUID after completing paragraph 3.



1.4. Launch Scrap Mechanic Mod Tool
You can find the Mod Tool in your Steam library.



1.5. Create Survival Template custom game
In Mod Tool go to File > New Mod > Custom game > Survival Template.
This custom game is temporary. It is necessary to access blueprints in tile editor.



1.6. Change custom game UUID to tile's original UUID
Your custom game is located at "C:\Users\[YourUser]\AppData\Roaming\Axolot Games\Scrap Mechanic\User\User_[YourSteamID]\Mods\[CustomGameName]". You also can open it in Mod Tool in Files window: File > Open Folder.



Open "description.json". Replace custom game localId with the original tile UUID (from step 1.2.).



1.7. Create "Blueprints" folder in custom game
Create folder "Blueprints" in custom game folder ("...\Mods\[CustomGameName]"). This is necessary to put blueprints in it in order to access them in the Tile Editor.



1.8. Terrain Assets from Workshop
Skip this step if you are not using any terrain assets from Workshop.
To use Terrain Assets from Workshop in the tile, you need to copy them in custom game, so they don't disappear.
Dependencies (links to terrain assets) can be found in tile's "description.json":



Go to "...\Mods\[CustomGameName]\Terrain\Database" and open "assetsets.assetdb". At first, assetsets look like this:



For example, let's go with Terrain Assets by Lord Pain. Its fileId is 1331879173. To find it locally, go to Steam > Library > Scrap Mechanic > Properties > Installed Files > Browse. You are now in "...\steamapps\common\Scrap Mechanic". Go to "...\steamapps\workshop\content\387990\1331879173" - that's the folder of Terrain Assets by Lord Pain. Go to "...\1331879173\Database\assetsets.json":



Add assetSetList from "assetsets.json" to "assetsets.assetdb":



From "...\1331879173" copy folders Collision, Database, Mesh, Textures to your custom game folder. Congrats, now you have Terrain Assets by Lord Pain in the Tile Editor!

2. Blueprints
2.1. Find your blueprints
Your blueprints are stored in "C:\Users\[YourUser]\AppData\Roaming\Axolot Games\Scrap Mechanic\User\User_[YourSteamID]\Blueprints".
Sort folders by date in descending order to find the latest blueprints.



2.2. Copy your blueprint
Open blueprint folder and copy "blueprint.json" to "...\Mods\[CustomGameName]\Blueprints".



2.3. Change .json to .blueprint
Rename "blueprint.json" to "[nameItAsYouWant].blueprint".
Extension .blueprint is necessary to display blueprint in the Tile Editor.



How to make file extensions visible in Windows 10:
1. Click the View tab in File Explorer.
2. Click the box next to File name extensions to see file extensions.

2.4. Rotation and Position (Recommended)
Unfortunately, if you use a blueprint saved in Lift, you will not be able to change the rotation or position in the Tile Editor without snapping to the grid. Even if you change it in object properties and it displays correctly in Tile Editor, it will be broken when you create a world.
To solve this problem and do more flexible rotation and position, you can edit blueprint. For convenient blueprint editing you can make blueprint more readable with the help of json formatter: jsonformatter.curiousconcept.com. As an example, we look at a blueprint that contains several bodies and shapes. Simply put, there are bodies in creation: wheels, doors, etc. Each body contains many blocks and shapes. To move and rotate objects freely in Tile Editor, it is necessary to add parameter "type": 0 at the end of each body.



After editing don't forget to validate your blueprint.



2.5. Blocks and Parts from Workshop
They should work fine, except they don't display in Tile Editor. You can add them similarly to step 1.8.

3. Tile Editor
3.1. Open Tile Editor in Mod Tool
In Mod Tool go to Editors > Tile



3.2. Open your tile
In Tile Editor go to File > Open and choose your tile.



3.3. Open blueprints tab
In Asset Library (bottom left) choose "B" - blueprint



3.4. Place your blueprint
For convenient placement you can enable option "Transform around origin" (hotkey [X]).



3.5. Duplicates of blueprints (Recommended)
After saving a tile, several differently rotated and positioned creations will have the same rotation and position offset. Only general rotation and position will be saved for both objects and their offset position and rotation will be the same.
If you want more than 1 identical objects with different properties (restrictions, rotation offset, grid position offset), then create different blueprints.



3.6. Tile rotation (Optional)
Blueprints are not displayed on tiles in World Builder. If there are no landmarks by which you can determine the rotation of the tile, you can draw/build a marker. After completing this guide and creating a world in World Editor (inside the game, not Mod Tool), erase the marker in Mod Tool Tile Editor and resave the tile.



3.7. Save the tile with "Save"
In Tile Editor go to File > Save. Save your tile with "Save" option to rewrite it, not with "Save As".

4. Completing the Tile
4.1. Change tile UUID back to original
Change the tile UUID back to the original one. It was written down in step 1.2.



4.2. Copy "Blueprints" to tile folder
Copy "Blueprints" folder from custom game folder to the tile folder.



4.3. Blueprints Correction
If you have completed step 2.4:
Check blueprints, there should be no "type":1 in body if you don't want it to be static and snapped to grid. You need to change it to "type":2 to make it static and free-placed. For the objects that are meant to be dynamic, just leave "type":0.

4.4. New UUID for custom game
Generate new UUID for it, to avoid possible conflicts with the tile. UUID can be generated here: uuidgenerator.net.

4.5. Create a world with your tile
Create a world with your tile and see if it works correctly. If you are going to edit tile again, don't forget steps 1.3, 1.6 and 4.1.

4.6. Upload to Workshop (Optional)
You can upload your tile to the Workshop in normal Tile Editor. Make sure you don't resave tile here, or it will result in loss of blueprints.
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3264007062
When you are completely done, you may delete custom game or save it for later.
Conclusion
Thank you for going through this guide!
Let me know if you found any mistakes or inconsistencies.

3 Comments
-_- 2 Feb @ 8:41am 
123
#ff0088 Fafał 4 Jul, 2024 @ 2:02pm 
we got a guide to insert blueprints intho a tile before chapter 2
SniperAsp67 14 Jun, 2024 @ 1:30pm 
br123