New to creating mods.

Ahh, makes more sense now. The model has decompiled with no animations, but all of its reference SMDs. The .qc is what shows the compiler what files go where.
If you're still after making the Combine suit as an object, you're on the right track.
The next part is the animating bit. If you have Milkshape 3D, use it's Half-Life .smd importer, and edit each LOD to have the same basic model adjustments you need. Like, if you want to remove the mask - select the vertices in the face, and delete them.

The next part - setting up the animation - could get a little harder. Tell me what you want the thing to do, to look like, and I'll try and help you through it.

-Angry Lawyer
 
The animations are stored in.

male_shared.mdl
male_postures.mdl
male_gestures.mdl

I think male_shared cant be decompiled but the other 2 files hold all of the animations.
 
Hmm. Well, for some dumb reason, I can't download SoftImage because it randomly stops downloading and tries to tell me that it's ready to run. I try anyway, of course it says it's not all there. So I try to go reload download thinking "You stupid piece of **** computer, of course it's not done." But it insists that it is done and says that the download is complete (this is about 20 megs into a 160 meg file).

This Milkshape 3D program, I'll look in to that. Maybe my computer will let me have that one. I've never heard of it, so help walking through it would be awesome. I'm trying to hook up some surround sound to my computer right now (oh yeah :D ), so it will be about 15 from now until I start.
 
Do I do that by just right clicking Internet Exploer, going to Properties, and Delete Files? If so, I've done that a few times and it doesn't work. If that's not what your talking about, then I'm all ears.

Well, I found MilkShape 3d, installed it without a hitch, and tinkered with it. I soon found the Half-Life tools and a Decompiler within MilkShape. So I tried to decompile the model, but this time it crashed MilkShape. It crashed so bad that it doesn't even remember starting (I got the message "This is the first time you have run MilkShape 3D. This program will record the first and last date it is used. Are you sure this is the date?" again).

I think my model file is corrupted somehow, since two programs seemingly don't want to decompile it.
 
Hmm. New news. I tried to extract the Combine APC model to see if it was the model or my program. It extracts fine, but for some reason it said that it needs another animation to base it from. Hang on, I'll get a screenshot. Well, I guess now it doesn't need one. I clicked "Cancel" the first time, and when I try to do it again, it doesn't need it. Weird. I guess it may have extracted wrong, which cause the decompile to go haywire. I'll try it again...

Yeah, must have extracted wrong. Odd... oh well. It's fixed.

Oh, I found the animation section of it. The Police must have their own animations, because I found a Police_animation.mdl and some other file format. I went ahead and extracted those too.

I'll go ahead and tinker with MilkShape to see if I can get it to do what I want.

Oh, I know my question. MilkShape wants an .m3sd file. How do I get it to accept .smd files?

Here's all the files I got from the decompile.
 
Cool. i figured out how to edit a certain model so that it looks like it's hanging by the scruff of the neck. The arms are close to it's sides, the head is angled down and the toes are pointed way down. I'm debating with myself as to where I should put the helmet. Deleting it is not an option. Maybe I should set it in the ground near the feet, or under the arm, or leave it where it is so it loko like some sort of hood. It will go in a locker in a locker room. What do you guys think?
 
Don't use Milkshape's decompiler - it's buggered for HL2 models.

Best thing to do is to leave the reference file as it is, except for moving the headpiece to where you want it. To get the model in the pose you want it, without deforming your model massively, open an animation file, press the animate button, and move those bones into the position you want the guy to stand. Save it as another smd file, using the 'export' button. Make sure only 'animation' is checked on the next box.

Tell me when you've got this far, and I'll step you through compilation, and the editing of the C++ file.

-Angry Lawyer
 
Hmm... If I load Police_reference.smd it tries to lod and it crashes my computer. Plus it has a bunch of weird crap out side of the model (Some of it show before it crashes). I managed to capture a screenshot before I shut it down. There are other Police_refernce.smd files, but they all have lod_ in front of them. I don't know what that means, but I'll tinker with them while I wait for an answer.
 
Okay, all but the last two lod_ files crash when I try to load them, so I'm going to load the phymodel.smd. It looks more normal than the first screenshot. Should I move just the head verticies and leave the joints or move the joints too? For now, I'm going to leave the joints. If I have to redo it, it's just another chance to learn.
 
I think Milkshape needs to be updated, so it might be an idea to stick to keeping the Metrocop suit as having the helmet attached.

Physmodel.smd defined where the collision box is - don't fiddle with it.

-Angry Lawyer
 
Hmm. If I shouldn't mess with the physmodel, which model should I use? Here is a list of what I have. All the other models have some odd vertices stuck on the outside. Here I'll show you.

