Started by
Patosalvaje1212
on
Topic category: Advanced modding
I need help. I want to make a mod, that when a player kills a certain number of mobs, their base damage increases. Does anyone know how to do this?
(Sorry for my bad English, I'm Spanish)
I don't know how to do the base damage increase without strength but I think I know how to make the kill counter, make a number variable and name it the mob you want, and set the value to 0, also the scope should be player persistent if you want it to be kept even after death, if not then pick life time, make a procedure and set the trigger to entity dies, make it check if the entity is a sub type of what you want, as an example lets go with zombie, do if the entity is a zombie, then go into custom variables and grab both set and get values that you need, do set global zombie and get global zombie + 1, after that do if get global zombie = 10, give advancement "zombie slayer", then create another procedure that checks when the entity is attacked, and make it do generic damage plus 1 if the player attacks it. I hope this essay helps you lol, good luck trying to read this
you can use this plugin for changing most of the player's attributes (including the base damage): https://mcreator.net/plugin/65847/dtms-toolkit
The base damage of an entity is 2 (in half-hearts),
which is the default base value of an attribute called "attack_damage".
You still cannot use code blocks to change the value, but commands do actually work.
► /attribute <target> minecraft:attack_damage base set <value>
Keep in mind: This command can only be used in version 1.16 and above (after snapshot 20w17a, tbc.).
However, there are some alternatives for lower versions, like: Custom code, plugins, etc.
But using custom code could be unstable or even break the game.
→ So, only do it if you know what you're doing!
Is there an alternative for 1.19.2?