News

   HGN is supported by small passive adverts. Please consider disabling your adblocker on this site.
collapse

Playermodel Tutorial

Silver Knight · 14902

0 Members and 1 Guest are viewing this topic.

Offline Silver Knight

  • Founder, Director\Developer
  • Loki
  • *
    • Posts: 7113
  • 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
$modelname "<modelpathhere>.mdl"

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

Code
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
$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
player_manager.AddValidModel( "modelnamehere", 					"modelpath" )

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

Here's an example
Code
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 »
friendly
0
funny
0
informative
0
agree
0
disagree
0
pwnt
0
like
0
dislike
0
late
0
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions


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


Offline Silver Knight

  • Founder, Director\Developer
  • Loki
  • *
    • Posts: 7113
  • 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
friendly
0
funny
0
informative
0
agree
0
disagree
0
pwnt
0
like
0
dislike
0
late
0
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions


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


Offline Silver Knight

  • Founder, Director\Developer
  • Loki
  • *
    • Posts: 7113
  • 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
friendly
0
funny
0
informative
0
agree
0
disagree
0
pwnt
0
like
0
dislike
0
late
0
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions


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


Offline Sickness

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





Very very interesting...
friendly
0
funny
0
informative
0
agree
0
disagree
0
pwnt
0
like
0
dislike
0
late
0
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions

Rusty - Returned to the Zone


Offline KingArthur

  • Bane of the shoutbox, player of autoplaying music.
  • **Donator**
  • Epic Poster
  • *
    • Posts: 1014
  • 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.
friendly
0
funny
0
informative
0
agree
0
disagree
0
pwnt
0
like
0
dislike
0
late
0
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions



Offline Storm_Shield

  • "Never forget..."
  • Horse
  • **
    • Posts: 53
Reply #5 on: 02-12-2011
Already confused.
friendly
0
funny
0
informative
0
agree
0
disagree
0
pwnt
0
like
0
dislike
0
late
0
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions

I'm back from the dead...


Offline Frostee

  • Ellen Page is my waifu
  • Gladiator
  • ****
    • Posts: 938
  • Awards Pack your shit in a box and get out.
Reply #6 on: 02-12-2011
friendly
0
funny
0
informative
0
agree
0
disagree
0
pwnt
0
like
0
dislike
0
late
0
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions



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

       HGN is supported by small passive adverts. Please consider disabling your adblocker on this site.

    * Users Online

    Steven :D

    Dot Guests: 596 | Dot Users
    SimplePortal 2.3.7 © 2008-2021, SimplePortal