AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   HP Balance 1.5.1 (https://forums.alliedmods.net/showthread.php?t=50285)

Isobold 01-23-2007 06:29

HP Balance 1.5.1
 
16 Attachment(s)
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.

Install:
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.

Features:
HP Balance supports multilanguage, so feel free to translate it and post the translation here.

Configure:
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:
Code:

#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.
Tip: If you want to award good players instead of balancing the game, just choose a negative multiplier.

Changelog:

Version 1.0:
  • fully working version
Version 1.1:
  • Fixed playerSpawn being launched at demo record and other ResetHUD-events being unequal to spawn
Version 1.2:
  • 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
Version 1.3:
  • 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.
Version 1.4:
  • 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.
Version 1.5:
  • 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.
Version 1.5.1:
  • Little bug at round start, players were starting with only 10 HP ... thx to schlumpf2005 for reporting this

Known Issues:
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.

Languages:
  • Deutsch/German by Isobold
  • Francais/French by Isobold
  • English/English by Isobold
  • Danish translation by Pagh (aKa Phire Nuk3r)

Which version to choose?
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 .

Arkshine 01-23-2007 07:16

Re: HP Balance
 
Interesting. :)

I've tried with some bots.

I'm not sure that it's a good way to show the messages of all players ratio to everyone.
Perhaps by adding a say command like /ratio which gives the possibility to the player to show or not his own message.

Also it seems that it works fine. ;)

Isobold 01-23-2007 09:43

Re: HP Balance
 
Your right, that wasn't made intentionally, I changed the 0 to id ;-)

I will test this plugin some days on my own server. If I consider it useful, I will probably add some more functions (like adjusting some of the defines, or a say command instead of per round announcement)

Trent-Resnor 01-23-2007 23:13

Re: HP Balance
 
Reset HUD can be called more then once by a user. block it out... i learned this the hard way...

Isobold 01-24-2007 07:28

Re: HP Balance
 
Could you plz give me some more details (or a link, where I can read more about this topic?)?

Is there any function like client_spawn which is generic and not NS only?

I would not like to do a redundant plugin for DoD, CS, NS and so on ...

edit: Did found it by myself: http://forums.alliedmods.net/showthread.php?t=42159

Trent-Resnor 01-25-2007 00:28

Re: HP Balance
 
Heh, yea sorry i didn't get to show you what i ment. Glad you found it. and Glad i noticed it before VEN. or else this would have gone to unapproved instantly.

DuraLast 01-25-2007 00:47

Re: HP Balance
 
Ah, damn you=)

I was just making somthing similar to this, good job.

Isobold 01-25-2007 10:24

Re: HP Balance
 
Thx for your hint Trent-Resnor, when I was scripting for amxx the last time, this issue wasn't known that well, and afaik not that well documented. One of my other plugins, afk_kisss has this problem too, I'll fix it soon there even so I never heard about problems with my plugin due to this issue ...

Edit: I consider the development of this plugin terminated. Some of the defines could be cvars, but this would cost some performance without any advantage, as once configured you might not want to change the values all the time. For some maps you might want to disable this plugin, but amxx already give you a handy mechanism o do this.

soccdoodcss 01-26-2007 17:52

Re: HP Balance
 
Lol i made something liek this one too, it gave rewards also... but it was too damn sloppy :(. Nice job though.

Isobold 01-27-2007 07:55

Re: HP Balance
 
I tried this plugin for some hours now, seems to be bug free, but I will soon release a version 1.5 which will take in count the number of players in each team ...

The balancing by hp works quite well, it's lot's more fun, when each player has to give his best. Really good players have to watch harder for not getting injured, medium an bad players get more time to shoot accurate and to finally kill something and train their skills ...


All times are GMT -4. The time now is 14:41.

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