Skip to content

Latest commit

 

History

History
77 lines (59 loc) · 4.59 KB

Readme.md

File metadata and controls

77 lines (59 loc) · 4.59 KB

0.6.6 Update Broke JSON

Scrap Mechanic's Nov 0.6.6 update broke the JSON export to file method, for a workaround see the github issue with workaround. I have emailed the developers about the issue but with the holidays will probably be a while for a response.

Introduction

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.

Example

https://the1killer.github.io/scrapmechanictilemap/

INSTRUCTIONS

!!!! BACKUP YOUR SAVE, not responsible for any issues !!!!

  1. Really backup your save!
  2. Download this repoistory, green "Code" button on the top right, or Download Link
  3. Open terrain_overworld.lua from the downloaded files.
  4. Copy lines 132-157, local cells ...to... cells = nil end
  5. Open terrain_overworld.lua in your game files, e.x. C:\Program Files (x86)\Steam\steamapps\common\Scrap Mechanic\Survival\Scripts\terrain\terrain_overworld.lua
  6. Paste the lines into the game's terrain_overworld.lua, approx line 130, after CreateCellTileStorageKeys() within the Load() Function.
  7. Replace tile_database.lua in your game files with the one from the downloaded files. E.x. C:\Program Files (x86)\Steam\steamapps\common\Scrap Mechanic\Survival\Scripts\terrain\overworld\tile_database.lua
  8. Load your save game.
  9. 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.
  10. If hosting on a webserver
    1. Copy all the files under html/ to your webserver and open index.html and good to go.
  11. If viewing locally
    1. Open cells.json, select all text (ctrl-a), copy all text
    2. Paste text into https://codebeautify.org/jsonminifier and click "minify/compress" then copy the resulting text on the right
    3. Open html/index.html, on line 26 SMOverviewMap.init(); add two back ticks( ` ) inside the parentheses
    4. Paste the text from Part 2 inbetween the backticks. becomes SMOverviewMap.init(`[[{......`);
    5. Open html/index.html to view your map
  12. If you wish, remove or comment (--) the added lines in terrain_overworld.lua to improve game loading times

Some things to note

  • 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.

Changelog

  • v1.0.0
    • Initial Release

Donation

If you love this project and want to see more features give the developer a cup of coffee!

paypal

Tutorial Video

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 `.

Tutorial Video))






Creative Commons License
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.