Difficulty System

 

 

In order to simplify the sometimes tedious and time-consuming work of balancing a game for different difficultly levels, some of the basic stats and behaviors of AIís in MOHPA have modifiers applied to them. This allows the designers to modify certain global properties of the game by adjusting just a few parameters. This document is a brief explanation of how to adjust the difficulty settings. All CVARís can be modified as normal. The following are tweakable difficulty aspects.

 

AI Accuracy

Adjusting these parameters will effect how accurate all AIís are when firing their weapons. The four CVAR parameters and their default values are:

g_AIAccuracyEasy††††††††††††† -25

g_AIAccuracyMedium †††††††††† 0

g_AIAccuracyHard †††††††††††† 25

g_AIAccuracyRealistic†††††††† -25

 

The number is a scalar percent that enemy accuracy will use. For all levels of difficulty except Realistic, friendly units will get the negated value. (E.g. at Hard difficulty, Enemies will be 25% more accurate and friendly units will be 25% less accurate.) At Realistic difficulty all AIís will be 25% less accurate.

 

Grenade Awareness

††††††††††† Adjusting these parameters effects how aware all AIís are of grenades in their proximity. The parameters and their default values are:

 

g_AIGrenadeAwarenessEasy††††††††††† 25

g_AIGrenadeAwarenessMedium††††††††† 50

g_AIGrenadeAwarenessHard††††††††††† 75

g_AIGrenadeAwarenessRealistic†††††† 50

 

††††††††††† The number is a percent chance that an AI will be able to notice a nearby grenade. For example, at the Hard difficulty level, thereís a 75% chance that an AI will be able to notice a grenade thrown near him. Note that this is just a chance to notice a grenade, not a guarantee; other things factor into determining if the AI will notice the grenade (e.g. proximity and line of site also figure into this.)

 

AI Health

††††††††††† Adjusting these CVARs will effect how much health AIs get, provided the AIís health isnít explicitly set in script (in which case, the AIís health will not change based on difficulty settings.) The parameters and their default values are:

 

g_AIHealthModifierEasy††††††† -25

g_AIHealthModifierMedium††††† 0

g_AIHealthModifierHard††††††† 25

g_AIHealthModifierRealistic†† 0

††††††††††† The number is a percent modifier to apply against enemy AI health. For all levels of difficulty, friendly AIs will get the negated percent modifier applied to their health. For example, at the Hard difficulty level enemy AIs will have 25% percent less health than their default, while friendly units will get an extra 25% health.

 

 

Bullet Damage

††††††††††† Adjusting these CVARs will effect how much damage is applied by all AIís. This modifies only combat related damage (i.e. not falling damage) and does not adjust the players applied damage. The parameters and their default values are:

g_BulletDamageScalarEasy††††††††††† 50

g_BulletDamageScalarMedium††††††††† 100

g_BulletDamageScalarHard††††††††††† 100

g_BulletDamageScalarRealistic†††††† 200

 

††††††††††† The numbers are a percent of damage to apply. For example, at Easy difficulty level all damage is cut in half and at realistic levels, damage is twice as severe.

 

Notice Scale

††††††††††† Adjusting these CVARs scales the time that enemy AIs will take to notice friendly forces. The parameters and their default values are:

g_AINoticeScaleEasy†††††††††† 200

g_AINoticeScaleMedium†††††††† 100

g_AINoticeScaleHard†††††††††† 50

g_AINoticeScaleRealistic††††† 100

 

†††† The numbers are a percent chance modifier that an AI will notice an enemey actors. For example, at Hard difficulty, AIís are only half as likely to notice enemies, while at Easy difficulty they are twice as likely to notice an enemy.

 

 

Spawning

††††††††††† At the Easy difficulty setting, one third of enemies will simply not spawn. There are some problems to simply not spawning one out of three AIís (e.g. what happens when an AI that is necessary for a gag doesnít spawn?) Therefore it is necessary for designers to tell the game which groups of spawning enemies are ok to cull. This is accomplished by an optional parameter on the spawnset, spawngroup and spawn calls in script. The parameter is called ďlocal.use_difficultyĒ. If it is set to non-zero, the actors spawned from that call will be counted as one of the level-wide pool of enemies who will not spawn. Every third actor marked as such will not spawn on difficulty level Easy. All actors, friendly or enemy, on a level wide basis will count.