Blasco's Fair Kill XP System:
Created: January 2009
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
CREDITS/THANKS:
Scarface: The vast majority of this is his anyway (with some modifications) so he deserves
a great deal of credit. Even if I had not stuck with his excellent ideas it was only through
reading and rereading his code that I got an understanding of how all this comes together.
Knatt: For his formula for getting Level based on XP. (Never would have figured that out
on my own). And for his ECL system concering SubRaces as it is the foundation upon which
my own Class XP Modifier and SubRace XP Modifier functions are built.
Nightwing and his loyal band of players/followers on the "Dawn of Nordock" module: For thier
exhaustive testing and honest, forthright commentaries on the pros/cons of this system.
Fleshmelter: For a sensible request that inspired a new float constant.
DM-Taino: For suggesting some form of ECL support. (Now provided through Class and SubRace
XP Modifiers)
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
FEATURES:
1) Modifed version of Scarface's PARTY_BONUS constant. Allows a set bonus for simply being
in a party, and then a seperate bonus per PC in the Party.
2) Floating Text of the xp and/or gold earned. (From Scarface's XP System)
3) Ability to turn on/off the following features: Gold reward, Killer bonus, Summon Penalty,
Floating Text.
4) Special_XP_Bonus variable that can be used to give specific PCs an extra percentage of XP.
(Useful as a reward for completing certain quests or anything you desire) More details
on this special variable can be found just below the listing of constants.
5) Only 4 functions (6 in version 2):
void SendKillerMessage(object oKiller); //Send Killer Message included just for an extra element of fun.
The killer is awarded seperately from the party members in order to
cut down on any confusion and accidental cross association of variables.
6) Special KillerMessage function that sends a randomly selected message to the Killer and
ten percent of the time will play a bit of fanfare when a creature is slain. (Just for fun)
7) This system does not rely on the average party level to award xp. XP is determined by the
PC's individual level in relation to the Slain creature's Challenge Rating.
8) The ability to override many of your own predefined settings for specific areas or
creatures. Including:
I)The Base XP.
II)Maximum XP.
III)Minimum XP.
IV)Party Level Gap.
V) Fair Kill Range
9) Class XP Modifier to modify the amount of XP a PC collects based on his/her class. (In Version 2)
10) SubRace XP Modifier to modify the amount of XP a PC collects based on his/her subrace. (In Version 2)
I set this up to be as user freindly as possible and out of a desire to make an XP script
that is easier to understand. Which is the reason for using the FAIR_KILL_XP constant.
I felt it was more intuitive to work with a number representing an actual amount of XP and
to adjust from that number as needed.
Other than that, it is based heavily upon Scarface's XP script. (With some modifications).
It also uses Knat's forumla for determining Level based on XP.
I found Scarface's XP system to be an easier one to understand and kept most of his ideas in
this one.
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
CHANGE LOG:
February 2, 2009:
1) Fixed a typo in the Untested OnActivateItem example script.
2) Modified AwardKillerXP and AwardPartyXP to do a more gradual drop in XP awarded
to PCs who fall outside the FAIR_KILL_RANGE. (As a result of player feedback from
NightWing's "Dawn of Nordock" module.
3) Modified default values of the constants.
4) Modified the Credits.
////////////////////////////////////////////////////////////////////////////////
February 10, 2009:
1) Added the constant float: MAXIMUM_CREATURE_CR (As a result of a request by Fleshmelter)
////////////////////////////////////////////////////////////////////////////////
March 1, 2009:
1)Added the ability to override the FAIR_KILL_XP float constant for individual creatures
or for specific areas.
2)Added the ability to override the MAX_XP float constant for individual creatures or for
specific areas.
3) Added the ability to override the MIN_XP float constant for individual creatures or for
specific areas.
4) Added the ability to override the MAXIMUM_PARTY_LEVEL_GAP constant for specific
areas so that PCs of ALL levels can party together in that area.
5) Modified the SendKillerMessage function to give a 10 percent chance of playing the
fanfare music on any of the messages rather than just the "Hero Bonus" message.
6) Added 5 new messages to the SendKillerMessage function.
////////////////////////////////////////////////////////////////////////////////
March 3, 2009
1) Two bug fixes.
2) Added the ability to override the FAIR_KILL_RANGE constant for individual creatures or
for specific areas.
////////////////////////////////////////////////////////////////////////////////
March 13, 2009
(Version 2)
1) Added XP Modifier based on Class
2) Added XP Modifier based on SubRace
////////////////////////////////////////////////////////////////////////////////
PERSONAL NOTE:
I am not attempting to compete with Scarface, or with Knatts XP system. Both are excellent
in my opinion. My only real purpose in this system was to make something that I could
understand a little better and thus implement more properly in my own module. Hopefully,
it will be of use to you for the same reasons. If I had wanted something truly original
then I wouldn't have used so much of Scarface's ideas.
////////////////////////////////////////////////////////////////////////// /////
////////////////////////////////////////////////////////////////////////////////
Nice updates, although you seem to be killing your download count hehe, at least the votes stay. And yes the ECL would be awesome addition, I asked scarface about it some time ago on his script guess he never got around to it. _________________________ PW Action Server: | Chaosgate |
Posted by Blasco-Yang at 2009-03-0219:12:21
Just uploaded another update on March 3, 2009. Two bug fixes and another special variable for even more flexibility. Appears I was lucky enough to have caught the bugs before anyone downloaded the newest version. There were actually some fundamental changes to the script to create the many options to override the base settings. Because of that, the potential for error is certainely there (though other than the two relatively minor bugs I discovered, I haven't come across anything else in my tests) Please be certain to post any bugs, errors, or issues you find right here so I can get to it as quickly as possible. Thank you.
Posted by Blasco-Yang at 2009-03-0117:44:39
Updated on March 1, 2009. (See the description field) I came to the conclusion from several comments that what was needed was a great deal more flexibility in the default settings. Hopefully this update has addressed that and you will find it even more useful. Still trying to keep it understandable and easy to use by using descriptive variable naming and heavy comments. Thanks for your input gang. Much appreciated.
Posted by Blasco-Yang at 2009-02-2516:49:25
DM-Taino: I am open to adding to /modifying this script in any way that suits the average builder as long as I can keep it fairly simple for new scripters. Much of my own personal difficulties with the other script systems was not the scripting itself. (Those guys are excellent) My issues were in understanding how to implement those systems to suit my own needs with my vast lack of knowledge at the time. So I have attempted (as much as is possible with something as complex as an XP system) to keep this as user friendly and understandable as I am able. Having said that, I must also add that I have absolutely no experience with scripting Effective Class Level systems. This "Fair Kill XP System", in and of itself would have been impossible for me had I not spent many hours taking apart Scarface's system and studying it over intensely to garner some understanding of how an XP system should actually operate. So in the end, Yes, I am willing to add it in, but I will have to go take a look at the only ECL supported system I currently know of..... that being Knatts PWFXP system. Once I have a better understanding of it and how to merge it with what I have here I would be happy to do so, but even that is a bit further down the line as I still have some upcoming modifications to this system to work out. (I will also add that if you or anyone else are willing to make this modification to the Fair Kill System while continuing in the vein of keeping it simple, that you will not only have my gratitude, but you will find that I am more than willing to share the credit.) My thanks to you DM-Taino for sharing your thoughts.
Posted by DM-Taino at on05/31/09
I do like Scarface Killer XP System, but just one thing I did disagree with it. And that was that it didn't support ECL. So I will ask you, Blasco-Yang. Is there a chance you may add ECL support in your system here? DMT
Posted by Fleshmelter at on02/01/09
Yeah, I have been making adjustments for most mobs with CR adjustment (max however is -125), but I will continue to monitor it as Players are quick to point out when they don't get any XP =) Thanks again. _________________________ PW Action Server: | Chaosgate |
Posted by Blasco-Yang at 2009-02-1415:56:36
My apologies for taking so long to get to back to this FM. I went back to the toolset and did some further testing. It appears that the GetLevelByXP function actually does continue to figure the PC into levels ABOVE 40 all on its own. So the MAXIMUM_CREATURE_CR constant isn't really neccessary in your case. As long as your PCs are within the FairKillRange they should continue to collect XP just as they always have. So a level 50 PC (as calculated by Knatts' GetLevelByXP function could be involved in the slaying of Creatures with a CR of anywhere from 45 to 54 perhaps and still get decent XP (as long as all other requirements are met). Now if you have a situation where your creature's are of a CR that is vastly greater than you expect your PCs to ever attain (even with the fact that with Knatts' function they still continue to gain levels beyond 40) one simple solution would be: Decide on a decent range of levels you expect your PCs to be when they confront these creatures and in the creatures "advanced" tab use "adjustment" to bring the creature's challenge rating down to the median of that range. This won't affect the strength of your creature in any way. Just be certain to set the new MAXIMUM_CREATURE_CR constant back up to a high number or it will continue to treat all creatures of a higher level as level 40. One other thing, I did reset the variable "int nLowLevel" to 80 for testing as it only seemed the logical thing to do. That is an integer variable you find within the void main. I'm not quite certain what effect it will have if it remains with the default value of 40. It may even be best to not give it a default value at all. Just leave it as: int nLowLevel; instead of int nLowLevel = 40; I am taking all of this into consideration for the next update so your questions, suggestions, and ideas are all quite welcome and most appreciated.
Posted by Fleshmelter at on02/01/09
Ok fair nuff, so that works as planned now (initially I moved the constant upto 60.....which meant my players still needed to be within range of max constant which well they can't at that level). Of course the question is, will it penalize PC's when they are in Legendary Levels. Your system grabs XP as a calculation for level correct. Will your XP system penalize for each legendary level over 40, if MAXIMUM_CREATURE_CR = 40. If that is the case then, I would then ask if it's possible for a Local float be used to override the global, for the purpose of managing the MAXIMUM_CREATURE_CR float. Reason being if I have level 80 CR mob in an area for level 40 PC's a MAXIMUM_CREATURE_CR = 40 is perfect, but if I have level 180 CR mob in area for level 50 PC's a MAXIMUM_CREATURE_CR = 40 would be not so good. Ahhh well I prolly wrote too much, and it's all convoluted. Hope you get my drift.....still love the script, and thanks for your time. _________________________ PW Action Server: | Chaosgate |
Posted by Blasco-Yang at 2009-02-1318:20:30
Sorry FM. I should have been more forthcoming in how to use the new constant. Actually as it's curretnly set up you shouldn't have to add the constant to your creatures. It's being applied directly within the body of the script. Anytime a creature is slain that has a CR above 40 the script should be treating the creature as though it is a level 40 for the purpose of determining XP gained for the killer and his party members. This is, of course, subject to all other rules of the script (one being your FAIR_KILL_RANGE constant). If the Fair kill range constant is set to 5 for instance then all PCs ranging from level 35 to 40 should recieve XP based on thier level in comparison to the Creature's CR (Which in the case of any creature equal to or above CR 40.... with the new constant they are always equal to CR 40) If the PCs fall outside of your Fair Kill Range then penalties begin to apply and you will eventually begin to see Players getting only the Minimum XP.
Posted by Fleshmelter at on02/01/09
It seems the float constant isn't working as intended, may be that i'm not using it correctly. I place MAXIMUM_CREATURE_CR on creature set float constant to 40 for example, and the mob still gives minimum xp, and sends message about being too high mob level. So correct me if I'm not executing it right. _________________________ PW Action Server: | Chaosgate |