"Balance Delta" update interval command
QINGKn opened this issue ยท 8 comments
Is your feature request related to a problem? Please describe.
I am playing a modpack with factories that get inputs from buyers and sell stuff using sellers. They sell a stack of items at a ~5-10 second time interval. The "balance delta" is updated every second (i think) at the moment. So for example, it shows -150 for one second then -350 for another second and then the +2000 when a stack gets sold. This makes it hard to see how much money i am actually making over a bigger time period.
Describe the solution you'd like
My first thought and search was an in game command that lets you set the update interval of the "balance delta" so if you set it to 5 seconds you get the average delta/second over the last 5 seconds.
This can also be put in a config file without a command to make it a bit more simple to implement.
For example: second 1 I earn -150, second 2 I earn -350, second 3 I earn 0, second 4 I earn - 200 and second 5 I earn +2000.
(-150) + (-350) + (0) + (-200) + 2000 = 1300 โ +1300/5 seconds โ 1300/5 = +260/s
So the UI would show me +260/s and it updates every 5 seconds.
Describe alternatives you've considered
I have searched for this option but could not find it. If this option already exists, please let me know and add it to the documentation on the Github
When playing mechanical mastery I had the same "problem", after looking into the code it seems the time it takes to update the counter is set in the BalanceDisplay file:
if (event.phase == TickEvent.Phase.END && tick >= 20)
I can take a look a this as it shouldn't be to hard to make available in the client configs.
Thx for the quick implementation @AmmoniumX
Should the "change" string be updated to reflect the delta_time instead of staying "/s"?
Thx for the quick implementation @AmmoniumX Should the "change" string be updated to reflect the delta_time instead of staying "/s"?
You're right, thanks for pointing that out. I'll keep it as "/s" though, and just divide the change by the number of seconds (to display the "average" change per second)
Yess, @AmmoniumX Thanks for adding this. How can I adjust this myself? Because if I open the BalanceDisplay.class, it is not in readable code. Or is that the wrong file? Because I do not have a config file in the config folder yet.
Yess, @AmmoniumX Thanks for adding this. How can I adjust this myself? Because if I open the BalanceDisplay.class, it is not in readable code. Or is that the wrong file? Because I do not have a config file in the config folder yet.
There is a new config value added to the config folder, balanceDelta. You just need to change that to choose how many seconds"l will be used to take the "average"
Hmm maby i do not have the right update yet? I play on Curse Forge so i think i need to update it outside of it?
Hmm maby i do not have the right update yet? I play on Curse Forge so i think i need to update it outside of it?
No update has been released yet, I have just pushed a commit that fixes it. That's why the issue isn't marked as "closed" yet. You're going to have to wait a couple days until the next release is published (which includes some extra changes that need testing, and Curseforge will also need to review the file before accepting it to the platform)