[TUTORIAL] Compiling Models with ConTEXT

Rexy

The Kwisatz Haderach
aa
Dec 22, 2008
1,798
2,533
This is not my tutorial. But the usefulness of what the tutorial provides is essential to anyone wanting to compile models for any source game. This tutorial was originally written by Nauz @ interlopers.net.

I posted this tutorial here because I saw Hawk's thread about custom objects and saw that a lot of people were using the command line to compile models. There's no problem with this, but I did want to share with others the success that I've been having using this free software/setup.

Not only does this make your job easier as a modeler, it simplifies the process down to opening the .qc file and hitting F9.
_______________________________________________________________

http://www.interlopers.net/tutorials/24774

What does this tutorial teach me?
I'll show you how to set up a helpful text editor called "ConTEXT", to see you're studiomdl compiling process.
If you're handwriting your .qc file like me, you'll just need to open the .qc file for your model in the future and press F9, it will automatically compile. (no more browsing to the bin folder and drag- and dropping)

Why would i need to see it?
If your model doesn't compile correctly, the studiomdl window usually just disappears and you have no idea, what happened. With ConTEXT you'll be able to see the error-message.

What do I need?
ConTEXT (freeware)
and know how to place you're model files correctly

1. After you downloaded it, you should right-click any .qc file you recently made and go to
Properties.
For the "Open with..." option you should browse to "ConTEXT Programmers Editor" and click Ok.

2. For this tutorial I will compile a static prop model for Counterstrike:source.
After you place your .qc file and .smd files in the correct folder
(in my case: C:\Programme\Steam\SteamApps\[ACCOUNT]\counter-strike source\cstrike\models\Tutorial)
open you're MODEL.qc file (with ConTEXT, of course).

screen1.jpg


The settings in ConTEXT

3. Make sure that you can see the "Console Output" window under you're .qc file.
If you cannot see it, go to the View-tab and make sure, that "Console Output" is activated.

4. Now go the Options-> Environment Options.
Click the Execute Keys tab.

Click Add below the white box.
You should be requested to enter extensions now. Type qc and click Ok.
You're window should look like this now:

screen2.jpg


5. Move on by left-clicking on F9.

Following settings are required:

Execute: Paste you're path to the studiomdl.exe in there.
For me compiling for episode 1 it is
C:\Programme\Steam\SteamApps\[ACCOUNT]\sourcesdk\bin\ep1\bin\studiomdl.exe

Start in:
%p

Parameters:
%n

Hint:
Compile

And turn on the Capture console output and Scroll console to the last line options.

You're final setting should look like this:

screen3.jpg


Compiling
Just open the .qc file
(C:\Programme\Steam\SteamApps\[ACCOUNT]\counter-strike source\cstrike\models\Tutorial\model.qc in my case) with ConTEXT and press F9.

The model is being compiled.

screen4.jpg


Nauz

And lastly, in this thread: http://forums.tf2maps.net/showthread.php?t=838&page=8, Acumen suggests using alternatively this app: http://www.wunderboy.org/apps/guistudiomdl2.php. But in general, avoid using the command line when provided with an easier option.
 
Last edited: