config.maxLevel for NPC
My NPC in KoTS Commander Karef failed to be configured to level 20, as the check won't allow him.
npc.make_class(toee.stat_level_fighter, 20) # 20 is max
python_object.cpp:
static PyObject * PyObjHandle_MakeClass(PyObject* obj, PyObject* args) {
auto self = GetSelf(obj);
int level;
Stat statClass = stat_level_barbarian;
if (!PyArg_ParseTuple(args, "ii", &statClass, &level)) {
return nullptr;
}
if (level <= 0 || (uint32_t) level > config.maxLevel){
return PyInt_FromLong(0);
}
I think this limit should be applied to PC only. But let NPC to be as designed.
Heh, it's just an ancient cheat code I used to test high level features. I think it's harmless to set the upper bound to 30 or something like that (I guess the limit would be XPTABLE_MAXLEVEL-3). Note that the code is simple enough that you could do it in python anyway...
"Note that the code is simple enough that you could do it in python anyway..." - sure. I just accidently caught that.
Default value btw is 10.