gm_mount2 - Use any source-engine content in GMod


DO NOT USE THIS ADDON AT THE MOMENT OR GARRYS MOD WILL CRASH - DOWNLOADS DISABLED (SVN still works)

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

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


DO NOT USE THIS ADDON AT THE MOMENT OR GARRYS MOD WILL CRASH - DOWNLOADS DISABLED (SVN still works)


DO NOT USE THIS ADDON AT THE MOMENT OR GARRYS MOD WILL CRASH - DOWNLOADS DISABLED (SVN still works)

Download
http://gmod.daggeringcats.com/mount2/images/index.php?image=download_heavy.png http://gmod.daggeringcats.com/mount2/images/index.php?image=download_lite.png
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.
The download is automatically generated out of the SVN.

SVN-Repository

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.

Official Addon Site

Finally, I’ve wanted this for months, now we can all mount Left 4 Dead without copying all the shit into your gmod folder. :smile:

Omg Awesome!

I thought you needed to convert the l4d models by removing some stuff and adding some stuff here and there to all vmts. As well as removing some models.

How does it work like that?

because it simply mounts the content into the filesystem and let the filesystem handle that part (at least it should work like that)

I think he meant you had to edit stuff in the vmts themselves, like phong or whatever - since L4D is a different engine.

not a different engine, but a different engine version, and normally should it be backward combatible (maybe there are some effects missing here and there because they were added to the new engine but that shouldn’t affect it that much)

At last! An improved version!

There are threads on how to convert l4d models to gmod. That’s why I was asking.

but somehow it doesnt work for me! I copyed the content of the garrysmod folder into my own garrysmod folder and well, in the Gmod Options there is nothing added!

L4D uses .vtx for models’ texture-allocation while the normal source engine uses .dx90.vtx,.dx80.vtx,.sw.vtx.

In the code, I simply translate names from e.g. .dx90.vtx to .vtx.

And yes, some stuff has to be hidden which is by now: .pre, anim_.mdl, anim_.ani and gestures_.mdl. I simply catch that in the code also.

[editline]02:41PM[/editline]

Can you send me that one? Currently, the models do look low-quality in my GMod (at least, they do not look how I remember them from L4D).
Maybe I can write a wrapper then. Shouldn’t be that hard.

[editline]02:42PM[/editline]

Put every file of the SVN’s garrysmod/* to <steamusername>/garrysmod/garrysmod/*.

If it still doesn’t work, show me your console dump. There should be lua errors then.

I fixed 2 things for you aVoN.

The problem for why it wasn’t loading was the module. It was in lua/include/modules, when it should have been in lua/includes/modules.

Also, I noticed you missed out quite a few source mods that are on Steam, so I have edited one of the .luas to fix it. Here is the chunk that I edited:
[lua]-- Currently copy & paste from the old enhanced-gm_mount by SteveUk. later my addon will find all your games dynamically
local AdditionalContent = {
ageofchivalry = {title = “Age of Chivalry”,depotid = 17510},
mm = {title = “Dark Messiah”,depotid = {2100,2130}},
diprip = {title = “D.I.P.R.I.P. Warm Up”,depotid = 17530},
dystopia = {title = “Dystopia”,depotid = 17580},
esmod = {title = “Eternal Silence”,depotid = 17550},
insurgency = {title = “Insurgency Modern Infantry Combat”,depotid = 17700},
left4dead = {title = “Left 4 Dead”,depotid = 500,vpk = “pak01_dir.vpk”},
left4dead2 = {title = “Left 4 Dead 2”,depotid = 550,vpk = “pak01_dir.vpk”},
pvkii = {title = “Pirates, Vikings, and Knights II”,depotid = 17570},
se1 = {title = “SiN Episodes”,depotid = 1300},
smashball = {title = “Smashball”,depotid = 17730},
synergy = {title = “Synergy”,depotid = 17520},
ship = {title = “The Ship”,depotid = 2400},
zps = {title = “Zombie Panic! Source”,depotid = 17500},
}[/lua]

That goes into mount2.lua, and I think you can tell where in it.

http://www.facepunch.com/showpost.php?p=16653848&postcount=1

I think that’s the one.

ok so I followed the hotfix that omolong posted, and it works now. And I have to say :iia:

sif use my virtual table dumping code :stuck_out_tongue:

Edit: If you want the last filesystem virtual members, use ida pro and decompile the linux binary for orange box(since they have function names compiled into the .so). Find the virtual table, then you should be able to understand what they do.

I’m currently at work. Quickly fixed the wrong folder - Thanks Omolong.

Just added Omolongs list of steamgames to the addon. Mounting the additional games should work now.

Planning on adding a little menu like the old one had? I loved that little cloud. :3:

No need to. Just open “GMod Settings” and you find all available games there.
That’s one part of the “direct integration into GMod”.
The other integration is you see all mounted games in the spawnmenu under “Browse” with their Game-Names (instead of all mounted only to “All” or mounted with their shortcut-names).

Next part I’ll work on is the srcds-support. Shouldn’t be that hard - Just have to rewrite a few lines of code. srcds uses a little bit different folders than a client-game.

I’m also plan adding spawnlists for some games - At least for L4D and all the steamworks-games you get for free.

Oh snap. Didn’t even notice that. Sweet.

Edit:

Potential problem?