ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

Digest: Difference between revisions

From ModEnc
Jump to navigation Jump to search
Crimsonum (talk | contribs)
No edit summary
E1 Elite (talk | contribs)
m Added game's digest generating method.
 
(2 intermediate revisions by 2 users not shown)
Line 3: Line 3:
{{MappingBar}}
{{MappingBar}}


This section contains a checksum of the data within a [[map]] file. It's used to ensure all clients (i.e. players) have the same version of the map. If there's a mismatch in the checksums or the map sizes between the players, the game assumes the maps to be different, and it will transfer the host's map file to the other players.
Digest section is considered by the game as the last section of a map, found at the bottom of the map files. It contains a unique identification or signature. This section contains 1 line of base64 encoded 20-byte long hex code.  


This section is automatically generated by the [[Final Alert]] map editor and all its derivatives. It's usually located at the bottom of the map file.
Game differentiates between a map having a digest or not for online map listing. It's used to ensure all clients (i.e. players) have the same version of the map. If there's a mismatch in the digest value or the map hash/sizes between the players, the game assumes the maps to be different and it will transfer the host's map file to the other players. This section has no effect on singleplayer mission maps.
 
Game's method of generating digest entry is by using the hash of the data from INIClass (internal INI content which doesn't contain comments with some space and tabs removed) and then encoding with base64.
 
FinalSun/FinalAlert2 uses system up time as seed for generating a random number which is further processed to make it a 20-bytes long value. Basically, a random number could be used to generate a 20-byte long unique hex value which can be encoded using base64 to generate the unique identification for the map's digest entry. FinalSun/FinalAlert2 doesn't change the digest entry when saving edited maps. It generates a new entry if digest is not present.


==See Also==
==See Also==

Latest revision as of 16:29, 2 March 2021

This page should correctly be named "[Digest]"; it is wrong due to technical restrictions.



Digest section is considered by the game as the last section of a map, found at the bottom of the map files. It contains a unique identification or signature. This section contains 1 line of base64 encoded 20-byte long hex code.

Game differentiates between a map having a digest or not for online map listing. It's used to ensure all clients (i.e. players) have the same version of the map. If there's a mismatch in the digest value or the map hash/sizes between the players, the game assumes the maps to be different and it will transfer the host's map file to the other players. This section has no effect on singleplayer mission maps.

Game's method of generating digest entry is by using the hash of the data from INIClass (internal INI content which doesn't contain comments with some space and tabs removed) and then encoding with base64.

FinalSun/FinalAlert2 uses system up time as seed for generating a random number which is further processed to make it a 20-bytes long value. Basically, a random number could be used to generate a 20-byte long unique hex value which can be encoded using base64 to generate the unique identification for the map's digest entry. FinalSun/FinalAlert2 doesn't change the digest entry when saving edited maps. It generates a new entry if digest is not present.

See Also