Scrap Mechanic

Scrap Mechanic

45 ratings
Destructible Corn (Survival Mod)
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
26.582 KB
18 May, 2020 @ 4:59am
1 Change Note ( view )

Subscribe to download
Destructible Corn (Survival Mod)

Description
Makes the corn destructible by vehicles

Installation
- Navigate to your Scrap Mechanic installation folder (In your Steam Library right click on Scrap Mechanic then click on Properties. From there go to the "Local files" tab and click "Browse local files")
- Open another window in the same location but then navigate up to the steamapps folder and then down to workshop/content/387990/2100848690
- Copy the Survival folder (drag and drop) and erase the file

You can now destroy corn using vehicles if you're massive enough and go fast enough (the treshold is pretty low so yoou don't have to worry too much about it)
19 Comments
Funtime Gabe 2 Jan, 2024 @ 3:53pm 
yeah this isnt needed anymore
Vajdani 2 Apr, 2022 @ 4:13am 
this was made way before the devs added breakable corn
David "Blackoil" Wilson 1 Apr, 2022 @ 7:13pm 
bro this mod should not exist
ZoLatKam 1 Sep, 2021 @ 4:16pm 
wrgarland - Not by vehicles. Just a few years ago, Corn was a solid as a rock when you hit it with your vehicle. It was terrible.
wrgarland 1 Sep, 2021 @ 1:27pm 
hasn't corn always been destructible in survival mode???
Vajdani 28 Aug, 2020 @ 4:51am 
Hey! Does this still work?
HastyTurtle 18 Jun, 2020 @ 1:04pm 
How did you get to that kind of code and stuff? I have an idea for a mod but i don't know how to make it.
yankeevader 7 Jun, 2020 @ 12:26pm 
I love being able to hit the corn with my car but after awhile I had too many laying around and didnt want to stop and pick them up. and it was beginning to affect the game with 3 of us playing
so I modified the file to destroy when hit by anything but the hammer

in the CornPlant.lua file you can change 2 lines of code to achieve this - Change self:sv_onHit() in both the _onProjectile and _onExplosion to self.harvestable:destroy()

I also changed the one on impact velocity from self:sv_onHit() to self.harvestable:destroy()
not sure if it was needed but its working exactly as I wanted.



function CornPlant.server_onProjectile( self, hitPos, hitTime, hitVelocity, projectileName, attacker, damage )
self.harvestable:destroy()
end

function CornPlant.server_onMelee( self, hitPos, attacker, damage )
self:sv_onHit()
end

function CornPlant.server_onExplosion( self, center, destructionLevel )
self.harvestable:destroy()
ZoLatKam 5 Jun, 2020 @ 12:36am 
@Spastic Cube - Destroying the corn by crashing into it still allows you to loot it!
ZoLatKam 5 Jun, 2020 @ 12:35am 
@Exund Ah! Fantastic! I've downloaded your copy of the CornPlant.lua & replaced the necessary bits to make it destructable - Works GREAT!