-
Notifications
You must be signed in to change notification settings - Fork 1
DifficultyConfig
This section describes how the difficulty system can be configured, which was added starting with mod version 2.0.0. With this new system the difficulty can be changed/increased with progressing game time.
The difficulty config is stored under: minecraft/config/undeadnights_difficulty_config.json (this location is the same for Fabric, NeoForge and Forge)
Note: which the addition of the difficulty system, several config options have been moved from the MainConfig to the new DifficultyConfig. Please recheck all config files, when upgrading to the new version.
Below the default difficulty config is explained in detail. Scroll down for the default difficulty config (how it is first generated).
The config consists of two main sections:
- dynamic scaling for horde mobs (disabled by default)
- an array of difficulty levels (only one level defined by default)
With the first section "dynamic scaling" 4 attributes (health, damage, speed and armor) of the horde mobs can be influenced/increased. Either by the amount of players on the server / in the game or increased always after a certain amount of days. A max value for the 4 attributes can also be defined. Dynamic scaling is disabled by default.
Example: "healthScalePerPlayer": 0.05 and 5 Players on the server = 0.05 * 4 (one player is the base value) = 0.20 -> all newly spawned horde mobs get a 20% health boost.
Note: if dynamic scaling in not needed, that section can be removed from the config
The second section defines an array with the different "difficulty levels", each array entry can have several of the following subsections:
- difficulty level definition
- difficultySettingsHordeNights
- difficultySettingsHordeMobs
- difficultySettingsHordes
- difficultySettingsLureEffect
At the start of a difficulty level entry 4 things are defined: the difficultyName, the minimum and maximum starting day a the chance for and switch to that level to happen. With a 100% change the switch will happen on the minimum day. If the switch didn't happen before the maximum day, it will always on the day maximum is set to.
With this subsection the Horde Night settings can be changed with changing difficulty levels.
With this subsection the Horde Mobs settings can be changed with changing difficulty levels. The following things for Horde mobs can be changed: attributes like mob health (e.g. "healthAttributeScaleFactor": 1.1 will increase mob health by 10%), behavior in sunlight, speed on water, mob climbing and block breaking.
With this subsection the Horde settings can be changed with changing difficulty levels. Like scale the amount of mobs in a horde. Enable/disable ramdom hordes. But most important the different hordes that are available in this level. Note: those need to be defined in the HordeConfig (the first Horde in that config is 1, the second 2 and so on). "hordeSelectionMode" can have two values sequential or random, this defines how the next horde to spawn is selected.
With this subsection the Horde Lure effect settings can be changed with changing difficulty levels.
{
"dynamicScaling": {
"dynamicScalingEnabled": false,
"healthScalePerPlayer": 0.05,
"damageScalePerPlayer": 0.05,
"speedScalePerPlayer": 0.0,
"armorScalePerPlayer": 0.0,
"daysBetweenScaleIncreases": 10.0,
"daysHealthScaleIncrease": 0.05,
"daysDamageScaleIncrease": 0.05,
"daysSpeedScaleIncrease": 0.0,
"daysArmorScaleIncrease": 0.0,
"maxHealthScale": 2.0,
"maxDamageScale": 2.0,
"maxSpeedScale": 2.0,
"maxArmorScale": 2.0
},
"difficultyLevels": [
{
"difficultyName": "Level 1",
"minStartDay": 0,
"maxStartDay": 0,
"chanceForDifficultyLevelSwitch": 100,
"difficultySettingsHordeNights": {
"daysBetweenHordeNights": 5,
"chanceForHordeNight": 100,
"spawnAdditionalWaves": true,
"cooldownBetweenWaves": 45,
"chanceForAdditionalWave": 7
},
"difficultySettingsHordeMobs": {
"updateHordeMobAttributes": false,
"updateAttributesOfThirdPartyMobs": false,
"healthAttributeScaleFactor": 1.0,
"damageAttributeScaleFactor": 1.0,
"speedAttributeScaleFactor": 1.0,
"armorAttributeScaleFactor": 1.0,
"hordeZombiesBurnInTheSun": false,
"vanillaZombiesBurnInTheSun": true,
"hordeZombiesAreFasterOnWater": false,
"hordeMobsCanClimbEachOther": true,
"blockBreaking": false,
"blockBreakingTier": 1
},
"difficultySettingsHordes": {
"hordeSizeScaleFactor": 1.0,
"enableRandomHordes": false,
"chanceForRandomHorde": 15,
"hordeSelectionMode": "sequential",
"listOfPossibleHordes": [
1
]
},
"difficultySettingsLureEffect": {
"enableLureHordeEffect": true,
"nonHordeZombiesCanCauseLureHordeEffect": true,
"chanceForLureHordeEffect": 0.07,
"durationForLureHordeEffect": 60,
"lureHordeEffectSpawnsHorde": true,
"chanceForLureEffectToSpawnHorde": 0.2
}
}
],
"internalConfigVersion": 1
}
Below you find an example with 3 difficulty levels and dynamicScaling removed from the config.
Note:
- for this you need to have 5 hordes defined in a HordesConfig variant 2
- for difficulty levels 2 and 3 only the relevant changed elements are present
{
"difficultyLevels": [
{
"difficultyName": "Level 1",
"minStartDay": 0,
"maxStartDay": 0,
"chanceForDifficultyLevelSwitch": 100,
"difficultySettingsHordeNights": {
"daysBetweenHordeNights": 5,
"chanceForHordeNight": 100,
"spawnAdditionalWaves": true,
"cooldownBetweenWaves": 45,
"chanceForAdditionalWave": 7
},
"difficultySettingsHordeMobs": {
"updateHordeMobAttributes": false,
"updateAttributesOfThirdPartyMobs": false,
"healthAttributeScaleFactor": 1.0,
"damageAttributeScaleFactor": 1.0,
"speedAttributeScaleFactor": 1.0,
"armorAttributeScaleFactor": 1.0,
"hordeZombiesBurnInTheSun": false,
"vanillaZombiesBurnInTheSun": true,
"hordeZombiesAreFasterOnWater": false,
"hordeMobsCanClimbEachOther": true,
"blockBreaking": false,
"blockBreakingTier": 1
},
"difficultySettingsHordes": {
"hordeSizeScaleFactor": 2.0,
"enableRandomHordes": false,
"chanceForRandomHorde": 15,
"hordeSelectionMode": "sequential",
"listOfPossibleHordes": [
1, 2
]
},
"difficultySettingsLureEffect": {
"enableLureHordeEffect": true,
"nonHordeZombiesCanCauseLureHordeEffect": true,
"chanceForLureHordeEffect": 0.07,
"durationForLureHordeEffect": 60,
"lureHordeEffectSpawnsHorde": true,
"chanceForLureEffectToSpawnHorde": 0.2
}
},
{
"difficultyName": "Level 2...",
"minStartDay": 3,
"maxStartDay": 5,
"chanceForDifficultyLevelSwitch": 50,
"difficultySettingsHordeMobs": {
"updateHordeMobAttributes": true,
"updateAttributesOfThirdPartyMobs": false,
"healthAttributeScaleFactor": 1.2
},
"difficultySettingsHordes": {
"hordeSelectionMode": "sequential",
"listOfPossibleHordes": [
2, 3
]
}
},
{
"difficultyName": "Level 3...",
"minStartDay": 8,
"maxStartDay": 10,
"chanceForDifficultyLevelSwitch": 60,
"difficultySettingsHordeMobs": {
"updateHordeMobAttributes": true,
"updateAttributesOfThirdPartyMobs": false,
"healthAttributeScaleFactor": 1.2
},
"difficultySettingsHordes": {
"hordeSelectionMode": "random",
"listOfPossibleHordes": [
2, 4, 5
]
}
}
],
"internalConfigVersion": 1
}