Raised This Month: $32 Target: $400
 8% 

[NMRiH] Weapon Configs (v1.0.5, 2020-04-13)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Ryan.
Member
Join Date: Jan 2018
Plugin ID:
6364
Plugin Version:
1.0.5
Plugin Category:
Gameplay
Plugin Game:
No More Room in Hell
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Cutomize weapon speeds and behavior
    Old 12-12-2018 , 20:31   [NMRiH] Weapon Configs (v1.0.5, 2020-04-13)
    Reply With Quote #1

    Brief
    Customize No More Room in Hell's weapon stats and animation speeds. See below for all customizable properties.

    This plugin re-creates a feature that used to be included in the Quality of Life plugin.

    It requires DHooks with Dynamic Detours extension.
    Features
    Customize weapon behavior:
    • Damage (normal, headshot, shove and thrown)
    • Pushback chance (normal and headshot)
    • Stamina cost (shove and melee attack)
    • Shove cooldown time
    • Magazine capacity
    • Medical item heal amount
    • Explosion radius of grenades and flare gun
    • Whether weapon can be used to suicide (gimmicky due to missing animations)
    • Whether weapon can perform skillshot (Linux servers only)

    Customize weapon speeds:
    • Melee, shove and charged attack
    • Hip-fire and ironsight shooting
    • Reload, unload and ammo check
    • Maglite activation
    • Barricade speed, e-tool toggle

    Weapon damage and medical heal amounts can also be randomized.
    Example config
    PHP Code:
    "weaponconfig"
    {
        
    // High-capacity, super revolver
        
    "fa_sw686"
        
    {
            
    // Super damage
            
    "damage" "500"
            "damage_headshot" "1000"
            "damage_shove" "25"

            
    // High capacity
            
    "capacity" "12"

            
    // No cooldown between shots (shoot as fast as you can click)
            
    "hip_fire_delay" "0"

            
    // 2x faster ironsight shooting speed
            
    "sight_fire" "2"

            
    // 1.5x faster reload speed
            
    "reload" "1.5"

            
    // 4x faster ammo check speed
            
    "check_ammo" "4"
        
    }

        
    // Faster, more agile knife
        
    "me_kitknife"
        
    {
            
    // 6% faster charge-up and charge-release speed
            
    "charge" "1.06"
            "release" "1.06"

            
    // Time between attacks is 0.4 seconds
            
    "quick_delay" "0.4"
            "release_delay" "0.4"
            "shove_delay"   "0.4"
            
            
    // Charge attack can be unleashed after 0.1 seconds of charging
            
    "charge_delay" "0.1"

            
    // Throwing knife of death
            
    "damage_thrown" "1000"
        
    }

    See 'addons/sourcemod/configs/weapon-configs-example.cfg' for more examples.
    ConVars
    • sm_weapon_configs_enabled - 1 = Plugin active. 0 = Plugin disabled.
    • sm_weapon_config - Name of active weapon configuration excluding the .cfg extension. Set to "" to disable weapon configs.

    Weapon configs are relative to your nmrih/addons/sourcemod/configs folder.

    Installation
    1. Install Metamod Source
    2. Install Sourcemod
    3. Install DHooks with Dynamic Detours extension
    4. Download nmrih-weapon-configs.zip from below and extract it into your nmrih directory

    Credits
    • NMRiH dev team
    • Sourcemod crew
    • Drifter and Peacemaker for DHooks extension
    • rio for their suggestion on how to return a null CBaseEntity from DHooks
    • overmase for spotting problem with qol.cfg overwriting other plugin's config
    • Kevin for spotting issues with the bow and QOL config and suggesting random heal amount
    • GEEEX221 for finding issue with custom firearm damage not working
    • Holy Crap for suggesting cvar to toggle plugin activeness
    • Ulreth for reporting lack of PvP support with custom weapon damages

    Changelog
    1.0.5 - 2020-04-13
    • Added sm_weapon_configs_enabled to toggle plugin activeness (Thanks Holy Crap)
    • Fixed custom firearm damage not working in PvP (Thanks Ulreth)

    1.0.4 - 2019-02-25
    • Added support for weapon damage range
      • Use the format <low>-<high> to set range of damage. E.g. "damage" "50-100"
    • Added support for custom medical heal amounts. Use "damage" key to set heal amount. Supports random range.

    1.0.3 - 2019-02-22
    • Fixed custom firearm damage not working (Thanks GEEEX221)
    • Fixed bow using 2x speed in default config

    1.0.2 - 2018-12-29
    • Added damage_thrown_headshot and damage_shove_headshot
    • Added QOL's old bayonet changes to QOL config
    • Fixed bow shooting too fast and removed 20-round revolver from QOL config (Thanks Kevin)

    1.0.1 - 2018-12-13
    • Renamed qol.cfg so it doesn't overwrite QOL plugin's config (Thanks overmase)

    1.0.0 - 2018-12-12
    • Re-release of original QOL system in separate plugin
    Attached Files
    File Type: zip dhooks-detours7-for-sourcemod-1.10.zip (442.5 KB, 833 views)
    File Type: zip nmrih-weapon-configs-1.0.5.zip (54.2 KB, 559 views)
    __________________

    Last edited by Ryan.; 04-13-2020 at 21:26. Reason: Updated to version 1.0.5
    Ryan. is offline
    Ryan.
    Member
    Join Date: Jan 2018
    Old 12-13-2018 , 19:11   Re: [NMRiH] Weapon Configs (v1.0.1, 2018-12-13)
    Reply With Quote #2

    Fixed an issue where this plugin's qol.cfg would overwrite another plugin's config. Thanks overmase!
    Ryan. is offline
    Maxovich
    New Member
    Join Date: Nov 2017
    Old 12-20-2018 , 20:24   Re: [NMRiH] Weapon Configs (v1.0.1, 2018-12-13)
    Reply With Quote #3

    Nice work!
    Maxovich is offline
    Ryan.
    Member
    Join Date: Jan 2018
    Old 12-29-2018 , 01:09   Re: [NMRiH] Weapon Configs (v1.0.2, 2018-12-29)
    Reply With Quote #4

    Changes in version 1.0.2:
    • Added damage_thrown_headshot and damage_shove_headshot
    • Added QOL's old bayonet changes to QOL config
    • Fixed bow shooting too fast and removed 20-round revolver from QOL config (Thanks Kevin)

    Thanks to Kevin for spotting some big mistakes in the way bow behavior was working as well as oversights in the Quality of Life weapon config.

    The new weapon options (damage_thrown_headshot and damage_shove_headshot) control the amount of damage zombies take when hit in the head by a thrown weapon or weapon shove. If a weapon defines "damage_thrown" but doesn't define "damage_thrown_headshot" then the plugin will fallback to the custom "damage_thrown" value when a zombie is hit in the head by a thrown weapon. Similar thing happens with damage_shove and damage_shove_headshot.

    This upload was made using Sourcemod 1.9 so it should work correctly in both Sourcemod versions 1.9 and 1.10.
    Ryan. is offline
    GEEEX221
    Junior Member
    Join Date: Jun 2018
    Old 02-17-2019 , 07:34   Re: [NMRiH] Weapon Configs (v1.0.2, 2018-12-29)
    Reply With Quote #5

    Hi Ryan!
    I have a problem.
    I am trying to use your plugin, but only the parameters for changing the speed of reloading / firing / checking the number of ammo work in it.
    Parameters of damage, capacity - the most important - do not work.
    For example:
    "weapon_options"
    {
    "fa_mp5a3"
    {
    "damage_headshot" "500"
    "capacity" "40"
    }
    }
    When I create this weapon for verification, it appears with 30 cartridges, as by default. Well, it can still be recharged to 40, but still, something is wrong.
    Damage to the head remains the same - 300.
    What have I done wrong?

    P.S.:I copied the text of the file, but it is displayed incorrectly. In fact, I did everything right.

    Last edited by GEEEX221; 02-17-2019 at 07:35.
    GEEEX221 is offline
    Ryan.
    Member
    Join Date: Jan 2018
    Old 02-22-2019 , 23:25   Re: [NMRiH] Weapon Configs (v1.0.3, 2019-02-22)
    Reply With Quote #6

    Thanks GEEEX221. You discovered a huge regression that stopped all custom firearm damage. I've uploaded a new version that should fix the issue
    __________________
    Ryan. is offline
    Ryan.
    Member
    Join Date: Jan 2018
    Old 02-25-2019 , 23:46   Re: [NMRiH] Weapon Configs (v1.0.4, 2019-02-25)
    Reply With Quote #7

    Version 1.0.4 adds support for random damage and custom heal amounts.

    Important: This version of Weapon Configs will cause crashes with Quality of Life installs older than 2.0.2. You'll need to update to 2.0.2 or later to avoid these crashes.

    To use random damage, enter a damage range in the weapon config. For example, "damage" "50-100" allows for damage between 50 and 100. If only one number is entered then the original behavior of non-random damage will be used.

    All medical items can have a user-defined health restore amount. Medical items interpret their damage key as the amount of health to heal. They support the randomized damage format which allows a random amount of health to be gained.
    __________________

    Last edited by Ryan.; 02-26-2019 at 00:00.
    Ryan. is offline
    GEEEX221
    Junior Member
    Join Date: Jun 2018
    Old 03-02-2019 , 06:22   Re: [NMRiH] Weapon Configs (v1.0.4, 2019-02-25)
    Reply With Quote #8

    Hello again.
    Thank you for still working on the game.
    I tried the updated version of the plugin - and yes - thanks for the patch, now the damage works without problems.
    BUT - there is a problem with capacity.
    I tested two guns - mp5 (increased capacity to 40 rounds) and m92 (beretta) (up to 20 rounds).
    Somehow strange comes out. Beretta appears on the map always with only 20 rounds, there is no scatter of values. However, this is not the case with mp5 - the spread is from 0 to 40.
    And what else is unusual - if you drop a weapon (any of these two) through the admin menu, you get a weapon with a standard capacity value (30 and 15, respectively).
    GEEEX221 is offline
    Ryan.
    Member
    Join Date: Jan 2018
    Old 03-05-2019 , 21:19   Re: [NMRiH] Weapon Configs (v1.0.4, 2019-02-25)
    Reply With Quote #9

    Thanks for the feedback geeex. I think the difference you found between the mp5 and m92fs starting capacities is due to the map's design. Mappers can choose the amount of ammo that spawns inside placed weapons. It's likely that the mp5 has been given a random ammo whereas the m92fs is set to 100%. Unfortunately the game still uses the original capacity sometimes, such as performing an ammo check or when a weapon first spawns. I should be able to fix the latter case though.
    Ryan. is offline
    Ryan.
    Member
    Join Date: Jan 2018
    Old 04-13-2020 , 21:29   Re: [NMRiH] Weapon Configs (v1.0.5, 2020-04-13)
    Reply With Quote #10

    Version 1.0.5 is released. It fixes custom firearm damage so it works as expected in PvP. Thank you Ulreth for finding this! The new version also adds a cvar to more easily toggle whether the plugin is active or not, sm_weapon_configs_enabled [0/1]. Thanks for the suggestion, Holy Crap!
    __________________
    Ryan. is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 14:51.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode