G4me4u / g4mespeed

GNU General Public License v2.0
8 stars 3 forks source link

[Feature request] Health-Synced tick rate lerping #10

Open Pepsied-5229 opened 6 months ago

Pepsied-5229 commented 6 months ago

Have the tick rate be determined by how much health you currently have. I like the idea of the game speed slowing down as your health falls below full, and it scales linearly with how much health you have remaining. And as we heal, the tick rate will slowly climb back up to normal game speed. Having extra time to react will certainly help when you're in a pinch, but it can also be annoying to deal with how slow everything is when you're not in any danger. So, I propose a dynamic tick rate dependent on the player's health. Here's an example. Let's say we set a maximum tick rate of 20 tps, and a minimum tick rate of 5 tps. Let's also say that our health is currently half full, so 50%. If we lerp 5, to 20 by 0.5 alpha, then we would get 12.5. That would be the new current tick rate. I would've created a small datapack that does this, but I couldn't find any commands to manually set the tick rate. I'd have to use carpet for that.

G4me4u commented 6 months ago

Hello,

I apologize for the massive delay, but I only just had time to look at it.

There is a command to set the tps: "/tps newTps" should do the trick.

In terms of implementing it in the mod, it seems that this is feature more related to something in G4mespeed experimental (a separate mod which I have been working on). That has some random unpolished features. I might consider it at some point.

Hope that helps.