Scaling Health

Scaling Health

23M Downloads

Mob spawner's mobs do not give difficulty

GIANTCRAB opened this issue ยท 4 comments

commented

Versions

Expected Behavior

Difficulty increases when you kill mobs spawned by spawner

Actual Behavior

Difficulty does not change. (Might be a conflict with aphothesis mod?)

Links/Images

My server config

#Settings for tamed creatures
[pets]
	#Delay (in seconds) between regen ticks for pets. Set 0 to disable.
	regenDelay = 30.0

#Settings related to difficulty. Difficulty determines various things, such as how much health mobs have.
[difficulty]
	#Ignore the Y-axis in difficulty calculations
	ignoreYAxis = true
	#The maximum difficulty value a player can have.
	maxValue = 500.0
	#Distance-based area modes will multiply distance by this value to get difficulty
	distanceFactor = 0.0025
	#EvalEx expression: A multiplier for area difficulty calculations, typically based on the number of players in the search radius.
	groupAreaBonus = "1 + 0.05 * (areaPlayerCount - 1)"
	#Message displayed to the player when sleeping, assuming it would change their difficulty.
	#If left empty, the default message is pulled from the translation file.
	sleepWarningMessage = ""
	#Every second, this value is added to player and dimension difficulty.
	#Enter a negative number to subtract difficulty instead.
	changePerSecond = 0.003
	#These players will not gain difficulty. Use either name or UUID.
	#Note: if non-exempt players are nearby, mobs will still be stronger.
	exemptPlayers = []
	#The minimum difficulty value a player can have. This can be smaller from startingValue.
	minValue = 0.0
	#Track a difficulty value for this dimension. Otherwise, uses the "default" dimension.
	localDimensionDifficulty = false
	#If true, player difficulty is tracked for this dimension.
	#Otherwise, the value tracked for the "default" dimension is used.
	localPlayerDifficulty = false
	#If true, a comment will appear to notify when you are considered afk
	afkMessage = true
	#Determines how difficulty is calculated.
	#WEIGHTED_AVERAGE:
	#weighted average of players difficulty based on distance - players further away from an area will have less of an impact
	#AVERAGE:
	#Takes the average difficulty of nearby players
	#MIN_LEVEL:
	#Lowest difficulty of all nearby players
	#MAX_LEVEL:
	#Highest difficulty of all nearby players
	#DISTANCE_FROM_SPAWN:
	#Difficulty increases further away from world spawn, see distanceFactor config above.
	#DISTANCE_FROM_ORIGIN:
	#Same as DISTANCE_FROM_SPAWN but from (0, 0, 0)
	#DISTANCE_AND_TIME:
	#Mix of WEIGHTED_AVERAGE and DISTANCE_FROM_SPAWN. Difficulty increases with time but also with distance
	#DIMENSION_WIDE:
	#Difficulty tracked at the server level. Player difficulty is irrelevant.
	areaMode = "WEIGHTED_AVERAGE"
	#Distance to look for difficulty sources (players) when calculating area difficulty.
	searchRadius = 256
	#Multiplier for changePerSecond when the player is not moving.
	idleMultiplier = 0.0
	#The initial player difficulty value for newly spawned players.
	startingValue = 0.0

	#Change difficulty when certain things happen
	#putting in -difficulty- produces no change, putting 0 will reset difficulty after this action
	[difficulty.mutators]
		#EvalEx expression: A player sleeps in a bed
		onPlayerSleep = "difficulty"
		#EvalEx expression: A player dies
		onPlayerDeath = "difficulty - 1.0"
		#EvalEx expression: A normal hostile mob is killed by a player
		onHostileKilled = "difficulty + 0.04"
		#EvalEx expression: A player killed another player
		onPlayerKilled = "difficulty + 10.0"
		#EvalEx expression: A boss is killed by a player
		onBossKilled = "difficulty + 5.0"
		#EvalEx expression: A blight is killed by a player
		onBlightKilled = "difficulty"
		#EvalEx expression: A peaceful mob is killed by a player
		onPeacefulKilled = "difficulty"

		[[difficulty.mutators.byEntity]]
			types = ["minecraft:villager"]
			onKilled = "difficulty + 0.01"

	[difficulty.multipliers]

		#Allows difficulty to be changed based on the moon phase. values must have 8 elements.
		#The first is full moon, the fifth is new moon.
		#'enabled' must be set to true for this to work.
		[difficulty.multipliers.lunarCycles]
			values = [1.5, 1.3, 1.2, 1.0, 0.8, 1.0, 1.2, 1.3]
			enabled = false

		#Set difficulty multipliers based on location. You can match dimensions, biomes, or both.
		#If either the biomes or dimensions array is empty, it is ignored (matching all)
		[[difficulty.multipliers.byLocation]]
			biomes = ["modid:example"]
			scale = 1.0
			dimensions = ["overworld"]

[equipments]

	#CHEST ARMOR
	[[equipments.chestplate]]
		tier = 1
		minDifficulty = 20
		equipment = "minecraft:leather_chestplate"
		enchantments = []

	[[equipments.chestplate]]
		tier = 1
		minDifficulty = 35
		equipment = "minecraft:leather_chestplate"
		enchantments = ["protection"]

	[[equipments.chestplate]]
		tier = 1
		minDifficulty = 49
		equipment = "minecraft:chainmail_chestplate"
		enchantments = ["protection"]

	[[equipments.chestplate]]
		tier = 2
		minDifficulty = 70
		equipment = "minecraft:golden_chestplate"
		enchantments = ["thorns"]

	[[equipments.chestplate]]
		tier = 2
		minDifficulty = 90
		equipment = "minecraft:chainmail_chestplate"
		enchantments = ["protection"]

	[[equipments.chestplate]]
		tier = 3
		minDifficulty = 110
		equipment = "minecraft:iron_chestplate"
		enchantments = ["projectile_protection"]

	[[equipments.chestplate]]
		tier = 3
		minDifficulty = 125
		equipment = "minecraft:iron_chestplate"
		enchantments = ["protection", "thorns"]

	[[equipments.chestplate]]
		tier = 3
		minDifficulty = 140
		equipment = "minecraft:diamond_chestplate"
		enchantments = []

	[[equipments.chestplate]]
		tier = 4
		minDifficulty = 155
		equipment = "minecraft:iron_chestplate"
		enchantments = ["projectile_protection", "thorns"]

	[[equipments.chestplate]]
		tier = 4
		minDifficulty = 170
		equipment = "minecraft:diamond_chestplate"
		enchantments = ["protection"]

	[[equipments.chestplate]]
		tier = 4
		minDifficulty = 210
		equipment = "minecraft:diamond_chestplate"
		enchantments = ["protection", "thorns"]

	#HEAD ARMOR
	[[equipments.helmet]]
		tier = 1
		minDifficulty = 20
		equipment = "minecraft:leather_helmet"
		enchantments = []

	[[equipments.helmet]]
		tier = 1
		minDifficulty = 35
		equipment = "minecraft:leather_helmet"
		enchantments = ["protection"]

	[[equipments.helmet]]
		tier = 1
		minDifficulty = 49
		equipment = "minecraft:chainmail_helmet"
		enchantments = ["protection"]

	[[equipments.helmet]]
		tier = 2
		minDifficulty = 70
		equipment = "minecraft:golden_helmet"
		enchantments = ["thorns"]

	[[equipments.helmet]]
		tier = 2
		minDifficulty = 90
		equipment = "minecraft:chainmail_helmet"
		enchantments = ["protection"]

	[[equipments.helmet]]
		tier = 3
		minDifficulty = 110
		equipment = "minecraft:iron_helmet"
		enchantments = ["projectile_protection"]

	[[equipments.helmet]]
		tier = 3
		minDifficulty = 125
		equipment = "minecraft:iron_helmet"
		enchantments = ["protection", "thorns"]

	[[equipments.helmet]]
		tier = 3
		minDifficulty = 140
		equipment = "minecraft:diamond_helmet"
		enchantments = []

	[[equipments.helmet]]
		tier = 4
		minDifficulty = 155
		equipment = "minecraft:iron_helmet"
		enchantments = ["projectile_protection", "thorns"]

	[[equipments.helmet]]
		tier = 4
		minDifficulty = 170
		equipment = "minecraft:diamond_helmet"
		enchantments = ["protection"]

	[[equipments.helmet]]
		tier = 4
		minDifficulty = 210
		equipment = "minecraft:diamond_helmet"
		enchantments = ["protection", "thorns"]

	#BOOTS ARMOR
	[[equipments.boots]]
		tier = 1
		minDifficulty = 5
		equipment = "minecraft:leather_boots"
		enchantments = []

	[[equipments.boots]]
		tier = 1
		minDifficulty = 15
		equipment = "minecraft:leather_boots"
		enchantments = ["thorns"]

	[[equipments.boots]]
		tier = 1
		minDifficulty = 25
		equipment = "minecraft:chainmail_boots"
		enchantments = []

	[[equipments.boots]]
		tier = 1
		minDifficulty = 25
		equipment = "minecraft:leather_boots"
		enchantments = ["protection"]

	[[equipments.boots]]
		tier = 1
		minDifficulty = 30
		equipment = "minecraft:chainmail_boots"
		enchantments = ["protection"]

	[[equipments.boots]]
		tier = 2
		minDifficulty = 40
		equipment = "minecraft:golden_boots"
		enchantments = ["thorns"]

	[[equipments.boots]]
		tier = 2
		minDifficulty = 40
		equipment = "minecraft:iron_boots"
		enchantments = []

	[[equipments.boots]]
		tier = 2
		minDifficulty = 50
		equipment = "minecraft:golden_boots"
		enchantments = ["protection", "thorns"]

	[[equipments.boots]]
		tier = 2
		minDifficulty = 60
		equipment = "minecraft:chainmail_boots"
		enchantments = ["frost_walker"]

	[[equipments.boots]]
		tier = 3
		minDifficulty = 80
		equipment = "minecraft:iron_boots"
		enchantments = ["protection"]

	[[equipments.boots]]
		tier = 3
		minDifficulty = 100
		equipment = "minecraft:iron_boots"
		enchantments = ["protection", "thorns"]

	[[equipments.boots]]
		tier = 4
		minDifficulty = 110
		equipment = "minecraft:diamond_boots"
		enchantments = []

	[[equipments.boots]]
		tier = 4
		minDifficulty = 125
		equipment = "minecraft:leather_boots"
		enchantments = ["protection", "thorns", "frost_walker"]

	[[equipments.boots]]
		tier = 4
		minDifficulty = 135
		equipment = "minecraft:iron_boots"
		enchantments = ["thorns", "frost_walker"]

	[[equipments.boots]]
		tier = 5
		minDifficulty = 155
		equipment = "minecraft:golden_boots"
		enchantments = ["protection", "thorns", "frost_walker"]

	[[equipments.boots]]
		tier = 5
		minDifficulty = 165
		equipment = "minecraft:diamond_boots"
		enchantments = ["protection"]

	[[equipments.boots]]
		tier = 6
		minDifficulty = 195
		equipment = "minecraft:diamond_boots"
		enchantments = ["protection", "thorns", "frost_walker"]

	#LEGGINGS ARMOR
	[[equipments.leggings]]
		tier = 1
		minDifficulty = 20
		equipment = "minecraft:leather_leggings"
		enchantments = []

	[[equipments.leggings]]
		tier = 1
		minDifficulty = 35
		equipment = "minecraft:leather_leggings"
		enchantments = ["protection"]

	[[equipments.leggings]]
		tier = 1
		minDifficulty = 49
		equipment = "minecraft:chainmail_leggings"
		enchantments = ["protection"]

	[[equipments.leggings]]
		tier = 2
		minDifficulty = 70
		equipment = "minecraft:golden_leggings"
		enchantments = ["thorns"]

	[[equipments.leggings]]
		tier = 2
		minDifficulty = 90
		equipment = "minecraft:chainmail_leggings"
		enchantments = ["protection"]

	[[equipments.leggings]]
		tier = 3
		minDifficulty = 110
		equipment = "minecraft:iron_leggings"
		enchantments = ["projectile_protection"]

	[[equipments.leggings]]
		tier = 3
		minDifficulty = 125
		equipment = "minecraft:iron_leggings"
		enchantments = ["protection", "thorns"]

	[[equipments.leggings]]
		tier = 3
		minDifficulty = 140
		equipment = "minecraft:diamond_leggings"
		enchantments = []

	[[equipments.leggings]]
		tier = 4
		minDifficulty = 155
		equipment = "minecraft:iron_leggings"
		enchantments = ["projectile_protection", "thorns"]

	[[equipments.leggings]]
		tier = 4
		minDifficulty = 170
		equipment = "minecraft:diamond_leggings"
		enchantments = ["protection"]

	[[equipments.leggings]]
		tier = 4
		minDifficulty = 210
		equipment = "minecraft:diamond_leggings"
		enchantments = ["protection", "thorns"]

[mob]

	[mob.damage]
		#The maximum extra attack damage a mob can receive
		maxBoost = 30.0
		#How rapidly mob attack damage rises with difficulty (0 = no damage boost)
		boostScale = 0.15

	#Chance for mobs to receive a random potion effect (assuming their difficulty is high enough)
	[mob.potionChance]
		hostile = 0.375
		peaceful = 0.025

	[mob.xp]
		#Xp scaling multiplied by difficulty - xp scale of 0.1 with difficulty 10 will give about 11x more xp
		Boost = 0.06

	#Mob health settings
	[mob.health]
		#This modifier affects the hp scale of mobs spawned by spawners, a normal 100 hp boost, will be of 30 using default value
		spawner = 1.5
		#Determines how difficulty affects mob health.
		#2 types of modes: Multiplier and additive, with 3 different multipliers.
		#MULTI: Mob hp is multiplied, mobs with higher base hp have more increase.
		#MULTI_HALF: Same as MULTI but mobs with more than 20 hp have reduced scaling (bosses, endermen, witches, etc).
		#MULTI_QUARTER: Same as MULTI_HALF but scaling is reduced further for 20hp+ mobs.
		#ADD: Flat increase for all mobs, no matter their base hp.
		modifierMode = "MULTI"

		[mob.health.multiplier]
			hostile = 0.5
			passive = 0.375

	[mob.blight]
		#Xp scaling for blights, 3 will give 3 more times more xp then another mob on the same difficulty
		maxBoost = 5.0
		#Notify everyone that a blight died in combat
		notifyOnDeath = true
		#Multiplier for blight difficulty, 2 will make blights have stats equal to 2 * current difficulty
		blightModifier = 3.0
		#These mobs won't be able to become blight, to add use - MODID:entity_name - except for mc mobs, minecraft: can be omitted as shown
		exemptedMobs = ["bat", "cat", "chicken", "cod", "cow", "donkey", "fox", "horse", "mooshroom", "mule", "ocelot", "parrot", "pig", "rabbit", "salmon", "sheep", "tropical_fish", "turtle", "villager", "wandering_trader"]

		[[mob.blight.potionEffects]]
			potion = "minecraft:fire_resistance"
			minDifficulty = 0
			level = 1
			durationInMinutes = 5.0

		[[mob.blight.potionEffects]]
			potion = "minecraft:resistance"
			minDifficulty = 0
			level = 1
			durationInMinutes = 5.0

		[[mob.blight.potionEffects]]
			potion = "minecraft:speed"
			minDifficulty = 0
			level = 4
			durationInMinutes = 5.0

		[[mob.blight.potionEffects]]
			potion = "minecraft:strength"
			minDifficulty = 0
			level = 2
			durationInMinutes = 5.0

	[[mob.randomPotionEffects]]
		potion = "minecraft:speed"
		minDifficulty = 15
		level = 1
		durationInMinutes = 10.0

	[[mob.randomPotionEffects]]
		potion = "minecraft:speed"
		minDifficulty = 50
		level = 2
		durationInMinutes = 10.0

	[[mob.randomPotionEffects]]
		potion = "minecraft:strength"
		minDifficulty = 30
		level = 1
		durationInMinutes = 10.0

	[[mob.randomPotionEffects]]
		potion = "minecraft:fire_resistance"
		minDifficulty = 10
		level = 1
		durationInMinutes = 10.0

	[[mob.randomPotionEffects]]
		potion = "minecraft:invisibility"
		minDifficulty = 35
		level = 1
		durationInMinutes = 10.0

	[[mob.randomPotionEffects]]
		potion = "minecraft:resistance"
		minDifficulty = 40
		level = 1
		durationInMinutes = 10.0

