pathgrid subrecords amongst cell references

Involved development of the OpenMW construction set.
Post Reply
User avatar
cc9cii
Posts: 523
Joined: 28 Mar 2013, 04:01

pathgrid subrecords amongst cell references

Post by cc9cii »

This is in reference to bug #2070. The loading fails because pathgrid records are found in an unexpected place.

If the pathgrid record is skipped then then esp loads. But is that the correct solution, or should ESM::Cellref be modified to accept pathgrid subrecords as well?
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: pathgrid subrecords amongst cell references

Post by Zini »

Pathgrid records do not belong into cell records or any subrecords of a cell record. That would be a defective content file. I am still puzzled why it loads into OpenMW, but not into OpenCS. We should figure out what is going on here, before we implement any fixes.
User avatar
cc9cii
Posts: 523
Joined: 28 Mar 2013, 04:01

Re: pathgrid subrecords amongst cell references

Post by cc9cii »

I don't know for sure, but I suspect it is because OpenMW handles cell loading differently, especially with regards to moved references (see mwworld/store.cpp). Instead of calling ESM::Cell::load() like OpenCS, it calls ESM::Cell::loadData() and ESM::Cell::loadCell() individually.

But of course, I could be way off track as well ;-)
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: pathgrid subrecords amongst cell references

Post by scrawl »

Another possible explanation would be that the problematic cell just hasn't been loaded yet. In OpenMW cells are only loaded once you visit them or an object in that cell is referenced by a script.
User avatar
cc9cii
Posts: 523
Joined: 28 Mar 2013, 04:01

Re: pathgrid subrecords amongst cell references

Post by cc9cii »

The cell that fails is -9, 8 I believe. There's a bunch of Ogre exceptions because I've not installed the meshes, etc, but the cell seems to load with only a script error

Code: Select all

warning line 37, column 5 (endif)
    endif without matching if/elseif
Execution of script NOM_well_water_still failed:
OpenMW seems to have loaded the pathgrids ok? But the pathgrids are clearly out of place, so most likely the mod/esp has some issues. i.e. OpenCS should ignore these extra pathgrid data in Cell records.
Image
EDIT: I've installed the mod fully but still have Ogre issues, there must be some other dependency
User avatar
cc9cii
Posts: 523
Joined: 28 Mar 2013, 04:01

Re: pathgrid subrecords amongst cell references

Post by cc9cii »

Hmmm, my assessment was wrong. Even with the pathgrid records skipped OpenCS is showing the same pathgrid points. (but why isn't the food store rendered?)

Looks like OpenMW does *not* load those extra pathgrid points after all.

Image
Tinker
Posts: 231
Joined: 06 Mar 2013, 17:35

Re: pathgrid subrecords amongst cell references

Post by Tinker »

The food store renders for me, it is not in -9,8 but nearby.

Could it be that the food store was originally added to -9,8 then later moved to its present location but "stuff" was left behind?

I am in contact with the mod author and can ask him questions if needed.
User avatar
cc9cii
Posts: 523
Joined: 28 Mar 2013, 04:01

Re: pathgrid subrecords amongst cell references

Post by cc9cii »

Yes, the pathgrids are in -9, 8 but the food store is on the next cell. The store does render in OpenMW, but not in OpenCS.

EDIT: stepping through the debugger I can see that OpenMW recognises the moved ref terrain_rock_wg_08 and the pathgrid record following it. Not sure why OpenCS does not do the same.

EDIT2: figured out what was happening. Cell::getNextRef() skips moved references but doing so can leave no more subrecords to read. CellRef::load() will then confused because ESMReader::isNextSub("xxx") will always return false when there are no more subrecords to read.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: pathgrid subrecords amongst cell references

Post by Zini »

EDIT: stepping through the debugger I can see that OpenMW recognises the moved ref terrain_rock_wg_08 and the pathgrid record following it. Not sure why OpenCS does not do the same.
This feature is not yet implemented in OpenCS.
Post Reply