Raised This Month: $154 Target: $400
 38% 

[TF2] Resurrection - Respawn in Arena Mode (updated 12-Mar-2015)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
pheadxdll
AlliedModders Donor
Join Date: Jun 2008
Plugin ID:
4363
Plugin Version:
0.7
Plugin Category:
Gameplay
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
    6 
    Plugin Description:
    Teammates come back to life when the control point is captured!
    Old 09-21-2014 , 12:23   [TF2] Resurrection - Respawn in Arena Mode (updated 12-Mar-2015)
    Reply With Quote #1

    Resurrection
    Capturing the control point will respawn your dead teammates instead of ending the round. Capture time is increased when the opposite team has more alive players. Players take a penalty for standing on the control point. A team wins by eliminating the enemy team or by holding the control point for set period of time.

    Based on the Arena: Respawn mod I came across this week. I threw this together and it turned out to be a nice change of pace for arena. Had some people request the plugin so I thought I'd release it.

    Here's what is different:
    1. No dependencies such as stripper and therefore has the ability to toggle on and off
    2. Dynamic capture time - why should a team with 8 more alive players cap as fast?
    3. A timer has been added to prevent the situation in which an engineer or C/D spy is hiding in the bushes and the game will never end.

    Features:
    • Automatic votes when a map begins to toggle resurrection mod.
    • Player nominated votes activated by typing res in chat. (Similar to RTV)
    The above two features are turned off by default. Take a look at the cvars to configure them for your server. You may run normal arena all the time but want to give players the option to play resurrection or start a vote automatically after the map begins. Or you may run resurrection arena all the time but want to give players the option to turn it off.

    For cvars, commands, or source code, use the GitHub.

    Usage notes:
    1. This is for arena maps only!

    Install:
    1. Copy resurrect.smx to the sourcemod/plugins directory.
    2. Copy resurrect.phrases.txt to the sourcemod/translations directory.

    old downloads: 86
    Attached Files
    File Type: inc resurrect.inc (1.9 KB, 143 views)
    File Type: smx resurrect.smx (28.0 KB, 130 views)
    File Type: txt resurrect.phrases.txt (2.7 KB, 119 views)
    __________________

    Last edited by pheadxdll; 03-12-2015 at 18:55.
    pheadxdll is offline
    robotortoise
    Senior Member
    Join Date: Nov 2013
    Location: Somewhere in the US
    Old 09-22-2014 , 12:19   Re: [TF2] Resurrection - Respawn in Arena Mode
    Reply With Quote #2

    This looks awesome!

    Can you make a cvar to automatically start a vote each arena map whether to use this mode or normal arena mode please?
    __________________
    -Robotortoise [Palutena's Bro]

    If you ever need help with Wii/Gamecube/DS sounds/music/ect., I'm your man!

    Contact me via Steam

    I don't bite.


    How to loop and compress .wav files

    Me and my friends' server
    robotortoise is offline
    Powerlord
    AlliedModders Donor
    Join Date: Jun 2008
    Location: Seduce Me!
    Old 09-22-2014 , 12:55   Re: [TF2] Resurrection - Respawn in Arena Mode
    Reply With Quote #3

    Haven't had a chance to try this yet and I'm currently at work, but...

    A few suggestions/considerations:

    Has interaction with weapons that clear the Marked For Death been taken into account? That is... GRU, Equalizer, and Escape Plan.

    How does this interact with players hit by the Fan O'War? Does it shorten their Marked for Death status to resurrect_time_mfd if they step on then off the point?

    I was going to mention round timers, but it appears you've already taken that into account. Personally, I use SendConVarValue with tf_arena_round_time instead of setting it to a high value, but as long as the correct timer is showing, I guess it doesn't matter.

    Incidentally, this plugin may be a good candidate for using the new EmitGameSound functions / PrecacheScriptSound added in SM 1.6.1. Unfortunately, Valve didn't make resurrect sounds with a rndwave so I'm not sure how it decides which one to play.
    __________________
    So long and thanks for all the fish.

    Last edited by Powerlord; 09-22-2014 at 12:56.
    Powerlord is offline
    pheadxdll
    AlliedModders Donor
    Join Date: Jun 2008
    Old 09-22-2014 , 20:31   Re: [TF2] Resurrection - Respawn in Arena Mode
    Reply With Quote #4

    @rob sure, that's a good idea

    @powerlord
    1. Fan O' War uses a different condition so no conflict there. GRU and escape plan do use the same condition. The persistent effects from having the weapon out work fine. Holstering the weapon calls AddCond for 2-3s. Since AddCond chooses the longer duration, there's no conflict. The default value of resurrect_time_mfd is 5 seconds which is greater than the after effects for those two weapons anyway.
    2. I do want to make sure the value of tf_arena_round_time on the server is 0. If I didn't, I suppose I would have to catch and remove/hide the new team_round_timer that spawns on arena_round_start. Two timers in the background seems awkward and my plugin offers the same functionality so I'll stick with it.
    3. I did look for phrases and did not find any. Even if they existed, some of them reference the medic healing them and the pyro has no lines so I'll have to code them anyway.
    __________________

    Last edited by pheadxdll; 09-22-2014 at 20:34.
    pheadxdll is offline
    Powerlord
    AlliedModders Donor
    Join Date: Jun 2008
    Location: Seduce Me!
    Old 09-23-2014 , 09:56   Re: [TF2] Resurrection - Respawn in Arena Mode
    Reply With Quote #5

    Quote:
    Originally Posted by pheadxdll View Post
    @rob sure, that's a good idea

    @powerlord
    1. Fan O' War uses a different condition so no conflict there. GRU and escape plan do use the same condition. The persistent effects from having the weapon out work fine. Holstering the weapon calls AddCond for 2-3s. Since AddCond chooses the longer duration, there's no conflict. The default value of resurrect_time_mfd is 5 seconds which is greater than the after effects for those two weapons anyway.
    2. I do want to make sure the value of tf_arena_round_time on the server is 0. If I didn't, I suppose I would have to catch and remove/hide the new team_round_timer that spawns on arena_round_start. Two timers in the background seems awkward and my plugin offers the same functionality so I'll stick with it.
    3. I did look for phrases and did not find any. Even if they existed, some of them reference the medic healing them and the pyro has no lines so I'll have to code them anyway.
    2. I use SendConVarValue in PropHunt Redux to make clients think it has a value when its really set to 0 on the server. Really handy for preventing the timer from overlapping the player count while not actually having the game actually create the arena timer.

    3. They're done individually in game_sounds_vo.txt. "spy_mvm_resurrect01", "spy_mvm_resurrect02", etc... except pyro. Which is why I wondered why they didn't have something like "spy_mvm_resurrect" with a rndwave like most other sounds do. Since they don't, it'd have to be done manually anyway. *shrug*
    __________________
    So long and thanks for all the fish.
    Powerlord is offline
    pheadxdll
    AlliedModders Donor
    Join Date: Jun 2008
    Old 09-24-2014 , 20:14   Re: [TF2] Resurrection - Respawn in Arena Mode
    Reply With Quote #6

    New version 0.3!
    Code:
    0. Fixed the capture HUD showing incorrect progress on certain maps
    1. Changed the capture time formula to be based on the difference of both team's alive players. Added cvars (resurrect_cap_min/mid/max to allow for configuration. The command 'resurrect_test' will print out a table of possible respawn times in server console to help with testing.
    2. The value of 'tf_arena_round_time' is no longer changed on the server.
    3. The value of resurrect_enabled takes effect when the new round begins. Changing the value mid-round will not have any immediate effect.
    4. Added natives: Resurrect_Enable and Resurrect_IsRunning to get started!
    5. Capping when the game is 1v1 will provide you with a health boost (resurrect_health_bonus)
    I'll add a way to initiate a vote soon. In preparation, I've made the cvar set the state of the mod when it enters a new round. Any good voting APIs, or should I just use sourcemod's VoteMenuToAll?
    __________________

    Last edited by pheadxdll; 09-24-2014 at 20:19.
    pheadxdll is offline
    ddhoward
    Veteran Member
    Join Date: May 2012
    Location: California
    Old 09-24-2014 , 22:31   Re: [TF2] Resurrection - Respawn in Arena Mode
    Reply With Quote #7

    In the .inc file, you should replace REQUIRE_PLUGINS with the more correct REQUIRE_PLUGIN. Furthermore, you should add this to the file:

    PHP Code:
    #if !defined REQUIRE_PLUGIN
    public __pl_resurrect_SetNTVOptional() {
        
    MarkNativeAsOptional("Resurrect_Enable");
        
    MarkNativeAsOptional("Resurrect_IsRunning");
    }
    #endif 
    Also, it seems that Resurrect_Enable(false) and Resurrect_Enable(true) are functionally identical. The native appears to completely ignore all parameters, only working to set resurrect_enabled to 1 on use.
    __________________

    Last edited by ddhoward; 09-24-2014 at 22:46.
    ddhoward is offline
    pheadxdll
    AlliedModders Donor
    Join Date: Jun 2008
    Old 09-24-2014 , 23:17   Re: [TF2] Resurrection - Respawn in Arena Mode
    Reply With Quote #8

    Thanks for catching that, I've made the fixes for the natives and re-uploaded the plugin.
    __________________
    pheadxdll is offline
    Jammy
    Member
    Join Date: Aug 2014
    Old 09-26-2014 , 12:30   Re: [TF2] Resurrection - Respawn in Arena Mode
    Reply With Quote #9

    Quote:
    Originally Posted by pheadxdll View Post
    New version 0.3!
    I'll add a way to initiate a vote soon. In preparation, I've made the cvar set the state of the mod when it enters a new round
    Does this mean when someone joins the first round is normal arena? After that round it goes to resurrection? If that's the case.. Do not want.

    Last edited by Jammy; 09-26-2014 at 12:31.
    Jammy is offline
    pheadxdll
    AlliedModders Donor
    Join Date: Jun 2008
    Old 09-26-2014 , 12:36   Re: [TF2] Resurrection - Respawn in Arena Mode
    Reply With Quote #10

    That only happens if the resurrect_enabled cvar is set to 0 when the map starts/first round begins. So by default, the first round will be resurrection mode.
    __________________

    Last edited by pheadxdll; 09-26-2014 at 12:59.
    pheadxdll 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 10:16.


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