Weapon Damage Scaler

Allows scaling of player damage per weapon/ammo/skin/prefab

Total Downloads: 1,411 - First Release: Jan 3, 2016 - Last Update: Dec 4, 2017

5/5, 8 likes
  1. the scale will applied for user who set the scale or for all player?
     
  2. All players.
     
  3. Anytime I try to scale the Assault Rifle it scales the rifle.lr300 instead and shows confirmation on screen. Ive tried "Assault Rifle" and rifle.ak with the same results.
     
  4. I think I fixed this bug locally a little while back, can you try using the attached version and see if it's fixed?

    With that version, you have to supply either the full english name, or the full short name. rifle.ak, Assault Rifle, rifle.lr300, LR-300 Assault Rifle, etc.
     

    Attached Files:

  5. Shady757 updated Weapon Damage Scaler with a new update entry:

    1.0.7

     
  6. How to set up weapons to NPC damage
     
  7. Currently there is no way to scale damage only towards NPCs.
     
  8. i tryed to add landmine and bear trap to the data file but its not working.. is there a way to do it ?
    Code:
    "trap.landmine": {
          "Name": "Landmine",
          "GlobalModifier": 1.0,
          "IndividualParts": {
            "r_forearm": 1.0,
            "l_forearm": 1.0,
            "l_upperarm": 1.0,
            "r_upperarm": 1.0,
            "r_hand": 1.0,
            "l_hand": 1.0,
            "pelvis": 1.0,
            "l_hip": 1.0,
            "r_hip": 1.0,
            "spine3": 1.0,
            "spine4": 1.0,
            "spine1": 1.0,
            "spine2": 1.0,
            "r_knee": 1.0,
            "r_foot": 1.0,
            "r_toe": 1.0,
            "l_knee": 1.0,
            "l_foot": 1.0,
            "l_toe": 1.0,
            "head": 1.0,
            "neck": 1.0,
            "jaw": 1.0,
            "r_eye": 1.0,
            "l_eye": 1.0,
            "l_clavicle": 1.0,
            "r_clavicle": 1.0,
            "": 1.0,
            "r_index2": 1.0,
            "target_collider": 1.0,
            "target_collider_bullseye": 1.0,
            "right_ear": 1.0,
            "l_thumb3": 1.0,
            "hinge": 1.0,
            "hinge_cap": 1.0,
            "hinge_hatch": 1.0,
            "l_thumb1": 1.0
          }
        },
        "trap.bear": {
          "Name": "Bear Trap",
          "GlobalModifier": 1.0,
          "IndividualParts": {
            "r_forearm": 1.0,
            "l_forearm": 1.0,
            "l_upperarm": 1.0,
            "r_upperarm": 1.0,
            "r_hand": 1.0,
            "l_hand": 1.0,
            "pelvis": 1.0,
            "l_hip": 1.0,
            "r_hip": 1.0,
            "spine3": 1.0,
            "spine4": 1.0,
            "spine1": 1.0,
            "spine2": 1.0,
            "r_knee": 1.0,
            "r_foot": 1.0,
            "r_toe": 1.0,
            "l_knee": 1.0,
            "l_foot": 1.0,
            "l_toe": 1.0,
            "head": 1.0,
            "neck": 1.0,
            "jaw": 1.0,
            "r_eye": 1.0,
            "l_eye": 1.0,
            "l_clavicle": 1.0,
            "r_clavicle": 1.0,
            "": 1.0,
            "r_index2": 1.0,
            "target_collider": 1.0,
            "target_collider_bullseye": 1.0,
            "right_ear": 1.0,
            "l_thumb3": 1.0,
            "hinge": 1.0,
            "hinge_cap": 1.0,
            "hinge_hatch": 1.0,
            "l_thumb1": 1.0
     
  9. It's not possible, not yet anyway. The functionality of this plugin is pretty limited, it'll probably be expanded on in the future, but I can't say when for sure.
     
  10. Can it be used only for some players? Such as VIP
     
  11. Not yet, but I suppose permission support could be added in the future.
     
  12. Can I do the damage in certain weapons
    Example
    Tempered AK47 - 1.2 dc
    Military Camo AK47 - 1.4 dc
     
  13. I've been working on this on my local version for a while now, progress has been slow but hopefully I'll be able to release a new version of this plugin with fixes and new features within the next month (including what you've requested).
     
  14. If I would want to double headshot someone with AK, How would i set this up?
     
  15. You mean make it so 2 headshots always kills a player with the AK? Well, there's no exact way to set the damage, only scale it. So if you did 50 damage, scaled it by 2.0, it'd be 100. You'd just have to find the sweet spot.
     
  16. @Shady757 Love the plugin! Im using it to make arrows do less damage on a no guns server, anyways,
    Im running into problem with arrow damage reduction also being applied to animals

    From Overview:
    "For clarification, the config option "PlayersOnly" toggles whether or not the damage will be scaled on things like buildings, barrels, npcs, etc. If set to true (default), it only scales damage against other players."

    /config/WeaponDamageScaler.json:
    "PlayersOnly": true,
    "UseGlobalDamageScaler": false
    (Attached actual config file)

    weapon.setscale "Wooden Arrow" 0.33

    /data/damagescaler_data.json:
    "arrow.wooden": {
    "Name": "Wooden Arrow",
    "GlobalModifier": 0.33,
    "IndividualParts": {
    (attached actual config file)

    line 199
    Code:
    void OnEntityTakeDamage(BaseCombatEntity entity, HitInfo hitInfo)
            {
                if (entity == null || hitInfo == null || hitInfo?.Initiator == null) return;
                var attacker = hitInfo?.Initiator?.GetComponent<BasePlayer>() ?? null;
                var victim = entity?.GetComponent<BasePlayer>() ?? null;
                if (attacker != null)
                {
                    if ((bool)Config["UseGlobalDamageScaler"])
                    {
                        hitInfo.damageTypes.ScaleAll(float.Parse(Config["GlobalDamageScaler"].ToString()));
                        return;
                    }
                    if ((bool)Config["PlayersOnly"] && victim != null) ScaleDealtDamage(hitInfo);
                    else ScaleDealtDamage(hitInfo);
                }
            }
    It looks like PlayersOnly flag does not work as expected,

    I tested it with Build for Rust | Oxide plugin to spawn in animals
    /animal boar ----> right click ----> /animal

    Boars were still being affected by arrow damage changes even though PlayersOnly was set to true.

    Thanks!
     

    Attached Files:

  17. Yeah, there's quite a few issues in the latest released version. ;)
    Lots of changes have been made locally and I'm hoping to push an update soon. In the next update, you'll be able to set scalars for specific prefab, skins and building grades, permissions support as well as code improvements.
     
  18. Quick question is there a way to add smoke rockets to the rocket ammo types that can be scaled? Tried scaling ammo.rocket.smoke and it accepts the command but does not seem to change the damage. Thanks!
     
  19. Do they deal damage now? I think back when this was originally made the smoke rockets did no damage. The next update should allow you to scale this type.
     
  20. They do very little damage now (5 hp on a building). I appreciate your help and will watch for the next update.