Subscribe
 Post #1
 3rd December 2006
Spoco's Avatar
February 2005
1,516 Posts
A tool for changing props mass.

Primary fire: Set weight, Secondary fire: Copy weight, Reload: Reset weight to original weight

Also has a nice bubble that tells you the current mass of a prop.



Update 1.21:
  • Added duplicator support

Download 1.21:


Update 1.2:
  • Reset feature is now using the reload function rather than running on "Think" (at the time it wasn't working)
  • Cleaned up the code
  • Changed to addon format

Note: I know it's annoying how the tips disappear behind for example wheel tips. If you ask me, those wheel tips should only appear when you're holding the tool gun with the correct mode (same with the outlines).

Update 1.11:
  • Now compatible with the new STool system
  • Mass can no longer be 0 or lower (can cause a crash)

Update 1.1:
  • Fixed missing tooltracer and sound effects
  • Reload now resets the weight back to normal

Update 1.001:
  • Fixed console flood when player is dead.

Extract to your garrysmod\addons directory.
 Post #2
 3rd December 2006
Emo kid's Avatar
December 2006
13 Posts
Nice man i need this for all my building purposes.
 Post #3
 3rd December 2006
Naka's Avatar
August 2006
496 Posts
Thanks a lot! This will be very useful for building.
Also, please use garrysmod.org for your file hosting, Ihud sucks.
 Post #4
 3rd December 2006
Spoco's Avatar
February 2005
1,516 Posts
Naka posted:
Thanks a lot! This will be very useful for building.
Also, please use garrysmod.org for your file hosting, Ihud sucks.
Sorry, I got pissed, because I had already compressed it in a RAR and garrysmod.org doesn't accept RAR files.

Edit:

Now it doesn't accept my zip files packed with WinRAR either.
 Post #5
 4th December 2006
Starce's Avatar
September 2006
799 Posts
Damn man, this is great!
 Post #6
 4th December 2006
Gold Member
Nick Nack's Avatar
April 2005
3,172 Posts
SPOCO! YOUR IN GM10 LUA! Man, I can't even BEGIN to imagine things you will be making in the future.
 Post #7
 4th December 2006
Gold Member
CrazyCraps's Avatar
April 2005
3,852 Posts
Did you make the nice little "Time Spent on Server" thing?

Anywho, very useful little tool. Well done. :)
 Post #8
 4th December 2006
Gold Member
huntskikbut's Avatar
November 2005
5,825 Posts
Godamn, everyone is making the stuff I've been workin' on.
 Post #9
 4th December 2006
Spoco's Avatar
February 2005
1,516 Posts
CrazyCraps posted:
Did you make the nice little "Time Spent on Server" thing?

Anywho, very useful little tool. Well done. :)
Yes, I made Timespent script for GMod 9, and this one on the screenshot, I made today. Didn't release it yet, but I will if anyone wants it.
 Post #10
 4th December 2006
Starce's Avatar
September 2006
799 Posts
Doesn't work for me.. :( i really need help, i get the tool out, but it won't let me click an object and set the weight...some of my Stools don't work either....damn.
 Post #11
 4th December 2006
Spoco's Avatar
February 2005
1,516 Posts
Starce posted:
Doesn't work for me.. :( i really need help, i get the tool out, but it won't let me click an object and set the weight...some of my Stools don't work either....damn.
Check your console for any errors. This is probably related to some other script of yours.
 Post #12
 4th December 2006
Gold Member
Yotrig's Avatar
August 2006
5,239 Posts
Thanks a lot Spoco, downloaded :D

Good job :)
 Post #13
 4th December 2006
Starce's Avatar
September 2006
799 Posts
No console errors...:\
 Post #14
 4th December 2006
Iron Man's Avatar
October 2005
190 Posts
What is the directory folder? If the folder isn't called directory what is it called?
 Post #15
 4th December 2006
Festival's Avatar
September 2006
1,058 Posts
I
LOVE
YOU!
 Post #16
 4th December 2006
