theHunter: Call of the Wild is a hunting simulator, which - unfortunately - has some characteristics of a typical first-person shooter, namely missions, rewards and locked equipment. Since this prevents actual hunting, I thought it would be interesting to analyse the file format that saves level, XP, cash and so on.
I wrote a fairly generic tool called laymanshex that takes a partial file description and a binary file as input and outputs the values. Values can be changed with the ‘-set’ argument.
% ./laymanshex thp_player_profile_adf.layhex thp_player_profile_adf Level = 19 XP = 20235 SkillPoints = 0 PerkPoints = 0 SkillPointsSpent = 7 PerkPointsSpent = 6 Cash = 16640 RifleLevel = 14 HandgunLevel = 4 ShotgunLevel = 4 BowLevel = 1 RifleScore = 1992 HandgunScore = 382 ShotgunScore = 417 BowScore = 0 % ./laymanshex -set="Level=60,XP=100000" thp_player_profile_adf.layhex thp_player_profile_adf Created backup thp_player_profile_adf.bak20200426231811 Level = 60 XP = 100000 SkillPoints = 0 PerkPoints = 0 SkillPointsSpent = 7 PerkPointsSpent = 6 Cash = 16640 RifleLevel = 14 HandgunLevel = 4 ShotgunLevel = 4 BowLevel = 1 RifleScore = 1992 HandgunScore = 382 ShotgunScore = 417 BowScore = 0 % ./laymanshex -set="Cash=0x7FFFFFFF" thp_player_profile_adf.layhex thp_player_profile_adf | grep Cash Cash = 2147483647
The partial file description for thp_player_profile_adf (COTW version 1.49) looks like this:
little endian : byte Level : int32 XP : int32 SkillPoints : int32 PerkPoints : int32 SkillPointsSpent : int32 : byte PerkPointsSpent : int32 : byte Cash : int32 RifleLevel : int32 HandgunLevel : int32 ShotgunLevel : int32 BowLevel : int32 RifleScore : int32 HandgunScore : int32 ShotgunScore : int32 BowScore : int32
Releases of laymanshex can be found here, go sources in the laymanshex git repo and possible further file descriptions in the laymanshex-files git repo.
The file format of COTW saves has changed many times in the past and I assume it will again at some point in the future.