This function returns 0 if the targeted player does not deserve an XP penalty for multiclassing, 1 if she deserves a 20% penalty, 2 if she deserves a 40% penalty, in accordance with 3E D&D rules. Note that the Bioware engine already deducts the appropriate penalty when assigning XP rewards, even if those XP rewards are given through scripting. That makes this function kinda useless. I didn't know that when I wrote it originally though. Darn. Oh well. Send all comments by private message to elchwang on the official NWN web site. Update from 1.03 to 1.04 -- Function now recognizes the 40% penalty scenario, as per 3E rules. (I mistakenly thought the penalty was only 20%.) v1.04, 13FEB03
I wouldn't call it useless. This is very handy if a person wants to tweak the adjustments :)
Instead of awarding xp using GiveXPToCreature (which has the bw adjustments), use SetXP(oCreature, GetXP(oCreature) + nAward); and you can use your script to determine the adjustments.
and replace everything that comes after it (but *not* including it) with these two lines:
return 1;
else return 2;
}
That should work. What that would do is return 0 for all single classers, 1 for all dual classers and 2 for all triple classers. You can then deduct whatever penalty you want based on those int values.
I can send you a cleaned up version via email if you like.
Posted by Brian ( ..xxx.xxx ) at 2003-06-15 13:07:00
Elchwang - actually I could see the use in your script...if modified a bit. I do not know very much about scripting or I'd give it a shot...but I could really use a script that penalizes ALL multiclassing. 20% for 2 classes, 40% for 3.
How could your script be modified to do that?
Thanks for any help you can give.
Posted by elchwang ( ..xxx.xxx ) at 2003-05-08 09:56:00
Dekion,
(1) I know that Bioware already auto-deducts the appropriate penalty. See the previous comments on this page.
(2) I also know that not every multi-classer deserves a penalty. This is accounted for in the script, as I said in the readme, and as is evident in the script. Test it and see.
I think you should read the readme and pre-existing comments more carefully, and possibly the script itself, before posting erroneous and redundant comments.
Posted by Dekion ( ..xxx.xxx ) at 2003-05-06 06:29:00
The game code already take into account if you deserve a penalty for multiclassing. In addition, you aren't penalized automatically if you multiclass, only if at least one of the classes is not a preferred class of the race you play and the levels of non-preferred class(es) are seperated by more than one. A level 2 Fighter/6 Rogue Human would have no penalty, a level 1 Monk/6 Wizard Elf would not either, a level 3 Fighter/1 Ranger/6 Rogue Human (highest level is the preferred class for Humans) would have a 20% penalty and a 1 Ranger/5 Rogue/7 Cleric Dwarf would have a 40% penalty. Those penalties are calculated automatically, test it and see.
Posted by elchwang ( ..xxx.xxx ) at 2003-02-14 22:03:00
This is v1.04 -- it fixes the oversight of the 40% penalty
case. Though, as I said in my previous comment, this
function is a lot less useful than I originally thought it
would be, as Bioware auto-deducts the appropriate penalty
even for pre-scripted XP rewards.
(Though -- you *can* still use the function if, for
instance, you do *not* want to penalize mult-classers.
Then use the function to identify which penalty will be
given, if any, and then script your XP reward to
compensate appropriately.)
Posted by elchwang ( ..xxx.xxx ) at 2003-02-13 20:59:00
Ah crud. Your impression was right, InterSlayer. I just
made a lever in my toolset dole out 10,000XP every time
you pull it. If a PC deserving of a multi-classing
penalty pulls it, she gets only 8,000XP.
This function is kinda useless then.
Which is kinda good, as it's also incorrect. It fails to
give a 40% penalty to three-class characters that deserve
it, as per 3E rules. I'll post a revised version soon,
but the NWN engine already calculates XP penalty
automatically, so the function doesn't have much work to
do. (It still has some uses, as in if you want to
automate an NPC to look over a PC and say something
like "you deserve an XP penalty!".)
Posted by InterSlayer ( ..xxx.xxx ) at 2003-01-29 01:19:00
This is great thanks =) I was always under the impression
NWN took into account XP multiclassing penalties even if
you gave XP implicitly by scripting.
You must be Logged In to post comments in this section.