mr psycho's Avatar
August 2005
55 Posts
Awesome! I was going to start on something like this in a few days because I really dislike using hoverballs to counter heavy weight. You've saved me a lot of time that I can now spend messing around, thanks!
 Post #17
 4th December 2006
Starce's Avatar
September 2006
799 Posts
This comes up when i try to spawn thrusters:


LS: stools/thruster.lua:40: attempt to call method 'CheckLimit' (a nil value)
 Post #18
 4th December 2006
Xth3Cr0wX's Avatar
July 2006
1,314 Posts
Can you please put this into a zip? My WinRAR does not work.
 Post #19
 4th December 2006
Spoco's Avatar
February 2005
1,516 Posts
Starce posted:
This comes up when i try to spawn thrusters:


LS: stools/thruster.lua:40: attempt to call method 'CheckLimit' (a nil value)
You probably have problems with the updates. You need to follow these instructions:

#gmod @ irc.gamesurge.net posted:
Problems with update? Delete garrysmod/lua & garrysmod/gamemodes folder and try again.
Xth3Cr0wX posted:
Can you please put this into a zip? My WinRAR does not work.
Done.
 Post #20
 4th December 2006
Games Moderator
Jimbomcb's Avatar
February 2005
10,575 Posts
Why do I always make something and go into the Lua forum to find it's just been released. Damn you Spoco
 Post #21
 4th December 2006
007SILVERTOE's Avatar
June 2006
1,601 Posts
God this is perfect. Expecialy if you make a flying hoverball fort! Nice Job.
 Post #22
 4th December 2006
Games Moderator
Jimbomcb's Avatar
February 2005
10,575 Posts
Good thinking on making it switch to the stool when clicked though, gold star.
 Post #23
 4th December 2006
PackRat's Avatar
August 2005
690 Posts
Indeed, many thanks for the tool switching code, that was a big help when I was struggling with the Wing Tool.

Might I suggest one change:

function ThinkWeightPanel()
    if flip == nil then 
        flip = true
        return
    end		
    if cpanel:IsVisible() then
        if flip then
            LocalPlayer():ConCommand("gmod_tool weight")
            flip = false
        end
    else
        flip = true
    end
end

That check I added at the top stops it from spamming the console with null variable errors when the player dies.
 Post #24
 4th December 2006
gardskarsten's Avatar
October 2006
68 Posts
this will help me place a camra on a cs scanner so i can se what people are doing :D
 Post #25
 4th December 2006
Joshgt2's Avatar
November 2006
46 Posts
Does this also apply for changing the weight of grouped things welded together or just each one individually?
 Post #26
 4th December 2006
Spoco's Avatar
February 2005
1,516 Posts
PackRat posted:
Indeed, many thanks for the tool switching code, that was a big help when I was struggling with the Wing Tool.

Might I suggest one change:

That check I added at the top stops it from spamming the console with null variable errors when the player dies.
No, that was not the cause. It was the client-side worldtip function that caused the error by accessing the player objects GetActiveWeapon and GetClass. When the player is dead, there is no active weapon so GetClass will fail trying to access a NULL entity.

But, I fixed that now, just download it again.

Joshgt2 posted:
Does this also apply for changing the weight of grouped things welded together or just each one individually?
Works only on single objects at a time.
 Post #27
 4th December 2006
†TYRANICK†™'s Avatar
July 2006
1,169 Posts
SWEET! thanks man!
 Post #28
 4th December 2006
FeezX's Avatar
August 2006
34 Posts
Thanks, really nice mod & good idea :D
 Post #29
 4th December 2006
SkAzZ's Avatar
December 2005
49 Posts
Brilliant, can make my flying objects now.
 Post #30
 4th December 2006
ThaBuilder's Avatar
May 2005
210 Posts
This should be very useful! I can't wait to try it out.
 Post #31
 4th December 2006
