Talk:Compiling a model

From Valve Developer Community
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Proposal: Second qc example

Since there are almost two basic (most used) types of models (prop_static / prop_physics) in Source I think it would be helpful to add just a second example qc which handles a prop_physics. Swot 03:21, 8 June 2012 (PDT)

Programmer's Notepad use

Is there any way to use Programmer's Notepad (http://www.pnotepad.org/) for work with .qc-files? Meaning, is it possible without really great efforts. I checked it's profiles ("schemes") already and - they are not compatible with those of Notepad++ (so if one wants to use PN, then creating a scheme is necessary).

model and material path issues?

I've been following the directions here to make a model, but I can only get the model to load directly from the models/ directory, and the texture to load from the materials/ directory. (cdmaterials and all subdirectory commands don't work) Anyone else having these kinds of issues?

Glitchy Model

I created a model, you know, modelled it, exported SMD's, compiled, etc., but when I try to put it in hammer as a prop_static it just doesn't show up, and when I place it as a prop_physics (which it really shouldn't be) it won't let me pick it up. In addition, when I touch it so as to "wake" it, the game crashes. I'm stunped as to what's going on. Please help!

Below is my qc file in case it helps:

//
$modelname Elevator_Button/Elevator_Button.mdl
$cdmaterials models/Elevator_Button
$staticprop
$scale 2.0
$body studio "Elevator_button_ref.smd"
$texturegroup "Elevator_button"
{
   { "Elevator_button" }
   { "Elevator_button_skin_01" }
   { "Elevator_button_skin_02" }
   { "Elevator_button_skin_03" }
   { "Elevator_button_skin_04" }
   { "Elevator_button_skin_05" }
   { "Elevator_button_skin_06" }
   { "Elevator_button_skin_07" }
   { "Elevator_button_skin_08" }
   { "Elevator_button_skin_09" }
   { "Elevator_button_skin_10" }
   { "Elevator_button_skin_11" }
   { "Elevator_button_skin_12" }
   { "Elevator_button_skin_13" }
   { "Elevator_button_skin_14" }
   { "Elevator_button_skin_15" }
   { "Elevator_button_skin_16" }
}
$sequence idle "Elevator_button_idle.smd"  fps 15

First thing I'd try is removing $texturegroup there. I've never seen a model with that many. --TomEdwards 14:32, 5 May 2009 (UTC)
Well, I need all of them because it's an elevator button, and I want a specific one for each floor, with on and off skins. It would take too long to make an individual model for each, and I have no idea if there's a way other than skinning to make them appear "on." Subject15837 20:00, 5 May 2009 (UTC)
Can't you run a test compile just to see what happens? --TomEdwards 14:27, 6 May 2009 (UTC)
A test compile? Of the map, or the model? Because if you mean the model, then my problem is not that I don't want to compile it, it's that I don't know qc commands well enough to find a way to do it.
Make a new QC and paste this into it:
$modelname Elevator_Button/Elevator_Button.mdl
$cdmaterials models/Elevator_Button
$staticprop
$scale 2.0
$body studio "Elevator_button_ref.smd"
$sequence idle "Elevator_button_idle.smd"  fps 15
Then see if that works. --TomEdwards 13:23, 7 May 2009 (UTC)

NoGameDir error

When I try to compile my model with the studiomdl.exe it just gives this error:

Unable to find gameinfo.txt. Solutions:

1. Read http://www.valve-erc.com/srcsdk/faq.html#NoGameDir 2. Run vconfig to specify which game you're working on. 3. Add -game <path> on the command line where <path> is the directory that gameinfo.txt is in.

Samekind of error comes with Studiocompiler. Please can anyone help me? --nom1nator 16:56, 11 June 2009 (UTC)

When did you last run the SDK launcher, and is it set to the correct game?
Hmm, I have just runned SDK from steam, not the launcher. What I should do? --nom1nator 17:18, 11 June 2009 (UTC)
Now I got it work, but how I get the textures work? --nom1nator 19:01, 13 June 2009 (UTC)

plz help

i got this error: Error opening c:\program files (x86)\steam\steamapps\alooy6\sourcesdk_content\hl 2\(x86)\steam\steamapps\alooy6\sourcesdk_content\hl2\flufy.qc

what do i do? --Lazy genius 01:25, 13 June 2009 (UTC)

As you can probably see, (x86)\steam\steamapps\alooy6\sourcesdk_content\hl2\ repeats itself. Try moving the QC to a location without a space in it. --TomEdwards 10:22, 13 June 2009 (UTC)

Unable to find the .smd file

When i try to compile the model, he don't want because he do not find the smd. But I've put in the models folders

C:\>"c:\program
files\steam\steamapps\[username]\sourcesdk\bin\orangebox\bin\studio
mdl" "C:\MurDroit.qc"
WARNING: AppFramework : Unable to load module p4lib.dll!
qdir:    "c:\"
gamedir: "c:\program files\steam\steamapps\[username]\half-life 2 deathmatch\hl2mp\
"
g_path:  "C:\MurDroit.qc"
Building binary model files...
Working on "MurDroit.qc"
ERROR: c:\MurDroit.qc(14): - could not load file 'mur\MurDroit.smd'
ERROR: Aborted Processing on 'mur\MurDroit.mdl'
WARNING: Leaking 1 elements
It's looking for C:\mur\MurDroit.smd. Take a look at the "File locations" sidebar in the article. --TomEdwards 17:48, 15 November 2009 (UTC)

-Thanks, he compiled the model. it was because i have sometime problem to understand english (i am non-english)