1. Post #1
    Gold Member
    aVoN's Avatar
    December 2005
    2,880 Posts


    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

    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
    Reply With Quote Edit / Delete Reply Germany Show Events Friendly x 68Lua King x 59Useful x 53Winner x 7Agree x 6Dumb x 5Lua Helper x 5Optimistic x 4Funny x 3Informative x 2Late x 2Bad Spelling x 2Artistic x 1Zing x 1Disagree x 1 (list)

  2. Post #2
    Gold Member
    BlackhawkGT's Avatar
    June 2007
    211 Posts
    Finally, I've wanted this for months, now we can all mount Left 4 Dead without copying all the shit into your gmod folder.
    Reply With Quote Edit / Delete Reply Netherlands Show Events Agree Agree x 51Optimistic Optimistic x 1Winner Winner x 1Funny Funny x 1 (list)

  3. Post #3
    Pass along
    commander204's Avatar
    May 2008
    4,065 Posts
    Omg Awesome!
    Reply With Quote Edit / Delete Reply France Show Events Agree Agree x 17Winner Winner x 2Friendly Friendly x 1Dumb Dumb x 1 (list)

  4. Post #4
    CapsAdmin's Avatar
    August 2005
    3,985 Posts
    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?
    Reply With Quote Edit / Delete Reply Norway Show Events Agree Agree x 5Disagree Disagree x 2Dumb Dumb x 1 (list)

  5. Post #5
    Gold Member
    Neico's Avatar
    October 2005
    104 Posts
    because it simply mounts the content into the filesystem and let the filesystem handle that part (at least it should work like that)
    Reply With Quote Edit / Delete Reply Germany Show Events Agree Agree x 5Informative Informative x 2Optimistic Optimistic x 1 (list)

  6. Post #6
    Gold Member
    thomasfn's Avatar
    July 2008
    2,965 Posts
    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.

  7. Post #7
    Gold Member
    Neico's Avatar
    October 2005
    104 Posts
    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)
    Reply With Quote Edit / Delete Reply Germany Show Events Agree Agree x 6Bad Spelling Bad Spelling x 1 (list)

  8. Post #8
    Gold Member
    Omolong's Avatar
    December 2007
    7,614 Posts
    At last! An improved version!
    Reply With Quote Edit / Delete Reply United Kingdom Show Events Agree Agree x 11Late Late x 1 (list)

  9. Post #9
    CapsAdmin's Avatar
    August 2005
    3,985 Posts
    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)
    There are threads on how to convert l4d models to gmod. That's why I was asking.
    Reply With Quote Edit / Delete Reply Norway Show Events Dumb Dumb x 1 (list)

  10. Post #10
    Pass along
    commander204's Avatar
    May 2008
    4,065 Posts
    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!
    Reply With Quote Edit / Delete Reply France Show Events Dumb Dumb x 2Funny Funny x 1 (list)

  11. Post #11
    Gold Member
    aVoN's Avatar
    December 2005
    2,880 Posts
    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?
    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.

    Edited:

    There are threads on how to convert l4d models to gmod. That's why I was asking.
    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.

    Edited:

    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!
    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.
    Reply With Quote Edit / Delete Reply Germany Show Events Late Late x 1 (list)

  12. Post #12
    Gold Member
    Omolong's Avatar
    December 2007
    7,614 Posts
    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:
    -- 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},
    }

    That goes into mount2.lua, and I think you can tell where in it.
    Reply With Quote Edit / Delete Reply United Kingdom Show Events Lua Helper Lua Helper x 3Informative Informative x 1Lua King Lua King x 1Artistic Artistic x 1 (list)

  13. Post #13
    CapsAdmin's Avatar
    August 2005
    3,985 Posts
    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.
    http://www.facepunch.com/showpost.ph...48&postcount=1

    I think that's the one.
    Reply With Quote Edit / Delete Reply Norway Show Events Informative Informative x 1Dumb Dumb x 1 (list)

  14. Post #14
    Pass along
    commander204's Avatar
    May 2008
    4,065 Posts
    ok so I followed the hotfix that omolong posted, and it works now. And I have to say :iia:
    Reply With Quote Edit / Delete Reply France Show Events Friendly Friendly x 1 (list)

  15. Post #15
    Box collector
    haza55's Avatar
    October 2005
    545 Posts
    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.
    Reply With Quote Edit / Delete Reply Australia Show Events Informative Informative x 1 (list)

  16. Post #16
    Gold Member
    aVoN's Avatar
    December 2005
    2,880 Posts
    I'm currently at work. Quickly fixed the wrong folder - Thanks Omolong.

  17. Post #17
    Gold Member
    aVoN's Avatar
    December 2005
    2,880 Posts
    Just added Omolongs list of steamgames to the addon. Mounting the additional games should work now.

  18. Post #18
    Gold Member
    blackops7799's Avatar
    December 2006
    1,714 Posts
    Planning on adding a little menu like the old one had? I loved that little cloud. :3:

  19. Post #19
    Gold Member
    aVoN's Avatar
    December 2005
    2,880 Posts
    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.

  20. Post #20
    Gold Member
    blackops7799's Avatar
    December 2006
    1,714 Posts
    Oh snap. Didn't even notice that. Sweet.

    Edit:

    Potential problem?
    Reply With Quote Edit / Delete Reply United States Show Events Funny Funny x 73Agree Agree x 5Artistic Artistic x 1Winner Winner x 1 (list)

  21. Post #21
    CapsAdmin's Avatar
    August 2005
    3,985 Posts
    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.
    Reply With Quote Edit / Delete Reply Norway Show Events Agree Agree x 2 (list)

  22. Post #22
    Gold Member
    aVoN's Avatar
    December 2005
    2,880 Posts
    Oh snap. Didn't even notice that. Sweet.

    Edit:

    Potential problem?
    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

    Edited:

    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.
    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++).
    Reply With Quote Edit / Delete Reply Germany Show Events Informative Informative x 1 (list)

  23. Post #23
    Grocel's Avatar
    October 2008
    1,249 Posts
    What are Detours? And why VAC don't like them?
    Reply With Quote Edit / Delete Reply Germany Show Events Dumb Dumb x 1Agree Agree x 1 (list)

  24. Post #24
    Box collector
    haza55's Avatar
    October 2005
    545 Posts
    What are Detours? And why VAC don't like them?
    In Lua terms this is a detour/hook.

    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

    Valve does not like them because you can do naughty things with them, such as wall hacks and aim bots.
    Reply With Quote Edit / Delete Reply Australia Show Events Informative Informative x 6Agree Agree x 3 (list)

  25. Post #25
    Gold Member
    aVoN's Avatar
    December 2005
    2,880 Posts
    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.

    Edited:

    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!

    Edited:
    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.
    Reply With Quote Edit / Delete Reply Germany Show Events Friendly Friendly x 2Bad Spelling Bad Spelling x 1 (list)

  26. Post #26
    SteamDB
    Marlamin's Avatar
    November 2007
    10,955 Posts
    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.
    Reply With Quote Edit / Delete Reply Netherlands Show Events Agree Agree x 1 (list)

  27. Post #27
    Gold Member
    aVoN's Avatar
    December 2005
    2,880 Posts
    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.
    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.

  28. Post #28
    The BLU Heavy's Avatar
    August 2009
    377 Posts
    aVoN, I fucking love you for this.
    Reply With Quote Edit / Delete Reply Canada Show Events Friendly Friendly x 2Agree Agree x 1Informative Informative x 1Optimistic Optimistic x 1 (list)

  29. Post #29
    Wickerman123's Avatar
    February 2009
    3,545 Posts
    how big is this download? im on a cap here so i hope its not too big

  30. Post #30
    Pass along
    commander204's Avatar
    May 2008
    4,065 Posts
    I mean the main models work! And why not use a skin switcher or something?

    Edited:

    It is exactly: 49.6 MB (52,112,900 Bytes)

  31. Post #31
    Wickerman123's Avatar
    February 2009
    3,545 Posts
    I mean the main models work! And why not use a skin switcher or something?

    Edited:

    It is exactly: 49.6 MB (52,112,900 Bytes)
    oh cool :) not too big, it will just take a while

    thanks :niggly:
    Reply With Quote Edit / Delete Reply United Kingdom Show Events Useful Useful x 1 (list)

  32. Post #32
    Gold Member
    aVoN's Avatar
    December 2005
    2,880 Posts
    I mean the main models work! And why not use a skin switcher or something?

    Edited:

    It is exactly: 49.6 MB (52,112,900 Bytes)
    Actually it's just half the size: 25 MB. The 50 MB comes, because you have the hidden .svn files everwhere.

    Next update will most probably come today. Fixing up "shiny models" and some models not having physics (like the common infected of L4D). I also regenerated all spawnicons for L4D1 and 2 and put them in separate addon folders with the material fixed above.
    Reply With Quote Edit / Delete Reply Germany Show Events Friendly Friendly x 1Lua King Lua King x 1 (list)

  33. Post #33
    Gold Member
    jason278's Avatar
    February 2009
    12,437 Posts
    For some reason this caused my my player to walk very slow as if I as if I was holding down the alt key. The game was fine before I installed this
    Reply With Quote Edit / Delete Reply United States Show Events Dumb Dumb x 1Funny Funny x 1 (list)

  34. Post #34
    SteamDB
    Marlamin's Avatar
    November 2007
    10,955 Posts
    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.
    Didn't GMOD start out with hacky code?
    Reply With Quote Edit / Delete Reply Netherlands Show Events Agree Agree x 8Funny Funny x 1 (list)

  35. Post #35
    Gold Member
    aVoN's Avatar
    December 2005
    2,880 Posts
    For some reason this caused my my player to walk very slow as if I as if I was holding down the alt key. The game was fine before I installed this
    I can't confirm this.
    What games do you have mounted?

    Edited:

    Can you try it now? I have updated the addon.

  36. Post #36
    Gold Member
    Bellmanator's Avatar
    August 2008
    1,622 Posts
    Does this currently work on servers? If so you can have my babies. :3:
    Reply With Quote Edit / Delete Reply United States Show Events Friendly Friendly x 5Funny Funny x 1Dumb Dumb x 1 (list)

  37. Post #37
    Gold Member
    aVoN's Avatar
    December 2005
    2,880 Posts
    Does this currently work on servers? If so you can have my babies. :3:
    Not yet, but it is planed.

    Maybe I can finish that part tomorrow or on sunday
    Reply With Quote Edit / Delete Reply Germany Show Events Bad Spelling x 3Friendly x 1Informative x 1Agree x 1Optimistic x 1 (list)

  38. Post #38
    jack254's Avatar
    January 2010
    1,385 Posts
    the rate hes going

    he has way to many babies


    edit: also do some of the l4d2 models overwrite the l4d models?
    Reply With Quote Edit / Delete Reply United Kingdom Show Events Funny Funny x 1Bad Reading Bad Reading x 1Dumb Dumb x 1 (list)

  39. Post #39
    Gold Member
    aVoN's Avatar
    December 2005
    2,880 Posts
    the rate hes going

    he has way to many babies


    edit: also do some of the l4d2 models overwrite the l4d models?
    Yes: The hunter,boomer, smoker, tank and witch in L4D2 override the L4D1 versions. the new versions are anyway more detailed. The most difference is with the tank, boomer and smoker. The other models look quite the same.
    Reply With Quote Edit / Delete Reply Germany Show Events Friendly Friendly x 1 (list)

  40. Post #40
    Gold Member
    jason278's Avatar
    February 2009
    12,437 Posts
    Wow, it seems the update fixed the slow walk, thanks

    Oh and I hexed the L4D2 infected if you care http://www.garrysmod.org/downloads/?a=view&id=82237
    Reply With Quote Edit / Delete Reply United States Show Events Informative Informative x 1Useful Useful x 1Friendly Friendly x 1 (list)