View Single Post
Plugin Info:     Modification:          Category:          Approver:   Hawk552 (427)
Vet
Veteran Member
Join Date: Jul 2006
Location: I|O wa
Old 06-03-2007 , 15:34   DoD Respawn Time Controller
Reply With Quote #1

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)

--------------------
Attached Files
File Type: cfg respawnctrl.cfg (395 Bytes, 1333 views)
File Type: sma Get Plugin or Get Source (dod_respawnctrl.sma - 3269 views - 7.0 KB)
File Type: zip dod_respawnctrl.zip (11.6 KB, 1489 views)
__________________
=====================================
- My Plugins -
=====================================

Last edited by Vet; 09-09-2008 at 22:22. Reason: Update, remove dead link
Vet is offline
Send a message via MSN to Vet