Raised This Month: $12 Target: $400
 3% 

BF2 Rank Mod 1.5.5 [4/21/11] (pRED*)


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff        Approver:   Hawk552 (427)
vittu
SuperHero Moderator
Join Date: Oct 2004
Location: L.A. County, CA
Old 02-18-2007 , 20:33   BF2 Rank Mod 1.5.5 [4/21/11] (pRED*)
Reply With Quote #1

Battlefield 2: Rank Mod by pRED*



.: Description :.

This plugin is an attempt to recreate the Battlefield ranking system onto CS1.6.

Features the basics of the ranking system, with no power up gain received from leveling. Power ups are an optional feature gained by obtaining Badge Awards. Badges are obtained by completing specified tasks. This plugin utilizes AMX Mod X's stats system.
Ranks are based on the number of Points you have. Points are earned from frags and from planting/defusing the bomb. Also, if you choose to run it Points can be earned from the objectives of the CS Flags plugin.
NOTE: Some Ranks require Badges to be gained just like in BF2, so if you choose to disable Badges by the bf2_badges cvar those Ranks are not obtainable.

Badges are earned by accomplishing the objectives specified in the help menu. For example, the Basic Knife Badge is earned by 2 knife kills in 1 spawn. There are 3 levels of Badges in increasing difficulty just like in BF2: Basic, Veteran, and Expert. If enabled, Badges will give the power up bonuses listed below.
Badge - Basic/Veteran/Expert Reward (*optional feature)
Knife - 20/40/60% of damage done with knife returned to player.
Support - +2/+4/+6 M249 damage per bullet
Pistol - 20/25/33% chance of stunning attacker
Assault - +10/+20/+30 Bonus HP when spawning
Sniper - 1/3,1/2,1/1 Chance of Free awp/scout
Explosives - .2/.4/.6 multiplier added to Grenade damage
Shotgun - 150/100/50 alpha level invisibility with Knife
SMG - 15/30/45 speed boost added for all weapons
Players with one thirds, two thirds, or all of the Badges will get 50, 100, and 200 Armor(Vest+Helm) respectively.

Medals are awarded for getting 1st, 2nd, and 3rd highest frags at the end of the map. These do not award any powerups but keep track of the highest number of wins on the server stats page (see the ingame menu)
Other Info:
Servers running the mod

Plugin usage stats

Screenshots:
(these need to be updated)
Rank Icon Being Displayed
Free Items when you spawn
Pistol Badge Imobilising an enemy
Another Rank Icon Being Displayed
Running out of ideas... Hmm another rank icon!


.: Complimentary Addons :.
.: Requirements :.
  • Amx Mod X 1.80 or above w/Counter-Strike Addon
    Modules:
    CStrike
    CSX
    FakeMeta
    Fun
    Ham Sandwich
    nVault or MySQL (depending on save method)
  • Sprites in "BF2 Rank Mod 1.5.5.zip"


.: Known Issues :.

1. In order to obtain some Ranks, Badges must be turned on.
2. If the server has bots, csstats_rankbots must be set to 1 in order for bots kills to count toward Badges.
3. Plugin will not load without the required sprites.
4. Round must end normally for medals to be given (dependent on intermission event, changelevel and amx_map will not call this event).


.: Installation :.

Download Descriptions:
bf2webdocs.zip - Optional motd web pages for help info, requires website to host if used.
bf2rank.sma - sma script, not complete plugin. Attached only for reference purposes.
BF2 Rank Mod 1.5.5.zip - For new installs. Contains entire script, compiled plugin, required sprite files, and optional sounds.
BF2 Rank Mod 1.5.5 script only.zip - For upgrading servers, contains script only. Needs to be compiled.

New Installs (nVault saving):
  • Unzip all files in "BF2 Rank Mod 1.5.5.zip" to your server's mod directory (the "cstrike" or "czero" folder).
  • Add bf2rank.amxx to your plugins.ini file (".../amxmodx/configs/plugins.ini")
  • Copy and paste the cvars shown below into amxx.cfg
  • (optional) Unzip "bf2webdocs.zip" onto a web host and set bf2_help_url "" to the url location of the webdocs
  • (optional) Delete or add optional sound files in "BF2 Rank Mod 1.5.5.zip" to ".../sound/bf2rank/"

If upgrading just download "BF2 Rank Mod 1.5.5 script only.zip" extract contents and compile locally. Then just upload the newly compiled file to your server. This last update included 2 optional sound files, if not on your server they will not be used.

For MySQL saving a define must be uncommented at the top of bf2rank.sma and script must be recompiled.

Note: there is no way to transfer nVault saved data to MySQL or vise versa and I have no plans to add that function.


