Scrap Mechanic

Scrap Mechanic

How big is the survival map?
How big is the survival map?
< >
Showing 1-9 of 9 comments
Teamkiller May 18, 2020 @ 10:52am 
48x64 cells
MERC Major Gosnell May 18, 2020 @ 12:32pm 
and how big is a cell
Chloe the Kistune May 18, 2020 @ 12:39pm 
Must be pretty darn big cuz I been doing some exploring and havent found the edge yet. I thought it was procedurally generated but apparently not
Golden Golem May 18, 2020 @ 12:49pm 
It is, they are different. Ive got 2 saves and the landmark around the road to the mechanics shop are totally different
Last edited by Golden Golem; May 18, 2020 @ 12:49pm
jintoya May 18, 2020 @ 1:18pm 
it uses an elevation smoothing system with a bunch of "tiles"
tiles: big squares that make up the map, loaded with assets

every time you start a new game it shuffles the tiles according to a randomly generated seed and disperses them across the map, then it smooths the difference in elevation from tile to tile.

the world is not infinite, but generating a map in this way is rather easy and you are only limited by computer memory really...so the answer is "really, really big" and this could change at some point.
Teamkiller May 21, 2020 @ 1:15am 
Found out that cell size is 64 m (tiles can be multi-celled)
It means map size is 4x3 km
Thank you
Xeridox May 21, 2020 @ 4:28pm 
It's actually double that size... In Overworld.lua:

Overworld.cellMinX = -64
Overworld.cellMaxX = 63
Overworld.cellMinY = -48
Overworld.cellMaxY = 47

It appears there is a cell 0 on each axis as well...

So from East to West is 128 cells and North to South is 96 cells...
128x64 = 8,192, or 8.192 KM
96x64 = 6,144, or 6.144 KM
8.192 x 6.144 = 50.331648 square kilometers, which is indeed a pretty big world.

There is actually some code in place in SurvivalPlayer.lua that allows you to see what cell you're in, and I have confirmed that you can't go past the cells shown above.

The crashed ship is always in the same cell (-36,-40), in the southeast corner, as are lots of other POI's, viewable in generate_cells.lua, so you could sort of draw a map on a grid using this knowledge. I may do that later... :)

Need a compass? The sun is always to the south and slightly east. At night you can still see the shadows from the non-existent moon, which is in the same place in the sky (I suspect future updates may change this).

Last edited by Xeridox; May 21, 2020 @ 6:10pm
Xeridox May 21, 2020 @ 6:55pm 
Spoilers ahead! You have been warned...

Here is a map of predetermined POI's on a grid in the current version of SM.

Please note: There is no grass, water, or warehouses as that changes with each version.

The grid may also screw with your eyes a bit...but should help if you get lost.

https://steamcommunity.com/sharedfiles/filedetails/?id=2104655343

Furthermore, if you want to show the cell coordinates:

The file you need is C:\Program Files (x86)\Steam\steamapps\common\Scrap Mechanic\Survival\Scripts\game\SurvivalPlayer.lua

Back it up first, then open the original. There are 3 lines you need to modify, simply by either deleting a "--" from the beginning, or adding one.

Step 1
--------
Search for the following line and add a "--" at the beginning and a space (that's two dashes, without the quotes, you will see other lines with them just a few lines below in the code):

self.cl.hud:setText( "Time", getTimeOfDayString() )

change it to
-- self.cl.hud:setText( "Time", getTimeOfDayString() )

Step 2
---------
A few lines down, delete the two dashes:

-- local text = math.floor( character.worldPosition.x / CellSize )..", "..math.floor( character.worldPosition.y / CellSize )

so it looks like
local text = math.floor( character.worldPosition.x / CellSize )..", "..math.floor( character.worldPosition.y / CellSize )

Step 3
---------
A few more lines down (lots of them with a -- at the beginning)

Again, delete the two dashes from

-- self.cl.hud:setText( "Time", text )

Save the file and run the game. Where the time usually is you should see cell coordinates. They will change every 64 meters.

For me the time no longer appears, but to change it back, simply use your backup file (you DID make a backup before you started monkeying with the code, right?) or just reverse the changes. If the file is still open in your text editor you can just CTRL+U for undo. Have fun :)
Last edited by Xeridox; May 21, 2020 @ 7:13pm
< >
Showing 1-9 of 9 comments
Per page: 1530 50

Date Posted: May 18, 2020 @ 9:46am
Posts: 9