</God>'s Avatar
May 2005
76 Posts
I downloaded and tried this out yesterday. Very useful! Thanks! :D
 Post #32
 4th December 2006
Starce's Avatar
September 2006
799 Posts
Spoco posted:
You probably have problems with the updates. You need to follow these instructions:





Done.
Ok, let me try that.

Yay, it worked. Thanks!
 Post #33
 4th December 2006
OverloadUT's Avatar
December 2006
389 Posts
I tried this out yesterday and it worked very well, thank you!

My only suggestion would be to add an option to reset an object's weight back to what it is by default.
 Post #34
 4th December 2006
TechedRonan's Avatar
March 2005
1,735 Posts
Oh wow, thanks.. I've been asking around for a masschanger for a while now.
 Post #35
 4th December 2006
Streat's Avatar
September 2006
69 Posts
This is very useful! Thanks a lot!
 Post #36
 4th December 2006
Martial Law's Avatar
January 2006
190 Posts
Am I the only one who doesn't see a download link? I really want this..
 Post #37
 5th December 2006
Squid's Avatar
July 2005
760 Posts
Wow I can see this being very useful for making big airships with out using 20 billion hoverballs.
 Post #38
 5th December 2006
ProV's Avatar
December 2005
99 Posts
OK, I used the tool to make my the jeep very light and I added a prop to it at a weight that had the wheels stressed ever so slighly. I got in and in a instant the car went through the map and I was on the desktop of my pc. No error at all. It made me laugh! Other than that great STool!
 Post #39
 5th December 2006
nowhere's Avatar
May 2006
791 Posts
Currently running on my server and working semi-well.
 Post #40
 5th December 2006
Xeon06's Avatar
September 2005
1,074 Posts
Extremely useful, thanks.
 Post #41
 5th December 2006
Gold Member
mikfoz's Avatar
January 2006
14,934 Posts
This looks incredibly useful. Not being able to do this was driving me nuts.
 Post #42
 5th December 2006
panasonic's Avatar
January 2005
661 Posts
Are you talking about a weight gun or a mass gun? I think you mean mass ,since the gravity in source isn't calculated by the earth's gravitational power (9.81).
 Post #43
 6th December 2006
redhood's Avatar
April 2006
72 Posts
OverloadUT posted:
My only suggestion would be to add an option to reset an object's weight back to what it is by default.
I've got to second OverloadUT. Great work though!
 Post #44
 6th December 2006
TGunskill's Avatar
February 2005
54 Posts
Thanks bud. This will help out a lot.
 Post #45
 6th December 2006
Spoco's Avatar
February 2005
1,516 Posts
Update 1.1:
  • Fixed missing tooltracer and sound effects
  • Reload now resets the weight back to normal

Download:
 Post #46
 7th December 2006
Mr. BoBBy's Avatar
June 2006
75 Posts
You are a GENIUS thank you so much for making this, it's extremely useful!
 Post #47
 7th December 2006
40sTheme's Avatar
November 2006
13 Posts
I don't see the download link in the post. I see the 'Download 1.1:', but no link. Any ideas?
 Post #48
 7th December 2006
nowhere's Avatar
May 2006
791 Posts
40sTheme posted:
I don't see the download link in the post. I see the 'Download 1.1:', but no link. Any ideas?
Click the image.
 Post #49
 7th December 2006
Gold Member
mikfoz's Avatar
January 2006
14,934 Posts
This is by far the most simple and useful tool I downloaded in days and the reload function in the update just perfects it. Simple to ues without farting about in lots of bloody chat messages and suchlike.

Now if someone just made a weld/stacker gun that worked a bit similar to easy weld but you could say how many duplicates you wanted to weld/stack just touching each other instead of having to fuck about knowing the size of everything, or even displayed the size in a message window and had a little slider for xyz to overide the automatic thing so you could just point with the crosshairs... That'd be cool.
 Post #50
 7th December 2006
