Tutorials

Compiling models through ConTEXT



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).

news post image

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:

news post image

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
news post image

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.

news post image

Nauz

View comments ( 5 )

Back to top