You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I propose to add an optional cooldown timer for items.
It can be any amount of time, from very short to very long.
Whenever a player uses an item which requires cooldown, this and same items can not be used again before the cooldown ends. Attempting to use the item again before the cooldown timer ends will do nothing and will also not cause any punch/use animations to be played in the wieldhand.
“Using” here refers to anything that involves:
on_use
on_secondary_use
on_place
on_punch (no matter if miss or hit; also counts for weapons like swords; this restriction will apply on top of the reduced damage mechanic)
(name me others I might have forgotten)
The engine could also provide a simple visual clue in the hotbar as a simple “progress” bar below the wear bar. It starts off full and becomes empty over time, until the cooldown has ended. Maybe the item in hotbar could also be “grayed out” or something like that. If multiple items are affeced, all those should have the hotbar effect.
Finally, I suggest to also add group support for this. Modders could be able to either add colldown just for the single item they define it for (the default), or they can choose to apply the cooldown to an entire group.
If such a “cooldown” group is defined, the user will be prevented to use any item which is member of the specified cooldown group for the remainder of the cooldown time. The
Use cases:
Minetest Game: Preventing players of spam-eating 100 bread in 10 seconds. Currently, bread is massively OP as you can eat at inhumane speeds and survive PvP and lava for very long times as long you have stockpiled hundreds of breads ;-)
Nerf anything else that insta-heals you
Preventing player from spamming arrows with bow and arrow (throwing mod)
Simple non-automatic rifles (1 click = 1 shot)
Preventing player from teleporting very quickly multiple times in succession without delay by using the point teleporter (item which teleports you to the node you pointed at) (teletool mod)
MineClone 2: Cooldown timer 1 of second after using ender pearl (this is a throwable item which teleports the player to impact location
MineClone 2: Cooldown timer of ca. 2 seconds after eating anything else (already implemented with a hack, but has completely wrong animations and effects)
MineClone 2: Cooldown timer of 1 second after eating chorus fruit (teleports player randomly after eating)
Explanation of cooldown groups:
After eating bread with 2 seconds cooldown, but with no cooldown group defined, the user will be unable to eat any bread for 2 seconds
After eating bread with 2 seconds cooldown with cooldown group “food”, the user will be unable to eat any food (bread, apples, cheese, you name it) for 2 seconds
I suggest to also add group support for this. Modders could be able to either add colldown just for the single item they define it for (the default), or they can choose to apply the cooldown to an entire group.
I'd prefer a cooldown field in the item def itself. If not provided, cooldown is disabled.
This is a feature request.
I propose to add an optional cooldown timer for items.
It can be any amount of time, from very short to very long.
Whenever a player uses an item which requires cooldown, this and same items can not be used again before the cooldown ends. Attempting to use the item again before the cooldown timer ends will do nothing and will also not cause any punch/use animations to be played in the wieldhand.
“Using” here refers to anything that involves:
on_use
on_secondary_use
on_place
on_punch
(no matter if miss or hit; also counts for weapons like swords; this restriction will apply on top of the reduced damage mechanic)The engine could also provide a simple visual clue in the hotbar as a simple “progress” bar below the wear bar. It starts off full and becomes empty over time, until the cooldown has ended. Maybe the item in hotbar could also be “grayed out” or something like that. If multiple items are affeced, all those should have the hotbar effect.
Finally, I suggest to also add group support for this. Modders could be able to either add colldown just for the single item they define it for (the default), or they can choose to apply the cooldown to an entire group.
If such a “cooldown” group is defined, the user will be prevented to use any item which is member of the specified cooldown group for the remainder of the cooldown time. The
Use cases:
throwing
mod)teletool
mod)Explanation of cooldown groups:
See also this abandoned PR: #4319
The text was updated successfully, but these errors were encountered: