Project

General

Profile

Actions

Bug #118

open

Some NPCs have outrageously high (>1000) stats

Added by MUD over 3 years ago. Updated over 3 years ago.

Status:
In Progress
Priority:
High
Assignee:
Start date:
09/29/2020
Due date:
% Done:

0%

Estimated time:
reported_by:
Hilapdatus

Description

It has been noted that some NPCs have outrageously high stats. The Maze Keeper, for instance, has stats that are greater than 1000.

I discovered that this can happen when SetLevel() is called before SetRace().

SetRace() calls genetics::eventInitializeStats(). This function is whack and has been for a long time! Some recent change that I made elsewhere seems to have allowed the crazy of this function to emerge.

It takes the base stat level for the given race and multiples it by 1/10th of the NPCs level. It then halves this value and then multipled by the NPCs level and divided by 3.5.

So, let's look at the Maze Keeper, a level 42 god. The base stat level for each stat is 43. So, given the information above, each stat would be:

43 * 42 / 10.0 / 2 * 43 / 3.5 == 1109
Actions #1

Updated by Hilapdatus over 3 years ago

  • Subject changed from Bug Report to Some NPCs have outrageously high (>1000) stats
  • Description updated (diff)
  • Status changed from New to In Progress
  • Priority changed from Normal to High

In "fixing" genetics::eventInitializeStats(), I actually made this situation worse and the maze keeper had stats over 3000. The switch() statement which determined the stat class factor didn't have any break statements and so no matter what the stat class was the factor was always 0.5. Once I added the break statements in, the stat class factor for the maze keepers race became 1.8.

This function utilizes so much multiplication, this is nuts! The other broken aspect of this function is that these crazy high numbers only affect NPCs whose level is set before their race. If the race is set before the level then the stats will be artificially low.

The first step is to figure out a mathematical function that generates reasonable stats.
The second step will be to either calculate NPC stats after each call to SetRace() and SetLevel() or we do a 0-duration call_out() to set the stats after create().

Actions #2

Updated by Hilapdatus over 3 years ago

We need to do some serious balancing of racial stats.

All stats for humans are Average/Normal, which is fine, and with a base stat level of 8. A pig, however, has Excellent durability with a base stat level of 43 -- the same as a god!

This is going to take some work and it is going to alter a lot of the game. :/

Actions

Also available in: Atom PDF