• Guide to getting portal 2 models into Gmod
    66 replies, posted
(Firstly, not sure if this is the right place to put this. I was split between here, Gmod Discussion and Models/Skins. But the L4D guide is in this sub forum so it makes sense IMO. But if anyone with the power to move it thinks its in the wrong forum please do move it to the correct place) After seeing a few threads regarding Portal 2 content in gmod I did a bit of research as I really wanted to use the models. Eventually someone (Ben1066 and Matsilagi) posted which part of the VTF files needed to be changed to get the the textures to load in gmod. As its a very slow process (and not very easy for some people) I decided to write a (really) small little tool to do all of the VTF files for you. So I present the "Portal 2 file fixer", and a step by step guide on how to get the content to work in gmod. Hopefully this solution will help people till Garry updates Gmod to support the newer version of the VTF format (or maybe its Valve who need to update the engine?) To extract the files I recommend you use [url=http://nemesis.thewavelength.net/index.php?p=26]GCFScape[/url]. You need to open the "pak01_dir.vpk" file. Firstly extract the models and materials from the Portal 2 VPK file into a gmod addon folder (Create an info.txt for it) Run the batch file mentioned in [url=http://www.facepunch.com/threads/642683-Step-by-Step-for-adding-L4D-models-to-Gmod]this[/url] thread. It must be run from INSIDE of your models folder Once you have run that you can run this program, the instructions are quite simple. Simply paste in the path to your Portal 2 materials folder (For example C:\Program Files (x86)\steam\steamapps\Username\garrysmod\garrysmod\addons\Portal2\materials) If you do not go directly to the materials folder it may take a long time (Just doing my portal2 folder took me 5 mins as opposed to 30 seconds for just the material folder) Once you have told the program the folder you want it to do, just sit back and wait. Once its done it will tell you. That's all there is to it, a lot of the models seem to be just effects and a couple seem to crash Gmod when you try to render their spawn icon. I dunno if this is a problem with my install of Gmod, the textures or just the models. A little disclaimer and a warning, this program MAY corrupt the texture files (although it hasn't happened to me, it is entirely possible). If this happens you will just need to re-extract the files. It will only modify files with "VTF" file extensions that are of the correct version, but just to be on the safe side don't run it on a folder with anything other than the portal 2 texture files in. Now for the actual program. It needs .NET 3.0. If you only have 2.0 and really cannot upgrade I could rebuild it for 2.0. Its opensource and available on Github if anyone wants to look at it / tell me how bad it is / try to improve it etc. It wasn't intended for public release (I wrote it with the intention of just using it my self, but a couple of people showed interest in it) so its pretty bad but it works. [B]You can download it [url=https://github.com/downloads/Jsmuk/Portal2-File-Fixer/Fixer.zip]here[/url]. Source code can be viewed and acquired [url=https://github.com/Jsmuk/Portal2-File-Fixer]from here[/url][/B] If you have any issues with this, ill try and help. It worked fine for me so I assume it will work for others.
I want Animal King in gmod
It seems quite a few models cause gmod to crash with the error "STRING_DEREFERENCE_c0000005_studiorender.dll" (according to [url]http://dumps.garrysmod.com[/url]). Is anyone else getting this or is it just me?
The fixer tells me it can't fix any of the materials. "Error: Cannot fix [texture]"
[QUOTE=DrunkenGMan;29362243]The fixer tells me it can't fix any of the materials. "Error: Cannot fix [texture]"[/QUOTE] I'm pretty sure it does that for textures that are already v7.4 or lower.
[QUOTE=WulfyStylez;29362457]I'm pretty sure it does that for textures that are already v7.4 or lower.[/QUOTE] That's pretty much it, there's a few texture files that are not 7.5.
[QUOTE=Jsm;29362510]That's pretty much it, there's a few texture files that are not 7.5.[/QUOTE] Ah, that makes sense. I'll go see if everything works and update this with results.
[QUOTE=DrunkenGMan;29362243]The fixer tells me it can't fix any of the materials. "Error: Cannot fix [texture]"[/QUOTE] Same here. [editline]22nd April 2011[/editline] [QUOTE=Jsm;29362510]That's pretty much it, there's a few texture files that are not 7.5.[/QUOTE] Oh okay then.
I just found out that I ran two instances of the .bat file and it created dozens of duplicates.
[QUOTE=Wootman;29362674]I just found out that I ran two instances of the .bat file and it created dozens of duplicates.[/QUOTE] Probably best not to do that.
what do i put in the info.txt
Tried opening "ballbot" folder. It crashed.
Wait, with the fixer tool this means we can use regular Half-Life 2 hammer instead of the Alien Swarm hammer.
[QUOTE=Nalty;29362711]what do i put in the info.txt[/QUOTE] Something like this [code] "AddonInfo" { "name" "Portal 2 Content" "version" "1.0" "up_date" "22/4/2011" "author_name" "0" "author_email" "0" "author_url" "0" "info" "0" "override" "0" } [/code]
Alright, soon as I open a folder for anything that is a ragdoll, GMod crashes.
[QUOTE=Wootman;29362763]Wait, with the fixer tool this means we can use regular Half-Life 2 hammer instead of the Alien Swarm hammer.[/QUOTE] I think the problem caused by models crashing could be an issue. Worth a try though I guess (after all it would just be simply moving the models / textures to another folder and trying)
Is it possible to get someone to upload it to Mediafire or somewhere? I would do it myself, but I am worried about messing stuff up like I did with the l4d2.
Gmod doesn't like the ragdolls I guess, first thing I try is Chell and I instantly crash.
we should get a list of which work and which dont
[QUOTE=Jsm;29362053]It seems quite a few models cause gmod to crash with the error "STRING_DEREFERENCE_c0000005_studiorender.dll" (according to [url]http://dumps.garrysmod.com[/url]). Is anyone else getting this or is it just me?[/QUOTE] This is the exact crash.
[QUOTE=Jsm;29362053]It seems quite a few models cause gmod to crash with the error "STRING_DEREFERENCE_c0000005_studiorender.dll" (according to [url]http://dumps.garrysmod.com[/url]). Is anyone else getting this or is it just me?[/QUOTE] I'm getting that when I try to load ragdolls.
the dummy ragdoll works
[QUOTE=Jsm;29361322]Once you have run that you can run this program, the instructions are quite simple. Simply paste in the path to your Portal 2 materials folder (For example C:\Program Files (x86)\steam\steamapps\Username\garrysmod\garrysmod\addons\Portal2\materials) If you do not go directly to the materials folder it may take a long time (Just doing my portal2 folder took me 5 mins as opposed to 30 seconds for just the material folder) [/QUOTE] I extract but in materials only .vtf files that arent open with VTFEdit (7.5). Where is .vmt-s ?
[url]http://www.facepunch.com/threads/1080696-Portal-2-Model-Porting[/url] Check that thread out for more info about Portal 2 porting.
Without recompiling the ragdolls will never work correctly. Props should work though. You guys need to wait till the portal 2 ports get released.
[QUOTE=Soviet_PLYuSH;29370865]I extract but in materials only .vtf files that arent open with VTFEdit (7.5). Where is .vmt-s ?[/QUOTE] The VMT files are just text files, they have no version attached to them so any version of the source engine can load them.
[QUOTE=murphy7;29371966]Without recompiling the ragdolls will never work correctly. Props should work though. You guys need to wait till the portal 2 ports get released.[/QUOTE] How do I recompile Ragdolls, is there any guide? Please I can't wait for the ports XD
The Ragdolls Dont Work But You Can Still Have Fun With Them ! [url]http://img585.imageshack.us/g/gmconstruct0002i.jpg/[/url]
[QUOTE=shadowgiratina;29376170]How do I recompile Ragdolls, is there any guide? Please I can't wait for the ports XD[/QUOTE] You would need to decompile them, but according to people in the thread in the models / skins forum the newer models seem to crash the decompiler.
Mhh ...my fixer say "Error :cannot fix "***path***"
Sorry, you need to Log In to post a reply to this thread.