Raised This Month: $ Target: $400
 0% 

[L4D2] Chainsaw Buff v1.2.1 [26-May-2022]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
NoroHime
Veteran Member
Join Date: Aug 2016
Location: bed
Plugin ID:
7985
Plugin Version:
1.2.1
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    5 
    Plugin Description:
    make chainsaw great again
    Old 02-28-2022 , 07:32   [L4D2] Chainsaw Buff v1.2.1 [26-May-2022]
    Reply With Quote #1

    about
    • my friends sometime complains chainsaw so useless, well this kinda easy to solve
    • what does i do? hit target or firing will gain adrenaline and temp health
    • resistant receive damage when firing
    • hit zombies can refill chainsaw fuel, all configurable
    • reference some code from Left 4 Dhooks Direct and SMLib
    • this is my realism part

    ConVar

    PHP Code:
    // Enabled 'Chainsaw Buff'
    chainsaw_buff_enabled "1"

    // gain adrenaline duration when every firing
    chainsaw_buff_fire_adrenaline "0.02"

    // gain buff health when every firing
    chainsaw_buff_fire_buff "0.03"

    // gain adrenaline duration when hitted
    chainsaw_buff_hit_adrenaline "0.1"

    // gain buff health when hitted
    chainsaw_buff_hit_buff "0.1"

    // refill the fuel when hitted -1:refil whole clip 0.5:half chance gain 1sec fuel 1:certainly gain 1sec 0:nope
    chainsaw_buff_hit_refill "-1"

    // resistant receive damages when firing, negative:add damage 1:invinsible
    chainsaw_buff_fire_res "0.5" 

    Game ConVar / Hint
    this below cvar is created by game, you can set they on server.cfg etc
    PHP Code:
    // higher this value will make chainsaw attack hitbox wider but more randomizer
    chainsaw_attack_cone 30 //30 mean hit angel

    // higher will make chainsaw attack hitbox gets farther
    chainsaw_attack_distance 50

    // chainsaw dps equal damage/interval = 1000
    chainsaw_damage 100
    chainsaw_hit_interval 0.1

    ammo_chainsaw_max 20 

    changelog
    • v1.0 (28-2-22)
      - just releases
    • v1.1 (28-2-22)
      - add feature resistant receive damage when firing, fix an issue
    • v1.1.1 (1-3-22)
      - fix an issue 'player sometime not weapon on hand cause error'
    • v1.1.2 (1-3-22-afternoon)
      - fix a logic error thanks "ddd123", this is something i have neglected for a long time
    • v1.2 (2-3-22)
      - optional 'refill or chance gain fuel when hit', solve 'instantly kill wont trigger hit action'
    • v1.2.1 (26-May-2022)
      - fix damage resistant not work sometime like tank punch
      - temp health cant over than max hp now
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d_chainsaw_buff.sp - 505 views - 10.5 KB)
    __________________

    Last edited by NoroHime; 06-02-2023 at 10:31.
    NoroHime is offline
    NoroHime
    Veteran Member
    Join Date: Aug 2016
    Location: bed
    Old 02-28-2022 , 08:21   Re: [L4D & L4D2] Chainsaw Buff v1.1 [28-2-22]
    Reply With Quote #2

    update
    Quote:
    • v1.1 add feature 'resistant receive damage when firing', fix an issue; 28-2-22

    PHP Code:
    // resistant receive damages when firing, negative:add damage 1:invinsible
    chainsaw_buff_fire_res "0.5" 
    __________________

    Last edited by NoroHime; 02-28-2022 at 08:26.
    NoroHime is offline
    Sev
    Veteran Member
    Join Date: May 2010
    Old 02-28-2022 , 09:48   Re: [L4D & L4D2] Chainsaw Buff v1.1 [28-2-22]
    Reply With Quote #3

    Now all we need is for the bots to benefit from this by allowing them the same features with the chainsaw.

    EDIT

    02/28/2022 - 10:04:03: [SM] Exception reported: Entity -1 (-1) is invalid
    L 02/28/2022 - 10:04:03: [SM] Blaming: l4d_chainsaw_buff.smx
    L 02/28/2022 - 10:04:03: [SM] Call stack trace:
    L 02/28/2022 - 10:04:03: [SM] [0] GetEntPropString
    L 02/28/2022 - 10:04:03: [SM] [1] Line 766, /groups/sourcemod/compiler-1.10/include/entity.inc::GetEntityClassname
    L 02/28/2022 - 10:04:03: [SM] [2] Line 176, /home/forums/content/files/2/7/2/5/1/8/193967.attach::OnWeaponSwitchPost

    Last edited by Sev; 02-28-2022 at 11:10.
    Sev is offline
    NoroHime
    Veteran Member
    Join Date: Aug 2016
    Location: bed
    Old 02-28-2022 , 12:38   Re: [L4D & L4D2] Chainsaw Buff v1.1 [28-2-22]
    Reply With Quote #4

    Quote:
    Originally Posted by Sev View Post
    Now all we need is for the bots to benefit from this by allowing them the same features with the chainsaw.

    EDIT

    02/28/2022 - 10:04:03: [SM] Exception reported: Entity -1 (-1) is invalid
    L 02/28/2022 - 10:04:03: [SM] Blaming: l4d_chainsaw_buff.smx
    L 02/28/2022 - 10:04:03: [SM] Call stack trace:
    L 02/28/2022 - 10:04:03: [SM] [0] GetEntPropString
    L 02/28/2022 - 10:04:03: [SM] [1] Line 766, /groups/sourcemod/compiler-1.10/include/entity.inc::GetEntityClassname
    L 02/28/2022 - 10:04:03: [SM] [2] Line 176, /home/forums/content/files/2/7/2/5/1/8/193967.attach::OnWeaponSwitchPost
    thanks report, looks sometime player weapon not exists, now fix it
    actually we have many way to let Survivor Bot using chiansaw, like Info Editor

    ----

    update
    Quote:
    • 1.1.1 fix an issue 'player sometime not weapon on hand cause error'; 1-3-22
    __________________

    Last edited by NoroHime; 02-28-2022 at 12:54.
    NoroHime is offline
    ddd123
    Senior Member
    Join Date: May 2021
    Old 03-01-2022 , 04:54   Re: [L4D & L4D2] Chainsaw Buff v1.1.1 [1-3-22]
    Reply With Quote #5

    Hi, i can activate adrenaline effect on chainsaw while on deploying animation delay.
    Meaning, if i keep swap my weapon before chainsaw is about to use fuel while holding fire button, I can use free adrenaline boost.

    Also i believe you forgot add "event.GetInt("weaponid") == WEAPONID_CHAINSAW" on fire_adrenaline at number 101
    Code:
    public void OnWeaponFire(Event event, const char[] name, bool dontBroadcast) {
    
    	if (fire_adrenaline || fire_buff && event.GetInt("weaponid") == WEAPONID_CHAINSAW) {
    Otherwise all my weapon get adrenaline effect while shooting once i pick up chainsaw? Correct me if i'm wrong.

    Last edited by ddd123; 03-01-2022 at 04:59.
    ddd123 is offline
    NoroHime
    Veteran Member
    Join Date: Aug 2016
    Location: bed
    Old 03-01-2022 , 05:05   Re: [L4D & L4D2] Chainsaw Buff v1.1.1 [1-3-22]
    Reply With Quote #6

    Quote:
    Originally Posted by ddd123 View Post
    Hi, i can activate adrenaline effect on chainsaw while on deploying animation delay.
    Meaning, if i keep swap my weapon before chainsaw is about to use fuel while holding fire button, I can use free adrenaline boost.

    Also i believe you forgot add "event.GetInt("weaponid") == WEAPONID_CHAINSAW" on fire_adrenaline at number 101
    Code:
    public void OnWeaponFire(Event event, const char[] name, bool dontBroadcast) {
    
    	if (fire_adrenaline || fire_buff && event.GetInt("weaponid") == WEAPONID_CHAINSAW) {
    Otherwise all my weapon get adrenaline effect while shooting once i pick up chainsaw? Correct me if i'm wrong.
    ---------
    oh no i test i on javscript maybe i wrong, let me stricter check this
    ----------
    and i actually havent good way to detect chainsaw real firing or deploying, because the chainsaw is an accident, he won't have "count" param on fire event
    and the seriously bad thing about chainsaws is that they're very weak when deploying, and my friends really don't like that point, so there's really no problem with making these intentional when activating adrenaline on deploying
    ----------
    may you no need this feature you can set hit_adrenaline higher and disable fire_adrenaline

    update
    Quote:
    • v1.1.2 fix a logic error thanks "ddd123", this is something i have neglected for a long time; 1-3-22(afternoon)
    __________________

    Last edited by NoroHime; 03-01-2022 at 05:23.
    NoroHime is offline
    NoroHime
    Veteran Member
    Join Date: Aug 2016
    Location: bed
    Old 03-01-2022 , 06:20   Re: [L4D & L4D2] Chainsaw Buff v1.1.2 [1-3-22]
    Reply With Quote #7

    i tried detect chainsaw fuel gets lower to mark firing state, but clip property is an integer, that mean player have to using at least 1sec then detected

    this is a version of depoying detection, i wont merge it to main thread
    Quote:
    v1.2 new feature 'damage resistant when deploying' fix 'firing action activating on deploying'; 1-3-22(night)

    // resistant receive damages when deploying, negative:add damage 1:invinsible
    chainsaw_buff_deploying_res 0.75
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d_chainsaw_buff.sp - 289 views - 11.0 KB)
    __________________

    Last edited by NoroHime; 03-01-2022 at 06:26.
    NoroHime is offline
    sonic155
    Senior Member
    Join Date: Mar 2019
    Old 03-02-2022 , 04:05   Re: [L4D & L4D2] Chainsaw Buff v1.1.2 [1-3-22]
    Reply With Quote #8

    https://cdn.discordapp.com/attachmen...01173505_1.jpg

    the refill thing is somewhat broken o.o

    https://cdn.discordapp.com/attachmen...34/unknown.png

    they overlap and pass the limit both on -1 and 1.5 both over pass and over lap
    sonic155 is offline
    NoroHime
    Veteran Member
    Join Date: Aug 2016
    Location: bed
    Old 03-02-2022 , 04:11   Re: [L4D & L4D2] Chainsaw Buff v1.1.2 [1-3-22]
    Reply With Quote #9

    Quote:
    Originally Posted by sonic155 View Post
    https://cdn.discordapp.com/attachmen...01173505_1.jpg

    the refill thing is somewhat broken o.o

    https://cdn.discordapp.com/attachmen...34/unknown.png

    they overlap and pass the limit both on -1 and 1.5 both over pass and over lap
    may i split refill convar to "refill clip" and "fill some duration"
    im not think so many about fuel yet, because my server chainsaw has almost infinity ammo, wait me a minutes update
    __________________

    Last edited by NoroHime; 03-02-2022 at 04:12.
    NoroHime is offline
    NoroHime
    Veteran Member
    Join Date: Aug 2016
    Location: bed
    Old 03-02-2022 , 04:41   Re: [L4D & L4D2] Chainsaw Buff v1.2 [2-3-22]
    Reply With Quote #10

    update

    Quote:
    • v1.2 optional 'refill or chance gain fuel when hit', fix issue 'instantly kill wont trigger hit action'; 2-3-22

    PHP Code:
    // refill the fuel when hitted -1:refil whole clip 0.5:half chance gain 1sec fuel 1:certainly gain 1sec 0:nope
    chainsaw_buff_hit_refill "-1" 
    __________________
    NoroHime is offline
    Reply


    Thread Tools
    Display Modes

    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 20:35.


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