Creating player model overview

Player models are multipart models. They are created as any other models (read more about model creation in Serious Modeler Help). Main model is player's legs called by default player.mdl (you can change it in Player's .amc file). Torso (by default body.mdl, but could be changed in .amc file) is attached on player.mdl (read more on attachments in Serious Modeler help). Body must have attachment called HEAD (by default head.mdl, but could be changed in .amc file). Other models (like glasses, helmets....) are optional and must be included in player's .amc file.
Everyone of required models have set of attachments (body, head, weapons...) which names and sequencing should be as default (additional attachments can be added and controled via .amc files). When loading any player model in Serious Modeler, in in Tools panel (Q) under Attachments tab, next to each attachment name, link to actual model is found. Bellow is list of required attachments for Player model (from .h file).

Legs model: (player.mdl)
PLAYER_ATTACHMENT_TORSO 0 -Attachment name for torso (body.mdl), additional attachments can be added on model and controled via .amc file

Torso model: (body.mdl)
BODY_ATTACHMENT_HEAD 0
BODY_ATTACHMENT_COLT_RIGHT 1
BODY_ATTACHMENT_KNIFE 2
BODY_ATTACHMENT_SINGLE_SHOTGUN 3
BODY_ATTACHMENT_DOUBLE_SHOTGUN 4
BODY_ATTACHMENT_FLAMER 5
BODY_ATTACHMENT_TOMMYGUN 6
BODY_ATTACHMENT_CANNON 7
BODY_ATTACHMENT_GRENADE_LAUNCHER 8
BODY_ATTACHMENT_LASER 9
BODY_ATTACHMENT_MINIGUN 10
BODY_ATTACHMENT_ROCKET_LAUNCHER 11
BODY_ATTACHMENT_COLT_LEFT 12
BODY_ATTACHMENT_ITEM 13


