Posts Tagged ‘Garry’s Mod’

gm_mount2 – Use any source-engine content in GMod

February 19th, 2010 120 comments

This addon allows you mounting any source-engine games in Garry’s Mod including default VALVE games, Steamworks content like D.I.P.R.I.P, Left 4 Dead and every installed SourceMod.

You need to have MSVC 2010 Redistributable x86 installed, or it will not work.


The full version includes spawnicons for some models (several MB). The light version doesn’t, so it is much smaller. But you have to generate the icons yourself.


User: anon
Password: anon

Annotations for Left 4 Dead 1/2:
Left 4 Dead maps are not compatible with Garry’s Mod. Don’t try loading them – This will only cause GMod to crash.

Why another mounting addon?
You may know the orginal mounting addon and it’s extension for sourcemods. They work well but I wasn’t really satisfied with the way they work and I disliked their messy sourcecode so I wrote up my own from scratch.
My addon directly integrates into GMod and works on dedicated servers which is not possible without many modifications of the old gm_mount addon.
It also can mount Left 4 Dead and Left 4 Dead 2 which is the main purpose of this addon, which took me over 3 weeks, around 2000 lines of C++ code and much coffee to figure that out.

New puddlejumper in the next release

February 1st, 2009 7 comments

puddlejumperSome of you might have known this already. The new puddlejumper (V3), modelled by VoteKick and coded by LightDemon (based on Catdeamon’s shuttle SENT) will be in the next Stargate Pack release for Garry’s Mod.

So far, I needed to modify some minor code passages to make it work more efficently. But this is not the major work I have done. The main issue was, that the jumper used a hard-coded keyboard layout. You might think “huh, that’s not such a problem”. Well, it’s kind off. I’m a player who uses the left-/right-/up-/down- keys and numpad for gaming instead of the WASD keys. Sadly these keys have been used by LightDemon to handle stuff like zoom in/out so while I flew the jumper, my view always zoomed in and out. (Keys were bound twice)

(Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.)

Anyway, now I coded a system which gives you the freedom to bind your keys to the wished one. I’m quite proud of this work, because it’s 100% Lua and uses some hacks to work correctly. And it is coded object orientated so in future, when LightDemon and VoteKick finished their X302 or Hatak, I can easily add my keyremapper to these ships too.


January 16th, 2009 2 comments

Oh well hi again.

I was busy the last days with finishing my practicum protocol (Get it here. It’s in German), where I made mostly every image, calculated all values while my practicum partner wrote the text. After I got this done the next task applies: Learning for an exam in less than two weeks.

But what I actually was going about to tell you is, that I started working on a little Duplicator enhancement for Garry’s Mod, which should be more userfriendly compared to AdvDupe. I planned to make it an enhancement of the original Duplicator rather than a new tool. It should also load the old AdvDupe saves of course.  Any file action is meant to work like in the windows explorer (that’s where I’m currently at). Spawning should not be that slow and laggy like AdvDupe is (I’ll orientate on VMFSuit’s spawn algorithm). And there will be a way to mass-save stuff, which isn’t constrained to each other (Quad/Circle select).

But I can’t tell you, when it will be readyor if I will ever finish it. It’s just I’m all over busy with other stuff or I get bored by coding due to a simple issue I can’t solve easily.

Categories: Blog, Garry's Mod, Lua, Physics Tags: , ,

The FPS drops in Garry’s Mod are wished!

December 18th, 2008 3 comments

This sounds strange but it’s the truth.
If you still remember my post about the lua garbage collector causing fps drops in Garry’s Mod every five minutes, you know what I’m talking about.

Now I asked garry if he took any review to this issue and he just answered the following:

It’s was an option between a constant smaller FPS drop or a periodic fps drop, I chose the periodic one.

So instead of running the garbage collector constantly in background, lowering the FPS from e.g. 250 to 230 (which is acceptable), he runs it periodically when there is too much garbage. Depending on installed lua addons, this can be every 5 minutes. Then your FPS drop from 250 to 5 – And that can take up to 10 seconds.

This is annoying and nearly made me stop playing Garry’s Mod. I don’t know why he thinks this is better, but he probably didn’t want to get the people with shitty PCs excluded from GMod (which he actually did with the Orange Box update, but this is another point).

So I see no real point why he did it. For me, I’ll still use my little fix which I have posted in the comments of my first rant about this issue. A public fix (downloadable for anyone) will follow too.

Categories: Games, Garry's Mod, Lua, Steam Tags: , , ,

Search terms

October 25th, 2008 No comments

Maybe it’s a bit to early to tell you which search terms using google followed to my blog but here it is:

fps lag every 5 minutes

Yes, this is an evil problem. You better buy a new graphic card my dear.

lua garbage collection game

I remember one of my rants against the Garry’s Mod garbage collection causing horrible fps drops every 5 minutes. Could this be related to the first search term? Who knows Wink

insurgency sucks

Are you just that type of 12-year-old who flames every game which is different to Counter Strike? Insurgency rocks! You just can’t run around and kill everyone with headshots like it’s in CS:S. In Insurgency you have to really play in teams.

tutorial Making your own stargate in garry’s mod using aVoN

Uh, you want to use me to make your own stargate in garry’s mod? I’m not that pleasured getting formed to a super conducting ring a.k.a. Stargate. Sorry. Atleast you spelled my name correctly. Thanks Smile

Categories: Blog, Garry's Mod Tags: ,

Long time no news – So here it is

