• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

[General] Detect Cheats

Status
Not open for further replies.

sentrywiz

S

sentrywiz

Hi all.

I searched around for this and I found some systems and guides for cheats.
However, implementing a whole system just to add one line of game text seems stupid to me.

However, I am few days away from releasing a map I've been working on for a whole month and its a singleplayer roguelike with a score system.

Now you can see my point -- a score system. There might be some people who will just go whosyourdaddy and defeat both the point of the game and get a superb score to unfairly brag about.

I just want to add one line of game text that says "Cheater" in the final score, and I want to detect when any cheat has been used so that the final score does show, but it also shows that cheats were used.

Any simple way of doing this?
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
I made a prevention from both Iseedeadpeople and whosyourdaddy.

For iseedeadpeople, you periodically check if some unreachable point is visible, and if it is, he used iseedeadpeople.

For whosyourdaddy, I made a unit that had 100000 hp, 10000 damage and 1000000 hp/s and ridiculous attack speed, so you can detect whosyourdaddy almost instantly, with I think 1 vision radius(It cant even see itself), and placed the unit for the player and then neutral hostile the same unit, but without attack(so it wont attack, just to make sure).

Then I basically hooked "unit dies" event to the unit that gets hit over and over again, and if it dies you used whosyourdaddy, because there is no possible way the unit could've died. You can then punish the player in any way you want.
 

sentrywiz

S

sentrywiz

I made a prevention from both Iseedeadpeople and whosyourdaddy.

For iseedeadpeople, you periodically check if some unreachable point is visible, and if it is, he used iseedeadpeople.

For whosyourdaddy, I made a unit that had 100000 hp, 10000 damage and 1000000 hp/s and ridiculous attack speed, so you can detect whosyourdaddy almost instantly, with I think 1 vision radius(It cant even see itself), and placed the unit for the player and then neutral hostile the same unit, but without attack(so it wont attack, just to make sure).

Then I basically hooked "unit dies" event to the unit that gets hit over and over again, and if it dies you used whosyourdaddy, because there is no possible way the unit could've died. You can then punish the player in any way you want.

Thanks for your response.

But this is a gimmick solution. And its a rather complicated one, involving periodic checks and loops.

I was rather thinking of the event player types X.
 

sentrywiz

S

sentrywiz

you cant detect when user types cheats in, so there is no way you can do it that way(not that I can think of)

That sucks. Even though I just need to add one string when a cheat is being used.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
There might be some people who will just go whosyourdaddy and defeat both the point of the game and get a superb score to unfairly brag about.
For some reason I doubt anyone would do that.

Only SC2 has events to detect when cheats are entered. In WC3 you can only detect the results of cheating (impossible to kill units die, sudden unexplained resource gain, impossible structures built, impossible to see units seen etc).
 

sentrywiz

S

sentrywiz

For some reason I doubt anyone would do that.

Only SC2 has events to detect when cheats are entered. In WC3 you can only detect the results of cheating (impossible to kill units die, sudden unexplained resource gain, impossible structures built, impossible to see units seen etc).

That's good information to know.

However, there are alternate ways of detecting cheats. I'm aiming for a lazy solution though, that's why I don't want to bother.

I guess I will just have to release my map and let people decide on their own if they want to cheat or not. But I wanted to include a sort of competition, for people that will play to map to try and get a bigger score and compete with it.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
Force them to play it on LAN. Even when playing by yourself cheats are disabled there.

Some boolean variable gets set based on if the game is in single player mode (cheats enabled) or multiplayer mode (cheats disabled). You do not need other players, just for them to play alone using it so they cannot cheat.

Many multiplayer maps do this to disable save/load systems. Best example is SWAT aftermath where you need to solo and unlock some stuff using it.

Change the colour of the score based on if the boolean is set or not. You could have red for singleplayer (with cheats) and green for LAN (without cheats). Then ask for a screen shot of the score so you know which is which (cheaters will probably be unable to tell the difference, especially if you make the colours more subtle).

I think it might be the following global but am not sure.
JASS:
boolean bj_isSinglePlayer=false

Obviously this limits your map to the 8MB map size limit. If you depend heavily on imports you will need to provide them via means outside the map.
 
Level 12
Joined
Mar 13, 2012
Messages
1,121
I think it might be the following global but am not sure.
Jass:
boolean bj_isSinglePlayer=false

bj_isSinglePlayer just returns whether in the loading screen of the map exactly one human player was present or not.

ReloadGameCachesFromDisk() is the function to determine if a game is single player or local network/bnet.


It might not concern you, but note that whosyourdaddy does not give instant kill damage but just multiplies it by 100.
 

sentrywiz

S

sentrywiz

Force them to play it on LAN. Even when playing by yourself cheats are disabled there.

Some boolean variable gets set based on if the game is in single player mode (cheats enabled) or multiplayer mode (cheats disabled). You do not need other players, just for them to play alone using it so they cannot cheat.

Many multiplayer maps do this to disable save/load systems. Best example is SWAT aftermath where you need to solo and unlock some stuff using it.

Change the colour of the score based on if the boolean is set or not. You could have red for singleplayer (with cheats) and green for LAN (without cheats). Then ask for a screen shot of the score so you know which is which (cheaters will probably be unable to tell the difference, especially if you make the colours more subtle).

I think it might be the following global but am not sure.
JASS:
boolean bj_isSinglePlayer=false

Obviously this limits your map to the 8MB map size limit. If you depend heavily on imports you will need to provide them via means outside the map.

Limiting players to have to play it in LAN is sort of meh. Its a singleplayer map, there is no multiplayer in it therefor its only logical to play it in singleplayer.

But I do understand your sentiment and I've also played maps that kick you if you play solo in singleplayer just because of score reasons.

Thanks +rep. Its a valid solution. Not sure if I would do it though

SUPPOSE I would do this. Then how would I do that? Can you walk me through the syntax and where to put it
because other than cleaning leaks with custom scripts I have little to no knowledge of JASS.

bj_isSinglePlayer just returns whether in the loading screen of the map exactly one human player was present or not.

ReloadGameCachesFromDisk() is the function to determine if a game is single player or local network/bnet.


It might not concern you, but note that whosyourdaddy does not give instant kill damage but just multiplies it by 100.

whosyourdaddy can be easily detected especially since I use a DDS. If a unit gets hit for more than 50 damage (which you can never achieve in the map, its obviously a cheat)

But +rep for the information. Can you tell me where do I write that ?
 
Level 12
Joined
Mar 13, 2012
Messages
1,121
Can you tell me where do I write that ?
Well in a function shortly after game start of course.
If you mean how to put it in custom script then here's how:

Create a boolean in the variable editor, for example named isSinglePlayer.
Then by using
  • Custom script: set udg_isSinglePlayer = ReloadGameCachesFromDisk()
you have it saved in your variable.

Then you can for example remind players with a text that if they are playing in single player, no official score will be recorded.
 

sentrywiz

S

sentrywiz

Well in a function shortly after game start of course.
If you mean how to put it in custom script then here's how:

Create a boolean in the variable editor, for example named isSinglePlayer.
Then by using
  • Custom script: set udg_isSinglePlayer = ReloadGameCachesFromDisk()
you have it saved in your variable.

Then you can for example remind players with a text that if they are playing in single player, no official score will be recorded.

Custom script works too.

So if this variable is false, then its a LAN game if its true its singleplayer?
 
Status
Not open for further replies.
Top