HP Balance v1.5.1
This plugin tries to balance the game between players by changing players hp in function of their death-kill-ratio on player spawn.
This plugin should work with any mod.
To install it
, just put the hp_balance.sma into the scripting folder, the hp_balance.amxx into the plugins folder and the hp_balance.txt into the data/lang folder. Add hp_balance.amxx to the end of your plugins.ini. Enable the fun-module
in your modules.ini.
HP Balance supports multilanguage, so feel free to translate it and post the translation here.
Default is a max. difference of 50% from initial health, and a ratio-multiplier of 10, so that 4 deaths and 3 kills would result in (4-3)*10+100=110% of the initial health. More than 150% and less than 50% would be set to 150% or 50% percent. If you want to change this, open the sma-file in a text-editor of your choice, and change those lines:
#define SPAWNS_CONSIDERED 10 // Number of respawns considered for calculation of ratio
#define MULTIPLIER 10 // Percentage-multiplier for death-kill-ratio
#define MAX_INC_PERCENTAGE 50 // Max percentage health is increased from base
#define MAX_DEC_PERCENTAGE 50 // if >= 100, min hp is set to 1
#define MAX_PLAYERS 32 // Change this, if your mod and your server are supporting more than 32 players
Compile the plugin using the web compiler or the compiler you downloaded with amxx. Put the new amxx-file into your plugins-folder and change map.
If you want to award good players instead of balancing the game, just choose a negative multiplier.
Version 1.0:Version 1.1:
- Fixed playerSpawn being launched at demo record and other ResetHUD-events being unequal to spawn
- No more static basic health, but health on spawn as calculation basis, this should take in count those mods with different races with different basis health
- The hp-difference is now fully calculated in %, you may even choose a max. difference of more than 99%, min hp is set to 1 if hp would be 0 or below.
- Plugin now only counts kills-death-ratio within a certain spawn-period. Default is ten respawns. This should prevent players from staying at their level forever on mods as day of defeat.
- Plugin won't make giant steps between each round, but make follow players health only by MULTIPLIER (default 10 %) steps to the real ratio.
- Min-Health and Max-Health may be adjusted separately.
- Little bug at round start, players were starting with only 10 HP ... thx to schlumpf2005 for reporting this
Due to the rolling kill-death-ratio-deadline, the attributed health points are sometimes not reflecting the actual gaming situation instantly. This is intended, but might confuse players and testers. If you know a better formula than the one used, let me know, and I will look what it's impact is. If you want k-d to be considered without rolling dead line, please use tirvial version.
Which version to choose?
- Deutsch/German by Isobold
- Francais/French by Isobold
- English/English by Isobold
- Danish translation by Pagh (aKa Phire Nuk3r)
If you just want to have hp changed by kill-death-ratio, choose trivial version. If you want the rolling deadline where older kills and deathes are not considered and hp may not change in huge steps, use hp_balance. Both versions need hp_balance.txt .