AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] Resurrection - Respawn in Arena Mode (updated 12-Mar-2015) (https://forums.alliedmods.net/showthread.php?t=248666)

pheadxdll 09-21-2014 12:23

[TF2] Resurrection - Respawn in Arena Mode (updated 12-Mar-2015)
 
3 Attachment(s)
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

robotortoise 09-22-2014 12:19

Re: [TF2] Resurrection - Respawn in Arena Mode
 
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?

Powerlord 09-22-2014 12:55

Re: [TF2] Resurrection - Respawn in Arena Mode
 
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.

pheadxdll 09-22-2014 20:31

Re: [TF2] Resurrection - Respawn in Arena Mode
 
@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.

Powerlord 09-23-2014 09:56

Re: [TF2] Resurrection - Respawn in Arena Mode
 
Quote:

Originally Posted by pheadxdll (Post 2202579)
@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*

pheadxdll 09-24-2014 20:14

Re: [TF2] Resurrection - Respawn in Arena Mode
 
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?

ddhoward 09-24-2014 22:31

Re: [TF2] Resurrection - Respawn in Arena Mode
 
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.

pheadxdll 09-24-2014 23:17

Re: [TF2] Resurrection - Respawn in Arena Mode
 
Thanks for catching that, I've made the fixes for the natives and re-uploaded the plugin.

Jammy 09-26-2014 12:30

Re: [TF2] Resurrection - Respawn in Arena Mode
 
Quote:

Originally Posted by pheadxdll (Post 2203329)
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.

pheadxdll 09-26-2014 12:36

Re: [TF2] Resurrection - Respawn in Arena Mode
 
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.


All times are GMT -4. The time now is 08:46.

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