Please delete this

Started by geromet, November 16, 2020, 03:26:40 PM

geromet

Simple Infinite seeming Stamina mod.
Simply stops the stamina bar from draining to make you faster by placebo effect.

Download:
https://drive.google.com/file/d/1dzjhOxSyDHunCPBKZJbOAk_dG8G_8Psu/view?usp=sharing (https://drive.google.com/file/d/1dzjhOxSyDHunCPBKZJbOAk_dG8G_8Psu/view?usp=sharing)

ai_enabled

Hello!
So, this is a client-only mod. Nice attempt! It's a good example to reference the topic "Is hacking/cheating possible in CryoFall?" (https://forums.atomictorch.com/index.php?topic=1147.0) Specifically, this section:

QuoteHacking attempts
Since the game has full support for client side modding it is possible to make any client-side changes. Some "hackers" may be impressed by the "results" they get with their attempts - like increasing their health points, weapon fire rate, inventory capacity or setting the technologies unlock price to zero.

But naturally, such changes could not be propagated to the server as it has its own persistent state inaccessible to players and running independent world simulation with it. There will be a discrepancy with the server and that's it - the server will not agree to the hacker's actions and they will have no actual effect whatsoever.

Basically any client side game-state changes are completely pointless.

So, if you install and try this mod you will be impressed first that the stamina bar is stuck on 100%. However, eventually, you will notice that mod makes zero practical differenceΓÇöyour character is still subject to stamina loss (it cannot run for a while when stamina drops to zero, the character will slow down).
The reason is that the server has independent simulation that this mod has no control over. The client performs a similar simulation in order to ensure there is zero latency with the stamina simulation. It's called lag prediction (so you can move and perform most actions without waiting for the server response that has a round-trip delay aka ping).

By turning off the stamina system on the client, you're creating a discrepancy in the client simulation. The client will assume the character has full stamina and allow it to run all the time. But as soon as the stamina reaches zero on the server, the client simulation will diverge from the server simulation. The client will receive the correct simulation result from the server about the past player positions and notice the simulation prediction error. It will have to correct it by adjusting the player position in order to match the one on the server (rubber-banding, or even teleporting to the correct position). You can also attempt hacking that position adjustment logic but it will be fruitless as well (as the client will just glitch and display an incorrect state totally mismatching the actual location).

The same applies to other game mechanics such as health points (try to make yourself invincible!), food and water, run speed, fire rate, ammo usage, etc.

In the end result, this client mod provides no benefits and only makes things worse but not allowing the player to know their current stamina amount. To make this mod useful it must be converted to a server+client mod and installed on both client and server, but that's not the idea behind this mod I guess.

Regards!

geromet

Hello, thanks for your great reply :)
I'll do some more testing, but I've been using this for days without noticing any slowing down or getting rubber banded.
I think this is because of the issue described in the comments.
Everything you're saying makes sense though.