HyperGaming Network

Other Forums => Development => Old Forum Boards => Scrapyard => Modelling => Topic started by: Silver Knight on 20-01-2010

Title: Playermodel Tutorial
Post by: Silver Knight on 20-01-2010
1. Get the tools! http://www.megaupload.com/?d=BLQUXLI5 (http://www.megaupload.com/?d=BLQUXLI5) Here's my development tools folder which contains the MDLDecompiler and the GUIStudioCompiler
Decompile the model you want. (I put my decompiled models in my documents "decompiled models/<nameofmodelhere>" so I can go back to it later)

2. Get Notepad++
http://notepad-plus.sourceforge.net/uk/site.htm (http://notepad-plus.sourceforge.net/uk/site.htm)
It's alot beter than the old notepad.

3. Edit the model .qc

You might want to change the model path so you don't screw up any other models.
So just edit this line to where the model will go
$modelname "<modelpathhere>.mdl"

and change the "$includemodel" to what you want it to be.
Here's a list of your anim choices

male NPC:
male NPC:
$includemodel "humans/male_shared.mdl"
$includemodel "humans/male_ss.mdl"
$includemodel "humans/male_gestures.mdl"
$includemodel "humans/male_postures.mdl"

male player:
$includemodel "m_anm.mdl"
$includemodel "m_gst.mdl"
$includemodel "m_pst.mdl"
$includemodel "m_shd.mdl"
$includemodel "m_ss.mdl"

female NPC:
$includemodel "humans/female_shared.mdl"
$includemodel "humans/female_ss.mdl"
$includemodel "humans/female_gestures.mdl"
$includemodel "humans/female_postures.mdl"

female player:
$includemodel "f_anm.mdl"
$includemodel "f_gst.mdl"
$includemodel "f_pst.mdl"
$includemodel "f_shd.mdl"
$includemodel "f_ss.mdl"

CS:S / Combine player
$includemodel "cs_fix.mdl"

Kleiner:
$includemodel "Kleiner_animations.mdl"
$includemodel "humans/male_shared.mdl"
$includemodel "Kleiner_postures.mdl"
$includemodel "Kleiner_gestures.mdl"

Police (fixed anims)
$includemodel "Police_animations.mdl"
$includemodel "Police_ss.mdl"
$includemodel "humans/male_shared.mdl"


If your making a CS:S model into a player, you will want to remove this line.
$ikchain ikclip ValveBiped.weapon_bone_Clip knee 0.707 -0.707 0.000

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.
(https://forums.hypergamer.net/proxy.php?request=http%3A%2F%2Fimg366.imageshack.us%2Fimg366%2F4809%2Ftutorialpic1jx4.png&hash=136b405ff5bc02765e5c9fcc1a407ef23d90665c)

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
(https://forums.hypergamer.net/proxy.php?request=http%3A%2F%2Fimg366.imageshack.us%2Fimg366%2F1038%2Ftutorialpic2ii1.png&hash=cf042cd1a034ffb14dd0e2d502e726842a1203b2)

4. Compile and Test
Open GUI studio mdl,

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.

Open the Source SDK modelviewer to test your model.

When you've tested all of the anims in modelviewer, you may then proceed to add your custom playermodel / NPC to Garry's Mod.

Make a lua file in "garrysmod/garrysmod/lua/autorun" and name it the whatever you want (you might want to name it whatever the model is named and add "_player" to the end)

Open the lua file and add these lines for a playermodel.


player_manager.AddValidModel( "modelnamehere", "modelpath" )

list.Set( "PlayerOptionsModel",  "modelnamehere", "modelpath" )


Here's an example

player_manager.AddValidModel( "ShoTGuNGuY49", "models/player/group01/shtgngy.mdl" )

list.Set( "PlayerOptionsModel",  "ShoTGuNGuY49", "models/player/group01/shtgngy.mdl" )
Title: Re: Playermodel Tutorial
Post by: Silver Knight on 20-01-2010
Reserved
Title: Re: Playermodel Tutorial
Post by: Silver Knight on 20-01-2010
Reserved
Title: Re: Playermodel Tutorial
Post by: Sickness on 20-01-2010
Reserved





Very very interesting...
Title: Re: Playermodel Tutorial
Post by: KingArthur on 20-01-2010
Harder then it looks, I got every aspect of it working besides textures- cant get the file path right.
Title: Re: Playermodel Tutorial
Post by: Storm_Shield on 02-12-2011
Already confused.
Title: Re: Playermodel Tutorial
Post by: Frostee on 02-12-2011
Quote from: Storm_Shield on 02-12-2011
Already confused.

(https://forums.hypergamer.net/proxy.php?request=http%3A%2F%2Fimages.wikia.com%2Fasdf%2Fimages%2F1%2F1c%2FNecro2.jpg&hash=0663e32a27e2d5770e334ee4a6fcd270a85bd5a1)