Is there any way to change / scale the damage an item does based on its durability / damage value in a data pack with dynamic attributes? Or would that only be possible with a mod? I honestly don't know where I'd even begin to work on this idea, but its one of the key mechanics in a game I'm working on so I would like to know how feasible it is. Since I want the items to have extremely high unbreaking anyways it doesn't exactly matter if the damage gets updated too often
#Damage scaling based on durability
1 messages · Page 1 of 1 (latest)
<@&1201956957406109788>
Someone will come and help soon!
💬 While you wait, take this time to provide more context and details.
🙇 After a while, hit the Summon Helpers button to ping the helper team. They'll be happy to help you
✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve
It's certainly possible
It sounds like a pain to implement just from a math perspective, but you can store the damage value to a scoreboard, do some math, and then roundabout apply it to the item's damage attribute
So roughly would that mean you make a new scoreboard for every tool when creating it and then you can read out the scoreboard value through a function that modifies the item every so many ticks based on the scaling calculation? I think the math would be pretty linear, I just need to learn the syntax. But first I need to figure out how the scoreboard can read out the durability of the items 🤔
A new scoreboard for each is not necessary
You can store essentially any numeric value to a scoreboard with /execute store result score <entity> <scoreboard> ....run <whatever command>
In this case whatever command would probably be a data get command
I'll have to play around with that for a bit, but thank you so much 🙂