HMX Forge (RB4/DCS/Amp16/FME) save game decryptor/encryptor

fix rivals clan data

Changed files
+91 -32
Saves
+91
Saves/RB4/RBClan.cs
··· 1 + namespace davesave.Saves.RB4 2 + { 3 + public class SpotlightSongHighScoreInstrumentInfo 4 + { 5 + #pragma warning disable CS8618 6 + public bool mHasInfo; 7 + public int mInstrument; 8 + public int mHighScore; 9 + public int mStars; 10 + public int mDifficulty; 11 + public bool mBrutal; 12 + public string mPlatformUID; 13 + public string mGamertag; 14 + public string mUnused; 15 + public string mOnlineID; 16 + public int mSpotlightPercent; 17 + public bool mIsMine; 18 + #pragma warning restore CS8618 19 + 20 + public static SpotlightSongHighScoreInstrumentInfo ReadFromStream(Stream stream) 21 + { 22 + SpotlightSongHighScoreInstrumentInfo info = new(); 23 + 24 + info.mHasInfo = stream.ReadUInt8() != 0x00; 25 + info.mInstrument = stream.ReadInt32LE(); 26 + info.mHighScore = stream.ReadInt32LE(); 27 + info.mStars = stream.ReadInt32LE(); 28 + info.mDifficulty = stream.ReadInt32LE(); 29 + info.mBrutal = stream.ReadUInt8() != 0x00; 30 + info.mPlatformUID = stream.ReadLengthUTF8(); 31 + info.mGamertag = stream.ReadLengthUTF8(); 32 + info.mUnused = stream.ReadLengthUTF8(); 33 + info.mOnlineID = stream.ReadLengthUTF8(); 34 + info.mSpotlightPercent = stream.ReadInt32LE(); 35 + info.mIsMine = stream.ReadUInt8() != 0x00; 36 + 37 + return info; 38 + } 39 + } 40 + 41 + public class RBClanPersistentData 42 + { 43 + #pragma warning disable CS8618 44 + public uint mUnknown1; 45 + public uint mUnknown2; 46 + public uint mUnknown3; 47 + public int mTier; 48 + public int mHighestTier; 49 + public uint mCachedSpotlightSongEventID; 50 + public Dictionary<int, SpotlightSongHighScoreInstrumentInfo[]> mSpotlightSongHighScores; 51 + public uint mUnknown4; 52 + public int mSpotlightPercent; 53 + public int mCrewXPPercent; 54 + public int mLPPercent; 55 + public int mTotalPoints; 56 + #pragma warning restore CS8618 57 + 58 + public static RBClanPersistentData ReadFromStream(Stream stream) 59 + { 60 + RBClanPersistentData clan = new(); 61 + RevisionStream rev = new RevisionStream(stream, 0x6, 0x6); 62 + 63 + clan.mUnknown1 = rev.ReadUInt32LE(); 64 + clan.mUnknown2 = rev.ReadUInt32LE(); 65 + clan.mUnknown3 = rev.ReadUInt32LE(); 66 + clan.mTier = rev.ReadInt32LE(); 67 + clan.mHighestTier = rev.ReadInt32LE(); 68 + clan.mCachedSpotlightSongEventID = rev.ReadUInt32LE(); 69 + 70 + int mSpotlightSongHighScores_length = rev.ReadInt32LE(); 71 + clan.mSpotlightSongHighScores = new Dictionary<int, SpotlightSongHighScoreInstrumentInfo[]>(mSpotlightSongHighScores_length); 72 + for (int i = 0; i < mSpotlightSongHighScores_length; i++) 73 + { 74 + int songID = rev.ReadInt32LE(); 75 + int mHighScores_length = rev.ReadInt32LE(); 76 + clan.mSpotlightSongHighScores[songID] = new SpotlightSongHighScoreInstrumentInfo[mHighScores_length]; 77 + for (int j = 0; j < mHighScores_length; j++) 78 + clan.mSpotlightSongHighScores[songID][j] = SpotlightSongHighScoreInstrumentInfo.ReadFromStream(rev); 79 + } 80 + 81 + clan.mUnknown4 = rev.ReadUInt32LE(); 82 + clan.mSpotlightPercent = rev.ReadInt32LE(); 83 + clan.mCrewXPPercent = rev.ReadInt32LE(); 84 + clan.mLPPercent = rev.ReadInt32LE(); 85 + clan.mTotalPoints = rev.ReadInt32LE(); 86 + 87 + rev.FinishReading(); 88 + return clan; 89 + } 90 + } 91 + }
-32
Saves/RB4/RBMisc.cs
··· 151 151 return ts; 152 152 } 153 153 } 154 - 155 - public class RBClanPersistentData 156 - { 157 - #pragma warning disable CS8618 158 - // TODO: figure out what this actually is 159 - // !! there is a chance that this could be a non-fixed size !! 160 - public uint[] mUnknown1; 161 - public int mTier; 162 - public int mHighestTier; 163 - public uint[] mUnknown2; 164 - #pragma warning restore CS8618 165 - 166 - public static RBClanPersistentData ReadFromStream(Stream stream) 167 - { 168 - RBClanPersistentData clan = new(); 169 - RevisionStream rev = new RevisionStream(stream, 0x6, 0x6); 170 - 171 - clan.mUnknown1 = new uint[3]; 172 - for (int i = 0; i < clan.mUnknown1.Length; i++) 173 - clan.mUnknown1[i] = rev.ReadUInt32LE(); 174 - 175 - clan.mTier = rev.ReadInt32LE(); 176 - clan.mHighestTier = rev.ReadInt32LE(); 177 - 178 - clan.mUnknown2 = new uint[7]; 179 - for (int i = 0; i < clan.mUnknown2.Length; i++) 180 - clan.mUnknown2[i] = rev.ReadUInt32LE(); 181 - 182 - rev.FinishReading(); 183 - return clan; 184 - } 185 - } 186 154 }