.: Compile Settings :.

Code:
// Uncomment to use MySQL instead of the default nVault saving
//#define SQL

// Admin flag settings for giving points/badges and server saved data reset
// These can also be set in cmdaccess.ini without need to change here
// (See amxconst.inc for more admin level constants)
#define ADMIN_LEVEL ADMIN_BAN
#define ADMIN_RESET ADMIN_RCON

// Note: Changing any of the above the above requires plugin to be recompiled

.: Commands :.

Console Commands:
bf2_resetstats - Resets all of your stats
bf2_addbadge <player> <badge> <level> - Gives a badge to player. Requires Ban admin access. Badge <0-7>. Level <0-3>
bf2_addkills <player> <kills> - Adds to a players kills.. Also requires ban access
Say Commands:
"/bf2menu" - Shows the Main Menu
"/who" - Shows a list of player and their rank
"/whois <name>" - Show the rank and badges of a specific player
"/whostats <name>" - Show the stats page for a player
"/ranks" - Shows the kill xp table
"/help" - Displays a Help MOTD
"/badges1" - Displays a Help MOTD on some of the badges
"/badges2" - Displays a Help MOTD on the rest of the badges
"/badges3" - Badges 3
"/bf2stats" - Show a list of your kill data

.: Cvars :.

Copy and paste to amxx.cfg
Code:
////////////////////////  Battlefield 2: Rank Mod  ////////////////////////

bf2_active 1		//(1|0) - Turns the plugin on or off - Default 1
bf2_badges 1		//(1|0) - Turns the badge system on or off - Default 1
bf2_badgepowers 0	//(1|0) - Enable/Disable the powers for the badges - Default 0
bf2_awp 0		//(1|0) - Is user given an awp or scout by having the sniper badge - Default 0 (scout)
bf2_ffa 0		//(1|0) - Enable/Disable team attack for receiving pts and for badge use, turn on for "free for all" servers - Default 0
bf2_xpmultiplier 0.1	//(float) - Changes the point multiplier needed to reach each level - Default 0.1 (15 points for rank 1, 20k points for top rank)
bf2_xpminplayers 2	//(int) - Minimum number of plays required to be in server before bonus bomb and flag xp (only) is awarded
bf2_reset_days 21	//(int) - Number of days without playing till xp gets pruned per user (Note: currently nvault saving only)
bf2_icon_time 1.5	//(float) - Amount of time to display the rank icons for. Default 1.5, 0 to disable icons all together.
bf2_help_url ""		//(string) - Remote folder where the bf2 web docs are stored (optional) do not include the trailing /
bf2_statustext 1	//(int) - Enable/Disable the points, # of bagdges, and rank info that replaces player name info in hud - Default 1
bf2_hud_options "abcde"	//(flags) - Set options for player aim hud message info (not shown if miscstats PlayerName option is on) - Default "abcde"
			//flag a - Display Health/Armor/Weapon for teammates
			//flag b - Display Rank for teammates
			//flag c - Display Rank for enemies
			//flag d - Hide display for invisible enemies
			//flag e - Move the display to above peoples heads

//CS Flags integration
bf2_flag_kills 2	//(int) - CS Flags - How many bf2 points are awarded for capturing a flag
bf2_flag_round_kills 0	//(int) - CS Flags - How many bf2 points are awarded for winning a round
bf2_flag_match_kills 0	//(int) - CS Flags - How many bf2 points are awarded for winning the match

///////////////////////////////////////////////////////////////////////////

.: Changelog :.

Code:
1.5.5 - 4/21/11
Fixed Assult Badge health bonus to only give health if less than current health to avoid conflicts.
Fixed max armor bonus to only give armor if less than current armor to avoid conflicts.

1.5.4 - 4/18/11
Changed data to load instantly instead of on tasks in plugin_cfg due to possible bug with bots.
Skipped nVault pruning if bf2_reset_days is set to 0.
Fixed bf2_resetserverstats to clear server bf2 stats and SQL's bf2ranks2 table data.
Changed Lieutenant General and General to be obtainable when badges are turned off.

1.5.3 - 6/8/10
Fixed bf2_hud_options to allow disabling player aim hud message info by setting cvar to nothing "".

1.5.2 - 8/31/09
Changed bf2_flag_min_players to bf2_xpminplayers and made it include bomb xp
Added bf2_statustext cvar to allow disabling replacement of hud name info, may also be used by other mods
Changed bf2_badgepowers cvar to be off by default.
Changed bf2_hud_options cvar to include e by default, the comments said it was included but was not.
Small updates to information in help motd's and other motd edits.
Fixed speed check to run on spawn and round start.

1.5.1 - 4/18/09
Fixed bf2_resetserverstats command to use ADMIN_RESET instead of ADMIN_LEVEL define
Fixed pistol badge code from being run on self from a suicide
Removed useless /hud command

1.5 - 4/15/09
Added saving by IP and nick controlled by csstats_rank cvar
Added saving for bots controlled by csstats_rankbots cvar
Added bf2_ffa cvar to enable/disable team kills to count for points
Added use of Hamsandwich for spawn and damage change code
Added check for PlayerName miscstats option to disable BF2's hud info
Added 2 Optional sounds from BF2 for rank and badge gain
Fixed speed system and added calls for FOV speed changes
Fixed badge checking not being checked on death not from a player 
Updated SQL saving code for improvements
Removed CSDM define and bf2_csdm.inl as changes made them unnecessary now
Removed fakemeta_util_mini.inl and included fakemeta_util.inc
Removed excess calls of DisplayHUD and save_badges
Fixed variable length that hold player names
Fixed a few possible out of bounds strings, still need to fix rest
Changed default ADMIN_RESET define to ADMIN_RCON from ADMIN_CFG
Fixed knife badge max hp and to only show blue glow/screenflash if hp is given

1.4.1 - 2/27/09
vittu takes over maintaining the plugin due to pRED moving to SourceMod
Fixed CS Flags compatibility
Fixed TK giving points, will set an option to enable later
Fixed self grenade kill from adding to grenade kills
Fixed missing Lt General rank issue
Fixed description of requirements for special and higher ranks
Updated rank requirements not updated when more badges were last added
Adjusted StatusText, points hud info, to better fit max character amount
Added band-aid fix for auto save by steamid or IP, will update method later

1.4
Fixed wrong sprites displaying
fixed double hp gain on round reset (CSDM)
added /whostats command
bf2_help_url (and web motds) and bf2_badgepowers cvars
fixed sprites
CSDM badges not being awarded.
Top ranked in server display message
New menus
Reset your stats command
Medals other new stats
Logging admin commands
Two new badges. Fixed Explosives badge for csdm
Heaps of new stats options + saving them (server and player)
Changed power for support
SQL now a defined option
Moved needed fakemeta_util functions into a separate file (included)
New HUD system thanks to vittu (added cvar to control it)
bf2_reset_days cvar - number of days without playing till xp gets reset

1.31
Lowered chance of imobilising happening.
Changed damage event and bomb events to the csx forward versions and created a csx forward include
Capped knife badge damage to 130
Removed bf2_vaultload (pointless now.)
Fixed some spelling newbie mistakes..
Fixed immunity problems
Moved inl and config files into their own folder..
Probably a few other things too..

1.30
Starting work on 4 New ranks
Shows Teammates rank when you look at them.
Give 50,100,200 armour for having 6,12 or 18 badges..
Bf2 now saves totalkills itself. Prevents csstats resets..
bf2_addkills (admin abuse tool? - or to reset after csstats reset), gives x kills to a player
Reduced the amount of saving to vault - causing server lag.
Changed to nVault saving. Now uses only 1 vault data instead of 14.
Fixed armour being lower than you had before
Split file into large set of includes. Way easier to find functions you want.
Added +3 kills for defuse/explode. Cs flags mod support.
Added cvar bf2_version to allow the plugin to be detected by game monitor. (don't edit this.. it's just for info)
Fixed the html files after word pwnt them. I <3 microsoft.

1.23
Added CSDM functionality. Give hp/weapons on all spawns. 
Recoded badge checking to be individual on player death
Fixed HP bug and added message "beginning badge check"

1.22
bf2_addbadge admin command added

1.21
Added a badge check 5 seconds before map changes.

 1.2
Massive change to make global kill counting actually work..
Added screen to view weapon stats "say /bf2stats" or use the menu
Added concmd "bf2_vaultload" to forcibly load your own data from the vault (im using it to convert my stats from vault to sql)
Tell people to type bf2_vaultload into console and their badges will be restored. Other than that probably a useless command

1.1
Fixed Bug with Veteran Assault badge
Added SQL support (bf2_sql 1)
Changed support badge to bonus speed (added code for extra damage, recoil - will finish when amxx 1.77 is released)
Sounds, Screen Shake, User glows..

.: Credits :.

Read the SMA.. The list is getting kinda big. Thanks to all of you.

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

Do not attempt to use the "Get Plugin" link.
The attached sma contains only a tiny amount of the code and is just there for reference purposes. (especially checking the credits section)
Attached Files
File Type: zip bf2webdocs.zip (82.5 KB, 13630 views)
File Type: sma Get Plugin or Get Source (bf2rank.sma - 11490 views - 21.3 KB)
File Type: zip BF2 Rank Mod 1.5.5.zip (556.9 KB, 17434 views)
File Type: zip BF2 Rank Mod 1.5.5 script only.zip (31.4 KB, 6526 views)