September 30th, 2008 6 comments
The current two modes for the wallhack

The current two modes for the wallhack

I was quite busy the last days. I’m still learning for my exam on 6th October. It’s physical chemistry – Physics for chemicians. Well I’m not a chemician but chemistry was a course I have chosen additionally to my physics study. I had to chose some and trust me, chemistry was the easiest of all in my opinion.

On the other hand I’m coding in my leasure time on several lua projects. But I have to disappoint you, it’s not the stargate pack.

I’m still with my Poker game and I also started a lua “hack” out of boredome (for personal usage only). It currently has an aimbot and a wallhack. But before you flame me as a “hacker”: I’m none. My intention in coding it is because I can – That’s all. And it’s incredible easy.

The player table. Not finished yet or even functional.

The player table. Not finished yet

To the poker game which I’m coding in Lua: I just added the player boxes. In these boxes you see the player’s cards, their current cash and bets. Again it’s quite impressed by PokerTH which is, obviously, a really cool game.

Ah well: I just started reading some E-Books about super string theory. I’m not really far with it due to the much time it takes but it’s really interesting.

Instead of describing forces or particle as points, it tries to describe them as vibrating strings or branes (imagine branes like a piece of paper you can fold).

The math in it is highly advanced: So far I have seen it uses variation calculus at the beginning then describes the relations between the branes and normal spacetime using differential forms and manifolds. And all in index notation (Physicians like this because it’s easier to see links and short in writing).

You should not consider about trying to understand this theory if you haven’t passed at least 2 or more years of intensive physics study at university. And I’m in 5th semester now (already had 2 years). The book I’m with is by the way Introduction to Superstring Theory by John H. Schwarz. It is supposed to be a 4 lesson lecture to bring a short overview about what string theory is.

Garry’s Mod Garbage Collection causes FPS drops

September 23rd, 2008 11 comments

Two days ago I read about not reusing tables (and other datatypes) in Lua can cause massive FPS drops. I first didn’t want to believe this but now I know it’s real. This also explains an issue I had on my server for months now: My frames per second randomly drop from about 300 to below 10. And that every 5 minutes. The duration of this lag in most cases is around 1 and up to 15 seconds.

The reason for this is the Garbage Collection of Lua. Imagine this the following: You write postcards. Lets say about 2 every 5 minutes. But some are crap so you want to get rid of them – They get into your garbage bin. But your bin can get full of course. So you have to bring it down for waste collection. Lets say this takes 5 minutes: You can’t write 2 more letters during that time: “You lag”.

With GMod Lua this is even worse – It seems Lua does not only bring the garbage down for waste collection: It looks like Lua directly brings it to the next landfill which is miles away – By feet.

You can test this the following way: First of all, rename your addons folder (to make sure no other script interferes).

Now start a new game and enter

lua_run_cl hook.Add("Tick","GC_Makes_FPS_DROP",function() for i=1,10000 do lol = {} end end)

into your console.

Your FPS should be normal now. But wait: Just a few seconds after you entered this your FPS drop to below 1 FPS. And this now every 10 seconds.

What does this script above actually do? Well, remember you writing postcards? The code above writes 1000 postcards on every tick. This means every time the game calculates stuff. This is many hundred, up to thousand times, a second.

“But wait, over 1000*1000 postcards every second – Isn’t that very much?” you might ask now. Well basically yes. It’s much. But remember that these postcards above were empty.
And scripts like Wire,Depthhud and others exactly do similar stuff like my example code. Not so often, but full of data and often enough to call the Garbage Collection at least every 5 minutes.

And seriously doesn’t make a lagging game you stop playing it? For me it does.

Categories: Garry's Mod, Lua Tags: ,

I finished the Card-VGUI

September 18th, 2008 6 comments


I just finished the card-vgui for my Poker game I currently code in Lua. The ranking is nearly done, the pot is coded and I thought: Hell yeah, next step will be the VGUI.

Another reason why I did it was because it’s horrible to identify the different cards by e.g. D.Q (Diamonds Queen) or S.7 (Spades Seven) – Just to name some.

Some information about the VGUI: You can resize it without any issues and only those textures which are necessary are saved.

E.g. the suits and only the upper half of the J,Q,K are stored in materials. The rest is done by the VGUI. This probably increases the code of the VGUI from about 30 to 130 lines compared to those which uses every card as imaged directly. But this decreases the size of the necessary textures from several MB to just around 236 kB.

Categories: Blog, Garry's Mod, Lua Tags: , ,


September 13th, 2008 16 comments
Royal Flush: The best in Hold'em you can get

Royal Flush: The best cards in Hold'em

Poker is an awesome game. I especially like Texas Hold’em so I decided to code a poker engine in lua!

It’s currently only finished to the part where everyone gets cards and chips. This was easy.

The current thing which nags me are sidepots: Let’s say A has 100, B has 50 and C has 100. Minimum to bid is 100. So A bids 100, B can’t bid more than 50 so he goes all-in and C just puts the required 100 to fill the pot.

This creates a sidepot for A and C with a total of 2*(100 – 50) = 100 and a pot for B with 3*50 = 150 he can win.

Sounds easy, but is really eating my brain cells. Currently it works for especially the situation I mentioned above. But it fails if A bids 50, B goes all in with 100 and A just calls by filling the pot with 50 more bucks.

I’m sure I can fix this. The only thing I’m really afraid of is coding a GUI for the engine *ugg*

Categories: Garry's Mod, Lua Tags: ,