Guide for using Attachments feature - DeeCaaD/CrackShotPlus_V2 GitHub Wiki

    Attachment:
        Disable_Using_CS_Attachment_Without_CSP_Attachment: <Boolean>
        Unable_To_Change_To_CS_Attachment_Message: <String>
        Attachments: <String>,<etc.>
        Maxium_Amount_Of_Attachments: <Integer>

New GUI system requested and paid by ultrapunisher97. Server ip: mcaim.com

Applying Attachments

Each attachment requires item configured for that specified attachment. That item is what you're going to need. I personally prefer adding Crafting Recipe for that attachment item, but some may not. If some doesn't want to add Crafting Recipe they can always use /csp attachment all command to take weapon's attachment items into inventory and then make Admin Shop ingame to sell those attachments. That command require csp.reload permission.

After you have find your own way to get that attachment item then you can proceed.

So you have now attachment item in your inventory, next thing you're going to do is simply click the attachment item and then click the weapon with that attachment. If the attachment is valid for the weapon it will be applied to it.

This video shows how skin, trail and visual reload changing works. It also shows how to attach and detach attachments. Also it shows how to remove ammo from weapon. https://youtu.be/guSflC7MX4w

How about detaching the attachments?

Inside attachment_gui.yml is configured detach item. You'll have to just craft or get that item some other way and then do same thing you use to apply attachments. Which is that you click detach item and then click the weapon with that detach item.

This video shows how skin, trail and visual reload changing works. It also shows how to attach and detach attachments. Also it shows how to remove ammo from weapon. https://youtu.be/guSflC7MX4w

Disable_Using_CS_Attachment_Without_CSP_Attachment

If true then weapon needs attachment which Attachment_Toggle is true in order to change to the attachment.

Example weapon which has this kind of configuration for attachments.

Attachment:
    Disable_Using_CS_Attachment_Without_CSP_Attachment: true
    Unable_To_Change_To_CS_Attachment_Message: "&7You have to add grenade launcher attachment&c!"
    Attachments: "Grenade_Launcher"

Then player needs to add attachment with Attachment_Toggle true for weapon to change to the actual CrackShot attachment.

Unable_To_Change_To_CS_Attachment_Message

Player gets this message when trying to change to CrackShot attachment while weapon doesn't have any attachment which Attachment_Toggle is true.
Disable_Using_CS_Attachment_Without_CSP_Attachment must be enabled for this.

Attachments

Determines the attachments which can be added for weapon.
Note: If you want to let players use multiple attachments put , between them. For example Attachments: "Attachment1,Attachment2,Attachment3"
Note: Attachment names are decided inside attachments folder.

Maxium_Amount_Of_Attachments

Determines the maxium amount of attachments which can be added for this gun.

Attachments Folder

Item is always necessary for attachments so players can add them for weapons.

Crafting should be used for items and it works like in CrackShot:

  • Amount = Quantity
  • Shaped_Recipe = Shaped
  • Recipe = Ingredients

Note: Node Attachments_Which_Denies is used to prevent players from adding attachment to weapon which has some of the attachments listed in Attachments_Which_Denies
Note: Maxium_Stack_Amount is used if you want to stack exactly same attachment. By default its 1.

Attachments Folder

List Of Attachment Modules