The first is the physmodel, which I edited (before you told me not to, but I saved it as something else so I have the original). Notice how it looks like a combine model. There's nothing outside the model.

The second is the Police_reference.mdl. Look at all the stuff outside of the basic shape. I'm not sure how to edit that. Also, there are so many things that are displayed that it lags my machine way down.

All the other files (displayed on the second screenshot) have lod in front of them and are like the second shot. The manhack ones are just a Police skeleton with a bunch of verticies in the shape of a manhack on the Combine's back.

Sheesh, I can't believe how much stuff has gone wrong by just trying to open and edit the model file. Just reread the thread and count how many thing have gone wrong. There has to be at least 6.
 
Well, Milkshape really needs to update their importer.

The Physmodel is a slightly larger, lower detail representation of the model, used to check where the model has collided with other things.
The LOD things, even though they don't import, are the actual visual representation of the model. LOD means Level Of Detail. When you move further away from a model, it renders a smaller LOD file, to save on rendering speeds. Either that, or the decompiler's not very good.

Success is getting up one more time than you're knocked down.

Still, I'd skip past the physical editing, and go on to the animation editing. Edit an animation file by loading the animation, and moving the bones into the shape you want while in Animation mode. And don't forget to press the 'assign Keyframe' button. Then set the animation length to 1. After that, you should be one step closer to having the suit model, even though the head is still attached to the model.
Let me know when you've got that bit done.

-Angry Lawyer
 
Well, heck, since the model is decompiled now, all I would have to do to make a salute animation is just go from neutral to salute and it would -- oh wait. Must stop myself. I was about to say that it would work right, but of course it wouldn't. I would have to fight some sort of problem. But nevertheless, I'm still gonna try it once I get the suit made. Then I have to make a seated position.

Well, back to work.

Okay. I've got a 1 frame length animation of a limp looking skeleton. As of now, it's an ms3d file. Should I go ahead and export it as an .smd?
 
Yup, and check the box saying 'export animations', but make sure it's not exporting mesh or texture data.
You're right, with keyframing, you can get a salute animation.

Then - the codey bit - making a QC file. Post what's currently inside the QC file (it can be opened with text editor), and we'll work some magic.

-Angry Lawyer
 
Umm... I don't get a box that allows me to check 'export animations." I only have a box allowing me to select between Reference or Sequence. I chose Reference first, and it no other box came up. Same with Sequence. I don't know what the difference is. I'll post a screen.

