forked from alphazolam/RE_RSZ
-
Notifications
You must be signed in to change notification settings - Fork 4
/
RE_RSZ_updateCRCs.1sc
25 lines (25 loc) · 1.29 KB
/
RE_RSZ_updateCRCs.1sc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//------------------------------------------------
//--- 010 Editor v10.0.2 Script File
//
// File: RE_RSZ_updateCRCs.1sc
// Authors: alphaZomega
// Version: 0.1
// Purpose: Updating outdated RSZ files to newest game version
// Category: RE Engine
// File Mask: *.user.2;*.pfb.*;*.scn.*;*.rcol.*;*.bhvt.*;*.motfsm2.*;*.fsmv2.*
// ID Bytes:
// History: August 11, 2022 -- Thanks to Darkness for adding the new "GetRSZClassCRC" function to RSZParser.dll
//------------------------------------------------
//return 0;
local uint L, R;
for (L=0; L<level; L++) {
R = 1;
while (exists(RSZFile[L].InstanceInfos.instanceInfo[R])) {
if (RSZFile[L].InstanceInfos.instanceInfo[R].CRC != RSZFile[L].InstanceInfos.instanceInfo[R].expectedCRC) {
Printf("Updating CRC for %s at %i from %u to %u\n", RSZFile[L].InstanceInfos.instanceInfo[R].typeId.HashName, startof(RSZFile[L].InstanceInfos.instanceInfo[R].CRC), RSZFile[L].InstanceInfos.instanceInfo[R].CRC, RSZFile[L].InstanceInfos.instanceInfo[R].expectedCRC);
WriteUInt(startof(RSZFile[L].InstanceInfos.instanceInfo[R])+4, RSZFile[L].InstanceInfos.instanceInfo[R].expectedCRC);
//RSZFile[lv].InstanceInfos.instanceInfo[r].CRC = RSZFile[lv].InstanceInfos.instanceInfo[r].expectedCRC;
}
R++;
}
}