[item]

	[item.heart_crystal]
		#Ore gen will automatically disable if power crystals do nothing, set to true to force it
		#Power crystals will still drop from mobs and appear in chests
		oregen = false
		#The number of levels required to use a heart crystal (min = 0)
		levelCost = 3
		#The amount of additional health restored by heart crystals (min = 0)
		#Heart crystals always restore the amount of health they add, this is a bonus
		healthRestored = 4.0
		#How much health a player will gain using a heart crystal (set 0 to disable)
		healthBoost = 1

	[item.enchanted_heart]
		#Change in difficulty when an enchanted heart is used
		change = -10.0

	[item.power_crystal]
		#The number of levels required to use a power crystal (min = 0)
		levelCost = 3
		#How much more damage a player deals after using a power crystal (set 0 to disable)
		damageBoost = 0.5

	[item.chance_heart]
		#Change in difficulty when a chance heart is used
		#For a value n, a chance heart has 1 in 2n + 1 chance of being cursed
		#In that case, n difficulty is added (n = 10, 1 in 21 chance to get +10)
		#There's a 2 in 2n + 1 chance for 1 to n difficulty to be subtracted (n = 3, 2 in 7 chance of getting -1, -2, or -3
		change = 10.0

	[item.cursed_heart]
		#Change in difficulty when a cursed heart is used
		change = 10.0

