Page 1 of 1

Feature 936 Editor: LAND record table

Posted: 04 Apr 2016, 10:12
by pi03k
I want to help with editor. I'm thinking about this task but can switch to something different. How can I help? Where can I find info/doc about LAND record type? Could somebody please break down this task for me?

Re: Feature 936 Editor: LAND record table

Posted: 04 Apr 2016, 11:14
by scrawl
From what I understand, the LAND data can't be properly represented/edited in a table, so there is not much to do here. The only functionality we might need from the table is to delete, clone or revert to default state. Right Zini?

Re: Feature 936 Editor: LAND record table

Posted: 04 Apr 2016, 11:29
by pi03k

Re: Feature 936 Editor: LAND record table

Posted: 04 Apr 2016, 21:07
by cc9cii
This might help you get started:

https://github.com/cc9cii/openmw/commit ... 2a23344604

The easiest way to deal with bug #3149 is to add columns to mRegions in data.cpp

Re: Feature 936 Editor: LAND record table

Posted: 05 Apr 2016, 08:37
by Zini
The land table has two purposes:
- Have a list of land records so the user can see which records exist and which do not
- Monitor the modification status of land records and change it if needed

Therefore the land table would have only two columns:
- ID
- Modification State

Re: Feature 936 Editor: LAND record table

Posted: 25 Apr 2016, 13:37
by pi03k

Re: Feature 936 Editor: LAND record table

Posted: 25 Apr 2016, 15:30
by pi03k
Scenario is add land record, save it, close, open it, save without changes.
https://www.youtube.com/watch?v=JXe-KMN5Xl4

It's on master with merged initial LAND support by cc9cii.
I assume that loading of modified omwgame file skipped some previously saved LAND data and that leads to this behavior.

- open omwgame file
- add land record
- save file
- close
- check size (increased)

- open omwgame file (added records are missing but record count in loading window is increased) 22245
- save file (no changes)
- check size (decreased)

From scenario above (if it's supported) saving (or loading) of LAND records doesn't work in openmw-cs.
Is adding LAND records in editor supported? Does my testing make any sense?

Re: Feature 936 Editor: LAND record table

Posted: 26 Apr 2016, 15:01
by Zini
You added a land record with an invalid name. That needs to be handled in the LAND table creator bar. The only valid IDs are of the format #x y
Instead of entering an ID string it might be better to have two integer fields for input.

Anyway, the LAND code wasn't written for that. I guess you may have trashed the data structure. In fact the esm/omwgame file format can not store LAND records with such an ID. No idea what kind of junk ended up being written to the file.