Scrap Mechanic Survival – How to Enable Mods (Corn Collision, Cell Coordinates, etc.)

A guide on how to enable mods (corn collision, cell coordinates, etc. in Scrap Mechanic Survival.

How to Enable Mods?

No More Fake Foliage Mod

This gets rid of trees and bushes which cannot be cut down or collided with. It does NOT get rid of the really large trees (which are fewer in number) or ground clutter. Please note this may also remove those assets from creative mode as well, so I strongly encourage making a backup first.

Please note your installation folder may be different from mine…

Backup the following file, then open the original:

C:\Program Files (x86)\Steam\steamapps\common\Scrap Mechanic\Data\Terrain\Database\assetsets.json

Find the ‘foliage’ entry that looks like this:

{

“assetSet”: “$GAME_DATA/Terrain/Database/AssetSets/foliage.json”,

“category”: “Foliage”

},

Delete ALL of that entry, including the first and last brackets and the comma.

Save the file and enjoy not having those annoying things in your face when you’re trying to explore or slowing your game down. 🙂

No More Corn Collision Mod

Yes, corn is how we get milk from Wocs…Other than that, corn is evil. We should be able to drive right through it…

…and now you can!

Introducing the No More Corn Collision Mod (or, The No More Evil Corn Mod).

This will allow you to pass through corn (in a car or on foot), yet leave it where you can still hit it with the hammer.

First, navigate to your Scrap Mechanic\Survival\Harvestables\Database\HarvestableSets folder.

Backup the file “hvs_farmables.json” just in case you mess up.

Open the original file and search for:

  • “col”: “$SURVIVAL_DATA/Harvestables/Collision/Farmables/hvs_farmables_cornplants_col.obj”,

Paste the following code right after that:

“collides”: {

“character”: false,

“body”: false,

“projectile”: false,

“melee”: true

},

Don’t forget to save the file.

Play the game and never crash into corn again. 🙂

Of course, you can play with those values…but “body” means any player-made creation. If projectile is true you would be able to shoot the corn.

More Chance For Metal Mod

This will give you a higher chance for metal from stone chunks.

Your SM installation folder may be different, but this is the default.

The file you’re looking for is:

  • C:\Program Files (x86)\Steam\steamapps\common\Scrap Mechanic\Survival\Scripts\game\harvestable\StoneChunk.lua

Back it up first before you modify it.

This line controls it:

  • local harvest = math.random( 3 ) == 1 and obj_harvest_metal2 or obj_harvest_stone

So, whenever “math.random( 3 )” is 1, then you will get metal, otherwise stone.

Change the == to > like:

  • local harvest = math.random( 3 ) > 1 and obj_harvest_metal2 or obj_harvest_stone

If it doesn’t give you enough just increase the 3 to a 5 or something.

Don’t forget to save the file.

Show Cell Coordinates Mod

This will show the cell coordinates to help you know your location in the world.

First off, a little info on the world in which we live…

From East to West is 128 cells and North to South is 96 cells, with a cell size of 64×64 meters.

  • 128×64 = 8,192, or 8.192 KM
  • 96×64 = 6,144, or 6.144 KM
  • 8.192 x 6.144 = 50.331648 square kilometers

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. The image here is a map of these predetermined cells. It does not show grass, water or warehouses, as these change each time a new world is generated. Fair warning, the grid may be a bit hard on the eyes.

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

And now the mod…

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 )

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 🙂

Oil Pump Mod – by SevereUC

This is NOT my mod, SevereUC made this mod.

This allows your vacuum pump to extract oil from oil geysers.

  • 1: Backup your game files!!!
  • 2: Navigate to your Scrap Mechanic folder.

I believe its normally “C:\steampowered\steamapps\common\Scrap Mechanic” and continue navigating through the folders to get to Scrap Mechanic\Survival\Scripts\game\interactables

  • 3: Open the Vacuum file in notepad.
  • 4: Including the quotations Search for: “AreaTrigger”

The code we are looking for should say:

end

elseif type( result ) == “AreaTrigger” then

  • 6: Highlight the word end and replace it with:
  1. elseif result:getType() == “oil” then
  2. local data = result:getData()
  3. if data then
  4. local partUuid = data[“harvest”]
  5. local amount = data[“amount”]
  6. if partUuid and amount then
  7. partUuid = sm.uuid.new( partUuid )
  8. local container = FindContainerToCollectTo( self.sv.connectedContainers, partUuid, amount )
  9. if container then
  10. table.insert( incomingObjects, { container = container, uuid = partUuid, amount = amount} )
  • end
  • end
  • end
  • end
  • break
  • 7: Save and exit that file.
  • 8: Navigate to: Scrap Mechanic\Survival\Harvestables\Database\HarvestableSets
    • And open: hvs_farmables in notepad or choice of text editor
  • 9: Including the quotations Search for “hvs_farmables_oilgeyser”
  • 10: Add “type”: “oil”, so that the code now looks like this:
  1. “name”: “hvs_farmables_oilgeyser”,
  2. “type”: “oil”,
  3. “color”: “51584dff”,
  • 11: Including the quotations Search for “OilGeyser”
  • 12: Add “harvest”: “1147e59d-6940-42b4-840b-07f05054f5e0”, //oil “amount”: 1
    • so that the code now looks like this:

“class”: “OilGeyser”,

“data”: {

“harvest”: “1147e59d-6940-42b4-840b-07f05054f5e0”, //oil

“amount”: 1

}

  • 13: Save the file and you should be all set for pumping oil.

By Xeridox


Similar Posts:


Share your love

One comment

  1. Im playing around a little with the coords, but I don’t want to miss the current time (or even restart the game to switch),
    I managed to get time + coordinates in one line, but my problem is, the fild is to short so the coords get cut.
    I’m not familiar with LUA, but maybe someone of your Readers (or Friends) knows how to expand the self.cl.hud:setText Field?

Leave a Reply

Your email address will not be published. Required fields are marked *

จัดอันดับเว็บพนัน