Skip to content

How to break the save system?

User Avatar
#3
Auto-translated
If the game can save and load files using scripts, then after the user clicks "End Turn," the game's identifier can be saved to a file... when the game starts, a session identifier is generated (a random number within a certain range, repeated four times, like a PIN code, although more variables could be used, but four is optimal), and a file with this identifier is saved – we have now recorded the session identifier, and the session control variable receives this value... before the user clicks "End Turn" again, the file is read, and a verification generation of the identifier, similar to a PIN code, is performed, meaning it's generated in four digits – a match is practically impossible!
1
2
3
4
5
6
r = os.clock()
function _random()
  math.randomseed(r);
  r = math.random()
  return r;
end
С уважением, Psatkha (Псатха)

---------------------------------------------

Неудачное планирование ведёт к неудаче ...

NCF - мод, добавляющий дополнительных существ в HeroesV 3.1