Since the 2013 SDK came out some people have been having aneurisms trying to get studiomdl to work. There is likely a straightforward and logical solution to this but it probably involves setting up visual c++ and compiling solutions and shit that scares my little blender-print pants off. So here's how I got it to work tonight.
What the problem probably is (and what I am not ready to deal with)
First of all, your VProject environment variable is likely leftover from the pre-steampipe era. This is an easy enough fix, although I am not sure how relevant it is. Open up CMD (windows button > run > cmd - if you're on windows 8 get pokki to emulate a start menu) and type in "set" and hit enter. You should see a bunch of environment variables. Somewhere near the bottom is VProject. It probably points to the EP2 in your [username] directory. EP2 is now in our "common" directory .You can clear this variable by typing in
- Code: Select all
set VProject=
Compiling a model
To get around this you'll need to set up a .bat file to compile your model. This is a little different to the old bat file. Create a new text document and change the file extension to .bat. Open it in notepad - note that notepad++ handles linebreaks differently, so use vanilla windoze notepad just to be sure. I am using SDK2013 multiplayer, so change accordingly if you are using single player. I am also compiling for Double Action: Boogaloo so change your mod path accordingly as well.
The main difference between this file and the old way of doing it is that you need to declare the .qc file you want to compile, which sucks my balls. You will also need to enter the full path to your studiomdl.exe and your mod's gameinfo.txt directory, as opposed to using the %sourcesdk% environment variable. Here is what I have in my .bat file:
- Code: Select all
"C:\Program Files (x86)\steam\steamapps\common\Source SDK Base 2013 Multiplayer\bin\studiomdl.exe" -nop4 -game "C:\Program Files (x86)\steam\steamapps\sourcemods\dab" beam_01.qc
pause
I am using the studiomdl in my SDK 2013 Multiplayer directory, the game is dab, and I am compiling a .qc file named beam_01.qc. Note that the .qc file is in the same directory as the .bat file. Also note that the paths are encapsulated in double quotation marks, to allow for white space.
Once you have this .bat file in the same directory as your .qc file (I keep mine in the model construction folder, not in the mod folder, since you need to make a new .bat file for every .qc you want to compile) all you do is double click the .bat file to have windows run it and compile your model. You should no longer get a "missing gameinfo.txt" error.
Using HLMV
If you try to use the hlmv.exe in your SDK2013 directory you will get another missing gameinfo.txt error. To fix this, right click on hlmv.exe and create a shortcut. Right click on the shortcut and select "properties". In the "target" box, append the same "-game [path/to/your/mod]" as you did in the .bat file above after all the stuff that is already there. So the target box in my hlmv.exe shortcut located in my Source SDK Base 2013 Multiplayer directory looks like this:
- Code: Select all
"C:\Program Files (x86)\steam\steamapps\common\Source SDK Base 2013 Multiplayer\bin\hlmv.exe" -game "C:\Program Files (x86)\steam\steamapps\sourcemods\dab"
I assume if you want to get the other tools to work around the gameinfo.txt error the same rules should apply.
Questions? Ask away.