AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   DoD Respawn Time Controller (https://forums.alliedmods.net/showthread.php?t=55978)

Vet 06-03-2007 15:34

DoD Respawn Time Controller
 
5 Attachment(s)
DOD Respawn Time Controller for Day of Defeat 1.3

Written by Vet(3TT3V)

REVISED (6-10-07)

Description:
This plugin will alter the values of the keys that determine the length of time it takes to respawn. Respawn factors can be set by a config file (respawnctrl.cfg), by CVARs, or for 'always-on-fast-respawns', depending on the mode of the plugin. If you use a config file, you can assign factors to individual maps, assign the same factors for all maps, or exclude a map from using the plugin.

How it Works:
First, some background. The time it takes to respawn in DOD is mainly reliant on 2 factors. A built-in timer that will vary per the number of players per team (6 ppt = 10 sec., 10 ppt = 12 sec., 14 ppt = 14 sec., etc.) and a timer multiplier. The multiplier is defined in the keys detect_allies_respawnfactor and detect_axis_respawnfactor that are in the entity info_doddetect. On nearly all DOD maps, the factors are left at the default value of 1.0 (no change). But on some maps (charlie, flugplatz and falaise for example) the map designers altered the factors to make the maps more balanced. You may have noticed that on dod_charlie, the Axis takes 3 times longer to respawn than the Allies. That's because the Axis factor is 1.5 and the Allies factor is 0.5. So if there were 10 players/team, the Axis respawn in 18 seconds (12 x 1.5) and the Allies respawn in only 6 seconds (12 x 0.5).

This plugin simply finds (or creates if needed) the entity values and changes them (as defined in the respawnctrl.cfg file). So you can increase or decrease each team's respawn time as desired. If you think dod_zalec is biased towards the Axis, you can increase the Axis factor, or reduce the Allies factor, or both. Or for fun, you can simply have all players on all maps respawn at the fastest rate. Its up to you. The minimum factor allowed is 0.1. So setting a factor to 0.1 will allow the fastest respawn possible. For reasons unknown to me, the fastest it gets is 3 seconds.

Installation:
Method 1) Download the .ZIP file and extract it to your \dod\ folder. The zip contains the plugin executable, the plugin source, and a config that will set all maps to the fastest respawn time. Then add the line dod_respawnctrl.amxx to your plugins.ini file.

Method 2) Compile the source on-line and place it in your \amxmodx\plugins\ folder. Then, if you intend to use a config file, either download the provided respawnctrl.cfg file or create your own file, and place that file in your \amxmodx\configs\ folder. If you intend to use modes 2 or 3, you don't need a config file but you need to set the CVAR dodrespawn_ctrl to either 2 or 3. This can be done in a config file (server.cfg or amxx.cfg) or through the console with the command dod_respawnctrl #. Add the line dod_respawnctrl.amxx to your plugins.ini file.

Again, you do not need a config file if you plan on using modes 2 or 3.

The config file:
The respawn.cfg file is a simple text file that defines the factors for the maps.

The file syntax is (a single SPACE separates each parameter):
<mapname> <allies_factor> <axis_factor>

If a map name of dod_all is found, ALL maps not listed previously will be set to the values in dod_all.
If the Allies factor is set to 0, the factors for that map are left unchanged.

Here are some sample respawnctrl.cfg files:
Sample1:
dod_kraftstoff 1.2 0.8
dod_zalec 0.7 1.3
(ONLY dod_kraftstoff and dod_zalec will have altered respawn factors)

Sample 2:
dod_jagd 0
dod_all 0.5 0.5
(All maps EXCEPT dod_jagd will have respawn factors of 0.5 for both teams)

Sample 3:
dod_kraftstoff 1.2 0.8
dod_zalec 0.7 1.3
dod_jagd 0
dod_all 0.9 1.1
(Maps dod_kraftstoff and dod_zalec use the specified values. All other maps are set to 0.9 for Allies and 1.1 for Axis, except for dod_jagd which is left unchanged)