Bobby B's Avatar
December 2006
254 Posts
Good job I can’t stop cracking up though. It’s just how many funny things you can do with this Mod. I made the really elaborate dominos type thing on “GM_CONSTRUCT” And there was the G man at the end and a small paper fell on his head, he hit the ground face first and flipped out on the ground.
 Post #51
 11th December 2006
Versus's Avatar
October 2006
229 Posts
hmm...i can't find the download link.
 Post #52
 11th December 2006
limited06's Avatar
September 2006
196 Posts
Versus posted:
hmm...i cant find the download link.
http://www.garrysmod.org/downloads/?a=view&id=2289

Very nice tool thanks
 Post #53
 12th December 2006
nowhere's Avatar
May 2006
791 Posts
The update broke this and it seems every other STOOL.
 Post #54
 13th December 2006
Deathbringer's Avatar
July 2006
14 Posts
nowhere posted:
The update broke this and it seems every other STOOL.
Yea he's right, the latest update did mess up every stool out, namely the context menu. There is a thread that helps fix them, but somebody responded in it that it still wouldn't work. So I do not know if everybody is just going to redo their stools or if there is a big fix. My suggestion is to update the stool but i don't know.
 Post #55
 13th December 2006
Spoco's Avatar
February 2005
1,516 Posts
Yeah, I need to update the script and then place the files in their correct folders. I'll get on that, later today.
 Post #56
 13th December 2006
nowhere's Avatar
May 2006
791 Posts
Spoco posted:
Yeah, I need to update the script and then place the files in their correct folders. I'll get on that, later today.
Excellent, gold star for you.
 Post #57
 13th December 2006
garry's Avatar
September 2001
9,914 Posts
Spoco posted:
Yeah, I need to update the script and then place the files in their correct folders. I'll get on that, later today.
Try to make it so it doesn't need txt files..

http://forums.facepunchstudios.com/s...d.php?t=249002

Also - I'm hearing that this crashes when you set the mass to 0.
 Post #58
 13th December 2006
darkmaster857's Avatar
January 2005
293 Posts
You my friend, are the new Jesus.

Edit:

You my friend, are the new Jesus.
 Post #59
 13th December 2006
Spoco's Avatar
February 2005
1,516 Posts
garry posted:
Try to make it so it doesn't need txt files..

http://forums.facepunchstudios.com/s...d.php?t=249002

Also - I'm hearing that this crashes when you set the mass to 0.
The slider goes from 1 to 50000, though you probably can set it to 0 if you write it manually or using your console. I'll fix that as well.

Edit:

Updated to 1.11:
  • Now compatible with the new STool system
  • Mass can no longer be 0 or lower (can cause a crash)

Download:
 Post #60
 13th December 2006
Gold Member
Miigga's Avatar
October 2006
4,197 Posts
Haha, I seem to be the first one to get 1.11

This is really useful. ECS can change the mass too, but this lets me see the original mass and everything.

Good job.
 Post #61
 13th December 2006
Cloftefer's Avatar
June 2006
350 Posts
Where is the download? I can't see it on any of the posts as if you deleted them?
 Post #62
 13th December 2006
Schfifty five's Avatar
January 2005
897 Posts
Wheres the download link..
 Post #63
 13th December 2006
nowhere's Avatar
May 2006
791 Posts
Schfifty five posted:
Wheres the download link..
Garrysmod.org went down, that's why there's no download link. Check this page: http://www.garrysmod.org/ and when it comes back up the download link will come with it.
 Post #64
 14th December 2006
Gold Member
angelangelv2's Avatar
November 2006
8,375 Posts
Damn it, I hate how the fancy tags from garrysmod.org don't show up if it's being overused.
 Post #65
 14th December 2006
Cyborgmatt's Avatar
May 2005
659 Posts
Download Link: http://www.uploads.gaming-resources....htstool111.zip
 Post #66
 14th December 2006
slashedhack's Avatar
September 2006
267 Posts
Sweet, thanks Cyborgmatt.
 Post #67
 18th December 2006
