You are here

Disable Class levelup after taking Prc?

11 posts / 0 new
Last post
cozmothemagician
Disable Class levelup after taking Prc?

I'm looking for a way to stop a person fom leveling up in the druid class after they start on a career as a Shape Master?  Anybody have any ideas? I COULD just hard code into all the spells/feats for a Shape Master a check on druid progression beyond level 5, but that would be a real PITA.

  • up
    50%
  • down
    50%
rjshae

What happens if a character becomes a shapemaster once they are past Druid level 5? It would be preferable to let a player take whatever class levels they want.

  • up
    50%
  • down
    50%
kamal

I'm not sure you can stop a player from taking levels in a class they would otherwise qualify for. Are you trying to stop taking further druid levels for PnP accuracy? What will the character do when they hit the max level as a Shapemaster (assuming it's a normal 10 level prc)?

  • up
    50%
  • down
    50%
kevL's

i tend to agree w/ Rj. I mean, it's an interesting problem but ... why shouldn't a player be allowed to continue leveling as a druid?

  • up
    50%
  • down
    50%
cozmothemagician

Meh, meybe I was just being mean (:  Yeah really, who da heck am I to tell peeps how they should level.

  • up
    100%
  • down
    0%
Clangeddin

On your module's pc levelling up script.

void ShapeshifterIsMean(object oPC, int nXP, int nSTART = TRUE, string s2DA = "exptable", string sCOLUMN = "XP")
{
    if (GetLevelByClass(CLASS_TYPE_DRUID, oPC) <= 5)
    {
        if (nSTART != TRUE)
        {

            SetXP(oPC, nXP);
            string sTXT = "Cannot have more than 5 druid levels with shapeshifter class. Exp refunded.";
            FloatingTextStringOnCreature(sTXT, oPC, FALSE);
        }
        return;
    }
    if (nSTART == TRUE)
    {
        int nCACHE = GetNum2DAColumns(s2DA);
    }
    int nLVL = GetHitDice(oPC);
    string sXP = Get2DAString(s2DA, sCOLUMN, nLVL - 2);
    SetXP(oPC, StringToInt(sXP));
    DelayCommand(0.0f, ShapeshifterIsMean(oPC, nXP, FALSE));
}

void CheckShapeshifter(object oPC)
{
    if (GetLevelByClass(CLASS_TYPE_SHAPECHANGER, oPC) < 1) return;
    int nXP = GetXP(oPC);
    DelayCommand(0.0f, ShapeshifterIsMean(oPC, nXP));
}

void main()
{
    object oPC = GetPCLevellingUp();
    DelayCommand(0.0f, CheckShapeshifter(oPC));
}

You can now resume being mean. devil

P.S. I don't know if you are using CLASS_TYPE_SHAPECHANGER (25) to identfy that class or you're using a new custom class, in that case you'll have to change it whatever is the row id in the class.2da.

  • up
    50%
  • down
    50%
Valefort

What about adding a cls_pres_druid.2da file with only a non-shapeshifter condition line ?

2DA V2.0

     LABEL                              ReqType                        ReqParam1       ReqParam2
0    ShapeMaster                 CLASSNOT                   #shapemaster  ****

 

  • up
    50%
  • down
    50%
Trinital

Interesting solution Valefort, can you NOT conditions in that 2DA? That's pretty useful.

  • up
    50%
  • down
    50%
kamal
I thought i had marked on the wiki that some class fields could have a not in them although official documentation didnt mention it, but cant find it. Must be becoming the sterotypical bumbling wizard.
  • up
    100%
  • down
    0%
Valefort

Yep you can Trinital !

  • up
    50%
  • down
    50%
Shadooow

It is written in NWN1 wiki by me. CLASSNOT and SAVE - they works in NWN1, because NWN2 uses NWN1 data it should work in NWN2 as well.

 
CLASSNOT
ReqParam1 is the row number of a prohibited class in classes.2da (131).
 
SAVE
ReqParam1 indicates the type of save (1 for fortitude, 2 for reflex, or 3 for will), and ReqParam2 is the required saving throw bonus (without magical modifiers).
  • up
    50%
  • down
    50%