Fair Strides

RESOURCE:NPC Auto-Leveller

Recommended Posts

While that does indeed seem credible, I have two questions:

 

1. How long and hard was that to actually figure out?

2. Do you know how the game decides which row a creature should use?

 

1. I was trying to recalculate all the calculations in the combat that the game does, this was just a part of it. But I think I didn't deal with the whole thing more than a month or two. I remember it was a bit frustrating in the beginning, but I must have gotten the right idea early on.. or read it somewhere, honestly I don't remember.

 

2. Multiplier Set in the .utc

Share this post


Link to post
Share on other sites

You do me a slight disservice here, DT. Surely I would have planned better than that? :P The function that resets a creature's stats is coded up and ready (minus the fact that I just realized it doesn't actually take feats, force powers, or skill points away, nor does is grant them like it should), but it is never actually executed. The k_ai_master.nss and fs_level.nss never actually call the function. The function can be called, but it isn't currently.

 

Oh, so the functions are there, they're just not called. That was the bit of info I was missing from our last communication on the script. Now it makes much more sense. Sorry there.

 

 

Here we go:

enemy_level = rounddown(player_level * levelmult)

enemy_hp_base = rounddown(player_level * vpmult) - 1

enemy_attack_mod = rounddown(player_level * tohitmult)

enemy_ac = rounddown(player_level * armormult) + 2

enemy_save_mod = rounddown(player_level * savemult)

enemy_damage = rounddown(player_level * damagemult + 1)

 

I don't seem to have figured out what crmod does though. As far as I can remember, those calculation gave the right results, but you should obviously check those for yourself.

 

That seems almost too easy. And crmod I'm guessing was meant to modify challenge rating, which is what actually assigns the amount of XP on death, as far as I'm aware. But all testing that I've done with it tells me it doesn't work.

 

However, there are clearly more calculations involved in some of these steps. For example, with hit points I know that:

 

rounddown(28*0.80) - 1 ≠ 630(base) or 1050(max), which are the values I see after opening up the save file GIT.

Share this post


Link to post
Share on other sites

Found some better notes:

Level = Level(Class I) + Level(Class II) + (PlayerLevel * levelmult(autobalance.2da) - 1) (only if mult > 0)

VP = BaseHitPoints * (PlayerLevel * vpmult(autobalance.2da) - 1)(only if mult > 0) + HitDie(classes.2da)/Levelup + CON * Level

FP = Max Force Points + ForceDie(classes.2da)/Levelup + WIS * Level

DEF = 10 + Natural AC + Class AC (acbonus.2da) + DEX + (PlayerLevel * armormult(autobalance.2da) + 2) (only if mult > 0)

ATT = D20 + Level(Class I) + Level(Class II) + (PlayerLevel * tohitmult(autobalance.2da)) (only if mult > 0) + STR/DEX

DAM = WeaponDie * (PlayerLevel * damagemult(autobalance.2da) + 1) (only if mult > 0) + (1.5(if single weapon) * STR)(if melee)

FOR = Class dependent(cls_st_*.2da) + character bonus(*.utc) + (PlayerLevel * savemult) (only if mult > 0) + CON

REF = Class dependent(cls_st_*.2da) + character bonus(*.utc) + (PlayerLevel * savemult) (only if mult > 0) + DEX

WIL = Class dependent(cls_st_*.2da) + character bonus(*.utc) + (PlayerLevel * savemult) (only if mult > 0) + WIS

 

This is from a file that was to become a guide, though I never finished it :( This should be more accurate.

 

And FairStrides, thought about your 1. again, I think I isolated the values that those multipliers should produce, then I just reversed the process and noticed it comes close to the player level, which was the crucial idea I needed. But I had all the other calculations in place as well, so it wasn't too hard getting those values, apparently.

 

EDIT: One more thing about PlayerLevel:

The game uses a system to automatically adjust the stats of enemies when they are spawned according to the player character. Exactly to what extent they are modified is defined in autobalance.2da. All values depend on the player level, which is determined from experience. This means that if you have enough experience for level 33, the game will consider that level even if you haven't levelled up yet.
Edited by bead-v

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.