Last edited by vittu; 04-21-2011 at 12:40. Reason: Uploaded 1.5.5 update...
vittu is offline
Send a message via AIM to vittu Send a message via MSN to vittu Send a message via Yahoo to vittu
Da_sk8rboy
Veteran Member
Join Date: Jul 2006
Old 02-18-2007 , 20:44   Re: Bf2 Rank Mod
Reply With Quote #2

Screenshots?
__________________
i stop around here and there.
Da_sk8rboy is offline
pRED*
Join Date: Dec 2006
Old 02-18-2007 , 20:55   Re: Bf2 Rank Mod
Reply With Quote #3

Tbh theres not all that much to see at the moment.
Just a HUD display at the bottom (similar to wc3 etc..) and some screen colour flashes.
Mite add that to the wish list: Flashy colours/sprites etc.

At the moment 3 of the badges give you free stuff : Green Screen Flash
1 Gives you lowered recoil (removed cone of fire. pwnage.) - Nothing visible
1 immobilizes people - Red Screen Flash
1 Returns health - Blue Screen Flash
pRED* is offline
godlike
Senior Member
Join Date: Apr 2005
Old 02-19-2007 , 03:49   Re: Bf2 Rank Mod
Reply With Quote #4

sounds good .
__________________
Read the rules before posting something stupid: click here

Any questions about amxx PM me
godlike is offline
vittu
SuperHero Moderator
Join Date: Oct 2004
Location: L.A. County, CA
Old 02-19-2007 , 04:55   Re: Bf2 Rank Mod
Reply With Quote #5

I like this idea. You should also add sounds to play to the client only when they get a new rank or get a badge, something from default sounds maybe so they wouldn't have to worry about it. And I think you should consider dod compatibility cause it seems like something they would enjoy.
vittu is offline
Send a message via AIM to vittu Send a message via MSN to vittu Send a message via Yahoo to vittu
Servak
Member
Join Date: Feb 2007
Location: Russia, Ryazan
Old 02-19-2007 , 08:31   Re: Bf2 Rank Mod
Reply With Quote #6

It is necessary to make that hud disappeared or was in the bottom of the screen, differently it too prevents to play.
Servak is offline
Send a message via ICQ to Servak
GraffityMaster
Member
Join Date: Jan 2007
Old 02-19-2007 , 11:16   Re: Bf2 Rank Mod
Reply With Quote #7

this haz a rezerved slot on my server...when it will be released...

Suggestion:

Make some classes like (players have to choose the class at server joining) :

1. Sniper
2. Assault
3. Soldier...
.....
etc.

and give them special abillites
__________________
GraffityMaster is offline
Servak
Member
Join Date: Feb 2007
Location: Russia, Ryazan
Old 02-19-2007 , 13:21   Re: Bf2 Rank Mod
Reply With Quote #8

Quote:
Originally Posted by GraffityMaster View Post
this haz a rezerved slot on my server...when it will be released...

Suggestion:

Make some classes like (players have to choose the class at server joining) :

1. Sniper
2. Assault
3. Soldier...
.....
etc.

and give them special abillites
No, is better would be, that the author has then created separate mod named BF2 with an opportunity of a choice of a class etc.Payers on my server do not like total conversion plugins like GabenMod, but this plugin theay approve. Good job.
Servak is offline
Send a message via ICQ to Servak
pRED*
Join Date: Dec 2006
Old 02-19-2007 , 14:10   Re: Bf2 Rank Mod
Reply With Quote #9

Quote:
Originally Posted by Servak View Post
It is necessary to make that hud disappeared or was in the bottom of the screen, differently it too prevents to play.
Not quite sure what you mean?..

You don't like the positioning on the HUD display? Or that the HUD tends to disappear after a while (say /hud to make it come back if that's the case)

As with the classes idea, I tend to agree with Servak. I don't have or play Dod but I can see a Dod version of this working quite well as it could integrate with the inbuilt class system quite easily.

And yes agree with the sound effects idea. Will look into it as soon as I get the chance.
pRED* is offline
Servak
Member
Join Date: Feb 2007
Location: Russia, Ryazan
Old 02-19-2007 , 14:26   Re: Bf2 Rank Mod
Reply With Quote #10

I meant that HUD there is all time in the center of the screen and does not disappear, that very much prevents to play.

Last edited by Servak; 02-19-2007 at 14:29.
Servak is offline
Send a message via ICQ to Servak
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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