godarklight / DarkMultiPlayer

DarkMultiPlayer - A multiplayer mod for Kerbal Space Program
MIT License
280 stars 120 forks source link

Cheats Problem #408

Open ghost opened 7 years ago

ghost commented 7 years ago

Environment

Description

When cheats are set to false, players can still use cheats such as the add Science and Set Orbit cheat.

81ninja commented 7 years ago

I guess there isn't an easy fix to this one, unless we go way out of our way to block players from using the Cheats menu (and possibly other mods) to cheat.

Mods can be blocked by enabling mod control, but the built-in cheat functions aren't readily disableable. Maybe if we manage to break/remove access to the menu?

As for science, funds and reputation, however, it'll probably be 'fixed' by work on other similar issues/features (shared careers, reputation loss etc).

Xinayder commented 7 years ago

@81ninja Disabling the debug menu isn't an ideal thing to do, specially for debugging purposes. Perhaps we can find a way to remove the cheats button from the menu and prevent people from using it.

My other idea was to handle funds/science/reputation server-side, and I think it would be the beginning for player-specific currencies (funds, science, reputation). Then we'd check if the reason the funds changed was Cheating and do not allow it.

81ninja commented 7 years ago

Keeping track of such things on the server side would be great, but if the reason for change can be detected, it'll be done by the client, then what's to stop a custom client from bypassing it?

On a thought, mostly anything we can do about cheating can be worked around by code. If we're just to stop the average player and keep him away from sin, disabling somehow the cheats menu/buttons would probably be simpler. (unless you are already working on it)

Server-side though, is a functionality we need to enable other features and fix a couple bugs, even if it won't stop people who are just there to cheat from doing it. In fact the bugs and frail consistency over reputation, roster, contracts and assets, etc. are more damaging to career modes right now than cheating.

If we just follow the golden rule, and assume the client can just block cheating by checking for the reason, we should probably go for it, as it'd be quicker.

Xinayder commented 7 years ago

I already tried checking, client-side, if the reason was cheating and applying a transaction with the same value (but with opposite signs) to it, but it didn't work quite well. I don't remember why it didn't work as expected, but I think it was something to do with either the game not updating the currencies or not being saved instantly to the server.

Maybe we should have both methods to prevent cheating, and the server acts like the bank or something like that.

81ninja commented 7 years ago

I'm under the impression the game sometimes updates variables multiple times during scene changes and the like, plus there's sending the scenario updates to the server. So I guess you're exactly right, the server could have a part on it.

Currencies don't/shouldn't change too often (unless it's a shared career), and when they do, their amount is limited, much more than when just cheating (and not by whole numbers, btw). The server could limit the times, the rate of change and block duplicate attempts at changing the values in a very short period. Maybe check the completion reward of contracts and parameters. All subject to the funds, science and rep multipliers in the difficulty options.

CareerWorker.cs would be nice :P

Twitchi1003 commented 6 years ago

Also having this issue.. trying to run public science server, and players are debug teleporting everywhere, would be awesome to have this functionality (back?)

merket commented 6 years ago

Hello I just discovered this. Came here to open a topic but since this is here, I want to bring back attention to it.

If people are able to add funds, rep and science via debug window, I believe that defeats the purpose of disabling cheats from server settings. I calculated for hours and adjusted the initial career starting science and multipliers by hand. No wonder some players were able to unlock certain parts so quickly.

How can I keep my server "FAIR" in this situation?