1. This forum is ARCHIVED! Visit the new Cloud Sixteen forums, codename Eden, at https://eden.cloudsixteen.com. These forums will remain archived for a few months before being closed down, so try to encourage plugin developers to begin moving their content across to the new forums.
Dismiss Notice
Hi Guest, you need a Steam account to register and post on these forums. Login with Steam at the top of the forums to get started!
Dismiss Notice
Hi Guest, do you want to buy HL2RP or another Clockwork schema? Visit the Cloud Sixteen Store to get started!

Other Weapon question.

Discussion in 'Development' started by BetaDesh, Jun 21, 2017.

  1. BetaDesh

    BetaDesh The fuck's a BetaDesh? Clockwork Customer

    Hey so I was just wondering, is there anyway on the clockwork weapon base to set the damage of a new weapon and/or change the damage of existing weapons?
     
  2. Change the number fam.
     
  3. BetaDesh

    BetaDesh The fuck's a BetaDesh? Clockwork Customer

    There isn't a number to change when I make the item
     
  4. Zig

    Zig Guest

    It's hard to understand what you're asking here. Do you want to change the damage a weapon does in the item's file? I'm sure there's a way you could do that, but it'd be much easier to actually open the SWEP's code and just change the damage of the weapon itself.
     
  5. The item's file is only for the item drop.

    You'll have noticed it contains no information about the weapon at all, such as fire rate and clip size. The computer clearly can't be guessing this data by itself, so the only answer is, you're looking in the wrong place.

    You're supposed to look for the actual weapon script, which for a schema/framework included weapon should be the entities folder inside the schema/framework, and for addons it's the script inside the addon.
     
  6. vexus

    vexus ej rockwell's worst nightmare Staff Member Manager Legend Clockwork Customer

    If you're looking to change the damage of a SWEP addon, you'll have to directly edit the SWEP's item to your liking. I think the last time I checked it was:

    Code:
    SWEP.Primary.Damage = X
    -- X is damage done if shot in chest, X*2 is headshot damage.
    
     
  7. BetaDesh

    BetaDesh The fuck's a BetaDesh? Clockwork Customer

    Oh my bad, so when I'm making an item I just use the weapon code where it asks for the id?
     
  8. Viz

    Viz Legend Clockwork Customer

    Yes, for the item's uniqueID you would put the classname of the weapon, e.g. "weapon_pistol", "weapon_357".
     
    • Informative Informative x 1
  9. Class name is typically the weapon's folder.
     
  10. BetaDesh

    BetaDesh The fuck's a BetaDesh? Clockwork Customer

    Would this work with weapons from a workshop addon?
     
  11. Viz

    Viz Legend Clockwork Customer

    Not to be rude, but why don't you try it?
    The answer is yes, but you should at least try it before you ask.
     
    Last edited: Jun 28, 2017
  12. Yes, but modifying the damage is hell. (You need to extract the GMA)

    EDIT: Do follow Viz's advice and try before asking, especially if it's faster to try and fail rather than wait for an answer.
    You can still ask to make sure AFTER you try, should you fail. In that case you may have done something wrong.
    If you don't need to modify the weapon stats, I don't remember how to check the ID without extracting the addon.
     
    Last edited: Jun 28, 2017
  13. Viz

    Viz Legend Clockwork Customer

  14. I didn't suggest that because if he can't change a weapon's damage then he probably can't use GetClass.
     
  15. BetaDesh

    BetaDesh The fuck's a BetaDesh? Clockwork Customer

    To be clear, I can change a weapons damage, I just was confused and thought that the clockwork item base was it's weapon base. Stupid mistake on my part still.
     
  16. But can you use getclass?
     

Previous Readers (Total: 0)