- Attachment name for Head (Head.mdl), additional attachments can be added after on model and controled via .amc file
- Attachment name for colt (in right hand)
- Attachment name for Knife (in right hand)
- Attachment name for Single shotgun (controled by right hand's triangle by default)
- Attachment name for Double shotgun (controled by right hand's triangle by default)
- unused
- Attachment name for Tommy gun (controled by right hand's triangle by default)
- Attachment name for Cannon (controled by right hand's triangle by default)
- Attachment name for Grenade launcher (controled by right hand's triangle by default)
- Attachment name for Laser gun (controled by right hand's triangle by default)
- Attachment name for Minigun (controled by right hand's triangle by default)
- Attachment name for Rocket launcher (controled by right hand's triangle by default)
- Attachment name for colt (controled by left hand's triangle by default)
- Attachment name misc items (used in singleplay only)


Head model: (Head.mdl)
Dont have any required attachments,additional attachments can be added on model and controled via player's .amc file

Player's legs model (player.mdl by default) need to have 3 assinged collision boxes, their names and sequencing must not be changed but properties as size and positions are adjustable.

PLAYER_COLLISION_BOX_STAND 0
PLAYER_COLLISION_BOX_CROUCH 1
PLAYER_COLLISION_BOX_SWIM 2
PLAYER_COLLISION_BOX_SWIMSMALL 3

- Standing collision when player walks, stand, fires weapons...
- Crouch collision when player is crouched
- Swimming collision when player swims
- Optional collision when player changes from walk to swim or vice versa.


Serious Sam model have extra set of animations for Cut sequences. They must exist in Serious Sam model in order to game properly work but to keep file size smaller they can be replaced with any existing animation from that model or can consist of single frame. To keep model's size smaller, body's weapons animations have been grouped in 3 groups:
1) Colt_: for colts and knife idle/attack/redrawing/drawing weapons....
2) Shotgun_: for single/double shotgun, laser, tommygun idle/attack/redrawing/drawing weapons....
3) Minigun_: for minigun/rocketlauncher/grenadelauncher and cannon idle/attack/redrawing/drawing weapons....
Those 3 groups have animations for swiming and walking.
Bellow is list of animations per model with comment which are must for singleplayer model and which can be replaced with other animations.

Torso model: (body.mdl)
Required animations

Colt animations
BODY_ANIM_DEFAULT_ANIMATION 0
BODY_ANIM_COLT_STAND 1
BODY_ANIM_COLT_REDRAW 2
BODY_ANIM_COLT_DRAW 3
BODY_ANIM_COLT_FIRERIGHT 4
BODY_ANIM_COLT_FIRELEFT 5
BODY_ANIM_KNIFE_ATTACK 6


- optional, best used for adding/adjusting attachments
- idle/running/walking/jumping animation
- puting weapon away (can be only 1 frame to keep filesize smaller)
- taking weapon out (can be same animation as Draw, with frames sequence inverted)
- firing right hand colt(can be only 1 frame to keep filesize smaller)
- firing left hand colt(can be only 1 frame to keep filesize smaller)
- knife attack(can be only 1 frame to keep filesize smaller)

Swimming Colt animations
BODY_ANIM_COLT_SWIM_STAND 7
BODY_ANIM_COLT_SWIM_REDRAW 8
BODY_ANIM_COLT_SWIM_DRAW 9
BODY_ANIM_COLT_SWIM_FIRERIGHT 10
BODY_ANIM_COLT_SWIM_FIRELEFT 11
BODY_ANIM_KNIFE_SWIM_ATTACK 12


- swim idle/swimming animation
- puting weapon away (can be only 1 frame to keep filesize smaller)
- taking weapon out (can be same animation as Draw, with frames sequence inverted)
- firing right hand colt(can be only 1 frame to keep filesize smaller)
- firing left hand colt(can be only 1 frame to keep filesize smaller)
- knife attack(can be only 1 frame to keep filesize smaller)

Colt animations
BODY_ANIM_DEFAULT_ANIMATION 0
BODY_ANIM_COLT_STAND 1
BODY_ANIM_COLT_REDRAW 2
BODY_ANIM_COLT_DRAW 3
BODY_ANIM_COLT_FIRERIGHT 4
BODY_ANIM_COLT_FIRELEFT 5
BODY_ANIM_KNIFE_ATTACK 6


- optional, best used for adding/adjusting attachments
- idle/running/walking/jumping animation
- puting weapon away (can be only 1 frame to keep filesize smaller)
- taking weapon out (can be same animation as Draw, with frames sequence inverted)
- firing right hand colt(can be only 1 frame to keep filesize smaller)
- firing left hand colt(can be only 1 frame to keep filesize smaller)
- knife attack(can be only 1 frame to keep filesize smaller)

Shotgun animations
BODY_ANIM_SHOTGUN_STAND 13
BODY_ANIM_SHOTGUN_REDRAW 14
BODY_ANIM_SHOTGUN_DRAW 15
BODY_ANIM_SHOTGUN_FIRELONG 16
BODY_ANIM_SHOTGUN_FIRESHORT 17


- idle/running/walking/jumping animation (can be same as Colt_stand to keep file size smaller)
- puting weapon away (can be only 1 frame to keep filesize smaller)
- taking weapon out (can be same animation as Draw, with frames sequence inverted)
- firing heavy weapons like doubleshotgun(can be only 1 frame to keep filesize smaller)
- firing smaller weapons like singleshotgun/laser/tommygun(can be only 1 frame to keep filesize smaller)

Swimming Shotgun animations
BODY_ANIM_SHOTGUN_SWIM_STAND 18
BODY_ANIM_SHOTGUN_SWIM_REDRAW 19
BODY_ANIM_SHOTGUN_SWIM_DRAW 20
BODY_ANIM_SHOTGUN_SWIM_FIRELONG 21
BODY_ANIM_SHOTGUN_SWIM_FIRESHORT 22


- swim idle/swimming animation
- puting weapon away (can be only 1 frame to keep filesize smaller)
- taking weapon out (can be same animation as Draw, with frames sequence inverted)
- firing heavy weapons like doubleshotgun(can be only 1 frame to keep filesize smaller)
- firing smaller weapons like singleshotgun/laser/tommygun(can be only 1 frame to keep filesize smaller)

Minigun animations
BODY_ANIM_MINIGUN_STAND 23
BODY_ANIM_MINIGUN_REDRAW 24
BODY_ANIM_MINIGUN_DRAW 25
BODY_ANIM_MINIGUN_FIRELONG 26
BODY_ANIM_MINIGUN_FIRESHORT 27


- idle/running/walking/jumping animation (can be same as Colt_stand to keep file size smaller)
- puting weapon away (can be only 1 frame to keep filesize smaller)
- taking weapon out (can be same animation as Draw, with frames sequence inverted)
- firing heavy weapons like Rocket/Grenade launcher and cannon(can be only 1 frame to keep filesize smaller)
- firing faster weapons like minigun(can be only 1 frame to keep filesize smaller)

Swimming Minigun animations
BODY_ANIM_MINIGUN_SWIM_STAND 28
BODY_ANIM_MINIGUN_SWIM_REDRAW 29
BODY_ANIM_MINIGUN_SWIM_DRAW 30
BODY_ANIM_MINIGUN_SWIM_FIRELONG 31
BODY_ANIM_MINIGUN_SWIM_FIRESHORT 32


- swim idle/swimming animation
- puting weapon away (can be only 1 frame to keep filesize smaller)
- taking weapon out (can be same animation as Draw, with frames sequence inverted)
- firing heavy weapons like Rocket/Grenade launcher and cannon(can be only 1 frame to keep filesize smaller)
- firing faster weapons like minigun(can be only 1 frame to keep filesize smaller)

Death animations
BODY_ANIM_DEATH_UNDERWATER 33
BODY_ANIM_DEATH_UNDERWATERIDLE 34
BODY_ANIM_DEATH_BACK 35
BODY_ANIM_DEATH_EASYFALLBACK 36
BODY_ANIM_DEATH_FORWARD 37
BODY_ANIM_DEATH_EASYFALLFORWARD 38
BODY_ANIM_DEATH_SPIKES 39


- death when killed while swimming or drawned
- death idle underwater
- death when killed with heavy weapon or by receiving large ammount of damage from front
- death when killed with small weapon or by receiving small ammount of damage from front
- death when killed with heavy weapon or by receiving large ammount of damage from back
- death when killed with small weapon or by receiving small ammount of damage from back
- death when pierced with spikes

Cut sequences only: (not used in multiplayer)
BODY_ANIM_COLT_REDRAWSLOW 40
BODY_ANIM_COLT_DEACTIVATETOWALK 41
BODY_ANIM_SHOTGUN_REDRAWSLOW 42
BODY_ANIM_SHOTGUN_DEACTIVATETOWALK 43
BODY_ANIM_MINIGUN_REDRAWSLOW 44
BODY_ANIM_MINIGUN_DEACTIVATETOWALK 45
BODY_ANIM_STATUE_PULL 46
BODY_ANIM_LOOKAROUNDONCE 47
BODY_ANIM_WAIT 48
BODY_ANIM_WAITTOLOOKAROUND 49
BODY_ANIM_LOOKAROUNDTOWAIT 50
BODY_ANIM_LOOKAROUND 51
BODY_ANIM_NORMALWALK 52
BODY_ANIM_SPAWNPOSE 53
BODY_ANIM_BRIDGEFALLPOSE 54
BODY_ANIM_KEYLIFT 55
BODY_ANIM_ABYSSFALL 56
BODY_ANIM_SPAWN_FALLDOWN 57
BODY_ANIM_SPAWN_GETUP 58


- puting weapon away slowly (same animation as redraw just slower, could be only 1 frame to keep filesize smaller)
- weapon redraw to 1st frame of walk animation (could be only 1 frame to keep filesize smaller)
- puting weapon away slowly (same animation as redraw just slower, could be only 1 frame to keep filesize smaller)
- weapon redraw to 1st frame of walk animation (could be only 1 frame to keep filesize smaller)
- puting weapon away slowly (same animation as redraw just slower, could be only 1 frame to keep filesize smaller)
- weapon redraw to 1st frame of walk animation (could be only 1 frame to keep filesize smaller)
- puting misc items to altars
- looking around
- inner animation from idle to look around
- inner animation from idle to look around
- inner animation from idle to look around with sequence inverted
- macro animation, consist of WaitToLookAround,4 times LookAoundOnce adn LookAroundToWait
- body walk animation without weapons
- spawning frame for beggining of the game
- falling from the bridge animation
- taking items from altar
- falling to abyss
- spawning animation for beggining of the game
- geting up for beggining of the game

Legs model: (Player.mdl)
Required animations

PLAYER_ANIM_DEFAULT_ANIMATION 0
PLAYER_ANIM_STAND 1
PLAYER_ANIM_BACKPEDAL 2
PLAYER_ANIM_BACKPEDALRUN 3
PLAYER_ANIM_JUMPSTART 4
PLAYER_ANIM_JUMPEND 5
PLAYER_ANIM_TURNLEFT 6
PLAYER_ANIM_TURNRIGHT 7
PLAYER_ANIM_RUN 8
PLAYER_ANIM_NORMALWALK 9
PLAYER_ANIM_CROUCH 10
PLAYER_ANIM_RISE 11
PLAYER_ANIM_CROUCH_IDLE 12
PLAYER_ANIM_CROUCH_TURNLEFT 13
PLAYER_ANIM_CROUCH_TURNRIGHT 14
PLAYER_ANIM_CROUCH_WALK 15
PLAYER_ANIM_CROUCH_WALKBACK 16
PLAYER_ANIM_SWIM 17
PLAYER_ANIM_SWIMIDLE 18
PLAYER_ANIM_DEATH_UNDERWATER 19
PLAYER_ANIM_DEATH_UNDERWATERIDLE 20
PLAYER_ANIM_DEATH_BACK 35
PLAYER_ANIM_DEATH_EASYFALLBACK 36
PLAYER_ANIM_DEATH_FORWARD 37
PLAYER_ANIM_DEATH_EASYFALLFORWARD 38
PLAYER_ANIM_DEATH_SPIKES 39

- default animation, can be any of frames from other animations, good for testing LOD, attachment adding/adjusting....
- idle when standing still (can be used in computer/model browser)
- walk backwards (can be same as walk just frames sequence inverted or Backpedalrun but faster)
- run backwards (can be same as run just frames sequence inverted)
- jump up part, player will stay in last frame while flying thru air
- falling down from jump
- turning left (can be replaced with walk/run)
- turning right (can be replaced with walk/run)
- run animation
- run animation (if doesnt look wierd can be replaced with run but should be slower)
- crouching, player will stay in last frame while crouched
- standing up to idle (can be same as crouch but inverted)
- idle while crouched (can be only 1 frame to keep filesize smaller)
- turning left crouched (can be replaced with crouch walk)
- turning right crouched (can be replaced with crouch walk)
- crouched walk
- can be replaced with crouched walk but inverted
- swim
- swim idle (can be replaced with few frames from swim but much slower)
- death when killed while swimming or drawned
- Death underwater idle (can be replaced with few frames from Death_Underwater but much slower)
- death when killed with heavy weapon or by receiving large ammount of damage from front
- death when killed with small weapon or by receiving small ammount of damage from front
- death when killed with heavy weapon or by receiving large ammount of damage from back
- death when killed with small weapon or by receiving small ammount of damage from back
- death when pierced with spikes

Cut sequences only: (not used in multiplayer)
PLAYER_ANIM_STATUE_PUT 26
PLAYER_ANIM_SPAWNPOSE 27
PLAYER_ANIM_BRIDGEFALLPOSE 28
PLAYER_ANIM_KEYLIFT 29
PLAYER_ANIM_ABYSSFALL 30
PLAYER_ANIM_SPAWN_FALLDOWN 31
PLAYER_ANIM_SPAWN_GETUP 32
PLAYER_ANIM_ENTERSPACESHIP 33
PLAYER_ANIM_INTRO 34


- not used, should be 1 frame
- 1 frame for game beggining
- falling from the bridge
- taking items from altar
- falling into deep abyss (death)
- falling from spawn pose
- getup
- pose for the end of game
- pose for game intro

Serious Sam model is only one available in singleplay and multiplay because it have additional animations needed for ingame cut sequences.

Note: Since weapons used in Serious Sam are different visually, we used those 3 groups of weapon handling for player models (Colt,Shotgun and Minigun). You can group them in single group and point different animations to same model animations (like Colt_stand, Shotgun_stand and Minigun_stand can be same animation).
To keep filesize smaller, some animations can be single frames only (like drawing/redrawing, fireing....).
Serious Engine uses interpolation between animation frames, so some animations with linear motion can have frame count reduced and still look good. If animation have complex nonlinear motion, more frames is needed.


Every player model uses same sounds located in Sounds/Player in .gro file. To change those sounds, unpack that directory from .gro file (zip archive) to root directory where Serious Sam is installed.
When game is started it will load sounds/models/textures first from folders where Serious Sam is installed and if cant find them there, it will look in .gro file.
To change Serious Sam model, unpack directory Models/Player/SeriousSam/ from .gro file (zip archive) to root directory where Serious Sam is installed.

Attachment model configuration files (.amc) located in root of Model/Player folder are used in Serious Sam's Players and Controls menu, though their implementation in future will be expanded and modified. Currrently they are used when previewing multiplayer models and attaching weapons to them ingame. There are 2 types of .amc files: one for weapons and one for multiplayer models. Weapons .amc files are located in Models/Weapons directory in .gro file, Player .amc files are located in Models/Player folder in .gro file.

Weapons:

This is .amc file for Rocket Launcher weapon (RocketLauncher.amc).

    { 						-beggining of .amc

Attachment: 11 -attachment number on Player's body model
{ -beggining of models definition

Model: TFNM Models\Weapons\RocketLauncher\RocketLauncherItem.mdl -main weapon model
Texture: TFNM Models\Weapons\RocketLauncher\Body.tex -main weapon model's texture

Attachment: 0 -1st attachment on main weapon model
{
Model: TFNM Models\Weapons\RocketLauncher\Body.mdl -attachment model name
Texture: TFNM Models\Weapons\RocketLauncher\Body.tex -attachment model' texture name
}

Attachment: 1 -2nd attachment on main weapon model
{
Model: TFNM Models\Weapons\RocketLauncher\RotatingPart.mdl -attachment model name
Texture: TFNM Models\Weapons\RocketLauncher\RotatingPart.tex -attachment model' texture name
}

Attachment: 2 -3rd attachment on main weapon model
{
Model: TFNM Models\Weapons\RocketLauncher\Projectile\Rocket.mdl -attachment model name
Texture: TFNM Models\Weapons\RocketLauncher\Projectile\Rocket.tex -attachment model' texture name
}
Attachment: 3 -4th attachment on main weapon model
{
Model: TFNM Models\Weapons\RocketLauncher\Projectile\Rocket.mdl -attachment model name
Texture: TFNM Models\Weapons\RocketLauncher\Projectile\Rocket.tex -attachment model' texture name
}

Attachment: 4 -5th attachment on main weapon model
{
Model: TFNM Models\Weapons\RocketLauncher\Projectile\Rocket.mdl -attachment model name
Texture: TFNM Models\Weapons\RocketLauncher\Projectile\Rocket.tex -attachment model' texture name }

Attachment: 5 -6th attachment on main weapon model
{
Model: TFNM Models\Weapons\RocketLauncher\Projectile\Rocket.mdl -attachment model name
Texture: TFNM Models\Weapons\RocketLauncher\Projectile\Rocket.tex -attachment model' texture name
}

} -end of models definition

} -end of .amc


Every multiplayer model have in its .amc file reference to weapon .amc file in preview mode. Attachments should be added in .amc file in order as they are added in model file.


Player:

This is .amc file for Serious Sam player (SeriousSam.amc).

Name: Serious Sam 					-name of model
{ -beggining of model definition
Model: TFNM Models\Player\SeriousSam\Player.mdl -player model name (master model )
Texture: TFNM Models\Player\SeriousSam\Player.tex -player model's texture name
Animation: 1 -preview animation number

Attachment: 0 -1st attachment on player model (should be body if exists)
{ -beggining of body attachment models definition

Model: TFNM Models\Player\SeriousSam\Body.mdl -body model name
Texture: TFNM Models\Player\SeriousSam\Body.tex -body model's texture name
Animation: 23 -preview animation number

Attachment: 0 -1st attachment on body model (should be head if exists)
{
Model: TFNM Models\Player\SeriousSam\Head.mdl -head model name
Texture: TFNM Models\Player\SeriousSam\Head.tex -head model's texture name

Attachment: 0 -1st attachment on head model
{
Model: TFNM Models\Player\SeriousSam\Glasses.mdl -glasses model name
Texture: TFNM Models\Player\SeriousSam\Glasses.tex -glasses model's texture name
}
}
PreviewOnly
{

Include: TFNM Models\Weapons\Minigun.amc -weapon's .amc for preview
}

} -end of body attachment models definition
} -end of model definition


In model's definition section, specular textures can be added. For specular add line Specular:TFNM Models\SpecularTextures\Medium.tex bellow Texture definition line. Same applies for bump (Bump:TFNM Models\BumpTextures\Metal.tex) and reflection (Reflection:TFNM Models\ReflectionTextures\gold.tex).