Scrap Mechanic

Scrap Mechanic

Laser Tools
147 Comments
Vajdani  [author] 9 Jul @ 10:51am 
I've thought of an easier way of doing it.
At the top of the file, there is a table that defines what collision types instantly kill the laser.

ProjectileManager.killTypes = {
terrainSurface = true,
terrainAsset = true,
limiter = true
}

A clean and simple way of disabling block damage is to add body collisions to it as well.

ProjectileManager.killTypes = {
terrainSurface = true,
terrainAsset = true,
limiter = true,
body = true
}

Now, the projectiles will destroy themselves when colliding with blocks and parts, without harming them.
Time_pug 9 Jul @ 10:40am 
which line in ProjectileManager.lua should I edit to disable block destruction? So far every attempt has just completely disabled the lasers.
Vajdani  [author] 9 Jul @ 10:24am 
There are no damage values, the script just deletes them outright. Do a search for the functions I mentioned earlier( destroyBlock , destroyShape ).
Time_pug 9 Jul @ 10:19am 
I've checked and changed every damage value I could find in all the json files and still the laser will infinitely destroy anything it touches. Having a comment for each function would help a lot with understanding them.
Time_pug 9 Jul @ 10:06am 
where can I find the damage value for placeable items (blocks, electronics etc)
Vajdani  [author] 9 Jul @ 7:24am 
I didn't make any really substantial additions, just a few small ones.
Time_pug 9 Jul @ 7:17am 
I've made multiple backups of my edit so I still have all the original values so nothing will be lost
Time_pug 9 Jul @ 7:11am 
are the other functions still the same so I can just port over my settings to the new one?
Vajdani  [author] 9 Jul @ 6:53am 
Hi, I had a few changes piled up on my end, so I pushed an update just now. It might override some of your changes, sorry about that.

Search for usages of the destroyBlock and destroyShape functions, I used them for destroying blocks and parts.
Time_pug 9 Jul @ 5:59am 
All I could find that could be related to the issue is spherecast and update pos. Literally learning Lua on the spot just to disable block destruction.
Time_pug 9 Jul @ 5:56am 
What line of code is responsible for the projectile penetration for placeable items? I've managed to tweak pretty much everything else except the destruction of blocks. Been working non stop for 4 days now on trying to disable the block destruction and still no luck. Best I was able to do was to cause the laser to freeze in place once it hit a placeable item.
Vajdani  [author] 8 Jul @ 5:35pm 
I would have to code that, no way to do that currently.
B. 8 Jul @ 2:57pm 
I love the laser pistol, but is there a way to change the damage it does primarily to blocks? as it is, it just goes through everything without stopping.
Vajdani  [author] 16 May @ 1:59pm 
The uuid is 69c063fe-385a-4135-8f5e-6247aec89769
Onas 16 May @ 12:03pm 
does anyone know what the item id is for the plasma ammo?
Kototop_CMB 9 May @ 10:09am 
r e a d d e s c r i p t i o n
LelEnox 9 May @ 9:55am 
How to switch mode of the mountable laser ?
HaRaN 21 Apr @ 12:58pm 
if they only will dont destroy creations, some option to turn off destruction. Only damage trees, rocks, bots...
puff_adder 22 Dec, 2024 @ 1:37pm 
The railgun justs really needs a model because it seems to work and shoot right
Vajdani  [author] 22 Dec, 2024 @ 12:15pm 
Tested both of them out again and they're so much worse than I remember, its kinda crazy lol
Yeah, both of these are staying hidden.
puff_adder 22 Dec, 2024 @ 11:58am 
The katana still looks fine without the extra animations but the railgun is kinda not looking all that working in terms of the model.
Vajdani  [author] 22 Dec, 2024 @ 10:09am 
I wasn't satisfied with how the cutting worked, unfortunately no matter how hard I tried to make it better, I just couldn't. We were planning on making custom animations for it. but we only got around to making the cut animations(I think?), after which we got busy with other stuff and all of our plans just fizzled out. Besides those two things, I wanted to add a cost to slicing things but i didnt get around to it.

