Quib Mask
An Insightful Genius (whatever the snot that is)
Posts: 491
You wouldn't even need to regob, just throw the edited cogs in a subfolder "cog" where the mod's gob is loaded from and they'd load first.
For the record, Lunatik's AHP is still hackable, and it's pretty complex.
My personal suggestion (as I've thought on making "anti-hacking" before) would be simple client/server based cogs as follows:
Server cog is host only (rather, it's flags are so it'll just execute on the hosts machine and inside the cog will be IsServer() if statements; hacking this cog won't really matter). The server cog generates a random number, and based on the results, picks a random player in game (who isn't the host) and sends them a trigger. The client cog would be super minimalist. If it's just one line of code, it'll be "unhackable" and will simply send a reply trigger with the requested information. A timer will start on the server cog after the trigger "question" is sent of maybe 15 seconds. If the client doesn't reply within 15 seconds, or the reply indicates they're cheating, they'll be jailed, faded, nulled, frozen, etc. very painfully and an announcement to the game will be made that suggests the host should kick them.
These cogs would be level based probably, since TDiR has required levels correct? If not it would probably work in mod form, but having them just be level declared cogs would be easier (rather than attaching them to inventory bins).
Now... what information do the triggers contain and what would the client cogs be like to make them as unhackable as possible you might be asking. Here's what I think:
The host would send a trigger like this:
SendTrigger(randomplayer, 14001, 60, 0, 0, 0);
The client cog would be something like this:
trigger:
if(GetSourceRef() == 14001) SendTrigger(GetSenderRef(), 14101, GetParam(0), GetInvMin(GetLocalPlayerThing(), GetParam(0)), 0, 0);
Return;
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
Retun;
The player the message is sent to and the bin checked would be random, and if the bin's min/max is not the number it should be, they're cheating. Likewise, flags and player model can be checked server-side for cheating.
Why all the 1s? Well, a certain percent of the beginning of a cog is "unhackable" meaning if it's changed at all it fails checksum. It'd probably be safe to leave out all the 1s, since they're just fuel for a decent JK "hacker" to use... it's kind of a tough call either way.
This method wouldn't be foolproof, but unfortunately nothing is for JK. There's always a way around it. Lunatik's solution just randomizes cogs a little bit, but you can still quickly rip them from the gob, use the character counter he wrote to do a quick and dirty count and throw in a small hack template of code in where there's room. Not as versatile of cheating as you'd normally have access to, but it's still doable.
This would simply add a way to grab inventory values off a client computer.
QM