OpenMW-cs does not save deleted subrecords?

Involved development of the OpenMW construction set.
Post Reply
ezze
Posts: 489
Joined: 21 Nov 2013, 13:20

OpenMW-cs does not save deleted subrecords?

Post by ezze » 20 Sep 2020, 02:49

I am playing around with the editor and I notice a strange behavior. Basically, the editor does not save the deleted subrecords, the net effect is that those records are then shown in game even if they should not be. I am using a git version compiled few days ago.

Here is an example, the first code block is a cell from the original mod as shown by tes3cmd dump, the second the same cell just after saving in the editor.

Code: Select all

Record: CELL "mzahnch ruin (8, -10)" Flags:0x0000 ()
  NAME: Name:Mzahnch Ruin
  DATA: (Exterior) Coordinates: (8, -10)  Flags:0x0042 (Has_Water)
  RGNN: Region:Azura's Coast Region
  NAM5: Color:6333898
  NAM0: Reference_Count:4
 *FRMR: ObjIdx:118134  MastIdx:1
  NAME: Name:Flora_tree_AC_04
  DELE: Deleted:4729956
 *FRMR: ObjIdx:118135  MastIdx:1
  NAME: Name:flora_emp_parasol_02
  DELE: Deleted:4729956
 *FRMR: ObjIdx:118136  MastIdx:1
  NAME: Name:Flora_emp_parasol_03
  DELE: Deleted:4729956
 *FRMR: ObjIdx:1953  MastIdx:0
  NAME: Name:flora_tree_jw_ayse_722
  DATA: X:66156.000  Y:-81180.000  Z:1344.000  X_Angle:0.0000  Y_Angle:0.0000  Z_Angle:0.0000
As you can see the author added a tree and removed the two emperor parasols and the Flora_tree_AC_04 thingy.

Code: Select all

Record: CELL "mzahnch ruin (8, -10)" Flags:0x0000 ()
  NAME: Name:Mzahnch Ruin
  DATA: (Exterior) Coordinates: (8, -10)  Flags:0x0042 (Has_Water)
  RGNN: Region:Azura's Coast Region
  NAM5: Color:6333898
  NAM0: Reference_Count:4
 *FRMR: ObjIdx:1953  MastIdx:0
  NAME: Name:flora_tree_jw_ayse_722
  DATA: X:66156.000  Y:-81180.000  Z:1344.000  X_Angle:0.0000  Y_Angle:0.0000  Z_Angle:0.0000
After saving, there is only the new tree.

Am I missing something? Or it is really a bug?

ezze
Posts: 489
Joined: 21 Nov 2013, 13:20

Re: OpenMW-cs does not save deleted subrecords?

Post by ezze » 21 Sep 2020, 03:21

I guess it is this bug that is on the tracker since 7 years... It is really unfortunate for this bug is a showstopper for me :(

User avatar
psi29a
Posts: 4915
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: OpenMW-cs does not save deleted subrecords?

Post by psi29a » 21 Sep 2020, 08:25

ezze wrote:
21 Sep 2020, 03:21
I guess it is this bug that is on the tracker since 7 years... It is really unfortunate for this bug is a showstopper for me :(
Technically it is an unimplemented feature/task to be done and not a bug. We do accept patches/merge requests/pull requests :D

ezze
Posts: 489
Joined: 21 Nov 2013, 13:20

Re: OpenMW-cs does not save deleted subrecords?

Post by ezze » 21 Sep 2020, 08:51

Since I never saw the Openmw-cs code I am afraid it is a bit hard. It is not just to pass-through the subrecord, but also to change the GUI so it shows, and allow to change, if a subrecord is deleted or not.

Maybe you can share some pointers?

User avatar
psi29a
Posts: 4915
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: OpenMW-cs does not save deleted subrecords?

Post by psi29a » 21 Sep 2020, 10:05

Perhaps it is best to have our CS Editor-in-chief unelsson give his view of things.

unelsson
Posts: 185
Joined: 17 Mar 2018, 14:57

Re: OpenMW-cs does not save deleted subrecords?

Post by unelsson » 21 Sep 2020, 10:26

I unfortunately can't work on this right now, but I might be able to help by pointing a finger.. I'd very much like to have a more defined explanation what needs to be done, and what isn't currently working. It's then easier to start diagnostics, homing on the issue.

I haven't been able to investigate this, but just shooting blind: I'd first check the component-level saving, as well as from the openmw-cs side's commands (Qt Undostack), see what's implemented and what's not. I believe you can mark records deleted, but it fails somewhere after that..

ezze
Posts: 489
Joined: 21 Nov 2013, 13:20

Re: OpenMW-cs does not save deleted subrecords?

Post by ezze » 21 Sep 2020, 13:56

I attached to this message a tiny example, maybe it will help you to understand what it needs to be done.
The forum does not accept .esp files, but the archive contains:

Code: Select all

no_ghostgate_tree_btes.esp
no_ghostgate_tree_openmwcs.esp
I just created the first file (no_ghostgate_tree_btes.esp) with the bethesda editor* and did exactly one thing: delete one of the dead trees you find on the east of Ghostgate.
I then open the file with OpenMW-CS and just saved it, that's it. The result is the second file: no_ghostgate_tree_openmwcs.esp.

Here is the dump from tes3cmd of both files:

Code: Select all

$ tes3cmd dump no_ghostgate_tree_btes.esp 

Record: TES3 "()" Flags:0x0000 ()
  HEDR:   Version:1.3  Is_Master:False  Author:""
  Description:""
  N_Records:1
 *MAST: Master:Morrowind.esm
  DATA: Length:79837557

Record: CELL "ghostgate (2, 4)" Flags:0x0000 ()
  NAME: Name:Ghostgate
  DATA: (Exterior) Coordinates: (2, 4)  Flags:0x0046 (Has_Water, Illegal_To_Sleep_Here)
  RGNN: Region:Ashlands Region
  NAM5: Color:6333898
  NAM0: Reference_Count:1
 *FRMR: ObjIdx:223671  MastIdx:1
  NAME: Name:flora_ashtree_06
  XSCL: Scale:2.00
  DELE: Deleted:4729956

Code: Select all

$ tes3cmd dump no_ghostgate_tree_openmwcs.esp 

Record: TES3 "()" Flags:0x0000 ()
  HEDR:   Version:1.3  Is_Master:False  Author:""
  Description:""
  N_Records:1
 *MAST: Master:Morrowind.esm
  DATA: Length:79837557

Record: CELL "ghostgate (2, 4)" Flags:0x0000 ()
  NAME: Name:Ghostgate
  DATA: (Exterior) Coordinates: (2, 4)  Flags:0x0046 (Has_Water, Illegal_To_Sleep_Here)
  RGNN: Region:Ashlands Region
  NAM5: Color:6333898
  NAM0: Reference_Count:1
As you can see the tree is not deleted anymore. So, playing with no_ghostgate_tree_openmwcs.esp one still sees the trunk.


* technically, created empty with MWEdit, edit with the bethesda editor, and then cleaned with tes3cmd.
Attachments
no_ghostgate_tree.7z
The two esp files
(388 Bytes) Downloaded 11 times

Post Reply