Archive

Archive for the ‘Garry’s Mod’ Category

gm_mount2 – Use any source-engine content in GMod

February 19th, 2010 aVoN 63 comments

Description
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.

Download

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.

SVN-Repository

Url: http://svn.daggeringcats.com/mount2
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.

gm_mount2 – Mount everything in GMod – Current state

February 5th, 2010 aVoN 21 comments

In the past two weeks, I have been working on gm_mount2, an adaption but also totally rewrite from scratch of this addon for GMod.

My intention first was making it mount games automatically if you install it serverside (the way it is in that link needs heavy modifications to make it run) and an easy integration into GMod’s default mounting-menu.

This was done really easily and I started thinking about “why can’t garry make GMod mount L4D?”. I took some more deeper research into it and found out, that L4D and L4D2 don’t use GCF-files to store their models, sounds and everything in – They use VPK files which are unsupported for mounting in the OrangeBox version of the Source-Engine where GMod runs on.

Luckily it rushed into my mind that Nemesis, the coder of GCFScape, has a library called HLLib which allows reading from VPK containers. It took me around 2 hours to figure out how HLLib works and I made my first successful attempt in reading from VPKs.

But now the torture began: How shall I tell GMod to read from VPKs? My idea was overriding default FileIO functions of Source which are stored in the interface IFileSystem and IBaseFileSystem. My idea was using MS Detours which is known to be detectable by VAC so I searched different ways for about 3 days before I got told “VAC in GMod is active but does not ban” (yet).

So the plan was clear: Detouring the methods of the interface and intercept if a file within a VPK is requested. It was all so clear and easy in my head but I got beaten down by reality really fast again. The methods of the interface I have to hook/overwrite are virtual, which makes them a pain in the ass to hook. It took me 2 days with the help of mainly Jinto before I was able to hook those. If any developer is interested in, you can find my VDETOUR script here.

Hooking now worked but I first had to figure our a fast and efficient way of tracing opened files so I can tell it’s either a file within a VPK or a “normal file”. This took me 3 more days.

Yes, I suck at ragdoll-posing - In the console you see what the filesystem has done etc and in the background you see Francis

Today I had my first successful attempt reading a file from within a VPK in GMod with GMod’s lua function file.Read but it just read about 500 letters at max – how silly.

Recapitulation: It was a pain in the ass to implement. Especially because my lack of knowledge of GMod’s internals. It could have been so much easier to implement if I’d be the mod-coder.

Update:

Today I made the successful attempt in loading a model of L4D in GMod using my module. It works flawless! No crashes etc. Now I only have to implement some minor stuff like file-searching and the lua-interface. Maybe one ore two more days and I can release it!

Categories: Blog, C++, Computer, Games, Garry's Mod, Modules Tags: , ,

Rusty Bullet hole

August 29th, 2009 aVoN 7 comments

The secret phrase, it is!

Categories: Games, Garry's Mod Tags:

New exploit in GMod

July 19th, 2009 aVoN 5 comments

Lately, people managed to exploit a “feature” in the SQLite module of GMod (gm_sqlite.dll) to write data anywhere on your harddisk.

They use the ATTACH command of SQLite3 which works the following: It attaches a new database to the current default one. If that file you specified does not exist, it will be created. This is where they managed to exploit it: They attache a new database into your autorun-folder and call it something like “name.bat”. Then they add BATCH code to that database which is saved in plaintext in that file. Now if you reboot your system, windows executes this batchfile. The filecontents then look like this.

This is a dangerous exploit and just garry can fix it.

Edit:

Garry fixed it the yesterday’s update.

Categories: Computer, Exploit, Garry's Mod, Lua Tags:

A new server

March 26th, 2009 aVoN 8 comments

The main hosters of YaS, including Flamehaze,Neic0, W0rf0x and me are thinking about to get a new server.

We aren’t sure yet which, but we thought about at least of getting a root-server with 4GB ram and a Core 2 Duo or a 8GB ram with a Xeon CPU. The prices are quite high but with 4 people paying for it, it’s cheaper than any virtual server you could otherwise get (which has a much worse performance).

Example: My server costs around 30€ a month and it’s a virtual server. Sharing the best root server we think about to get would only cost 25 € a month for each of us – while having a around 10 times better performance than my server has.

The idea is, to run a linux host system on it with the virtualistion Xen and then install (at least) one Windows Server via Xen. The pros for this are we don’t need to pay the monthly higher fee due to the Windows license general server-hosters take. We can use our own license. And luckily I have one laying unused around here at home Smile

Edit:

We deiced to buy this baby here. Intel Xeon Dual 2x 3.00+ GHz, 8 GB DDR2, 2x 750 GB.

Edit:

The new server is now available but still needs to be configured.

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

Videos in GMod and other things

March 19th, 2009 aVoN 7 comments

yasadToday I created a vison I had months ago: Placing HTML-based “adverts” ingame in order to tell people to register on YaS or playing videos ingame.

Coding it was quite hard because I had to use the very poorly documented cam.Start3D2D() function to draw VGUI elements in the world. Well I had success and here is how it looks like. The panels have “animation”-modes in which you can play e.g. youtube videos. But this mode is really expensive and lowers you FPS from 200 to 70 (without animation-mode you have 160 fps if you see such a panel and 200 if not).

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

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

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

The Atlantis’ gate new dialing animations

March 6th, 2009 aVoN 6 comments

Today I implemented the slow diallingmode for the Atlantis gate. I finished it in less than 30 minutes but finetuning it took longer (I have been told I implemented it incorrectly).

Anyway, it’s now finished and working. The fast-dial also has been improved to look like the slow diallingmode – but being faster.

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