If it makes any difference, I think there might be something wrong with my model. When the Animation button is off, it goes back to look like a ragdoll model. But when I click the Animation button, it looks like a limp suit (like it's supposed to). I'll post more screens.
I am thinking that what happened is that the limp-ness I gave to it was an animation and the regular form is what it looks like if it's not animated. Is this right or should I fix it so that it always looks limp? Meaning should the default pose be a suit or the animation be a suit? (I made both, just in case)


Almost forgot the .qc file. This one is from the Police_animation .mdl I decompiled. I opened up the Police.mdl file and nothing in there worked, so I assume you want the one that works.
 
Umm... I don't get a box that allows me to check 'export animations." I only have a box allowing me to select between Reference or Sequence. I chose Reference first, and it no other box came up. Same with Sequence. I don't know what the difference is. I'll post a screen.
In Milkshape, reference exports the model data, and sequence exports animations. Choose sequence.

If it makes any difference, I think there might be something wrong with my model. When the Animation button is off, it goes back to look like a ragdoll model. But when I click the Animation button, it looks like a limp suit (like it's supposed to).
Don't worry about it, that's just how Milkshape works.

Since you want it to work like Gordon's suit (at least, I'm assuming so), export the new animation as idle.smd. When you go to recompile, edit out the references to the other animations in the qc file, and add

$surfaceprop "default"
$sequence idle "idle" fps 30.00

to the end of it. Then, recompile.
It works, I just tried it using the hazard suit idle animation, and an unedited combine model.
 
So you are saying to delete pretty much everything in there. From this: (attachment 1)

To this: (attachment 2)

If so, then that was pretty easy. But how do I recompile a a bunch of .smd files into a .mdl file? Since I don't have anymore animation files, would I even need to put them back in the model? Only including the idle.smd and .qc files?
 
Whoops, I think I got a little confused when I posted that. Forget what I said about the animation references. The qc file with the animations compiles into police_animations.mdl, which isn't what you want. The qc file you need is the one from the decompiled police.mdl, which would have been overwritten if you decompiled all the models into the same folder. So, to make it easier, I've attached my qc file.

Overwrite everything inside your .qc file with the text file attached.

In order to recompile, use the program Studiomdl. This is included with the Source SDK, so you already have it. Open a command prompt window, and point it at your sourcesdk\bin folder. Type studiomdl c:\'location of the qc file', and hit enter. Wait until it says 'completed .qc file' (it may take a while). If there are no errors, the recompiled model will be in your half-life2\hl2\models folder.
Now, I tried renaming the model name in the qc file, but the resulting model shows up as having no textures in both Hammer and MV. But if you rename the model after it's compiled, the textures are present, so do that now. Otherwise the new model will be used instead of the original Metrocop model when you play (unmodded) HL2.

Now all you have to do is configure the model to act like the hazard suit.
 
Well, I can't figure out how to go forward down directories while in the cheap XP version of DOS. c:\program files won't let me go down the program files directory.

Just as a clarification, I need to have the .qc file editted (check), open up command prompt and surf down to the studiomdl program, run the studiomdl and tell it where my decompiled files are. It will compile the files under ...\Half-life 2\hl2\models file. I rename the model file to something like item_combineHEV. From there, should I put the file back into the gfc file I found it in?

Thanks for the help so far.

Oh, by the way, how would I edit a .mdl file to make it behave like an item rather than an NPC? Which file do I need to edit?

Okay, here goes. I figured out how to surf through C-DOS (that means Cheap DOS) and I found the studiomdlprogram. I got an error that looks like it wants me to put an extension. Something like gamedir, textures, tag reverse and a bunch of other weird stuff. Have you seen this?
 
StudioMDL is command line only. To use it, type studiomdl C:\'location of qc file'. The rest happens automatically. Those other things are just optional 'settings' (can't think of the right word) you can use when compiling.

Just as a clarification, I need to have the .qc file editted (check), open up command prompt and surf down to the studiomdl program, run the studiomdl and tell it where my decompiled files are. It will compile the files under ...\Half-life 2\hl2\models file. I rename the model file to something like item_combineHEV. From there, should I put the file back into the gfc file I found it in?
Check. But you only need to tell StudioMDL where your .qc file is, and you don't need to put the model back in the gcf.

Thanks for the help so far.
No problem. :) To tell you the truth, I had absolutly no idea how to do until I read your post. :p
But I'm learning to model in Milkshape, and I've messed around with StudioMDL, So the rest was just trial and error.

Oh, by the way, how would I edit a .mdl file to make it behave like an item rather than an NPC? Which file do I need to edit?
That's a little beyond me at the moment. Probably involves C++.
 
Edit: Answered already

I can help out with the C++ bit though, it's actually very simple, considering you want it to act exactly like the HEV suit.

-Angry Lawyer
 
Hmm. I don't exactly know what I did, heh heh. I ran the program, and it said it needed Steam running. Ok, quick fix. Try again. Now it said it can't find Extraction.qc. I don't know where it got the name Extraction (the only way it knows that is that one of my folders is called Combine Extraction), but I assumed it wanted my new .qc file. So, to make it happy, I renamed it Extraction and put it where it wanted it. Then it said that it needed the Police.mdl in some other folder so it could continue. Strange, I thought. But whatever. I moved it and continued. Then it went all the way to the end without a hitch, but at the end it says:

Memory leak: mempool blocks left in memory: 48
Memory leak: mempool blocks left in memory: 1

I assume that's a bad thing, but it happens all the time in Hammer and doesn't do anything, so I'm not too worried. Now i just hope that the new model did overwrite the old Police model. That would make all the Metrocops I put in my map into HEV suits (which would be funny at first, then be really bad).

So, now that my model is compiled, how do I get it to act like a suit?
 
Rename the compiled .mdl "Suit_combine.mdl", stick it in your mod's folder, and try placing a prop of it somewhere in a test map.

If that works, we can move on to the next step.

-Angry Lawyer
 
It didn't work.

I think what happened is that StudioMDL doesn't like spaces when trying to find the file. The file path was C:\Documents and Settings\Ben\Desktop\HL2 Files\Combine Extraction\Police\Decompiled and it would say:

Error opening C:\Program Files\Valve\Steam\SteamApps\<user>\sourcesdk\bin\extraction\animation.qc

So I think it got caught up in the "Combine Extraction" file name. So then I changed it to "Combine_Extraction," and then it got caught on HL2 Files. So I changed that, then it got caught on Documents and Settings. Windows won't let me change that.

Is there something I'm doing wrong? Is there a Windows based compiler? One where I tell it where all the files it needs are? I'll post a screenshot of the errors.
 
:eek: :LOL:
Sorry, forgot to mention: open up your qc file, and change the first line to the path/name of *your* qc file :p . Make sure you leave the $cd bit in front of it.
Also, make sure you're pointing StudioMDL *at* the .qc file, not just the directory it resides in.
For example, my .qc file is called 'mdldecompiler.qc', and it's in the folder 'c:\police'. So I would type 'studiomdl C:\police\mdldecompiler.qc', then hit enter.

Spaces shouldn't worry it, at least, it doesn't on my PC.
 
Ok, I think it compiled correctly. I simplified the address for it, so it was C:\Police and I think it worked wihout a hitch. The only problem is (and I expected this) is the the original npc_metrocop is now my altered metrocop that doesn't move (it's pretty funny when he tries to shoot me. His gun is stuck at his side and flashes go off, but the bullets hit the floor). I can't change the police.mdl to another name because it still looks for a police.mdl. I assume this is in the code that Angry Lawyer will help me with, but I'm just telling you what's up.

How's this look for a Combine HEV?

(It will be in a locker in my game so it will look a little more 'suit-like.')
 
Nice posing there :)

You should now have a file, something like 'police.mdl'
Simplest way to get this working involves no code, but stuffs you if you ever want to have the original suit as well as the combine one. Yours being a single-player mod, I think this way's the best.

Rename your file to hevsuit.mdl, and stick it into a new folder (called 'items') in your mod's main model directory.

All instances of the original HEV suit will now be Combine suits.
Fantastic.

The other way involves having a different file name, and coding a new entity. It's pretty simple, but a little pointless with what you're doing.

-Angry Lawyer
 
Roflmao. I guess a small little "Hey, this doesn't work." isn't good enough for the program. Check out the screenshot.

Well, the Police still work (they try to kill me because I didn't have the ai_relationship level on) and the model shows up in Hammer, but when i try to run it in game, I got that. If it helps, just the mdl file itself wasn't good enough. It wanted all the Police files (Police.dx8.0.something, Police.dx9.0.something, Police.vtx or something) that I got when I recompiled. So I renamed them to hevsuit like it wanted and that shows up.

*Looks at screenshot again* Yep, I think I'm doing something wrong.

However, it does work. If I walk up to it, I get the HEV suit and the ERROR goes away.

Hammer likes my model though. It looks right in it.
 
Just tried it with my quick version, it does the same thing. The console outputs: 'models\Police.vvd has wrong checksum'. Shows up fine in MV and Hammer...
I have no idea. I think it may be easier to just set it up as a new entity.
 
I don't think making a new entity would be that tough would it? some simple copy-paste from the hev suit cpp file into a new cpp file with the source model changed. But there I go thinking stuff would be simple. I thought that editting a model would be simple, but look how much work it is. If the whole mod is like this (I'm sure parts of it are), then I'm in it for the long haul, and there are no stops from here to Done-land.
 
Just remember that you're still learning at the moment. By the time you finish this mod, most of the 'hard stuff' will be like second nature. A hell of a lot of first-time modders would probably have realized just how much work is actually needed, and given up by now. The fact that you're still sticking with it is a good sign.
 
It's nothing to do with code, I think it's to do with Milkshape. The fact it comes up as 'error' at different distances implies that the detail level files didn't get included.

Post your current .QC file, I'll have a peek at that. I have a feeling it's in there.

-Angry Lawyer
 
Hmm. That would make sense. If the lod files (level of detail from certain distance) were missing, then it wouldn't know what to display. I don't think I included them. Somehow the qc file would need to be changed so that it doesn't need different level of detail, since the player will never be able to see it from more than about 15 feet away.
 
This is a long shot, but try this:

Code:
$cd "C:\Police"
$modelname "Police.mdl"
$body "police" "Police_reference.smd"

$surfaceprop "default"
$sequence idle "idle" fps 30.00

That way, it's not using LOD at all. Admitted, it's sloppy, bu you're only going to see the suit once, and it'll be close-up, so you might as well only have a high-detail model.

-Angry Lawyer
 
Hmm. That didn't work. I still got the error message. However, I think that this way is better anyway. It's simpler. Since you will only see it from one distance, then it might as well be highly detailed. I edited the qc file, then recompiled, renamed all the files to hevsuit and overwrite the file in my items folder and nothing changed.

A recap on what we know:
Hammer can see it fine.
When playing it shows up with error.
All I did was change the pose in MilkShape.
I edited the qc file so it doesn't require lod files.
The original Police still work.
It still acts like a suit.

Anything else? I'm probably overlooking something.
 
Try decompiling the original HEV suit, and have a look at what goes into it. Maybe there's something model-specific we're missing.

-Angry Lawyer
 
Okay, finals are finally over, so I can start working on my mod again. I decompiled the suit.mdl and found the qc file. It appears that it does have lod files. I'm thinking that I should rename all my police files to hevsuit and then copy the suit qc file to the police qc file. Then it would go look for lod files, see them as normal metrocop files, display them as a metrocop and display the animation 'idle.'
 
Back
Top