Raised This Month: $12 Target: $400
 3% 

[L4D2] Jockey Incap Ride (1.5) [2013-October-4]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
dcx2
Senior Member
Join Date: Sep 2011
Plugin ID:
3661
Plugin Version:
1.0
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Allows a Jockey to continue riding an incapacitated Survivor
    Old 05-25-2013 , 03:11   [L4D2] Jockey Incap Ride (1.5) [2013-October-4]
    Reply With Quote #1

    BACKGROUND

    I always felt the Jockey was a little lame; he's riding along and once the Survivor is incapacitated, he is forced to let go, and usually gets killed before he can safely escape. If he attacks a weak Survivor, he gets maybe a few seconds of riding in before he has to wait 30 seconds for his ability to reset. It's also possible for the Jockey's victim to free another pinned Survivor once the victim is released because of the incap.

    This plugin tries to make the Jockey more like a real pinner. It's one of a couple SI Super Powers that I've been meaning to release, but it has taken a while to iron out all the bugs in this. Not only do invincibility frames make OnTakeDamage lie, because even player_hurt lies about how much damage you take from some commons. However, I think this is now reliable enough for others to use.

    ---

    DESCRIPTION

    When a Survivor is about to get incapacitated, the Jockey can keep riding him. Damage continues to accumulate in the background, which is displayed to the Jockey as a hint.

    If the Jockey is shoved or killed, the Survivor is incapped and the accumulated damage is subtracted from their incap health. A shoved Jockey will have a full 30-second cool down, as if he had incapped the Survivor.

    If the Jockey manages to accumulate enough damage to overwhelm the Survivor's incap health, the Survivor will be instantly killed - ridden to death. The Jockey will have an accelerated 6-second cool down, as if he had just killed a black-and-white Survivor.

    Like a Smoker and Hunter, the Jockey will do increased damage to an incapacitated Survivor he is pinning (12 instead of 4, by default). All other attacks do normal damage. The Jockey will only get credit for the damage he does, but he'll get credit for all 12 points of damage.

    ---

    CVARS

    l4d2_incap_ride_enable (21):
    --Enable bit flag (add together, must use at least [1 or 2] and [4 or 8])
    --1=humans can ride, 2=AI can ride
    --4=Enabled in competitive modes, 8=Enabled in cooperative modes
    --16=Announce when an incap ride begins
    --31=all, 0=off, 21=default (only humans in competitive modes and announce)
    l4d2_incap_ride_debug (0): Prints debug output (0=off, 31=all)
    l4d2_incap_ride_multiplier (3.0): Damage done by the jockey during an incap ride will be multiplied by this

    ---

    UPDATES

    v1.5
    - Fixed random crashes due to SDKHooks_TakeDamage by switching to point_hurt instead

    v1.4
    - Fixed bug in code that displays Incap Ride hint to other survivors

    v1.3
    - Delay ForcePlayerSuicide on a short timer so that the survivor does not die in the middle of an SDKHook. This is out of an abundance of caution
    - Incap ride damage is now tracked with the Jockey instead of the Survivor, so that Survivors can switch teams and go spectator without causing an issue
    - Hold IN_SCORE button (default is tab I think) as a Survivor to see how much incap ride damage has accumulated for a fellow Survivor
    - Enable cvar can be used to disable Incap Ride announcement
    - Check Jockey for validity in jockey_ride_end

    v1.2
    - Fixed bug where incapped survivors with melee weapons wouldn't get pistols

    v1.1
    - All values (e.g. survivor incap health) are retrieved from their cvars instead of being hard-coded
    - New cvar, Incap Ride Multiplier, now allows customization of incap ride damage from the jockey
    - The AI is now allowed to incap ride; set enable flag 2
    - Competitive (versus/scavenge) and Cooperative (coop/survival) modes can be selectively enabled with enable flags 4 and 8. You must use at least one of these flags or the plugin will not be enabled. So for example, 5 is humans in competitive modes only, 10 is bots in cooperative modes only, 14 is bots in cooperative or competitive modes, 15 is anyone in any mode.


    ---

    INSTALLATION

    This plugin requires SDKHooks, so please DO NOT CLICK "Get Plugin", you must download the smx.

    This plugin also requires l4d2_infected_release.txt in your gamedata folder so that it can appropriately set the Jockey's ability recharge.

    As of v1.2, this plugin also requires l4d2_direct.txt in your gamedata folder. If you want to compile, you will need to download L4D2 Direct. https://github.com/ConfoglTeam/l4d2_direct/

    Note that the attached gamedata is not directly from L4D2 Direct's site, I modified the CDirector Windows offset to match Left4Downtown2. I assume it will eventually be fixed in L4D2 Direct's gamedata, but you should make sure your gamedata has the CDirector Windows read offset as 12, not 8.
    Attached Files
    File Type: txt l4d2_infected_release.txt (767 Bytes, 1277 views)
    File Type: txt l4d2_direct.txt (8.5 KB, 1457 views)
    File Type: sp Get Plugin or Get Source (l4d2_incap_ride.sp - 1009 views - 28.6 KB)
    File Type: smx l4d2_incap_ride.smx (15.8 KB, 1334 views)
    __________________

    Last edited by dcx2; 10-04-2013 at 01:11. Reason: Updating game data
    dcx2 is offline
    SyluxLockjaw100
    Senior Member
    Join Date: Jul 2010
    Location: Novaya Russia
    Old 05-25-2013 , 23:02   Re: [L4D2] Jockey Incap Ride (1.0) [2013-May-25]
    Reply With Quote #2

    Tested and it works, no bugs found. Good job on the plugin!
    SyluxLockjaw100 is offline
    Sev
    Veteran Member
    Join Date: May 2010
    Old 05-26-2013 , 23:51   Re: [L4D2] Jockey Incap Ride (1.0) [2013-May-25]
    Reply With Quote #3

    Make it work for Coop for the Jockey as AI as an optional cvar, and im sold.
    Sev is offline
    dcx2
    Senior Member
    Join Date: Sep 2011
    Old 05-31-2013 , 00:22   Re: [L4D2] Jockey Incap Ride (1.1) [2013-May-31]
    Reply With Quote #4

    Version bump. New features implemented. Also, Sev, your request has been fulfilled. Enjoy!
    __________________
    dcx2 is offline
    Sev
    Veteran Member
    Join Date: May 2010
    Old 06-01-2013 , 07:46   Re: [L4D2] Jockey Incap Ride (1.1) [2013-May-31]
    Reply With Quote #5

    Tested. Works great.

    2 wishes though.

    1. Find a way to tell us the health of the survivor being ridden from that survivors perspective (his/her remaining health) unless that was intentional to keep it hidden.

    (Optional) 2 . Remove the printtochat hint or make it an optional cvar to remove.

    Last edited by Sev; 06-01-2013 at 07:52.
    Sev is offline
    5ifty7even
    New Member
    Join Date: Nov 2012
    Old 06-02-2013 , 07:41   Re: [L4D2] Jockey Incap Ride (1.1) [2013-May-31]
    Reply With Quote #6

    Great plugin! I agree with Sev, would be nice to have a cvar to remove the txt printed in chat.
    5ifty7even is offline
    Sev
    Veteran Member
    Join Date: May 2010
    Old 06-02-2013 , 18:03   Re: [L4D2] Jockey Incap Ride (1.1) [2013-May-31]
    Reply With Quote #7

    Got a back breaking bug I've seen in coop that I assume is tied to the plugin.

    If you have a melee weapon and go into incap health after being jockeyed, once your saved, you can't protect yourself on the ground. You still have your melee weapon icon, but no pistol to protect yourself.
    Sev is offline
    dcx2
    Senior Member
    Join Date: Sep 2011
    Old 06-02-2013 , 18:16   Re: [L4D2] Jockey Incap Ride (1.1) [2013-May-31]
    Reply With Quote #8

    Thanks for the feedback. Yeah, that's probably my plugin. On my server, I have "incapped magnums" so when you have a melee and get incapped you get the magnum, that would explain why I never saw this issue.

    I will find a solution in the next couple days.
    __________________
    dcx2 is offline
    Sev
    Veteran Member
    Join Date: May 2010
    Old 06-02-2013 , 19:39   Re: [L4D2] Jockey Incap Ride (1.1) [2013-May-31]
    Reply With Quote #9

    Yeah definitely noted.

    Also something that tells all the survivors what incap health is remaining for the jockeyed survivor in question in coop and vs would be wonderful rather than just what incap health the survivor has remaining, if saved.
    Sev is offline
    dcx2
    Senior Member
    Join Date: Sep 2011
    Old 06-06-2013 , 23:04   Re: [L4D2] Jockey Incap Ride (1.1) [2013-May-31]
    Reply With Quote #10

    Fixing that issue is turning out to be trickier than I thought. Seems like Survivors are immune to SDKHooks_TakeDamage for about 2 seconds after a jockey ride ends. Worse, if I actually call TakeDamage from inside the jockey_ride event, it crashes the server. I need more time to solve this issue.

    Regarding your other suggestions...

    Is there a particular method you would propose for displaying the information about the incap ride to the other survivor's?

    PrintToChat is just a bad idea, I know that. I could use PrintToHint. I could also use PrintToCenterText but CenterText is really really tiny. I could try to do something with modifying the Survivor's health so everyone could see it naturally, but I'm afraid to modify health because that might make them move faster than they should.

    Also, you mentioned a PrintToChat you wanted to optionally remove. Is that the one that announces when the incap ride begins?
    __________________
    dcx2 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 08:57.


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