Attachment:
    Skin:
        Durability: <Integer>
        Custom_Model_Data: <Integer>
        Change_Item_Type: <String>
        Scope:
            Durability: <Integer>
            Custom_Model_Data: <Integer>
            Change_Item_Type: <String>
        Reload:
            Durability: <Integer>
            Custom_Model_Data: <Integer>
            Change_Item_Type: <String>
    Maxium_Stack_Amount: <Integer>
    Attachments_Which_Denies: <String>,<String>,<etc.>
    Attachment_Toggle: <Boolean>
    Projectile_Control:
        Velocity_Update_Interval: <Integer>
        Control_Access_After: <Integer>
        Lose_Control_Distance: <Integer>
        Lose_Control_Time: <Integer>
        Lost_Control_Message: <String>
    Homing_Projectiles:
        Radius_To_Nearest_Entity: <Integer>
        Projectile_Turn_Ratio: <Double>
        Crosshair_To_Lock: <Boolean>
        Message_To_Shooter: <String>
        Message_To_Victim: <String>
        Lose_Control_Time: <Integer>
        Lost_Control_Message: <String>
        Entity_Target_Blacklist: <Boolean>
        Entity_Target_List:
        - <String>
        - <etc.>
    Bouncing_Projectiles:
        Decrese_Velocity_Per_Bounce: <Double>
        Minium_Velocity: <Double>
        Bounce_Amount: <Integer>
    StatTrak:
        Only_Player_Kill: <Boolean>
    Extended_Clip:
        Increase_Capacity_Per_Clip: <Integer>
    Weight:
        Decrease_Weapon_Weight: <Double>
    Headshot:
        Increase_Damage: <Double>
        Potions_Affect: <String>-<Integer>-<Integer>,<String>-<Integer>-<Integer>,<etc.>
        Run_Command:
            Only_Player_Damage: <Boolean>
            Command: <String>,<String>,<etc.>
    Backstab:
        Increase_Damage: <Double>
        Potions_Affect: <String>-<Integer>-<Integer>,<String>-<Integer>-<Integer>,<etc.>
        Run_Command:
            Only_Player_Damage: <Boolean>
            Command: <String>,<String>,<etc.>
    Critical_Hit:
        Increase_Damage: <Double>
        Potions_Affect: <String>-<Integer>-<Integer>,<String>-<Integer>-<Integer>,<etc.>
        Run_Command:
            Only_Player_Damage: <Boolean>
            Command: <String>,<String>,<etc.>
    Hit:
        Life_Steal: <Double>
        Increase_Damage: <Double>
        Potions_Affect: <String>-<Integer>-<Integer>,<String>-<Integer>-<Integer>,<etc.>
        Run_Command:
            Only_Player_Damage: <Boolean>
            Command: <String>,<String>,<etc.>
    Rapid_Fire:
        Increase_Fire_Rate: <Double>
        Potions_Affect_Fire_Rate: <String>-<Integer>-<Integer>,<String>-<Integer>-<Integer>,<etc.>
    Spread:
        Potions_Affect_Spread: <String>-<Double>-<Integer>,<String>-<Double>-<Integer>,<etc.>
        Decrease_Spread_While_Not_Touching_Ground: <Double>
        Decrease_Spread_While_Sprinting: <Double>
        Decrease_Spread_While_Sneaking: <Double>
        Decrease_Spread_While_Zooming: <Double>
        Decrease_Spread_While_Standing_Or_Walking: <Double>
    Custom_Spread:
        Potions_Affect_Spread: <String>-<Double>-<Integer>,<String>-<Double>-<Integer>,<etc.>
        Decrease_Y_Spread_While_Not_Touching_Ground: <Double>
        Decrease_ZX_Spread_While_Not_Touching_Ground: <Double>
        Decrease_Y_Spread_While_Sprinting: <Double>
        Decrease_ZX_Spread_While_Sprinting: <Double>
        Decrease_Y_Spread_While_Sneaking: <Double>
        Decrease_ZX_Spread_While_Sneaking: <Double>
        Decrease_Y_Spread_While_Zooming: <Double>
        Decrease_ZX_Spread_While_Zooming: <Double>
        Decrease_Y_Spread_While_Standing_Or_Walking: <Double>
        Decrease_ZX_Spread_While_Standing_Or_Walking: <Double>
    Silencer:
        Hide_Trails: <Boolean>
        Reduce_Sound_Volume: <Double>
        Change_Sounds: <String>
        Reduce_Damage: <Double>
        Multiply_Projectile_Speed: <Double>
    Scope:
        Increase_Zoom: <Integer>
        Night_Vision: <Boolean>
        Scope_Affect_Fire_Rate: <Integer>
    Incendiary:
        Incendiary_Time: <Integer>
    Attachment:
        CS_Attachment: <String>
    Reload:
        Change_Reload_Duration: <Integer>
        Change_Reload_Sounds: <String>
        Run_Command:
            Reload: <String>,<String>,<etc.>
            Reload_Complete: <String>,<String>,<etc.>
    Camera_Recoil:
        Decrease_Upwards:
            Minium: <Double>
            Maxium: <Double>
        Decrease_Sideways:
            Minium: <Double>
            Maxium: <Double>
    Explode:
        Weapon_Used_For_Explosion: <String>
        Explosion_Trigger: <String>
    Kill:
        Only_Player_Kills: <Boolean>
        Run_Command: <String>,<String>,<etc.>
    Shoot:
        Run_Command: <String>,<String>,<etc.>
        Reduce_Weapon_Shoot_Delay: <ticks>
    Soulbound:
        Enable: <Boolean>
        Allow_Owner_Change: <Boolean>
    Crafting:
        Amount: <Integer>
        Shaped_Recipe: <Boolean>
        Recipe: <String>
    Item:
        Item_Type: <String>:<Byte>
        Item_Name: <String>
        Item_Lore:
        - <String>
        - <etc.>
        Item_Durability: <Integer>
        Custom_Model_Data: <Integer>

SKIN

Attachment skin overrides player chosen skins. Last attachment added to weapon has the final word on which skins is going to be used.

PROJECTILE_CONTROL

Check this if you want to use this attachment.
Note: Don't let weapons have multiple this kind of attachments.

HOMING_PROJECTILES

Check this if you want to use this attachment.
Note: Don't let weapons have multiple this kind of attachments.

BOUNCING_PROJECTILES

Check this if you want to use this attachment.
Note: Don't let weapons have multiple this kind of attachments.

STATTRAK

