[Solved] How many XP will I get if I kill a baddie?

The question was recently asked and answered in the NWN2 - Forum. But whats about NWN 1?

I put the following in the nw_c2_default6 script (at the very beginning) and saved the script in the module

object oDamager = GetLastDamager();
object oMe = OBJECT_SELF;

  if (GetLocalInt (oMe, "GetCR") == 0)
      SetLocalInt (oMe, "GetCR", 1);
      int nCR = FloatToInt(GetChallengeRating(oMe));
      string s2DAColumn = "C" + IntToString(nCR);

      int n2DARow = GetHitDice(oDamager) -1;

      string sXP = Get2DAString("xptable", s2DAColumn, n2DARow);

      float fXPmultiplier = IntToFloat(GetModuleXPScale()) / 10;
      string XP = IntToString(FloatToInt(StringToFloat(sXP) * fXPmultiplier));

      SendMessageToPC (oDamager, GetName (oMe) +": CR " +IntToString(nCR)+ "/ XP " + XP);

It will calculate the expected XP on the first successful hit on the enemy.

Thi first earthshattering realization was, that GetChallengeRating does not work on the playercharacter. There was nowhere a pointer that this is the case. GetHitDice seems to work quite fine.

Then any number of henchmen, familiars and/or summoned creatures will reduce the awarded XP by just 20%. No counting the number of supporting forces, just 20%. Is this correct???

Finally I’ll have to figure out, how class combinations will reduce the XP. Is there an easy way to do this?

Take a look at this article on the NWN Wiki.


I’ve been in this nwn wiki article recently, the discussion page for it is also interesting. Make sure to check it out!

1 Like