As for the railgun, its kinda just meh.
puff_adder 22 Dec, 2024 @ 9:19am 
Do you think you could finish the railgun? It looks cool. The katana looks complete though so why is it hidden?
Utka_Agent 21 Dec, 2024 @ 7:40am 
Tysm
:steamhappy::steamthumbsup:
Vajdani  [author] 21 Dec, 2024 @ 7:38am 
1. Go to your steam library, right click on SM and click on Browse local files
2. In the folder path, click on steamapps to go back to that folder
3. Here, you will see a few other folders, click on workshop
4. Click on content , then 387990 . This is where workshop items are stored for SM
5. Type 2843905833 into the search bar, then wait for it to find the folder. That folder contains Laser Tools' files.
6. After clicking on the mod folder, navigate to Tools/Database/ToolSets . Here is where you'll find tools.toolset , which contains all the tools.
7. Open tools.toolset with notepad. You will see that two tools have the showInInventory property set to false . To make them appear in the inventory, set them to true .
After that, you can boot up the game and test the tools. They kinda suck, don't expect to be blown away.
Kototop_CMB 21 Dec, 2024 @ 7:15am 
learn how to do mods
Utka_Agent 21 Dec, 2024 @ 7:13am 
how to unhide them in toolset??
:steamsad:
Vajdani  [author] 21 Dec, 2024 @ 6:46am 
There are 2 more tools that are in the mod but were never finished, so they are just hidden in the inventory. The only way to access them is to unhide them in the toolset.
Kototop_CMB 21 Dec, 2024 @ 4:03am 
what secret items?
Utka_Agent 20 Dec, 2024 @ 3:57pm 
Where is the command or what is it to reach secret items
or where is link to discord serv
Vajdani  [author] 24 Sep, 2024 @ 7:55am 
All parts have detailed descriptions that explain how to use them
Míša hraje 24 Sep, 2024 @ 7:51am 
pls someone now the mounted laser pistol why mine only shoot basic projectile?
John Lennon BACK AGAIN 20 Feb, 2024 @ 8:35am 
horsell common and the heat ray looking ass
Vajdani  [author] 2 Dec, 2023 @ 4:43am 
Mounted weapons - put them in a Plasma Container and connect it to the part
Tools - have the Plasma Batteries in your inventory
dt.siki 1 Dec, 2023 @ 11:11am 
how to load ammo in survival
Vajdani  [author] 30 Oct, 2023 @ 1:37am 
Just hook up a switch to them and turn it on(if youre in survival you have to hook up a plasma container too and fill it with plasma batteries)
Fool On The Hill 30 Oct, 2023 @ 1:24am 
I can't make mounted gun shoot, pls help
BJM8 31 Aug, 2023 @ 3:29pm 
why does it destroy blocks that are like 9-10 durability? seems kinda unfair to me idk, it makes undestructable prisons and stuff less fun even tho the mod is really useful
GigaCars 6 May, 2023 @ 8:41pm 
pew pew pew
Dart Frog  [author] 30 Apr, 2023 @ 2:39pm 
skill issue :lunar2019madpig:
Vajdani  [author] 30 Apr, 2023 @ 2:00pm 
Thank you
Wheatley 29 Apr, 2023 @ 10:13pm 
but not you dartfrog
Vajdani  [author] 10 Apr, 2023 @ 10:05am 
Update's out
Ejcreeper 9 Apr, 2023 @ 8:59am 
thanks
Vajdani  [author] 8 Apr, 2023 @ 10:40am 
Im working on it
Ejcreeper 7 Apr, 2023 @ 9:57am 
Can you make a version for survival or give us a guide or something I am sorry if you dont want to work on it but I really want to use it for survival
Vajdani  [author] 31 Mar, 2023 @ 9:11am 
I guess?
puff_adder 31 Mar, 2023 @ 8:32am 
Is this mod sort of discontinued because you haven't updated in a while.
Vajdani  [author] 31 Mar, 2023 @ 7:59am 
not really
puff_adder 31 Mar, 2023 @ 7:58am 
Are you still working on the knife?