#Set damage scaling by damage source. No scaling is done by default.
#Mod sources can be added too, you'll just need the damage type string. The number represents how steeply the damage scales.
#0 means no scaling (vanilla), 1 means it will be proportional to difficulty/max health (whichever you set).
#The scale can be any non-negative number, including numbers greater than one.
[damageScaling]
	#Damage scaling mode
	#Valid values: MAX_HEALTH, DIFFICULTY, AREA_DIFFICULTY
	mode = "AREA_DIFFICULTY"
	#Scale for all damage types which does not have a specific scale defined.
	#This can have unintended side effects, so it's recommended to leave this at 0.
	genericScale = 0.0
	#Does damage scaling affect peaceful mobs (animals)?
	affectPeacefuls = false
	#How sharply damage scales with difficulty
	difficultyWeight = 0.06
	#give the modid of a mod to negate ALL damage scaling in the mod
	blacklistMods = ["modid", "othermodid"]
	#Does damage scaling affect hostile mobs?
	affectHostiles = true
	#Does damage scaling affect players?
	affectPlayers = true

	[[damageScaling.damageTypes]]
		types = ["cactus"]
		scale = 0.0

#Settings for players
[player]

	#Regen config
	#enabled -- Quick toggle for regen
	#initialDelay -- Time in seconds after taking damage before regen begins
	#tickDelay -- Time in seconds between healing ticks
	#exhaustion -- Food consumed per healing tick
	#proportionalToMaxHealth -- If true, healing scales with max health. Otherwise, heals 1 health per healing tick
	#minFood -- Minimum food required for regen to be active
	#maxFood -- Maximum food at which regen will be active
	#minHealth -- Minimum health required for regen to be active
	#maxHealth -- Maximum health at which regen will be active
	[player.regen]
		minFood = 10
		exhaustion = 0.1
		minHealth = 0
		maxHealth = 2147483647
		proportionalToMaxHealth = false
		initialDelay = 20.0
		maxFood = 2147483647
		tickDelay = 5.0
		enabled = true

	[player.health]
		#Player health and max health are unique to this dimension.
		localHealth = false
		#Starting player health, in half-hearts (20 = 10 hearts)
		startingHealth = 20
		#EvalEx expression: On death, set the player's max health to this value. By default, there is no change.
		setOnDeath = "maxHealth - 2"
		#The minimum amount of health a player can have (this can be lower than starting health)
		minHealth = 20
		#The highest max health a player can reach, not considering the vanilla
		# health cap and modifiers from other sources. 0 means 'unlimited'.
		maxHealth = 0

		#settings for hp scaling by xp level
		[player.health.xp]
			#mode of health by xp, 0 for inactive, 1 for pure hp by level (deactivates heart crystals), 2 for mix, xp and heart crystals increases hp
			mode = 0
			#On hp increase, how much hp is gained
			hpAmount = 1
			#How many levels it takes for an hp increase
			levelAmount = 10

	[player.attackDamage]
		#The highest attack damage a player can achieve, not considering the vanilla
		#cap and modifiers from other sources. 0 means 'unlimited'.
		maxValue = 0

Steps to Reproduce the Problem

  1. Join server
  2. Kill mobs spawned by mob spawners
  3. Realise that difficulty does not increase
commented

The only thing I remember doing with spawners are that they will have less HP, not that killing specifficaly mob from spawners will increase difficulty

commented

In several versions ago, when I kill mobs that spawned from mob spawner, difficulty increases. Should this not have been the default behaviour?

commented

I've tested this with the latest version and it seems fine now. Thanks!

commented

Okay, I actually fixed it without realizing that it would fix it...