Scrap Mechanic

Scrap Mechanic

96 个评价
Xeridox's SM Survival Mods
由 Xeridox 制作
UPDATED TO 0.6.3. More Vacuum Pipes, Mineral Crystals and more!
   
奖励
收藏
已收藏
取消收藏
Update Notes and Other Info
Latest updates

June 18, 2022
Updated the Map Mod to 0.6.4. No need to update the others as no files were changed. The Map Mod on the workshop has also been updated. If you already subscribed to it, then it will update on your end automatically.

June 10, 2022
The Map Mod is now on the workshop as a custom game. Link in the guide below.

June 9, 2022
More Vacuum Pipes and Mineral Crystals updated to SM 0.6.3. All other mods should also still work. Please let me know if something is out of whack.

The XeriModPack will be added as an official custom game on the workshop when I'm done with it. As SM Survival continues to get better mod support, I will be moving others to the workshop as official mods as well. This guide will remain however, with links to the official mods once they're in place. :)

June 8, 2022
The Map Mod has been updated to SM 0.6.3, and a few improvements have been made. It should also work in multiplayer now.

June 2, 2022:
Mods for SM 0.6.0 are confirmed to still work in 0.6.2.

May 31, 2022:
  • More Vacuum Pipes updated to 0.6.0.
  • Mineral Crystals updated to 0.6.0.
  • More Chance For Metal still works in 0.6.0, no change in instructions needed.
  • No More Fake Foliage updated to 0.6.0.
  • Cell Coordinates updated to 0.6.0 and now include time and direction.

Some updates made to the guide. I removed the oil pump section since we now have oil ponds in the game, and the No More Corn Collision section was removed as it was no longer working and we can drive through corn now anyway. If anyone needs this info back for some reason let me know.

The XeriModPack and Map Mod are not updated yet and will not work with the current version. I'll get to it soon. :)


Disclaimer. Modifying SM files are done at your own risk. I am not responsible for what happens to your computer, SM installation or your sanity.

These mods are unofficial.
Future Scrap Mechanic updates may break these mods and/or cause unwanted side effects. If you're ok with the possibility of re-installing SM after said future update, then you may proceed.

Happy modding :)
More Vacuum Pipes Mod
Adds two new vacuum pipes: a 3-way 'T' pipe and a 4-way 'cross' pipe.

Featured in a video by Dr. Pixel Plays here:
https://www.youtube.com/watch?v=BGur7Cr5Z-s

I rebuilt my automated potato farm...so much neater! :)


You know you want them now...


Dec. 11, 2020: Cross pipe added.


Lots of storage linked together, mostly with T-pipes and a couple of cross pipes.



This mod is for Scrap Mechanic version 0.6.3 and 0.6.4 and may not work with other versions.

Get the mod here:
http://fbs.epizy.com/sm_mods/more_pipes_063.zip

Instructions

Download and unzip the above file into your Scrap Mechanic folder, normally located at
C:\Program Files (x86)\Steam\steamapps\common\Scrap Mechanic\

It should ask you some questions about replacing files and folders...answer yes of course :)

The new vacuum pipes are craftable from the craftbot. Enjoy! :)

Mineral Crystals Mod
Running out of stone piles in your world? Or perhaps those hills they usually grow on are so annoying...

Introducing the Mineral Crystals Mod.




This mod adds mineral crystals, which drop randomly from breaking stone chunks.
The seeds can then be replanted like a normal crop. When fully grown it will spawn a new stone pile, which can be harvested like any other stone pile.

Growing... growing...


Grown!


For obvious reasons, be sure to plant these quite a bit further from each other than you would normal crops.

Works with SM version 0.6.3 and 0.6.4, may not work with older or newer versions.

Get it here:
http://fbs.epizy.com/sm_mods/mineral_crystals_063.zip
Map Mod
Updated to SM 0.6.4.

The old version only showed land and water...


Introducing Map Mod version 2.0.

