Neverwinter Nights Forum News
Posted Sunday, July 27, 2003 - 19:10 CET by Veldrin

Here are today's Neverwinter Nights forum highlights. Please take into account that these are only single parts of various threads and should not be taken out of context. Bear in mind also that the posts presented here are copied as-is, and that any bad spelling and grammar does not get corrected on our end.

Georg Zoeller, Designer

Random Location: Not the most simple thing to ask for:

Here is what I would do. Measure the dimension of an area in on x and y, then generate a random point between these constraints and try to create an object (i.e. waypoing) there. If it is successful, use GetLocation on the object to make sure it is valid (and to find out at which location it was really created)


Quote: so there is no way to give a PC a level without calculating the Xp required to get to the next lvl???

I am not sure what you want to achieve:

if you...want to level up the PC one level, using the standard skill and feat choises of his package, calling LevelUpHenchman(oPC) once will do fine... you want to give him enough XP to get the next level but allow him to pick feats and skills for himself, you can use this script

void GiveNextLevel(object oPC)
{
int nHD = GetHitDice(oPC)+1;
int nXPNew = ((nHD * (nHD -1)) / 2) * 1000;
SetXP(oPC, nXPNew);
}

I think it should work with prestige classes, but I am not sure about that as I never tried to do that.

  • Your character meets all prerequisites for the prestige class at the given level
  • It started with a standard package (i.e. fighter) at level 1
  • You pass in a CLASS_TYPE_* that matches to a valid prestige class into the command
  • That the character's skills and feats at the level you want to start the prestige classes are valid for his old class. For some reason LevelUpHenchman does not fail because of invalid skills immediately at level 1 but may level up until a certain level and start to fail then


    Name:
    E-mail:
    Password (staff only):
    Comment: