News

  Have an issue with a Member of Staff?
Click here.

Playermodel Tutorial

Silver Knight · 14321

0 Members and 1 Guest are viewing this topic.

Silver Knight

  • Founder, Director\Developer
  • Loki
  • *
    • Posts: 7053
  • Awards The Kawaii award is awarded to veterans of the Anime Forum. This member is a Survivor of the Gay Vampire Castle. Bow to them! Over 4000 Posts! Groovy Baby! Has done something which pleases the Tech Bot Played on S.T.A.L.K.E.R Roleplay 2008 - 2013 Played on FALLOUT Roleplay 2010 - 2012 Played on Minecraft Roleplay "Aceon" 2011 - 2013 Played on Terraria Roleplay "Caphori" 2011 - 2013
on: 20-01-2010
1. Get the tools! 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
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
Code: [Select]
$modelname "<modelpathhere>.mdl"
and change the "$includemodel" to what you want it to be.
Here's a list of your anim choices

Code: [Select]
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.
Code: [Select]
$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.


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


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.

Code: [Select]
player_manager.AddValidModel( "modelnamehere", "modelpath" )

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

Here's an example
Code: [Select]
player_manager.AddValidModel( "ShoTGuNGuY49", "models/player/group01/shtgngy.mdl" )

list.Set( "PlayerOptionsModel",  "ShoTGuNGuY49", "models/player/group01/shtgngy.mdl" )
« Last Edit: 20-01-2010 by Last.Exile »


Quote
breslau: if i cant cheat i dont wanna play
breslau: period


Silver Knight

  • Founder, Director\Developer
  • Loki
  • *
    • Posts: 7053
  • Awards The Kawaii award is awarded to veterans of the Anime Forum. This member is a Survivor of the Gay Vampire Castle. Bow to them! Over 4000 Posts! Groovy Baby! Has done something which pleases the Tech Bot Played on S.T.A.L.K.E.R Roleplay 2008 - 2013 Played on FALLOUT Roleplay 2010 - 2012 Played on Minecraft Roleplay "Aceon" 2011 - 2013 Played on Terraria Roleplay "Caphori" 2011 - 2013
Reply #1 on: 20-01-2010
Reserved


Quote
breslau: if i cant cheat i dont wanna play
breslau: period


Silver Knight

  • Founder, Director\Developer
  • Loki
  • *
    • Posts: 7053
  • Awards The Kawaii award is awarded to veterans of the Anime Forum. This member is a Survivor of the Gay Vampire Castle. Bow to them! Over 4000 Posts! Groovy Baby! Has done something which pleases the Tech Bot Played on S.T.A.L.K.E.R Roleplay 2008 - 2013 Played on FALLOUT Roleplay 2010 - 2012 Played on Minecraft Roleplay "Aceon" 2011 - 2013 Played on Terraria Roleplay "Caphori" 2011 - 2013
Reply #2 on: 20-01-2010
Reserved


Quote
breslau: if i cant cheat i dont wanna play
breslau: period


Sickness

  • Catapult-Man
  • ****
    • Posts: 619
  • Fuck Bitches Get Money
Reply #3 on: 20-01-2010
Reserved





Very very interesting...

Rusty - Returned to the Zone


KingArthur

  • Bane of the shoutbox, player of autoplaying music.
  • *
    • Posts: 1013
  • why the hell did you do extra information
  • Awards Official Member of the Kilopost Club Played on S.T.A.L.K.E.R Roleplay 2008 - 2013
Reply #4 on: 20-01-2010
Harder then it looks, I got every aspect of it working besides textures- cant get the file path right.



Storm_Shield

  • "Never forget..."
  • Horse
  • **
    • Posts: 53
  • "Little Man." -Skybroke
Reply #5 on: 02-12-2011
Already confused.

I'm back from the dead...


Frostee

  • Ellen Page is my waifu
  • Gladiator
  • ****
    • Posts: 938
  • Smoke coal erryday
  • Awards Pack your shit in a box and get out.
Reply #6 on: 02-12-2011



Tags:
 

* Hello there Guest

Welcome to the HyperGaming Network forums! We are a large gaming and mod community. Please signup to gain access to other sections of the forum.




If you are having problems navigating the forums, please see this topic.

Forum News

  Have an issue with a Member of Staff?
Click here.

* Users Online

2powerandrewhatesyouVonXenoCoolFeermanCrossBoyWithoutAFairy

Dot Guests: 620 | Dot Users

* Board Stats

  • stats Total Members: 9296
  • stats Total Posts: 180801
  • stats Total Topics: 22646
  • stats Total Categories: 10
  • stats Total Boards: 212
  • stats Most Online: 1479