Command: (access level 'h' required)
dod_respawnctrl <0|1|2|3|?> - Changes the way the plugin operates (default 1)
0 - Plugin is disabled
1 - Plugin uses the respawnctrl.cfg file for respawn factors (default)
2 - Plugin uses respawn factors of 0.1 for both teams on all maps (no config needed)
3 - Plugin uses CVARs for respawn factors for all maps (default 0.5, no config needed)

CVARs:
dodrespawn_ctrl <0|1|2|3> (default 1) - Controls the mode of the plugin. DO NOT place this cvar in any config file that gets executed upon map change. The new value will not take affect until the map changes
dodrespawn_ally <#.#> (default = 0.5) - Respawn factor for Allies in Ctrl mode 3
dodrespawn_axis <#.#> (default = 0.5) - Respawn factor for Axis in Ctrl mode 3

The plugin includes a server-side variable named DOD_RespawnCtrl so you can locate servers that use the plugin via Game-monitor

Revision History:
----------------
1.6 (6-10-07)
Added 2 additional mode of operation. Mode 2 will configure all maps to use the fastest possible respawn rate (3 second respawns). Mode 3 will use CVARs to set the respawn factors. That way, you can changes the CVARs in-game for use on the next map. No config file is needed for these 2 new modes.

1.5 (6-3-07)
Original release

REVISED (6-10-07)

--------------------

|OnEHiTwOnDeR| 06-05-2007 21:13

Re: [DOD] Respawn Time Controller
 
why is there a need for a plugin which takes up space? just open bsp editor with the map u want change the value and ur done...

teame06 06-06-2007 00:30

Re: [DOD] Respawn Time Controller
 
Quote:

Originally Posted by |OnEHiTwOnDeR| (Post 486149)
why is there a need for a plugin which takes up space? just open bsp editor with the map u want change the value and ur done...

Hmm ... Let see.
1. You rent the server. What if the bsp is a 10 MB file. You need to upload the file. You don't have a very fast upload speed.

2. What if you want to adjust the time again and refer to 1.

3. What if you want to change multiple maps?

How much space 8 KB file take up compile plugin take up? There are major plus side on using this plugin. All this take up is very small memory when loaded.

Personally I would rather use this then edit the bsp directly.

Vet 06-06-2007 14:56

Re: [DOD] Respawn Time Controller
 
Quote:

Originally Posted by |OnEHiTwOnDeR| (Post 486149)
why is there a need for a plugin which takes up space? just open bsp editor with the map u want change the value and ur done...

You are correct, the same thing can be accomplished by editing the bsp. But I take a different perspective on it... "Why permanently edit a bsp when I can use a plugin". And me being kinda lazy, would rather edit one config file than edit & upload 30 bsps. Not to mention if I wanted to changed them back to the original settings. So I guess its 'whatever trips ur trigger'.

Vet 06-10-2007 00:28

Re: [DOD] Respawn Time Controller
 
Revised (6-10-07)
I added 2 addition modes to the plugin. See the 1st post for details.

JUSTSMOKIN 07-03-2007 16:59

Re: DoD Respawn Time Controller
 
This sounds cool i may give it a try out

TheMadCat 08-30-2007 23:36

Re: DoD Respawn Time Controller
 
Like you plugin, is there anyway to respawn faster then 3 seconds with setting at dod_all 0.1 0.1?

As it is, I say no. Anything in the source code I can edit that will do that?

Vet 09-04-2007 22:44

Re: DoD Respawn Time Controller
 
Not that I'm aware of. There may be a map entity you could play with.

MAUGHOLD 10-15-2007 04:16

Re: DoD Respawn Time Controller
 
ROFL, This plugin rocks booty. :)
up until now i have been using bsp edit to do this.
Thank you Vet.

dogeh1 08-10-2011 19:56

Re: DoD Respawn Time Controller
 
I dont understand how it works... what value i have to put in to in all the maps for 2 seconds of respawn time for both teams?


All times are GMT -4. The time now is 05:17.

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