GameSkill
From ZDoom Wiki
int GameSkill (void)
Usage
Returns the skill level of the current game.
Return value
The skill level of the current game. For script readability there are skill levels defined in zdefs.acs as follows:
- SKILL_VERY_EASY = 0
- “I'm Too Young to Die” in Doom.
- SKILL_EASY = 1
- “Hey, Not Too Rough in Doom.
- SKILL_NORMAL = 2
- “Hurt Me Plenty” in Doom.
- SKILL_HARD = 3
- “Ultra-Violence” in Doom.
- SKILL_VERY_HARD = 4
- “Nightmare!” in Doom.
These are ordered 0 through 4 so all operators will work. For example, skills which are <= SKILL_NORMAL are very easy, easy and normal.
Examples
This script takes the TID of a boss monster and applies different effects depending on the skill. Easier skills get a quarter health boss. Harder skills get a half health boss. Nightmare gets a full strength boss which is invisible.
script 1 (int boss)
{
if (GameSkill () <= SKILL_EASY)
SetActorProperty (boss, APROP_HEALTH, 1000);
else if (GameSkill () < SKILL_VERY_HARD)
SetActorProperty (boss, APROP_HEALTH, 2000);
else
SetActorProperty (boss, APROP_RENDERSTYLE, STYLE_Fuzzy);
}
Although this example is somewhat unbalanced, this command can help to finely tune skill levels.

