wc3edit.net
https://forum.wc3edit.net/

Preventing Cheat Packs
http://forum.wc3edit.net/deprotection-cheating-f64/preventing-cheat-packs-t37367.html
Page 1 of 1

Author:  animalmother [ May 2nd, 2020, 11:11 pm ]
Post subject:  Preventing Cheat Packs

Hey, anyone got tips for preventing cheat injection? Is it even possible?
Thanks!

Author:  owner123 [ May 3rd, 2020, 8:16 pm ]
Post subject:  Re: Preventing Cheat Packs

You can never prevent it entirely, due to maps having the full source available. No matter how much effort you put in, there can always be someone who will take the time to remove your anti-cheat. If WC3 can open your scripts file, anyone else can too (and they can edit it). I've thought a lot about theoretical ways to prevent cheating by use of encryption/hashes and concluded it's impossible.

That said, some of the most common methods to make cheating more difficult are:
- Name some of your map variables/functions the same as ones from popular cheatpacks. Causes a collision and syntax error if cheatpacks are inserted (extremely easy to defeat)
- Corrupt MPQ so that it's harder to open
- Add anti-cheat function ingame. The easiest is detecting when someone writes commands, like -gold ###, and kicking them out. You can get as advanced or as basic as you want. You could make this quite hard to defeat, but someone could always just change the command names
- Logical anti-cheat: detect when someone's gold/level goes up and it wasn't caused by any functions in your map, and kick them out. This can be hard to program, depending on what your game is like.

Here's a theoretical anti-cheat tool:
- Define a way to detect JJCP and NZCP command strings (for example -gold ###)
- Write a tool that adds code to every method in the map to create a dynamic trigger based on this anti-cheat detection (that is, define a new function for every existing function and add your CreateTrigger in there linked to this new function which serves as anticheat)
This would be basically impossible to remove but would increase your map size to an incredible size. And it would be possible to change the cheat commands still. I had considered writing this (and I might still write it) but I'm really not sure there's much of a point.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/