How does NWN determine the level when spawning enemies or generating loot?
- Does the generation logic consider your overall player level by XP?
- Or does the generation logic take a sum of your class levels?
The difference is thus: If you have 8 levels of Wizard and no other classes, and have surpassed the XP threshold to level, but have not yet levelled up, does the game generate mobs and loot at level 8 or 9?
Seeing the source of the “CTG_CreateTreasure” function would answer this, but I can’t seem to view it in the NWN Toolset.
This Lexicon entry might help.
In the toolset script editor, use the “open” icon, check “all files”, search for x0_i0_treasure.
Thanks for the pointer! From “nw_o2_coninclude”, it looks like the treasure generation system uses Hit (Point) Dice. So, for the Level 8 Wizard who has enough XP to level, but has not yet, the mobs and loot would generate according to Level 8, not Level 9.
Also, from the source, the system generates treasure in six levels, according to the player’s level (i.e. hit die):
- Levels 0-5
- Levels 6-8
- Levels 9-10
- Levels 11-13
- Levels 14-16
- Levels 17-100
So, if you’ve surpassed Level 100, you are out of luck. But, a Level 13 character will generate the same treasure as a Level 11 character (though the OC does also generate treasure according to class).