raziel23x / skyrim-plugin-decoding-project

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

Batch change referencing records does not change FormIDs of records with 0 references #85

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run "Batch change referencing records..."
2. Notice that any record which is not referenced by other records (such as 
default object manager) does not have its formid changed.

What is the expected output?
I expect that everything in the .csv file should have its formid changed 
whether or not it is referenced.

What do you see instead?
Batch change referencing records does not change FormIDs of records with 0 
references

What version of the product are you using? On what operating system?
FNVEdit 3.0.26 on Windows 7

Please provide any additional information below.
If this is how it was intended to work, would it be possible to expose the 
Change referencing records function for use in scripting?

I am with the TTW team (http://www.taleoftwowastelands.com) and, if I can get 
this function fixed or exposed in script. I can finally make TTW fully 
compatible with ANY FO3 mod.

Thank you for your time, your help, and your work on xEdit!

Original issue reported on code.google.com by kyleco...@gmail.com on 5 Dec 2012 at 4:01

GoogleCodeExporter commented 9 years ago
I admit I don't know what "Batch change referencing records..." does...
Can you please provide test plugins and csv files?

Original comment by zila...@gmail.com on 10 Dec 2012 at 6:28

GoogleCodeExporter commented 9 years ago
The purpose of the function is to replace one set of reference by another in 
batch. It is not a search/replace in NewMaster.

I'll let Zilav answer on exposing a "ReplaceFormID" function via script.

Original comment by HuguesLe...@gmail.com on 11 Jan 2013 at 3:26

GoogleCodeExporter commented 9 years ago
That's what I figured, in that case, it is changing the FormId of the main 
record on some records, but not others. That seems inconsistent to me. It 
should either change all main record form IDs, or none, at the moment it 
changes them if and only if they have at least one referencing record.

Original comment by kyleco...@gmail.com on 11 Jan 2013 at 7:19

GoogleCodeExporter commented 9 years ago
For every formid you provide the command find all the references and them 
change them. The original FormID getting changed as well is not done explicitly.

Original comment by HuguesLe...@gmail.com on 11 Jan 2013 at 7:31

GoogleCodeExporter commented 9 years ago
Now, I'm new to delphi, so forgive me if I am wrong, but this line: 
http://code.google.com/p/skyrim-plugin-decoding-project/source/browse/TES5Edit/b
ranches/dev-hlp-XE/frmViewMain.pas#6016 seems like it explicitly changes the 
form id of the main record in the batch change referencing records function.

This line: 
http://code.google.com/p/skyrim-plugin-decoding-project/source/browse/TES5Edit/b
ranches/dev-hlp-XE/frmViewMain.pas#5978 is where it excludes records that have 
no references. 

In my opinion, it is incredibly handy to have batch change referencing records 
also change the main record form ID. To that extent I would add:

RefRecord := _File.RecordByFormID[OldRecord.LoadOrderFormID, False];
if Assigned(RefRecord) and _File.Equals(RefRecord._File) then begin
     AddMessage('Changing FormID ['+IntToHex64(RefRecord.LoadOrderFormID, 8)+'] to ['+IntToHex(NewRecord.LoadOrderFormID, 8)+']');
     RefRecord.LoadOrderFormID := NewRecord.LoadOrderFormID;
end;

Between lines 5978 and 5979 so that, even if it has no references, the main 
record form id is still changed.

Forgive me if I'm wrong, and thanks for your time.

Original comment by kyleco...@gmail.com on 11 Jan 2013 at 7:57

GoogleCodeExporter commented 9 years ago
Line 6016 is the loop that actually change the referenced records. As it is 
now, xxEdit only creates list of references for formID that are actually 
referenced so that is why the oldRecord is not found and changed in some cases. 
But I do see some advantages to being able to do that.

Original comment by HuguesLe...@gmail.com on 14 Jan 2013 at 12:19

GoogleCodeExporter commented 9 years ago
Code changed by adding a flag in an optional 8th column to specify you want to 
also change the main record Formid.
Now I need some test material to confirm it works properly.

Original comment by HuguesLe...@gmail.com on 15 Jan 2013 at 8:36

GoogleCodeExporter commented 9 years ago
What kind of input is expected in the 8th column?
Thank you for your help, I will put together a few plugins and a .csv for 
testing and get it back to you. Thanks again!

Original comment by kyleco...@gmail.com on 15 Jan 2013 at 11:07

GoogleCodeExporter commented 9 years ago
1 to copy. Either 0 or nothing to not copy.

Original comment by HuguesLe...@gmail.com on 15 Jan 2013 at 1:23

GoogleCodeExporter commented 9 years ago
No reply for a very long time! Has this been solved with a script ?

Original comment by HuguesLe...@gmail.com on 5 Jul 2013 at 2:16

GoogleCodeExporter commented 9 years ago
Apologies, I ended up approaching the problem from a different angle and 
bypassing the problem completely. I still hold that the function currently 
works inconsistently, though. I'm going to make up those .esp and .csv files I 
promised 6 months ago. Be right back.

Original comment by kyleco...@gmail.com on 5 Jul 2013 at 2:22