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.
////////////////////////////////////////////////////////////////////////// /////
////////////////////////////////////////////////////////////////////////////////
Close but no cigar. *grin* Yes I am using the base settings and those are all tweaks i had tried prior to posting. All my encounters are set to normal and spawn between 1-4 monsters. So here is the problem i have: 1 CR 20 = 300xp 1 CR 19 = 258xp 1 CR 18 = 216xp 2 CR 16 = 264xp (132 each) 3 CR 15 = 270XP (90 each) You'll see that killing lower CR's actually give more xp than higher CR's. My hope was to have it scale and look something more along these lines: 1 CR 20 = 300xp 1 CR 19 = 278xp 1 CR 18 = 248xp 2 CR 16 = 230xp (115 each) 3 CR 15 = 216XP (72 each) Those aren't exact numbers but i think you get the idea. I would like it to scale close to the original base xp value without going over the previos amounts. So killing 2 or 3 or 4 would get you gradually lower than the base xp. Again this is just a wish wist list as i'm not sure what i'm asking can even be done *smile*. I'm using your script as is and it is working beautifully. Thanks for all your hard work!
Posted by Blasco-Yang at 2009-02-1016:53:35
jdeavila Fleshmelter Saduj Pattycake1 Jackrabbit Slim I should have said this sooner: You have my sincere thanks and gratitude for your kind comments and votes:
Posted by Blasco-Yang at 2009-02-1016:45:07
Hiya Jackrabbit! Makes perfect sense. I assume you have the following settings: FAIR_KILL_XP = 300.0; FAIR_KILL_ADJUSTMENT = 0.1 If so, then I think a minor tweaking of your FAIR_KILL_ADJUSTMENT constant should do the trick for you. (An important note though: Your current issue is dealing with 3 spawns of CR 15 each. If at some point it's anything other than that then further adjustment and experimentation may be needed) Here are some examples I experimented with after reading your post: (These examples are based on the assumption that your FAIR_KILL_XP constant is set to 300.0) 0.133; //Gives 100 XP to a level 20 PC Killing a Creature with a CR of 15. 0.134 //Gives 99 XP to a level 20 PC Killing a Creature with a CR of 15. 0.135 // Gives 97 XP to a level 20 PC Killing a Creature with a CR of 15. 0.14 // Gives 90 XP to a level 20 PC Killing a Creature with a CR of 15 0.15 //Gives 75 XP to a level 20 PC Killing a Creature with a CR of 15. As long as your FAIR_KILL_XP remains set to 300.0 then you should recieve 300 xp for killing a creature the same level as yourself. But as you can see, the greater the value you give your FAIR_KILL_ADJUSTMENT constant the lower the XP you recieve for killing a creature lower level than yourself. Keep in mind though that this setting will also affect the amount of XP you recieve for killing creatures that are HIGHER level than your character. Play around with that setting till it feels right to you. Post back here if there are any other issues and I will do my best to help. Actually, I have been considering splitting that constant into two seperate constants... One for Adjusting the XP recieved when you are higher than the creatures CR, and a second for when your level is lower than the creature's CR. Thus making the two possible scenarios independent of one another. Fleshmelter's suggestion has given me a couple of new ideas as well. Maybe in the next update.
Posted by Jackrabbit at on02/10/09
Downloaded this last night and I really like it. Very well commented which makes it easy for folks like me to understand *grin*. Question though. I use encounters in my mod and I cannot seem to get this to scale the xp for multiple monsters. Example: Currently level 20 PC spawns 1 CR 20, kills it gets 300 XP. Same PC spawns in 3 CR 15, kills each at 150 XP each,thus gaining 450 xp, 150 xp more than the CR 20. Can i scale it so that the 3 CR 15's total xp would average to the CR 20 or below? Hope that makes sense. I tried playing with some of the settings but could not achieve the result. Thanks in advance!
Posted by Blasco-Yang at 2009-02-0916:17:26
Guess I need more experience posting things to the vault. I didn't mean to overwrite the original. I meant to simply add another version (only slightly modified from the original), but no harm done I suppose. Let me know if the new float constant solves your issue Fleshmelter.
Posted by Blasco-Yang at 2009-02-0916:05:11
Perfectly reasonable request Fleshmelter. Was just about to post an updated version anyway and then saw your suggestion and went back to it and added in a new constant. Details are in the script. Of course, now I'm seeing that there are no files up there for download. Either I did something wrong when posting the updated version or its an admin thing and we just have to wait for approval.
Posted by Fleshmelter at on02/01/09
Ok, I was wondering was there any way of turning it off for certain creatures basically, I have creatures on my server which are designed to be extreme levels, and players could never hope to obtain these levels, but would need to fight these monsters in groups. Example would be a CR of 100 or so, with this script inplace no player would get xp beyond the minimum. _________________________ PW Action Server: | Chaosgate |
Posted by Pattycake1 at on02/02/09
We have been testing this on Dawn of Nordock for Blaso-Yang. The players really love it. It is very easy to use and gives you tools to handle power gaming, either to allow it or disallow it. I suggest this system to all the PW worlds out there.
Posted by Fleshmelter at on02/01/09
Great I always loved scarface's xp script, this is an excellent adaptation. I like the special XP as well, I've added tokens to my server that players can obtain as just great loot. The players I have love the xp script since it's been added. Great Job! _________________________ PW Action Server: | Chaosgate |
Posted by Saduj at on01/29/09
Nice work, simplicity is always a good thing :) _________________________ Carcerian/Saduj's Submissions: (169 Portrait/Soundset Unlocker) (12 NWN Fonts) (30 NWN Fonts) (Auto-Emotes) (Custom Dragon Disciples) (Dynamic Wildshape) (Keyring) (NPC Schedules) (Sacred Shields) (Spawning Undead) (Shayans Subrace Engine for 169)