This version shows more colors for the various biomes, especially the ones many have trouble finding.



Legend

Orange - Autumn Forest
Dark Brown - Burnt Forest
Light Brown - Desert
Purple - Chemical Lake
White - Your current location
Black - Undiscovered area
Green - grassy areas
Blue - water

As before, enter /map into chat to open the map. Escape closes.

This should also work in multiplayer now. I've not been able to test that, so if you notice any problems please let me know.

NOTE: There are two types of this mod, depending on your needs, and there are pros and cons to each:
  • Custom Game - This one installs easier (by using the usual subscribe button), but you must start a new world.
  • File Mod - Requires to manually extract files into the right directory, but there's no need to start a new world.

Link to the custom game: https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2819491460

File mod note, doesn't apply to custom game:
If you need to reinstall Scrap Mechanic, first backup the maps folder, normally found in C:\Program Files (x86)\Steam\steamapps\common\Scrap Mechanic\Survival\Scripts\game. After you reinstall SM and the Map Mod, simply put the backup folder back in place and overwrite any files it asks about.

Link to the file mod:
http://fbs.epizy.com/sm_mods/xeri_map_mod_064.zip

Extract to your Scrap Mechanic root directory, normally found at C:\Program Files (x86)\Steam\steamapps\common\Scrap Mechanic. It should ask to overwrite files and folders...answer yes of course. :)

The XeriModPack
COMING SOON

When I get it done, this will be an official custom game on the workshop. Watch this space for a link in the near future. :)

An unofficial modpack for Scrap Mechanic Survival
by Xeridox


Current mods included:

  • The Map Mod - Never get lost again.
  • Mineral Crystals - Grow your own stone chunks!
  • More Vacuum Pipes - Adds T-junction and cross vacuum pipes.
  • More Chance For Metal - Increases the chance for metal from stone chunks
  • No More Fake Foliage - Deletes most trees and bushes that can't be cut down.
  • Cell coordinates, compass and time added to HUD.

DIY Mods Info
The following are Do-It-Yourself mods, meaning you will be modding SM's files yourself with instructions rather than simply replacing them with downloaded ones. I recommend a good text editor with syntax highlighting, like Notepad++.

These are older mods back when I was first learning how to mod SM, and are pretty much for educational purposes now.

Once the XeriModPack is released as an official custom game, these will be included.

Please remember to back up files before modding them, and back up any worlds you plan to use them in, just in case. Happy modding :)
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 )" equals 1, then you will get metal, otherwise stone.
Change the == to > like this:

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

2 files need to be modded.
Step 1

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",
"categories": [ "Type/Foliage","Environment/Survival/Meadow",
"Environment/Survival/Forest"]
},

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

Step 2
Then backup and open C:\Program Files (x86)\Steam\steamapps\common\Scrap Mechanic\Survival\Terrain\Database\assetsets.json

Delete the following:

{
"assetSet": "$SURVIVAL_DATA/Terrain/Database/AssetSets/Nature/Foliage.json",
"categories": ["Type/Foliage", "Environment/Survival/Meadow"]
},

Save the file and enjoy not having those annoying things in your face when you're trying to explore or slowing your game down. :)
Cell Coordinates, Time, and Direction
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 64x64 blocks.

128x64 = 8,192 blocks
96x64 = 6,144 blocks

Blocks in Scrap Mechanic are 1/4 meter, so you can also say

2.048 KM (E to W)
1.536 KM (N to S)

The crashed ship is always in the same cell (-36,-40), in the southwest 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.


Need a compass? The sun is always to the south and slightly west. 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...

There are other mods that do way better than this one, but for the people who want this one instead or who want to learn unofficial modding, here ya go. :)

You're going to be modding 2 files for this to work...

Step 1
Make a backup of SurvivalPlayer.lua (commonly found at C:\Program Files (x86)\Steam\steamapps\common\Scrap Mechanic\Survival\Scripts\game) then open the original.