Note: Don't let weapons have multiple this kind of attachments.

EXTENDED_CLIP

If using extended clip attachment weapon needs to have ammo enabled. Note: This attachment stacks with other same kind of attachments.

WEIGHT

If using weight attachment weapon needs to have weapon weight also. For example weapon's Weapon_Weight is -0.03. Player adds weight attachment to weapon which Decrease_Weapon_Weight is 0.01 then weapon's weight will be -0.02.
Note: This attachment stacks with other same kind of attachments.

HEADSHOT

For Run_Command take example from damage features. Also Run_Command can stack with attachments

If using headshot attachment weapon needs to have headshots enabled.
Note: This attachment stacks with other same kind of attachments.
Note: For potions affect headshot check this

BACKSTAB

For Run_Command take example from damage features. Also Run_Command can stack with attachments

If using backstab attachment weapon needs to have backstabs enabled.
Note: This attachment stacks with other same kind of attachments.
Note: For potions affect backstab check this

CRITICAL_HIT

For Run_Command take example from damage features. Also Run_Command can stack with attachments

If using critical hit attachment weapon needs to have critical hits enabled.
Note: This attachment stacks with other same kind of attachments.
Note: For potions affect critical hit check this

HIT

For Run_Command take example from damage features. Also Run_Command can stack with attachments

Note: This attachment stacks with other same kind of attachments.
Note: This attachment affects all kind of damage cause by CrackShot (explosions, energy, projectiles).
Note: For potions affect hit check this

INCENDIARY

Incendiary_Time determines how long enemies will burn after getting hurt from weapon which has this kind of attachment.
Note: This attachment stacks with other same kind of attachments.

ATTACHMENT_TOGGLE

Check this if you want to use this attachment.
Note: If weapon has many this kind of attachments, it doesn't matter, but it isn't recommended to let weapons have multiple this kind of attachments. One is already enough to let players change to CrackShot attachment.

ATTACHMENT

This attachment lets players add attachment which changes their CrackShot attachment to other CrackShot attachment.
For example weapon Carbine has by default attachment from CrackShot named Grenade_Laucnher. Player adds attachment Attachment and that attachment's CS_Attachment is Bouncing_Gun. After that whenever player changes to CrackShot attachment its Bouncing_Gun and not Grenade_Launcher anymore.
Note: Don't let weapons have multiple this kind of attachments

RAPID_FIRE

Note: Don't let fire rate go above 16 or below 1. If it goes CrackShotPlus changes it automatically to 1 or 16 though.
Note: This attachment stacks with other same kind of attachments.
Note: For potions affect fire rate check this

SPREAD

Note: This attachment stacks with other same kind of attachments.
Note: This attachment affects only to CrackShot's bullet spread, not CrackShotPlus's custom bullet spread.
Note: For potions affect spread check this

CUSTOM_SPREAD

Note: This attachment stacks with other same kind of attachments.
Note: This attachment affects CrackShotPlus's custom bullet spread, not CrackShot's bullet spread.
Note: For potions affect spread check this

SILENCER

Note: This attachment stacks with other same kind of attachments.
Note: Supports custom sounds also.
Note: Multiply_Projectile_Speed is always by default 1.0. For example if attachment has Multiply_Projectile_Speed: 0.3 then projectile speed will be multiplied with 1.3(projectile goes faster) and if Multiply_Projectile_Speed is -0.4 then projectile speed will be multiplied with 0.6(projectile goes slower).
Note: Change_Sounds changes custom shoot sound if used else it uses CrackShot own sound playing system.

SCOPE

Note: For scope affect fire rate check this
Note: This attachment stacks with other same kind of attachments.

RELOAD

For Reload and Reload_Complete take example from reload features. Also Reload and Reload_Complete can stack with attachments

Note: Supports custom sounds also.
Note: Change_Reload_Sounds changes custom reload sound if used else it uses CrackShot own sound playing system.
Note: Don't let weapons have multiple this kind of attachments and if you do only last added this kind of attachment will work.

CAMERA_RECOIL

Note: This attachment stacks with other same kind of attachments.

EXPLODE

Weapon_Used_For_Explosion determines which weapon is used to create the explosion.
Explosion_Trigger has to be one of these BOTH, HIT_BLOCK or DAMAGE.
Note: HIT_BLOCK doesn't always work, even after damaging victim hit block even can still be triggered
Note: Don't let weapons have multiple this kind of attachments and if you do only last added this kind of attachment will work.

KILL

Take example from kill features
Note: This attachment stacks with other same kind of attachments.

SHOOT

Reduce_Weapon_Shoot_Delay reduces CSP's own shoot delay (this)
Take example from shoot features for run command.
Note: This attachment stacks with other same kind of attachments.

Soulbound

Take example from held features
Note: Don't let weapons have multiple this kind of attachments and if you do only last added this kind of attachment will work.

⚠️ **GitHub.com Fallback** ⚠️