This quickly outputs the world data of your scrap mechanic save game to a json file for display via leafletJS from pre-screenshotted tiles. Not quite as beautiful as my older screenshot method, but SOOOOOoooooo much quicker. This method is somewhat future proof as well. New tiles will still be displayed just blank, but updates should only require a new download of the missing tiles images.
https://the1killer.github.io/scrapmechanictilemap/
!!!! BACKUP YOUR SAVE, not responsible for any issues !!!!
- Really backup your save!
- Download this repoistory, green "Code" button on the top right, or Download Link
- Open terrain_overworld.lua from the downloaded files.
- Copy lines 73-98,
local cells
...to...cells = nil end
- Open terrain_overworld.lua in your game files, e.x. C:\Program Files (x86)\Steam\steamapps\common\Scrap Mechanic\Survival\Scripts\game\terrain\terrain_overworld.lua
- Paste the lines into the game's terrain_overworld.lua, approx line 71, after
updateLocationStorage()
- Load your save game.
- Copy cells.json from your game files C:\Program Files (x86)\Steam\steamapps\common\Scrap Mechanic\Survival\ to the html\assets\json directory in the downloads.
- If hosting on a webserver
- Copy all the files under html/ to your webserver and open index.html and good to go.
- If viewing locally
- Open cells.json, select all text (ctrl-a), copy all text
- Paste text into https://codebeautify.org/jsonminifier and click "minify/compress" then copy the resulting text on the right
- Open html/index.html, on line 26
SMOverviewMap.init();
add two back ticks( ` ) inside the parentheses - Paste the text from Part 2 inbetween the backticks. becomes
SMOverviewMap.init(
`[[{......
`);
- Open html/index.html to view your map
- If you wish, remove or comment (--) the added lines in terrain_overworld.lua to improve game loading times
- Terrain height not really shown.
- Game updates will remove the lua changes, requiring you to re-add them
- How to setup your own free GitHub website
- I think there could be some missing road/cliff tiles as there are many possibilties on how they mesh with eachother. Create an issue with your map seed and I can try to capture them.
- v1.0.0
- Initial Release
If you love this project and want to see more features give the developer a cup of coffee!
Thanks to LionHeartBlue Gaming to making a tutorial video. Most people will need Option 2 listed above and in the video.
Remember to enclose the JSON with back ticks `.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Scrap Mechanic is property of Axolot Games AB, I have no affiliation with them.