SaveScum / skyrim-plugin-decoding-project

Automatically exported from code.google.com/p/skyrim-plugin-decoding-project
0 stars 0 forks source link

Script bug: Undelete and Disable References.pas #117

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The script file, Undelete and Disable References.pas, has a bug in handling 
ACHR/ACRE records:

  // set persistence flag depending on game
  if (wbGameMode = gmFO3) or (wbGameMode = gmFNV) or (wbGameMode = gmTES5) and ((Sig = 'ACHR') and (Sig = 'ACRE')) then
    SetIsPersistent(e, True)
  else if wbGameMode = gmTES4 then
    SetIsPersistent(e, False);

The comparison between the ACHR and ACRE should be 'or', not 'and'. You cannot 
have a record be both of those at the same time.

Also question the logic of stripping the persistent flag on these for TES4 
since you can have that flag be either one depending on whether or not it has 
low level processing disabled.

Original issue reported on code.google.com by arthmoor on 26 Feb 2013 at 11:45

GoogleCodeExporter commented 9 years ago
Also might want to check the logic on this inside the main application code.

Original comment by arthmoor on 26 Feb 2013 at 11:48

GoogleCodeExporter commented 9 years ago
Yes it should be "or", missed that somehow.
However the logic for TES4 persistence is the same as in application, and was 
defined by Elminster. I don't know anything myself about this.
If you feel that it is wrong, tell exactly what it should do instead. I just 
wonder can it cause any troubles because thousands were cleaning mods in 
Oblivion for years and I don't remember any bug reports.

Original comment by zila...@gmail.com on 27 Feb 2013 at 6:02

GoogleCodeExporter commented 9 years ago
Is the cleanup code inside the app also using the same bugged condition?

As far as persistence, I'd suggest simply carrying it over based on whatever is 
in the master for Oblivion. For ACHR and ACRE subrecords it's safe to alter 
their positioning even though they're persistent. So there should be no need to 
mess with it.

Original comment by arthmoor on 27 Feb 2013 at 6:45

GoogleCodeExporter commented 9 years ago
No, the app is fine. I just messed script when copy pasting.

TES4Edit sets persistent flag from master when cleaning/saving esm file, and 
clears it for esp. And looks like it worked fine for several years. Do you 
really wish to change that now for Oblivion?

Original comment by zila...@gmail.com on 27 Feb 2013 at 7:11

GoogleCodeExporter commented 9 years ago
Checked source again, it sets master persistence in esms only for FO3, FNV and 
TES5. So it is always cleared in Oblivion when undeleting.

Original comment by zila...@gmail.com on 27 Feb 2013 at 7:13

GoogleCodeExporter commented 9 years ago
It probably isn't a major issue for NPCs/Creatures. They tend to fix themselves 
fine if someone should need to undo the changes.

Original comment by arthmoor on 27 Feb 2013 at 7:47

GoogleCodeExporter commented 9 years ago
Ok, leaving as it is. Script is fixed now.

Original comment by zila...@gmail.com on 27 Feb 2013 at 11:00