Fuck Hex - I Can't Do It

Hey I’ve been looking at RaptillaMajor 's tutorial on Hexing a biped model to make it use-able as a player model. But my results are nothing short of fail.

The model I’m trying this on is [ one.

Here’s the Hex I ended up with:
[URL=http://img512.imageshack.us/my.php?image=agenthex2jl8.jpg]

According to the tutorial, my hexing was done correctly. But for some dumb reason, All animations play sideways:
http://img263.imageshack.us/img263/4180/agentlq5.th.jpg

Unless you went dabbling in mstudiobone structs, seqdescs, animdescs and/or their included structures, I have no idea how that could have happened.

I changed exactly what I had to change in the tutorial.

My guess is that whoever ported the model and rigged it did a shitty job and probably forgot a bone or two. Or mis named one etc.

Anyway, here’s a Before/After pic of the ONLY two areas of Hex code I edited:

Before:

http://img239.imageshack.us/img239/8264/agenthex2beforeye6.jpg

Before:

http://img502.imageshack.us/img502/4971/agenthex1beforehq8.jpg

You could try recompiling models, it messes up faces, but I doubt your doing any of those.

My tutorial has worked before for other people somehow, and you can use as many animations as you want, here is my old tutorial repasted, it is still flawed.

Before you begin, I want you to know it doesn’t work on any random model you find, it only works on models rigged to the half life 2 skeleton, just pointing out.

This part is for those who do not know how to extract

then you use it to open up a .gcf that contains the model you want from,

C:/Program Files/Valve/Steam/SteamApps

For some people it is might just be Steam/Steamapps.

This part is the decompiling part

I’ve always been using the MDL Decompiler from cannon fodders tools but you could also use Studio Compiler which also decompiles.

So download either one from the link below, note though, that you need to create a shortcut to Studio Compiler and add -nosteam to the command line.

http://www.chaosincarnate.net/cannonfodder/cftools.htm

Since you have already extracted or have your model or atleast should by now, select the model with either decompiler and now make a folder and choose that as your output path, be sure to check the box that says “do not fix rotations” or your player model will come out not so right.

Now that you have decompiled a model, open the .qc with notepad that is located in the folder, find the things that will say \$includemodel, those are the animations for the model, to add player animations simply insert this in the animations section of the .qc
[lua]\$includemodel “player/male_anims.mdl”[/lua]

Next, you have to fix face posing data, or it will not compile later on, since are making just a player model anyways, you do not most of the face pose data likely.

I recommend just removing whatever it says is the problem, sorry before I suggested removing the entire thing which broke the eyes.

If it says: Eyelid “lower_right” neutral out of range (±0.5)

Then remove the line that says that, and the numbers for it below.

http://img366.imageshack.us/img366/4809/tutorialpic1jx4.png

If it says: unknown flex AU27ZR

Then remove the flex at the end of the flex data just above the \$lod stuff and one of the parentheses at the end of the line

http://img366.imageshack.us/img366/1038/tutorialpic2ii1.png

While you are in the .qc, you should change the details like the model name and materials path, remember that you are going to have to change the .vmt paths to the new location later on.

Time to compile and test

http://www.wunderboy.org/apps/guistudiomdl2.php

by now you should be able to just compile it, go to the target directory, retrieve your model, and be able to fully use it.

Select your mdldecompiler.qc where ever you put it, and set your gameinfo path.

After you fix the material vmt paths, you may also need to fix the faces if they are clamped, and extract all face materials then fix to the new folder path you are using on your playermodel.

I’m sorry if my tutorial seems too broad, and there’s some things you do not understand, but you may need to need know how to hex things so you understand that you need to change .vmt paths and such to actually understand this tutorial.

Alright, I’ll give it a try.

Seems like a lot of fucking trouble to go through just to make a model stand up straight.

Whatever, at this point (1:30AM) I couldn’t care less.

Thanks for the Tut, I’ll post some progress once I’ve tried it.

You do know you’re not meant to delete/backspace any lines from the hex editor, only overwrite yeah?

Mine let’s me backspace

Don’t backspace any lines if it lets you, ever

That is the major point that most people who try to hex fail on.

Except you can without a problem if you actually understand how the engine uses the contents of model files :downs:
Check out the model related stuff in the SDK source code, you’ll see what I mean.

Edit: I mean, check it out if you understand C++ that is. Sorry I always assume people can code :o

Uh yeah, that’s not really relevant is it?

I don’t understand how me saying that limitation to hexing isn’t really a limitation at all, is not relevant to hexing

You only have to do that for Male_07 for some reason, at least for me.

Ya when hexing don’t ever backspace, and I think one thing you did wrong is that the original model and folder names have to have the exact aount of letters as the news ones, or it won’t work.

It is true, but it’s a lot easier not to. It will just confuse someone who can’t hex files the easy way anyway.

How do you set the Game info path?
I loaded the EC, used HL2 as game and pressed compile, but i cant find where it went.

EDIT:
Okay I found the Gmod Gameinfo TXT, but I think I forgot to do something, I dont see any .vmt files
if you need to look at my QC here:

``````
\$cd "E:\Joe's Games\YUNA!@!@"
\$modelname "player/pil/yuna_ffx2/yuna.mdl"
\$model "yuna" "yuna.smd"
\$poseparameter move_yaw -180.00 180.00
\$poseparameter body_pitch -90.00 90.00
\$poseparameter body_yaw -90.00 90.00
\$cdmaterials "models\player\pil\yuna_ffx2\"
\$hboxset "cstrike"
\$hbox 3 "ValveBiped.Bip01_Pelvis" -7.250  -6.750  -4.750  7.250  1.750  5.750
\$hbox 6 "ValveBiped.Bip01_L_Thigh" 4.000  -4.700  -3.000  20.000  3.300  4.000
\$hbox 6 "ValveBiped.Bip01_L_Calf" -0.250  -3.750  -3.000  18.250  2.750  3.000
\$hbox 6 "ValveBiped.Bip01_L_Foot" -2.000  -2.800  -2.250  5.000  3.200  1.750
\$hbox 7 "ValveBiped.Bip01_R_Thigh" 4.000  -4.700  -3.000  20.000  3.300  4.000
\$hbox 7 "ValveBiped.Bip01_R_Calf" -0.250  -3.750  -3.000  18.250  2.750  3.000
\$hbox 7 "ValveBiped.Bip01_R_Foot" -2.000  -2.800  -1.750  5.000  3.200  2.250
\$hbox 3 "ValveBiped.Bip01_Spine1" -7.750  -1.750  -7.500  3.750  9.750  7.500
\$hbox 2 "ValveBiped.Bip01_Spine2" -4.000  -2.500  -7.000  11.000  9.500  7.000
\$hbox 1 "ValveBiped.Bip01_Neck1" -1.000  -5.500  -2.500  3.000  1.500  2.500
\$hbox 1 "ValveBiped.Bip01_Head1" -1.500  -5.300  -3.000  6.200  3.700  3.200
\$hbox 4 "ValveBiped.Bip01_L_UpperArm" -1.000  -2.250  -2.000  13.000  2.250  2.000
\$hbox 4 "ValveBiped.Bip01_L_Forearm" -1.500  -2.100  -2.100  11.500  2.100  2.100
\$hbox 4 "ValveBiped.Bip01_L_Hand" 0.250  -2.150  -1.500  5.750  1.350  2.500
\$hbox 5 "ValveBiped.Bip01_R_UpperArm" -1.000  -2.250  -2.000  13.000  2.250  2.000
\$hbox 5 "ValveBiped.Bip01_R_Forearm" -1.500  -2.100  -2.100  11.500  2.100  2.100
\$hbox 5 "ValveBiped.Bip01_R_Hand" 0.250  -2.150  -2.500  5.750  1.350  1.500
// Model uses material "0.vmt"
// Model uses material "1.vmt"
// Model uses material "2.vmt"
// Model uses material "3.vmt"
// Model uses material "4.vmt"
// Model uses material "5.vmt"
// Model uses material "6.vmt"
// Model uses material "7.vmt"
// Model uses material "8.vmt"
// Model uses material "9.vmt"
// Model uses material "10.vmt"
\$attachment "grenade0" "ValveBiped.Bip01_Pelvis" 7.00 1.50 1.00 rotate 0.00 0.00 -80.00
\$attachment "grenade1" "ValveBiped.Bip01_Pelvis" 7.50 1.50 -3.50 rotate 0.00 0.00 -80.00
\$attachment "grenade2" "ValveBiped.Bip01_Pelvis" -7.00 1.50 1.00 rotate 0.00 0.00 -80.00
\$attachment "grenade3" "ValveBiped.Bip01_Pelvis" -7.50 1.50 -3.50 rotate 0.00 0.00 -80.00
\$attachment "pistol" "ValveBiped.Bip01_R_Thigh" 8.00 1.00 -3.50 rotate 0.00 -0.00 -0.00
\$attachment "primary" "ValveBiped.Bip01_Spine2" -0.00 -4.00 -2.00 rotate 0.00 -0.00 -0.00
\$attachment "c4" "ValveBiped.Bip01_Spine2" 3.50 -6.50 -6.50 rotate -45.00 35.00 45.00
\$attachment "lfoot" "ValveBiped.Bip01_L_Foot" 0.00 5.00 -0.00 rotate -0.00 0.00 -0.00
\$attachment "rfoot" "ValveBiped.Bip01_R_Foot" -0.00 5.00 0.00 rotate -0.00 -0.00 0.00
\$attachment "muzzle_flash" "ValveBiped.Bip01_L_Hand" -0.00 0.00 0.00 rotate -0.00 0.00 0.00
\$includemodel "player/cs_player_shared.mdl"
\$includemodel "player/ak_anims_ct.mdl"
\$surfaceprop "flesh"
\$eyeposition 0.000 0.000 73.000
\$illumposition 0.463 0.016 36.216
\$sequence ragdoll "ragdoll" ACT_DIERAGDOLL 1 fps 30.00
\$ikchain rhand ValveBiped.Bip01_R_Hand knee  0.707 0.707 0.000
\$ikchain lhand ValveBiped.Bip01_L_Hand knee  0.707 0.707 0.000
\$ikchain rfoot ValveBiped.Bip01_R_Foot knee  0.707 -0.707 0.000
\$ikchain lfoot ValveBiped.Bip01_L_Foot knee  0.707 -0.707 0.000
\$ikchain ikclip ValveBiped.weapon_bone_Clip knee  0.707 -0.707 0.000
\$collisionjoints "phymodel.smd"

``````

Try Half life 2 then? It should tell you when you compiled where it went.

woops I didn’t put in all of my QC…

``````
\$cd "E:\Joe's Games\YUNA!@!@"
\$modelname "player/pil/yuna_ffx2/yuna.mdl"
\$model "yuna" "yuna.smd"
\$poseparameter move_yaw -180.00 180.00
\$poseparameter body_pitch -90.00 90.00
\$poseparameter body_yaw -90.00 90.00
\$cdmaterials "models\player\pil\yuna_ffx2\"
\$hboxset "cstrike"
\$hbox 3 "ValveBiped.Bip01_Pelvis" -7.250  -6.750  -4.750  7.250  1.750  5.750
\$hbox 6 "ValveBiped.Bip01_L_Thigh" 4.000  -4.700  -3.000  20.000  3.300  4.000
\$hbox 6 "ValveBiped.Bip01_L_Calf" -0.250  -3.750  -3.000  18.250  2.750  3.000
\$hbox 6 "ValveBiped.Bip01_L_Foot" -2.000  -2.800  -2.250  5.000  3.200  1.750
\$hbox 7 "ValveBiped.Bip01_R_Thigh" 4.000  -4.700  -3.000  20.000  3.300  4.000
\$hbox 7 "ValveBiped.Bip01_R_Calf" -0.250  -3.750  -3.000  18.250  2.750  3.000
\$hbox 7 "ValveBiped.Bip01_R_Foot" -2.000  -2.800  -1.750  5.000  3.200  2.250
\$hbox 3 "ValveBiped.Bip01_Spine1" -7.750  -1.750  -7.500  3.750  9.750  7.500
\$hbox 2 "ValveBiped.Bip01_Spine2" -4.000  -2.500  -7.000  11.000  9.500  7.000
\$hbox 1 "ValveBiped.Bip01_Neck1" -1.000  -5.500  -2.500  3.000  1.500  2.500
\$hbox 1 "ValveBiped.Bip01_Head1" -1.500  -5.300  -3.000  6.200  3.700  3.200
\$hbox 4 "ValveBiped.Bip01_L_UpperArm" -1.000  -2.250  -2.000  13.000  2.250  2.000
\$hbox 4 "ValveBiped.Bip01_L_Forearm" -1.500  -2.100  -2.100  11.500  2.100  2.100
\$hbox 4 "ValveBiped.Bip01_L_Hand" 0.250  -2.150  -1.500  5.750  1.350  2.500
\$hbox 5 "ValveBiped.Bip01_R_UpperArm" -1.000  -2.250  -2.000  13.000  2.250  2.000
\$hbox 5 "ValveBiped.Bip01_R_Forearm" -1.500  -2.100  -2.100  11.500  2.100  2.100
\$hbox 5 "ValveBiped.Bip01_R_Hand" 0.250  -2.150  -2.500  5.750  1.350  1.500
// Model uses material "0.vmt"
// Model uses material "1.vmt"
// Model uses material "2.vmt"
// Model uses material "3.vmt"
// Model uses material "4.vmt"
// Model uses material "5.vmt"
// Model uses material "6.vmt"
// Model uses material "7.vmt"
// Model uses material "8.vmt"
// Model uses material "9.vmt"
// Model uses material "10.vmt"
\$attachment "grenade0" "ValveBiped.Bip01_Pelvis" 7.00 1.50 1.00 rotate 0.00 0.00 -80.00
\$attachment "grenade1" "ValveBiped.Bip01_Pelvis" 7.50 1.50 -3.50 rotate 0.00 0.00 -80.00
\$attachment "grenade2" "ValveBiped.Bip01_Pelvis" -7.00 1.50 1.00 rotate 0.00 0.00 -80.00
\$attachment "grenade3" "ValveBiped.Bip01_Pelvis" -7.50 1.50 -3.50 rotate 0.00 0.00 -80.00
\$attachment "pistol" "ValveBiped.Bip01_R_Thigh" 8.00 1.00 -3.50 rotate 0.00 -0.00 -0.00
\$attachment "primary" "ValveBiped.Bip01_Spine2" -0.00 -4.00 -2.00 rotate 0.00 -0.00 -0.00
\$attachment "c4" "ValveBiped.Bip01_Spine2" 3.50 -6.50 -6.50 rotate -45.00 35.00 45.00
\$attachment "lfoot" "ValveBiped.Bip01_L_Foot" 0.00 5.00 -0.00 rotate -0.00 0.00 -0.00
\$attachment "rfoot" "ValveBiped.Bip01_R_Foot" -0.00 5.00 0.00 rotate -0.00 -0.00 0.00
\$attachment "muzzle_flash" "ValveBiped.Bip01_L_Hand" -0.00 0.00 0.00 rotate -0.00 0.00 0.00
\$includemodel "player/cs_player_shared.mdl"
\$includemodel "player/ak_anims_ct.mdl"
\$surfaceprop "flesh"
\$eyeposition 0.000 0.000 73.000
\$illumposition 0.463 0.016 36.216
\$sequence ragdoll "ragdoll" ACT_DIERAGDOLL 1 fps 30.00
\$ikchain rhand ValveBiped.Bip01_R_Hand knee  0.707 0.707 0.000
\$ikchain lhand ValveBiped.Bip01_L_Hand knee  0.707 0.707 0.000
\$ikchain rfoot ValveBiped.Bip01_R_Foot knee  0.707 -0.707 0.000
\$ikchain lfoot ValveBiped.Bip01_L_Foot knee  0.707 -0.707 0.000
\$ikchain ikclip ValveBiped.weapon_bone_Clip knee  0.707 -0.707 0.000
\$collisionjoints "phymodel.smd" {

\$mass 94.0
\$inertia 10.00
\$damping 1.75
\$rotdamping 10.00
\$rootbone "valvebiped.bip01_pelvis"
\$jointmassbias "valvebiped.bip01_pelvis" 2.60
\$jointdamping "valvebiped.bip01_pelvis" 1.00

\$jointconstrain "valvebiped.bip01_spine1" x limit 0.00 0.00 0.00
\$jointconstrain "valvebiped.bip01_spine1" y limit 0.00 0.00 0.00
\$jointconstrain "valvebiped.bip01_spine1" z limit 0.00 0.00 0.00

\$jointmassbias "valvebiped.bip01_spine2" 3.40
\$jointconstrain "valvebiped.bip01_spine2" x limit -15.00 15.00 0.00
\$jointconstrain "valvebiped.bip01_spine2" y limit -12.00 12.00 0.00
\$jointconstrain "valvebiped.bip01_spine2" z limit -20.00 15.00 0.00

\$jointmassbias "valvebiped.bip01_l_upperarm" 0.80
\$jointconstrain "valvebiped.bip01_l_upperarm" x limit -40.00 40.00 0.00
\$jointconstrain "valvebiped.bip01_l_upperarm" y limit -91.00 20.00 0.00
\$jointconstrain "valvebiped.bip01_l_upperarm" z limit -80.00 23.00 0.00

\$jointmassbias "valvebiped.bip01_l_forearm" 0.60
\$jointconstrain "valvebiped.bip01_l_forearm" x limit 0.00 0.00 0.00
\$jointconstrain "valvebiped.bip01_l_forearm" y limit 0.00 0.00 0.00
\$jointconstrain "valvebiped.bip01_l_forearm" z limit -123.00 -3.00 0.00

\$jointmassbias "valvebiped.bip01_l_hand" 0.20
\$jointconstrain "valvebiped.bip01_l_hand" x limit -52.00 37.00 0.00
\$jointconstrain "valvebiped.bip01_l_hand" y limit -12.00 8.00 0.00
\$jointconstrain "valvebiped.bip01_l_hand" z limit -52.00 -1.00 0.00

\$jointmassbias "valvebiped.bip01_r_upperarm" 0.80
\$jointconstrain "valvebiped.bip01_r_upperarm" x limit -40.00 40.00 0.00
\$jointconstrain "valvebiped.bip01_r_upperarm" y limit -20.00 91.00 0.00
\$jointconstrain "valvebiped.bip01_r_upperarm" z limit -80.00 24.00 0.00

\$jointmassbias "valvebiped.bip01_r_forearm" 0.60
\$jointconstrain "valvebiped.bip01_r_forearm" x limit 0.00 0.00 0.00
\$jointconstrain "valvebiped.bip01_r_forearm" y limit 0.00 0.00 0.00
\$jointconstrain "valvebiped.bip01_r_forearm" z limit -120.00 -3.00 0.00

\$jointmassbias "valvebiped.bip01_r_hand" 0.20
\$jointconstrain "valvebiped.bip01_r_hand" x limit -60.00 60.00 0.00
\$jointconstrain "valvebiped.bip01_r_hand" y limit -8.00 12.00 0.00
\$jointconstrain "valvebiped.bip01_r_hand" z limit -52.00 -1.00 0.00

\$jointmassbias "valvebiped.bip01_r_thigh" 1.30
\$jointconstrain "valvebiped.bip01_r_thigh" x limit -12.00 12.00 0.00
\$jointconstrain "valvebiped.bip01_r_thigh" y limit -8.00 33.00 0.00
\$jointconstrain "valvebiped.bip01_r_thigh" z limit -79.00 24.00 0.00

\$jointmassbias "valvebiped.bip01_r_calf" 0.80
\$jointconstrain "valvebiped.bip01_r_calf" x limit 0.00 0.00 0.00
\$jointconstrain "valvebiped.bip01_r_calf" y limit 0.00 0.00 0.00
\$jointconstrain "valvebiped.bip01_r_calf" z limit -6.00 116.00 0.00

\$jointmassbias "valvebiped.bip01_r_foot" 0.40
\$jointconstrain "valvebiped.bip01_r_foot" x limit -17.00 10.00 0.00
\$jointconstrain "valvebiped.bip01_r_foot" y limit -25.00 19.00 0.00
\$jointconstrain "valvebiped.bip01_r_foot" z limit -15.00 35.00 0.00

\$jointmassbias "valvebiped.bip01_l_thigh" 1.30
\$jointconstrain "valvebiped.bip01_l_thigh" x limit -12.00 12.00 0.00
\$jointconstrain "valvebiped.bip01_l_thigh" y limit -8.00 33.00 0.00
\$jointconstrain "valvebiped.bip01_l_thigh" z limit -79.00 24.00 0.00

\$jointmassbias "valvebiped.bip01_l_calf" 0.80
\$jointconstrain "valvebiped.bip01_l_calf" x limit 0.00 0.00 0.00
\$jointconstrain "valvebiped.bip01_l_calf" y limit 0.00 0.00 0.00
\$jointconstrain "valvebiped.bip01_l_calf" z limit -6.00 116.00 0.00

\$jointmassbias "valvebiped.bip01_l_foot" 0.40
\$jointconstrain "valvebiped.bip01_l_foot" x limit -17.00 10.00 0.00
\$jointconstrain "valvebiped.bip01_l_foot" y limit -25.00 19.00 0.00
\$jointconstrain "valvebiped.bip01_l_foot" z limit -15.00 35.00 0.00

\$jointconstrain "valvebiped.bip01_head1" x limit -72.00 60.00 0.00
\$jointconstrain "valvebiped.bip01_head1" y limit -37.00 33.00 0.00
\$jointconstrain "valvebiped.bip01_head1" z limit -19.00 45.00 0.00
}

``````

there.
Okay I found the Gmod Gameinfo TXT, but I think I forgot to do something, I dont see any .vmt files
if you need to look at my QC ABOVE

you guys are very helpful D: why did i even bother >.<