Step 2
Open a search box and paste this into it:
function SurvivalPlayer.cl_localPlayerUpdate( self, dt )

A few lines down you will see a section like this:

if character then
self.cl.underwaterEffect:setPosition( character.worldPosition )
self.cl.hungryEffect:setPosition( character.worldPosition )
self.cl.thirstyEffect:setPosition( character.worldPosition )
end


Right after the "end", paste this:


if character then
local text = math.floor( character.worldPosition.x / 64 )..", "..math.floor( character.worldPosition.y / 64 )
local direction = character.direction
local yaw = math.atan2( direction.y, direction.x )
if math.abs( yaw ) < math.pi * 0.25 then
text = text.." E"
elseif math.abs( yaw ) > math.pi * 0.75 then
text = text.." W"
elseif yaw >= math.pi * 0.25 then
text = text.." N"
else
text = text.." S"
end
g_survivalHud:setText( "Time", getTimeOfDayString() .. " " .. text )
end


That's it for that file. Don't forget to save it.

Step 3
Next we're going to modify the Hud.
Backup the file Hud_SurvivalHud.layout (commonly found at C:\Users\xeridox\Desktop\App Dev\SM Mods\Map Mod\Data\Gui\Layouts) and open the original.

Step 4
The second line in the file reads:

<MyGUI type="Layout" version="3.2.0">

Right after that, paste the following:


<Widget type="Widget" skin="PanelEmpty" name="TimePanel" position_real="0 0 0.18125 0.0740741">
<Property key="NeedKey" value="false" />
<Property key="NeedMouse" value="false" />
<Widget type="TextBox" skin="TextBox" name="Time" position_real="0.333333 0.625 0.666667 0.375">
<Property key="FontName" value="InventorySearchText" />
<Property key="Caption" value="00:00" />
<Property key="NeedKey" value="false" />
<Property key="NeedMouse" value="false" />
<Property key="TextShadow" value="true" />
</Widget>
</Widget>


Don't forget to save the file, and we're done. :)

In the top left-hand corner of the screen you should see the time, cell coordinates and direction you are facing.
132 条留言
Xeridox  [作者] 9 月 17 日 下午 7:56 
@glebmilenin743, oil can be pumped from oil ponds in the game now, so I didn't see reason to keep updating it.
glebmilenin743 9 月 14 日 上午 12:50 
where did the oil pump mod go?
Kevan 3 月 29 日 下午 3:55 
Great mods :steamthumbsup:; these still work with the current release of the game (probably cause they don't update it ever)
The extra vacuum pipes are so useful for watering and planting systems
Xeridox  [作者] 2023 年 4 月 9 日 下午 12:43 
@xXEIGXx, I really thought I had all the issues taken care of lol... I guess not! I'll get on it when me and a friend can get into mp and see if I can't fix it. Thanks for letting me know :) Have you tried the custom game mode? I'd like to know if the same happens with it also.
EIG 2023 年 4 月 8 日 下午 11:43 
when i do /map a bunch of white t appears, im a muliplayer client and it works for the host
Xeridox  [作者] 2022 年 12 月 25 日 上午 8:25 
@conterkira31, because pumping oil in Survival mode is in the main game now, and actually works much better than the mod ever did.
conterkira31 2022 年 12 月 25 日 上午 12:58 
why oil pump mod was removed
Peanut Arbuckle 2022 年 8 月 5 日 上午 3:08 
No problem. I'm now enjoying your mod to the fullest! Thank you so much for making it :)
Xeridox  [作者] 2022 年 8 月 4 日 下午 1:07 
Hi Gergoo007, it seems I had 'https' where I should have had 'http' so that's fixed now. Thanks so much for pointing that out. :)
Peanut Arbuckle 2022 年 8 月 3 日 上午 9:39 
Hi! The link to download the More Vacuum Pipes Mod seems to be broken... I was wondering if you could give us an alternative link to download it?