Scaling Health

Scaling Health

23M Downloads

[Question] Disable health modifier to specific spawned mobs

Insane96 opened this issue · 5 comments

commented

Hi, I'm the developer of Progressive Bosses, in short: a mod that makes bosses harder the more you kill them.
I have "Wither Minions" and "Dragon Minions" (basically Wither Skellys, Shulkers and Endermites) that can spawn during a fight. The problem is that those are affected by the Difficulty so they spawn with hundres of health. I've seen that there's a scalinghealth:difficulty tag but I really don't know if changing this on spawn will prevent the mod from appling the health, damage, etc. changes. So there's an "official" way to prevent this from happening?

Edit
Tried with

world.spawnEntity(witherSkeleton);
skellyTags.setShort("scalinghealth:difficulty", (short) 0);
witherSkeleton.getAttributeMap().getAttributeInstance(SharedMonsterAttributes.ATTACK_DAMAGE).removeModifier(MODIFIER_ID_DAMAGE);
witherSkeleton.getAttributeMap().getAttributeInstance(SharedMonsterAttributes.MAX_HEALTH).removeModifier(MODIFIER_ID_HEALTH);

but got no luck

commented

So they have the same ID's as vanilla mobs? I can see how that would be an issue. I'll change it to ignore any mobs where the scalinghealth:difficulty tag is less than zero, so set it to -1 when spawning your entities.

commented

So they have the same ID's as vanilla mobs?

Yeah, they are vanilla mobs just with some things changed (Name, loot table, AI).

Thanks

commented

You can add them to the Blacklist for dmg, blight and health scaling. As default that helps (normally finding such things is up to the people who wish to combine mods ie modpack makers) XD you wouldn’t believe how many different blacklists I have to go trough to for example make Summoned Electroblobs Minions not scale with dmg or HP or to decide what mobs get attacked from open modular turrets and which don’t. What an Ancient Warfare npc can Target or not what can be affected by AOE effects from everlasting abilities to prevent friendly mobs to be targeted and so on and so on.

Ye but the quickest fix from a mooders side out would be adding these entities to the blacklists as default. So they can be removed from the exception if wished for by simply deleting the entry line in the blacklist. and giving them special ID to make this easy Like ProgMobs:Wither_Minion which will in turn make it more compatible with other mods as well.

commented

Adding them to blacklist would stop normal Wither Skeletons ecc from begin processed

commented

Ye sry didn’t read the line with them using the same ID as vanilla ones. Ye can see how that could be a problem its annoying if things don’t have their own ID.