Kill stats state add-ons and change

 

The changes made to torso files will allow users with the menu to view their deaths. It is required to add new states and change old states. You may notice I remake location states even though the game has some. I do this to avoid confusion and errors. More detail can also be detected. Four states are changed and the rest are added. If a state does not have a entry commands section, add it in manually.

 

 

Changes

 

State Killed

 

TO count deaths we add the line ‘exec global/killed.scr "times_killed"’ to state KILLED.  We add it under entrycommands.

 

            entrycommands

            {

                        nextpaintime -1 // allow all pain calls to work properly for death anim selection

                        exec global/killed.scr "times_killed"

            }

 

 

Enabling locations

 

To get info on where or how the player died we have to run a new state before we run state KILLED_GENERIC. So we replace KILLED_GENERIC with KILLED_MOD. Then we add a new state KILLED_MOD later.

 

 

                        KILLED_GENERIC                : default

 

Change  to

 

                        KILLED_MOD                       : default

 

The state should now look like this.

 

state KILLED

{

            movetype anim

 

            entrycommands

            {

                        nextpaintime -1 // allow all pain calls to work properly for death anim selection

                        exec global/killed.scr "times_killed"

            }

 

            states

            {

                        EXPLOSION_KILLED          : PAIN_TYPE "explosion"

                        EXPLOSION_KILLED          : PAIN_TYPE "grenade"

                        EXPLOSION_KILLED          : PAIN_TYPE "rocket"

                        KILLED_MOD                       : default

            }

}

 

State KILLED_RUNNING

 

After KILLED_GENERIC has run it will want to play the animation depending on if the player was running, If they were KILLED_RUNNING will run. To update the states on killed running for the player we have to add a exec line and some entrycommands. The following can be copied and pasted into the state KILLED_RUNNING at the top but below the “{“.

 

 

            entrycommands

            {

                        exec global/killed.scr "times_running"

            }

 

 

The state should then look like this:

 

state KILLED_RUNNING

{

            entrycommands

            {

                        exec global/killed.scr "times_running"

            }

 

            action

            {

                        death_knockedup                     : PAIN_DIRECTION "front" PAIN_THRESHOLD "50" CHANCE "30"

                        death_chest                              : PAIN_DIRECTION "front" PAIN_THRESHOLD "50"

                        death_run                                 : default

            }

           

            states

            {

                        KILLED_WAIT_FOR_DONE            : default

            }

}

 

State KILLED_CROUCHING

 

In order to update the KILLED_ CROUCHING states for a player we have to add a entrycommands section that constrains a exec line. The line executed a script with a player variable. The player’s states then update. The following can be copied and pasted into the state KILLED_CROUCHING at the top but below the “{“.

 

            entrycommands

            {

                        exec global/killed.scr "times_crouching"

            }

 

 

The state should then look like this:

 

state KILLED_CROUCHING

{

            entrycommands

            {

                        exec global/killed.scr "times_crouching"

            }

 

            action

            {

                        death_frontcrouch         : PAIN_DIRECTION "rear"

                        rifle_pain_kneestodeath : default

            }

 

            states

            {

                        KILLED_WAIT_FOR_DONE            : default

            }

}

 

State KILLED_STANDING

 

As with states KILLED_CROUCHING and KILLED_RUNNING for KILLED_STANDING stats to work properly a entrycommands section must be added to this state. Within that section a line that exec killed.scr must be placed. This line must also parse "times_running" wich is then added to  in the players console. The following can be copied and pasted into the state KILLED_STANDING at the top but below the “{“.

 

            entrycommands

            {

                        exec global/killed.scr "times_stood"

            }

 

 

The state should then look like this:

 

 

state KILLED_STANDING

{

            entrycommands

            {

                        exec global/killed.scr "times_stood"

            }

 

            states

            {

                        KILLED_LOWER_TORSO    : PAIN_LOCATION "pelvis"

                        KILLED_LOWER_TORSO    : PAIN_LOCATION "torso_lower"

                        KILLED_UPPER_TORSO     : PAIN_LOCATION "torso_mid"

                        KILLED_UPPER_TORSO     : PAIN_LOCATION "torso_upper"

                        KILLED_NECK                                 : PAIN_LOCATION "neck"

                        KILLED_HEAD                                  : PAIN_LOCATION "head"

                        KILLED_HEAD                                  : PAIN_LOCATION "helmet"

                        KILLED_RIGHT_ARM          : PAIN_LOCATION "r_arm_upper"

                        KILLED_RIGHT_ARM          : PAIN_LOCATION "r_arm_lower"

                        KILLED_RIGHT_ARM          : PAIN_LOCATION "r_hand"

                        KILLED_LEFT_ARM             : PAIN_LOCATION "l_arm_upper"

                        KILLED_LEFT_ARM             : PAIN_LOCATION "l_arm_lower"

                        KILLED_LEFT_ARM             : PAIN_LOCATION "l_hand"

                        KILLED_LEG                         : PAIN_LOCATION "r_leg_upper"

                        KILLED_LEG                         : PAIN_LOCATION "r_leg_lower"

                        KILLED_LEG                         : PAIN_LOCATION "r_foot"

                        KILLED_LEG                         : PAIN_LOCATION "l_leg_upper"

                        KILLED_LEG                         : PAIN_LOCATION "l_leg_lower"

                        KILLED_LEG                         : PAIN_LOCATION "l_foot"

 

                        KILLED_UPPER_TORSO     : default

            }

}

 

State EXPLOSION_KILLED

 

When a player is blown up it runs this state straight form state killed. This state must have a entrycommands section added to it. From this section you can execute scripts and perform some player script commands. From here ‘exec global/killed.scr "times_blownup"’ should be placed. This will exec the script when a player is blown up. The script then deals with the stats. The following can be copied and pasted into the state EXPLOSION_KILLED at the top but below the “{“.

 

            entrycommands

            {

                        exec global/killed.scr "times_blownup"

            }

 

The state should then look like this:

 

 

state EXPLOSION_KILLED

{

            entrycommands

            {

                        exec global/killed.scr "times_blownup"

            }

 

            action

            {

                        death_explosion_large  : PAIN_THRESHOLD "150"

//                      death_explosion_small  : PAIN_THRESHOLD "130"

                       

                        // directional death animations of in middle damage range

//                      death_explosion_front   : PAIN_DIRECTION "rear"

                        death_explosion_back  : PAIN_DIRECTION "front"

                        death_explosion_left     : PAIN_DIRECTION "left"

                        death_explosion_right   : PAIN_DIRECTION "right"

                       

                        death_explosion_small  : default // a just-in-case catch-all

            }

           

            states

            {

                        KILLED_WAIT_FOR_DONE            : default

            }

}

 

Added States

 

Once the changes have been made you need to add enw states. These states detect where or how the player was killed then run the state KILLED_GENERIC. The following states can be copied and pasted anywhere in a torso file. I would sugest near the killed states.

 

 

 

state KILLED_MOD

{

            states

            {

                        KILLED_MOD_PELVIS                                : PAIN_LOCATION "pelvis"

                        KILLED_MOD_TORSO_LOWER                            : PAIN_LOCATION "torso_lower"

                        KILLED_MOD_TORSO_MID                                   : PAIN_LOCATION "torso_mid"

                        KILLED_MOD_TORSO_UPPER                              : PAIN_LOCATION "torso_upper"

                        KILLED_MOD_NECK                                              : PAIN_LOCATION "neck"

                        KILLED_MOD_HEAD                                               : PAIN_LOCATION "head"

                        KILLED_MOD_HEAD                                               : PAIN_LOCATION "helmet"

                        KILLED_MOD_R_ARM_UPPER                              : PAIN_LOCATION "r_arm_upper"

                        KILLED_MOD_R_ARM_LOWER                            : PAIN_LOCATION "r_arm_lower"

                        KILLED_MOD_R_HAND                             : PAIN_LOCATION "r_hand"

                        KILLED_MOD_L_ARM_UPPER                              : PAIN_LOCATION "l_arm_upper"

                        KILLED_MOD_L_ARM_LOWER                            : PAIN_LOCATION "l_arm_lower"

                        KILLED_MOD_L_HAND                              : PAIN_LOCATION "l_hand"

                        KILLED_MOD_R_LEG_UPPER                               : PAIN_LOCATION "r_leg_upper"

                        KILLED_MOD_R_LEG_LOWER                              : PAIN_LOCATION "r_leg_lower"

                        KILLED_MOD_R_FOOT                              : PAIN_LOCATION "r_foot"

                        KILLED_MOD_L_LEG_UPPER                                : PAIN_LOCATION "l_leg_upper"

                        KILLED_MOD_L_LEG_LOWER                              : PAIN_LOCATION "l_leg_lower"

                        KILLED_MOD_L_FOOT                              : PAIN_LOCATION "l_foot"

 

                        KILLED_MOD_TORSO_UPPER      : default

            }

}

 

-----------------------------------------------------------------------------------------------------------------------

Added

stats mod locations

 

 

 

state KILLED_MOD_PELVIS

{

            entrycommands

            {

                        exec global/killed.scr "times_pelvis"

            }

 

            states

            {

                        KILLED_GENERIC    : default

            }

}

 

state KILLED_MOD_TORSO_LOWER

{

            entrycommands

            {

                        exec global/killed.scr "torso_lower"

            }

 

            states

            {

                        KILLED_GENERIC    : default

            }

}

 

state KILLED_MOD_TORSO_MID

{

            entrycommands

            {

                        exec global/killed.scr "torso_mid"

            }

 

            states

            {

                        KILLED_GENERIC    : default

            }

}

 

state KILLED_MOD_TORSO_UPPER

{

            entrycommands

            {

                        exec global/killed.scr "torso_upper"

            }

 

            states

            {

                        KILLED_GENERIC    : default

            }

}

 

state KILLED_MOD_NECK

{

            entrycommands

            {

                        exec global/killed.scr "neck"

            }

 

            states

            {

                        KILLED_GENERIC    : default

            }

}

 

state KILLED_MOD_HEAD

{

            entrycommands

            {

                        exec global/killed.scr "head"

            }

 

            states

            {

                        KILLED_GENERIC    : default

            }

}

 

state KILLED_MOD_R_ARM_LOWER

{

            entrycommands

            {

                        exec global/killed.scr "r_arm_lower"

            }

 

            states

            {

                        KILLED_GENERIC    : default

            }

}

 

state KILLED_MOD_R_HAND

{

            entrycommands

            {

                        exec global/killed.scr "r_hand"

            }

 

            states

            {

                        KILLED_GENERIC    : default

            }

}

 

state KILLED_MOD_R_ARM_UPPER

{

            entrycommands

            {

                        exec global/killed.scr "r_arm_upper"

            }

 

            states

            {

                        KILLED_GENERIC    : default

            }

}

 

state KILLED_MOD_L_ARM_UPPER

{

            entrycommands

            {

                        exec global/killed.scr "l_arm_upper"

            }

 

            states

            {

                        KILLED_GENERIC    : default

            }

}

 

state KILLED_MOD_L_ARM_LOWER

{

            entrycommands

            {

                        exec global/killed.scr "l_arm_lower"

            }

 

            states

            {

                        KILLED_GENERIC    : default

            }

}

 

state KILLED_MOD_L_HAND

{

            entrycommands

            {

                        exec global/killed.scr "l_hand"

            }

 

            states

            {

                        KILLED_GENERIC    : default

            }

}

 

state KILLED_MOD_R_LEG_UPPER

{

            entrycommands

            {

                        exec global/killed.scr "r_leg_upper"

            }

 

            states

            {

                        KILLED_GENERIC    : default

            }

}

 

state KILLED_MOD_R_LEG_LOWER

{

            entrycommands

            {

                        exec global/killed.scr "r_leg_lower"

            }

 

            states

            {

                        KILLED_GENERIC    : default

            }

}

 

state KILLED_MOD_R_FOOT

{

            entrycommands

            {

                        exec global/killed.scr "r_foot"

            }

 

            states

            {

                        KILLED_GENERIC    : default

            }

}

 

state KILLED_MOD_L_LEG_UPPER

{

            entrycommands

            {

                        exec global/killed.scr "l_leg_upper"

            }

 

            states

            {

                        KILLED_GENERIC    : default

            }

}

 

state KILLED_MOD_L_LEG_LOWER

{

            entrycommands

            {

                        exec global/killed.scr "l_leg_lower"

            }

 

            states

            {

                        KILLED_GENERIC    : default

            }

}

 

state KILLED_MOD_L_FOOT

{

            entrycommands

            {

                        exec global/killed.scr "l_foot"

            }

 

            states

            {

                        KILLED_GENERIC    : default

            }

}