• gm_mount2 - Use any source-engine content in GMod
    1,320 replies, posted
  • Avatar of aVoN
  • [img]http://files.daggeringcats.com//GarrysMod/gm_mount2.jpg[/img] [highlight]DO NOT USE THIS ADDON AT THE MOMENT OR GARRYS MOD WILL CRASH - DOWNLOADS DISABLED (SVN still works)[/highlight] [b]Description[/b] 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. [b]Prerequisites[/b] You [b]need[/b] to have [URL="http://www.microsoft.com/downloads/details.aspx?FamilyID=a7b7a05e-6de6-4d3a-a423-37bf0912db84&displaylang=en"]MSVC 2010 Redistributable x86[/URL] installed, or it will not work. [highlight]DO NOT USE THIS ADDON AT THE MOMENT OR GARRYS MOD WILL CRASH - DOWNLOADS DISABLED (SVN still works)[/highlight] [highlight]DO NOT USE THIS ADDON AT THE MOMENT OR GARRYS MOD WILL CRASH - DOWNLOADS DISABLED (SVN still works)[/highlight] [b]Download[/b] [url=http://gmod.daggeringcats.com/mount2/mount2.zip][img]http://gmod.daggeringcats.com/mount2/images/index.php?image=download_heavy.png[/img][/url] [url=http://gmod.daggeringcats.com/mount2/mount2_lite.zip][img]http://gmod.daggeringcats.com/mount2/images/index.php?image=download_lite.png[/img][/url] 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. [b]SVN-Repository[/b] [quote] [b]Browse:[/b] [url]http://svn.daggeringcats.com/wsvn/mount2[/url] [b]SVN-Url:[/b] [url]http://svn.daggeringcats.com/mount2[/url] [b]User:[/b] anon [b]Password:[/b] anon [/quote] [b]Annotations for Left 4 Dead 1/2[/b] Left 4 Dead maps are not compatible with Garry's Mod. Don't try loading them - This will only cause GMod to crash. [b]Why another mounting addon?[/b] You may know the [url=http://www.facepunch.com/showthread.php?p=12293086]orginal mounting addon[/url] and [url=http://www.facepunch.com/showthread.php?t=637181]it's extension for sourcemods[/url]. 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. [b][url=http://mount2.daggeringcats.com/]Official Addon Site[/url][/b]
  • 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:
  • Avatar of CapsAdmin
  • 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?
  • Avatar of Neico
  • because it simply mounts the content into the filesystem and let the filesystem handle that part (at least it should work like that)
  • Avatar of thomasfn
  • [QUOTE=Neico;20285373]because it simply mounts the content into the filesystem and let the filesystem handle that part (at least it should work like that)[/QUOTE] I think he meant you had to edit stuff in the vmts themselves, like phong or whatever - since L4D is a different engine.
  • Avatar of Neico
  • 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)
  • Avatar of CapsAdmin
  • [QUOTE=Neico;20285443]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)[/QUOTE] There are threads on how to convert l4d models to gmod. That's why I was asking.
  • Avatar of commander204
  • 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!
  • Avatar of aVoN
  • [QUOTE=CapsAdmin;20285267]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?[/QUOTE] 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] [QUOTE=CapsAdmin;20285528]There are threads on how to convert l4d models to gmod. That's why I was asking.[/QUOTE] 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] [QUOTE=commander204;20285564]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![/QUOTE] 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.
  • Avatar of Omolong
  • I fixed 2 things for you aVoN. The problem for why it wasn't loading was the module. It was in lua/[b]include[/B]/modules, when it should have been in lua/[B]includes[/B]/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.
  • Avatar of CapsAdmin
  • [QUOTE=aVoN;20285688]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.[/QUOTE] [url]http://www.facepunch.com/showpost.php?p=16653848&postcount=1[/url] I think that's the one.
  • Avatar of haza55
  • sif use my virtual table dumping code :P 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.
  • Avatar of aVoN
  • I'm currently at work. Quickly fixed the wrong folder - Thanks Omolong.
  • Avatar of aVoN
  • Just added Omolongs list of steamgames to the addon. Mounting the additional games should work now.
  • Avatar of aVoN
  • [QUOTE=blackops7799;20290272]Planning on adding a little menu like the old one had? I loved that little cloud. :3:[/QUOTE] 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.
  • Avatar of blackops7799
  • Oh snap. Didn't even notice that. Sweet. [B]Edit:[/B] Potential problem? [img]http://i50.tinypic.com/15yjk9t.png[/img]
  • Avatar of CapsAdmin
  • And when you're completely done with it, you send it to garry so we can all make things that uses content from l4d if the user has it. :smile:
  • Avatar of aVoN
  • [QUOTE=blackops7799;20290538]Oh snap. Didn't even notice that. Sweet. [B]Edit:[/B] Potential problem? [img]http://i50.tinypic.com/15yjk9t.png[/img][/QUOTE] Uninstall Garry's Mod from SourceMods then. That's not a bug - The addon lists every game which it finds in SourceMods. I have the same [editline]10:12PM[/editline] [QUOTE=CapsAdmin;20291182]And when you're completely done with it, you send it to garry so we can all make things that uses content from l4d if the user has it. :smile:[/QUOTE] He is free adding it - But I'm unsure if he will, since it uses Microsoft Detours and is really deeply hooking into the engine. Detours is getting detected by VAC (but VAC is not banning in GMod) and by now I see no real other way doing it. But: Only with his help, I can make it crash-free and work perfectly with L4D since there are still crashes (especially for L4D maps) I can't figure out or fix because they happen in client.dll. I even compiled my own sourcemod with that addon here to figure out the crashes but I haven't worked much on that yet (I have no idea how to spawn ragdolls with C++).
  • Avatar of haza55
  • [QUOTE=Grocel;20302464]What are Detours? And why VAC don't like them?[/QUOTE] In Lua terms this is a detour/hook. [lua]local oldFileRead = file.Read; function file.Read(name) -- Your own code to manipulate this function. if(name == "lol.txt") then name = "rofl.txt"; end return oldFileRead(name); end[/lua] Valve does not like them because you can do naughty things with them, such as wall hacks and aim bots.
  • Avatar of aVoN
  • I just noticed the common-infected do not work as ragdoll and I found out, it was because I block every file named amin_*.mdl in my code. Well, if I won't block these files, the game crashs on special models and there is nothing I can do about it. But I dislike how majority of the common-infected models do not work. [editline]02:42PM[/editline] Just thought about hexing those models and adding something like "common_phys.mdl" instead of "anim_common.mdl" to them. This will prevent loading the models which crash once anim_common.mdl is present but will make those models which don't loadable. Hacky! [editline]02:43PM[/editline] Oh wait wait wait! I just noticed, it still crashs now. Now I know why. I modified some VMTs in order to suppress console errors. I changed the shader "Infected" (which is not present in the orangebox source engine) to VertexlitGeneric. Seems like this crashs the game now - haha.
  • I -really- hope garry will add this to GMOD when it's done. Unless he is planning VAC support for GMOD, I see no reason why not to add it. This is awesome, good job aVoN.
  • Avatar of aVoN
  • [QUOTE=Marlamin;20303949]I -really- hope garry will add this to GMOD when it's done. Unless he is planning VAC support for GMOD, [u]I see no reason why not to add it[/u]. This is awesome, good job aVoN.[/QUOTE] Because it is really hacky code - Nothing you can achieve without hacking into the engine. I really doubt it works with another method since everything in the game relies on the interface I hook up. I once thought CFileSystemPassthru could be a solution but I doubt it. That would most probably only work within the GMod code and just there where garry uses it - I doubt it will work in engine code so.
  • Avatar of commander204
  • I mean the main models work! And why not use a skin switcher or something? [editline]06:47PM[/editline] It is exactly: 49.6 MB (52,112,900 Bytes)