Kedoshin's Avatar
December 2006
74 Posts
This is just what I'm in need of:)

Lua King'd.
 Post #68
 18th December 2006
Unreal1997's Avatar
July 2006
81 Posts
Just thought I'd mention something I discovered with the mass STOOL. Even with the new hoverball "power" setting extremely heavy things still require a crapload of them.

However if you use the mass STOOL to make the hoverballs themselves very heavy, they will become very powerful.
 Post #69
 1st January 2007
AltF4Dead's Avatar
August 2006
19 Posts
This stool is probably the most useful thing I've ever used in gmod10.

thumbs up
 Post #70
 1st January 2007
thed3f's Avatar
August 2006
285 Posts
More people need to support this stool in their servers.
 Post #71
 1st January 2007
atkinghobo's Avatar
June 2005
11 Posts
Don't make heavy objects low weight... They freak out and fly most of the time.
 Post #72
 1st January 2007
sHiBaN's Avatar
April 2006
898 Posts
It doesn't for me. Only if you put it to 1. So I can make heavy bridges light enough that I can pick it up with the Gravity Gun.
 Post #73
 5th February 2007
Spoco's Avatar
February 2005
1,516 Posts
Updated the code, requested by Chaussette.

Download 1.2:
 Post #74
 5th February 2007
Chaussette's Avatar
December 2006
339 Posts
Thanks! :D

It's certainly the most simpel and useful STool!
 Post #75
 25th February 2007
706's Avatar
February 2007
3 Posts
I'm still very newbie to gmod and especially downloads, but I can't get this to work. I extracted the files to the addon directory, but now what? Is it supposed to automatically appear in the tools menu, or under the weapons tab? Do I have to type something into the console?
 Post #76
 25th February 2007
Spoco's Avatar
February 2005
1,516 Posts
706 posted:
I'm still very newbie to gmod and especially downloads, but I can't get this to work. I extracted the files to the addon directory, but now what? Is it supposed to automatically appear in the tools menu, or under the weapons tab? Do I have to type something into the console?
It should automatically appear to your spawn menu. Make sure the directory structure is sustained when you extract the files.
 Post #77
 28th February 2007
OneMech's Avatar
June 2005
47 Posts
Very useful. Thanks!^_^
 Post #78
 28th February 2007
Ghost-19's Avatar
April 2006
453 Posts
Just for the record, Weight and Mass are two different things...
 Post #79
 22nd March 2007
Gold Member
tad2020's Avatar
December 2006
1,656 Posts
I been using the old verion of this that I modifed to support duplication. These are the changes I make weight an Entity Modifier.

local function SetMass( Player, Entity, Data )

	if ( Data and Data.Mass ) then
		if (Data.Mass > 0) then
			Entity:GetPhysicsObject():SetMass(Data.Mass)
			if ( SERVER ) then
				duplicator.StoreEntityModifier( Entity, "MassMod", Data )
			end
		else 
			umsg.Start("WeightSTool_1", self:GetOwner()) 
			umsg.End()
		end
		
		return true
	end
	
end
duplicator.RegisterEntityModifier( "MassMod", SetMass )


function TOOL:LeftClick( trace )
	if CLIENT and IsReallyValid(trace) then return true end
	if not IsReallyValid(trace) then return false end
	
	if not Weights[trace.Entity:GetModel()] then 
		Weights[trace.Entity:GetModel()] = trace.Entity:GetPhysicsObject():GetMass() 
	end
	local mass = tonumber(self:GetClientInfo("set"))
	
	SetMass( Player, trace.Entity, {Mass = mass} )
	
	return true;
end
 Post #80
 25th March 2007
HiCom Raz's Avatar
September 2006
347 Posts
Nice. Should definitely help with my thruster operations! ^.^
Reply


All times are GMT. The time now is 03:55PM.

Facepunch Studios 2009 - Server 'Softlayer 2.0'