![Liquid Enchanting](https://media.forgecdn.net/avatars/thumbnails/144/405/256/256/636555750509301087.png)
[Suggestion] Config Option for Potion Effects on Tools & Armor to have limited uses before needing to re-apply them.
SonicX8000 opened this issue ยท 1 comments
As it is currently, once you coat your tools & armor with a Potion Effect it's pretty much a permanent effect. This got me thinking... what if there could be some sort of config option to limit the amount of uses on tools & armor before you need to reapply the potion?
Here's an example. If this config option is set to true, only potions listed can be applied to Tools & Armor & will have uses depending on what their applied on.
Key
"modid:potion_name / tool uses / bow uses / armor uses"
If on a Tool:
Each time you attack & deal damage to a mob, 1 use is taken away. No uses will be taken away if the target already has the Potion Effect.
If on a Bow:
For every projectile that is launched & damages a mob, 1 use is taken away. No uses will be taken away if the target already has the Potion Effect or if you miss your target.
If on Armor:
If you take damage, 1 use is taken away. This is different as you only lose uses by taking damage.
minecraft:strength / 30 / 20 / 25
This applies the strength effect & has 30 uses if on a Tool, 20 uses if on Bows & 25 uses if on Armor.
minecraft:long_strength / 40 / 30 / 50
This applies the Strength effect & has 40 uses if on a Tool, 30 uses if on Bows & 50 uses if on Armor.
minecraft:strong_strength / 20 / 15 / 20
This applies the Strength II effect & has 20 uses if on a Tool, 15 uses if on Bows & 20 uses if on Armor.
=====
Note that this is just an example so numbers are perhaps off for their uses. If you wish to 'disable' an effect you can do this...
minecraft:swiftness / 0 / 0 / 20
This applies the Speed effect & has 20 uses on Armor. It does nothing if on Tools or Bows which leads to a waste of materials.
minecraft:weakness / 30 / 20 / 0
This applies the Weakness effect & has 30 uses on Tools, 20 uses on Bows. It does nothing if on Armor which leads to a waste of materials.
minecraft:harming / 0 / 0 / 0
This applies the Instant Damage effect but because all uses are set at 0. Applying this Potion Effect would be a waste of materials.
In short... 0 uses means that it'll already be used up the moment the effect is applied.
=====
Hopefully I explained it well. Tool & Bows can be merged together since they're pretty much the same thing being that a use is taken away upon dealing damage. I was keeping them separated to give different usage values but if that can't work, they can be merged into one so it would be Tools & Armor at that point. It would then be...
"modid:potion_name / weapon uses / armor uses"
The reason for the "No uses will be taken" for Tools & Bows is so you don't have to lug around extra tools with no Potion Effects on them, such as applying it with an Iron Sword to apply the effect & switching to your Diamond Sword for dealing damage.
Armor usage is set low as it's suppose to be a 'Don't take damage' kind of thing so if you avoid taking any kind of damage, the Potion Effect will last a long time.
That's a solid feature suggestion, and also opens up a new method of crafting.
Initially I had the crafting at 8 potions / 1 item to make it expensive to craft, as you are getting an infinite potion. If we have the concept of "topping up" potions, we could have them craftable with only 1 potion to get a small topup, 2 for a little more, etc etc. This would also alleviate the concerns with multiple potions enchanted being overpowered, as the armor would slowly trickle down and run out.
I'll have a think about this, and may well implement!
My thoughts so far are:
- Set a default value for armor / tool for all potions, overrideable using a similar syntax to what you've suggested. As the mod works with unknown potions I'd need a default to keep cross-mod compatibility.
- Combine Tool / Weapon into one counter, so we just have offensive / defensive stats.
- Allow crafting with anywhere between 1-8 potions, giving more of a top-up as it goes.
- Set a max uses value, so user can't just add 100 potions and be done with it. Probably set the max to whatever 8 potions would be.
- Show "Uses remaining" in a tooltip, decrementing on use.
- When a potion hits 0, just remove the tag for that effect.
I likely wouldn't have this as a true/false configuration, and just have this as the new mechanic. I may be able to implement it in a way that makes potions infinite through the config file, I'll have a think.