Categories: Computer, Garry's Mod, Lua, Stargate Tags:

Garry broke GMod again *updated*

March 3rd, 2009 aVoN 8 comments

It is already well known that Garry tends to be hypersensitive to bugs or exploits on his game Garry’s Mod. He removes malicious code which can be exploited to crash servers. This is good so.

But his latest change was truly hypochondric: He disabled the ability to write to subfolders.

But let’s stop for a moment now and find out why this change is unecessary bullshit:

When Garry’s Mod first came out on Steam, you were only able to write to the /data folder and only to .txt files (reading was possible in the whole folder of garrysmod and you could create subfolders in /data such as /data/myaddon/). This was good so.

Recently an individual named Chrisaster came (I don’t want to blame him how for what he did) and used Garry’s command cl_lua_datafolder. This command can change the /data folder to any location on your computer. So he did create several fake-servers. People who joined got their /data folder changed to e.g. their desktop and Chrisaster spammed it with textfiles. (Truly annoying).

After Chris reported this, garry did not only decide to remove this exploitable command (which would be really sufficient to fix this issue), he also disabled the ability to write to subfolders (reading is still possible). The problem now is, that since Garry’s Mod has been released on steam (over 2 years ago) there have been many many many addons using the ability to write to subfolders. With this change, suddenly they become incompatible over night (those who used subfolders – And 90% of all addon which used the /data folder had their own subfolders in it)

Just some few addons, which are reall popular and now became useless:

  • Advanced Duplicator: Saving of files will not work properly anymore. People will not be able to see that file.
  • Expression Gate (Part of Wire): Same count’s for this. You are unable to save and load new files
  • ULib/ULX: An admin mod. It’s now unable to save new bans as it could before (bans still work but all additional data such as “Reason” and “Banned by” in future bans will be unavailable)

This is just a short list (I don’t know all addons) and I did not list my own addons (SySLib,Stargates) which suffer from the same issue.

All over, this is the (let’s guess) third update by garry, which totally breaks addons for no reason just because he became hysteric about issues, which aren’t any (Just remember, when he removed the ability to change your name ingame with no reason – From that day, all RP Gamemodes got broken).

Well, what does that mean after all? Well, if he doesn’t reverts this change, I will quit GMod, including my Server and all my addons I did so far.

I know, there is a way to get something similar as before via binary modules, but this way is hacky.

Edit:

He fixed it.

Categories: Computer, Garry's Mod, Lua, Stargate, Steam Tags:

VALVE did it again

February 21st, 2009 aVoN 4 comments

There was an update again for the orangebox engine today with the following changes:

Orange Box Engine

  • Fixed stats and achievements not working in Half-Life 2: Episode Two and Portal
  • Fixed incompatibilities with MODs

This again rendered Garry’s Mod useless on the serverpart. People again were unable to join due to the “Invalid Steam Key Size” issue. The cause is, VALVE probably forgot to update the serverfiles too.

If this hasn’t been fixed yet (I’ve been busy the whole day), there is a temporal solution for serverhosters:

Open Steam on your client computer and go to steam/steamapps/<username>/garrysmod/bin and copy the files engine.dll and steam_api.dll to your server’s scrds/orangebox/bin folder. Make sure, you have shutdown srcds before.

Now people can join again.

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

SteamID change for OrangeBox games

February 17th, 2009 aVoN No comments

steamid_change1Some of you may have noticed the issue of not being able to connect to gameservers due to Invalid Steam key size after the last update anymore with any of your OrangeBox games (Team Fortress 2,Day of Defeat:Source,Garry’s Mod,…Wink and Left 4 Dead.

The reason is VALVE changed the way the SteamID is denoted, which was actually supposed to be a unique ID per steamaccount before (At least everyone thought this).

Before, mostly every ID started with STEAM_0Mad:Y where X and Y are various numbers. Now it changed to STEAM_1Mad:Y in the mentioned games above.

You may think, this is quite a tiny changed (which it actually is), but it has far reaching consequences, if you didn’t had a STEAM_1Mad:Y ID before.

  • If you own games, which do not run on the OrangeBox Engine, you now have two SteamIDs.
  • Every ban on a server is purged.
  • Every routine using SteamIDs is now obsolete. This includes Statistics, AdminMods and for Garry’s Mod even more: Here, SteamIDs are widely used for saving any kind of data per steamaccount. Such as various Wire stuff or Duplicator Copies (= savegames)
  • Because of the issues above, serveradmins now have to change every steamid to STEAM_1Mad:Y in order to make their server work as before. This is serious work!
  • For those serveradmins who changed all the IDs already: We can’t be certain if VALVE changes this back again. So we get twie the work Frown

So you see, the recent update was more like a fuckdate. We generally know this from other well known gamedevelopers (I’m not going to name now), but VALVE hasn’t made such a update yet, which renders much stuff incompatible just for bare arbitrary.

Edit:

I just got from here, it’s a bug and VALVE is going to fix it:

—–Original Message—–
From: hlds_linux-bounces (AT) list (DOT) valvesoftware.com
[mailto:hlds_linux-bounces (AT) list (DOT) valvesoftware.com] On Behalf Of Jason Ruymen
Sent: Tuesday, February 17, 2009 7:36 PM
To: Half-Life dedicated Win32 server mailing list;
hlds_linux (AT) list (DOT) valvesoftware.com
Subject: [hlds_linux] Update coming for SteamID change

We’re hoping to have a fix for the SteamID change live within about an hour.
This will be an optional update.

Jason

Edit 2:

How expected, valve fixed it. Thank you!

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