Last active
January 26, 2019 01:17
-
-
Save Infernio/59c0b983bffcc7cf991ecc7384f9f0f4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
Check form version of all records in all currently loaded plugins. | |
Based on 'Check for old form version.pas'. | |
} | |
unit SSEFindOldFormVersions; | |
const | |
CheckFormVersion = 44; | |
function Initialize: integer; | |
var | |
i, j: integer; | |
plugin, rec: IInterface; | |
fileName: string; | |
begin | |
for i := 0 to Pred(FileCount) do begin | |
plugin := FileByIndex(i); | |
fileName := GetFileName(plugin); | |
if (fileName <> 'Skyrim.esm') and (fileName <> 'Update.esm') and (fileName <> 'Dawnguard.esm') and | |
(fileName <> 'HearthFires.esm') and (fileName <> 'Dragonborn.esm') and (fileName <> 'Skyrim.exe') then | |
for j := 0 to Pred(RecordCount(plugin)) do begin | |
rec := RecordByIndex(plugin, j); | |
// SPGD breaks on FormID version 44: https://bethesda.net/community/topic/23783/bug-form-version-44-spgd-record-unused-in-skyrim-se | |
if (Signature(rec) <> 'SPGD') and (GetFormVersion(rec) < CheckFormVersion) then | |
AddMessage('Outdated record with FormID ' + IntToHex(FormID(rec), 8) + ' of type ' + Signature(rec) + ', in plugin ' + fileName); | |
end; | |
end; | |
Result := 1; | |
end; | |
end. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment