Scrap Mechanic

Scrap Mechanic

Ocen: 45
Destructible Corn (Survival Mod)
   
Przyznaj nagrodę
Ulubione
Ulubione
Usuń z ulubionych
Rozmiar pliku
Zamieszczono
26.582 KB
18 maja 2020 o 4:59
1 lista zmian ( zobacz )

Zasubskrybuj, aby pobrać
Destructible Corn (Survival Mod)

Opis
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)
Komentarzy: 19
Funtime Gabe 2 stycznia 2024 o 15:53 
yeah this isnt needed anymore
Vajdani 2 kwietnia 2022 o 4:13 
this was made way before the devs added breakable corn
David "Blackoil" Wilson 1 kwietnia 2022 o 19:13 
bro this mod should not exist
ZoLatKam 1 września 2021 o 16:16 
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 września 2021 o 13:27 
hasn't corn always been destructible in survival mode???
Vajdani 28 sierpnia 2020 o 4:51 
Hey! Does this still work?
HastyTurtle 18 czerwca 2020 o 13:04 
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 czerwca 2020 o 12:26 
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 czerwca 2020 o 0:36 
@Spastic Cube - Destroying the corn by crashing into it still allows you to loot it!
ZoLatKam 5 czerwca 2020 o 0:35 
@Exund Ah! Fantastic! I've downloaded your copy of the CornPlant.lua & replaced the necessary bits to make it destructable - Works GREAT!