SaveScum / skyrim-plugin-decoding-project

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

PGRD saved incorrectly after copying in TES4Edit #135

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Copy as override any pathgrid from Oblivion.esm, for example 00030BC9
2. Save and exit.
3. Load saved plugin.

What is the expected output?
ITM pathgrid records

What do you see instead?
PGRR subrecord with bad data

What version of the product are you using? On what operating system?
r1345

Please provide any additional information below.

Original issue reported on code.google.com by zila...@gmail.com on 16 Jun 2013 at 5:25

GoogleCodeExporter commented 9 years ago
Time to find out if can run TES4Edit on my machine!

Original comment by HuguesLe...@gmail.com on 16 Jun 2013 at 8:42

GoogleCodeExporter commented 9 years ago
First issue, the Cell is not showing up as the first SubRecord. Looks like its 
a new issue since 3.30 ! (didn't take long :) )

Original comment by HuguesLe...@gmail.com on 16 Jun 2013 at 8:50

GoogleCodeExporter commented 9 years ago
Issue confirmed ! Looks like the array indexes are totally wrong on save, so it 
might be as old a my very first changes. I will try to find which version 
tomorrow.
At least copy as override looks ok.

Original comment by HuguesLe...@gmail.com on 16 Jun 2013 at 8:56

GoogleCodeExporter commented 9 years ago
Now that's disturbing :)

Original comment by zila...@gmail.com on 16 Jun 2013 at 8:56

GoogleCodeExporter commented 9 years ago
Btw Cell is not a real subrecord, it is artificial to allow moving cell child 
records between cells. It should never be sorted, however don't know for sure, 
never checked source code for that part.

Original comment by zila...@gmail.com on 18 Jun 2013 at 7:37

GoogleCodeExporter commented 9 years ago
I know, but the change to sorting subrecord was part of 3.30 and the issue 
appeared with 3.31!

Original comment by HuguesLe...@gmail.com on 19 Jun 2013 at 7:43

GoogleCodeExporter commented 9 years ago
OK. That whole Cell thing ? False alert. I was'nt using the correct source 
project :(
Back to looking at Copy as Override.

Original comment by HuguesLe...@gmail.com on 19 Jun 2013 at 8:45

GoogleCodeExporter commented 9 years ago
Strange that it happens only with PGRR, array of dynamic sorted arrays. Perhaps 
that's the only subrecord that has such structure among all definitions. Or 
perhaps wbCalcPGRRSize function fails when saving.

Original comment by zila...@gmail.com on 20 Jun 2013 at 9:04

GoogleCodeExporter commented 9 years ago
It's an unsorted array of a sorted array of integer.
The displayed issue is obviously that array count of the outer array do not 
match the original count, but the "concatenation" of all the inner array 
content is ok.

Original comment by HuguesLe...@gmail.com on 20 Jun 2013 at 10:55

GoogleCodeExporter commented 9 years ago
So, it looks to me that the issue is NOT is the copying, but in the array count 
callback.
Basically, oblivion.esm displays far less points in PGRR compared to what is 
specified in PGRP.

Original comment by HuguesLe...@gmail.com on 26 Jun 2013 at 8:22

GoogleCodeExporter commented 9 years ago
The error comes from the optimization I did on not recalculating the count of 
an array whose size we already know. The callback assumes it is called on each 
iteration of the counting. The good news is I can extract the index from the 
label (as in Point #1), but of course this might later break if the array 
becomes sorted.

Original comment by HuguesLe...@gmail.com on 26 Jun 2013 at 8:36

GoogleCodeExporter commented 9 years ago
The fnny part is I think Copy as Override was in fact correcting the display 
issue from oblivion.esm !

I am also changing the point type to itS16 from itU16 as "evidenced" by Point 
#18 of 00030BC9

Assumed solved as of r1347

Original comment by HuguesLe...@gmail.com on 26 Jun 2013 at 8:53

GoogleCodeExporter commented 9 years ago

Original comment by HuguesLe...@gmail.com on 27 Jun 2013 at 5:58