[Gameplay] Change the rpg so the cross hair doesn't move while moving (scripts below)

Discussion in 'General' started by Spike, Mar 28, 2017.

  1. Spike

    Spike Long Live The King!

    Messages:
    612
    Likes Received:
    42
    Trophy Points:
    0
    NF rpg
    Code:
    WeaponData
    {
        // Weapon characteristics:
        "Damage"            "130"        // damage
        "Bullets"            "1"        // bullets per shoot
        "CycleTime"            "3"        // time between shoots
    
        //Explosive-specific values
        "Velocity"            "1500"        // Rocket velocity
        "Turning Speed"            "1.5"        // Turning speed (0-1)
        "Explosion Force"        "100"        // Explosion push force
        "Explosion Radius"        "50"        // Explosion radius
        "Explosion Sprite"        "9"        // This number is converted into a particle name in game_particles.txt
       
       
        // Weapon data is loaded by both the Game and Client DLLs.
        "printname"            "#SDK_MP5"
        "viewmodel"            "models/NF/Weapons/v/artillery/nf_rkt.mdl"
        "playermodel"        "models/NF/Weapons/w/artillery/nf_artillery.mdl"
       
        "anim_prefix"            "famas"
        "bucket"            "1"
        "bucket_position"        "0"
    
        "clip_size"            "-1"
        "clip2_size"            "-1"
       
        "primary_ammo"            "AMMO_ROCKETS"
        "secondary_ammo"        "AMMO_MELEE"
    
        "weight"            "25"
        "item_flags"            "0"
    
        "BuiltRightHanded"        "0"
        "AllowFlipping"            "1"
    
        "MeleeWeapon"            "0"
        "MeleeDamage"            "50"    // damage per melee hit
        "MeleeCycleTime"        "1.0"    // time between melee attacks
    
    
    //Weapon Spread
        //When at rest
        "JumpingSpread"            "0.01"
        "StandingSpread"        "0.01"
        "DuckingSpread"            "0.01"
    
        //When moving at full speed (sv_maxspeed)
        "JumpingSpreadModifier"        "0.01"
        "StandingSpreadModifier"    "0.01"
        "DuckingSpreadModifier"        "0.01"
    
        //Maximum the spread can become due to spread increment per shot below
        "JumpingSpreadMax"    "0.7"
        "StandingSpreadMax"    "0.3"
        "DuckingSpreadMax"    "0.1"
    
        //Increment spread by this amount for every shot fired to maximum of moving at full speed spread
        "JumpingSpreadIncrement"    "0.01"
        "StandingSpreadIncrement"    "0.005"
        "DuckingSpreadIncrement"    "0.001"
    
        //Decrease spread by this amount for every second not fired down to minimum rest spread
        "JumpingSpreadDecrement"    "0.01"
        "StandingSpreadDecrement"    "0.05"
        "DuckingSpreadDecrement"    "0.1"
    
        //Weapon kick range x (vertical) and y (horizontal), full and no spread, max and min
        //interpolates between full and no spread value based on current spread (percentage inbetween at rest and maximum spread due to firing)
        //The max and min values are for defining a range that a random number is generated between
        "JumpingKick_X_FullSpread_Max"    "11"
        "JumpingKick_X_FullSpread_Min"    "9"
        "JumpingKick_X_NoSpread_Max"    "7"
        "JumpingKick_X_NoSpread_Min"    "5"
    
        "JumpingKick_Y_FullSpread_Max"    "2"
        "JumpingKick_Y_FullSpread_Min"    "-2"
        "JumpingKick_Y_NoSpread_Max"    "1"
        "JumpingKick_Y_NoSpread_Min"    "-1"
    
        "StandingKick_X_FullSpread_Max"    "3"
        "StandingKick_X_FullSpread_Min"    "2"
        "StandingKick_X_NoSpread_Max"    "2"
        "StandingKick_X_NoSpread_Min"    "1"
    
        "StandingKick_Y_FullSpread_Max"    "2"
        "StandingKick_Y_FullSpread_Min"    "0.5"
        "StandingKick_Y_NoSpread_Max"    "0.75"
        "StandingKick_Y_NoSpread_Min"    "0.3"
    
        "DuckingKick_X_FullSpread_Max"    "1"
        "DuckingKick_X_FullSpread_Min"    "0"
        "DuckingKick_X_NoSpread_Max"    "0.5"
        "DuckingKick_X_NoSpread_Min"    "0"
    
        "DuckingKick_Y_FullSpread_Max"    "0.1"
        "DuckingKick_Y_FullSpread_Min"    "0"
        "DuckingKick_Y_NoSpread_Max"    "0.05"
        "DuckingKick_Y_NoSpread_Min"    "0"
    //End Weapon Spread
    
    
        // Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds)
        SoundData
        {
            //"reload"            "Default.Reload"
            //"empty"            "Default.ClipEmpty_Rifle"
            "single_shot"            "NF_rpg.Fire"
        }
    
        // Weapon Sprite data is loaded by the Client DLL.
        TextureData
        {
            "weapon"
            {
                    "font"        "EmpiresTypeDeath"
                    "character"    "c"
            }
            "weapon_s"
            {   
                    "font"        "EmpiresTypeDeath"
                    "character"    "c"
            }
            "ammo"
            {
                    "font"        "EmpiresTypeDeath"
                    "character"    "c"
            }
            "crosshair"
            {
                    "file"        "sprites/crosshairs"
                    "x"        "0"
                    "y"        "48"
                    "width"        "24"
                    "height"    "24"
            }
            "autoaim"
            {
                    "file"        "sprites/crosshairs"
                    "x"            "0"
                    "y"            "48"
                    "width"        "24"
                    "height"    "24"
            }
        }
        ModelBounds
        {
            Viewmodel
            {
                Mins    "-10 -4 -13"
                Maxs    "21 9 -1"
            }
            World
            {
                Mins    "-10 -7 -6"
                Maxs    "22 8 9"
            }
        }
    }
    
    BE rpg
    Code:
    WeaponData
    {
        // Weapon characteristics:
        "Damage"            "130"        // damage
        "Bullets"            "1"        // bullets per shoot
        "CycleTime"            "3"        // time between shoots
    
        //Explosive-specific values
        "Velocity"            "1500"        // Rocket velocity
        "Turning Speed"            "1.5"        // Turning speed (0-1)
        "Explosion Force"        "100"        // Explosion push force
        "Explosion Radius"        "50"        // Explosion radius
        "Explosion Sprite"        "9"        // Explosion Sprite
       
       
        // Weapon data is loaded by both the Game and Client DLLs.
        "printname"            "#SDK_MP5"
        "viewmodel"            "models/Imperial/Weapons/v/AT/imp_AT.mdl"
        "playermodel"        "models/Imperial/Weapons/w/AT/imp_AT.mdl"
    
        "anim_prefix"        "Galil"
        "bucket"            "1"
        "bucket_position"        "0"
    
        "clip_size"            "-1"
        "clip2_size"            "-1"
       
        "primary_ammo"            "AMMO_ROCKETS"
        "secondary_ammo"        "AMMO_MELEE"
    
        "weight"            "25"
        "item_flags"            "0"
    
        "BuiltRightHanded"        "0"
        "AllowFlipping"            "1"
    
        "MeleeWeapon"            "0"
        "MeleeDamage"            "50"    // damage per melee hit
        "MeleeCycleTime"        "1.0"    // time between melee attacks
    
    
    //Weapon Spread
        //When at rest
        "JumpingSpread"            "0.01"
        "StandingSpread"        "0.01"
        "DuckingSpread"            "0.01"
    
        //When moving at full speed (sv_maxspeed)
        "JumpingSpreadModifier"        "0.01"
        "StandingSpreadModifier"    "0.01"
        "DuckingSpreadModifier"        "0.01"
    
        //Maximum the spread can become due to spread increment per shot below
        "JumpingSpreadMax"    "0.7"
        "StandingSpreadMax"    "0.3"
        "DuckingSpreadMax"    "0.1"
    
        //Increment spread by this amount for every shot fired to maximum of moving at full speed spread
        "JumpingSpreadIncrement"    "0.01"
        "StandingSpreadIncrement"    "0.005"
        "DuckingSpreadIncrement"    "0.001"
    
        //Decrease spread by this amount for every second not fired down to minimum rest spread
        "JumpingSpreadDecrement"    "0.01"
        "StandingSpreadDecrement"    "0.05"
        "DuckingSpreadDecrement"    "0.1"
    
        //Weapon kick range x (vertical) and y (horizontal), full and no spread, max and min
        //interpolates between full and no spread value based on current spread (percentage inbetween at rest and maximum spread due to firing)
        //The max and min values are for defining a range that a random number is generated between
        "JumpingKick_X_FullSpread_Max"    "11"
        "JumpingKick_X_FullSpread_Min"    "9"
        "JumpingKick_X_NoSpread_Max"    "7"
        "JumpingKick_X_NoSpread_Min"    "5"
    
        "JumpingKick_Y_FullSpread_Max"    "2"
        "JumpingKick_Y_FullSpread_Min"    "-2"
        "JumpingKick_Y_NoSpread_Max"    "1"
        "JumpingKick_Y_NoSpread_Min"    "-1"
    
        "StandingKick_X_FullSpread_Max"    "3"
        "StandingKick_X_FullSpread_Min"    "2"
        "StandingKick_X_NoSpread_Max"    "2"
        "StandingKick_X_NoSpread_Min"    "1"
    
        "StandingKick_Y_FullSpread_Max"    "2"
        "StandingKick_Y_FullSpread_Min"    "0.5"
        "StandingKick_Y_NoSpread_Max"    "0.75"
        "StandingKick_Y_NoSpread_Min"    "0.3"
    
        "DuckingKick_X_FullSpread_Max"    "1"
        "DuckingKick_X_FullSpread_Min"    "0"
        "DuckingKick_X_NoSpread_Max"    "0.5"
        "DuckingKick_X_NoSpread_Min"    "0"
    
        "DuckingKick_Y_FullSpread_Max"    "0.1"
        "DuckingKick_Y_FullSpread_Min"    "0"
        "DuckingKick_Y_NoSpread_Max"    "0.05"
        "DuckingKick_Y_NoSpread_Min"    "0"
    //End Weapon Spread
    
    
        // Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds)
        SoundData
        {
            //"reload"            "Default.Reload"
            //"empty"            "Default.ClipEmpty_Rifle"
            "single_shot"            "IMP_rpg.Fire"
        }
    
        // Weapon Sprite data is loaded by the Client DLL.
        TextureData
        {
            "weapon"
            {
                    "font"        "EmpiresTypeDeath"
                    "character"    "P"
            }
            "weapon_s"
            {   
                    "font"        "EmpiresTypeDeath"
                    "character"    "P"
            }
            "ammo"
            {
                    "font"        "EmpiresTypeDeath"
                    "character"    "P"
            }
            "crosshair"
            {
                    "file"        "sprites/crosshairs"
                    "x"        "0"
                    "y"        "48"
                    "width"        "24"
                    "height"    "24"
            }
            "autoaim"
            {
                    "file"        "sprites/crosshairs"
                    "x"            "0"
                    "y"            "48"
                    "width"        "24"
                    "height"    "24"
            }
        }
        ModelBounds
        {
            Viewmodel
            {
                Mins    "-10 -4 -13"
                Maxs    "21 9 -1"
            }
            World
            {
                Mins    "-10 -7 -6"
                Maxs    "22 8 9"
            }
        }
    }
    
    Once you change this the crosshair will stay like this while moving
    [​IMG]
     
  2. flasche

    flasche Member Staff Member Moderator

    Messages:
    13,299
    Likes Received:
    168
    Trophy Points:
    0
    hud_dynamiccrosshair 0
     
  3. LordDz_2

    LordDz_2 Strange things happens here

    Messages:
    2,956
    Likes Received:
    93
    Trophy Points:
    0
    Except that changes it for rifles and smgs which are affected by moving.
     
  4. flasche

    flasche Member Staff Member Moderator

    Messages:
    13,299
    Likes Received:
    168
    Trophy Points:
    0
    put it in <class>.cfg?

    if you put effort in it, you could even change it when you switch weapons - unless you use mousewheel ofc but who does that?
    and a macro might even overcome this issue as you always start with the same weapon.
     
  5. Spike

    Spike Long Live The King!

    Messages:
    612
    Likes Received:
    42
    Trophy Points:
    0
    This should of been changed ages ago
     
  6. Sgt.Security

    Sgt.Security Member

    Messages:
    3,137
    Likes Received:
    140
    Trophy Points:
    0
    Is there a specific reason why RPG crosshair needs to be stable when you are moving?
     
  7. Avatarix

    Avatarix Member

    Messages:
    422
    Likes Received:
    24
    Trophy Points:
    0
    The rocket follows the middle of the reticule anyway so it might be misleading?
     
  8. Neoony

    Neoony Member

    Messages:
    1,370
    Likes Received:
    106
    Trophy Points:
    0
    Is there a reason for it to expand when you move? xD

    Dynamic crosshair is supposed to show you how inaccurate the weapon will be. Its not supposed to indicate that you are moving.
    And RPG accuracy doesnt seem to be affected when moving.

    Might confuse some at first tries, if the person knows what its supposed to mean.

    But yeah, quite a detail.
     
    Avatarix likes this.
  9. flasche

    flasche Member Staff Member Moderator

    Messages:
    13,299
    Likes Received:
    168
    Trophy Points:
    0
    its not?
     
  10. Avatarix

    Avatarix Member

    Messages:
    422
    Likes Received:
    24
    Trophy Points:
    0
    no
     
  11. flasche

    flasche Member Staff Member Moderator

    Messages:
    13,299
    Likes Received:
    168
    Trophy Points:
    0
    its really only that the dumbfire missiles are off the center of the screen, be a bit to the right, nf a bit to bottom right.
     
  12. Avatarix

    Avatarix Member

    Messages:
    422
    Likes Received:
    24
    Trophy Points:
    0
    yes, and we want to have reticule for rocket being tracked by mouse closed so it's easier to aim and easier for new players?
     

Share This Page