#831 Editor: References Verifier

Involved development of the OpenMW construction set.
Post Reply
User avatar
nopoe
Posts: 112
Joined: 23 Dec 2012, 03:42
Location: CA, United States (UTC-8)

#831 Editor: References Verifier

Post by nopoe »

Having never modded Morrowind before or delved too deep into what modding requires, I'm a little lost here. Although I'm becoming a little less lost as read more and more.

I downloaded the fixes for the construction set so I can use it with my steam installation and I'm playing around with it now. I'm guessing that a reference verifier will verify that every reference in a cell is defined. In the case of the vanilla CS, that would mean there has to be an entry in the "Object Window". Is that about right?

How will this check be implemented? Should it be checking everything constantly or will it be a toolbar icon that you can click to verify everything is ok?
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: #831 Editor: References Verifier

Post by Zini »

First, forget about the original CS. OpenCS has nothing to do with it.

The verifier is run by clicking on File -> Verify. You need to write a Stage class and register it, so it can be run as part of the verifier operation.

An example how to implement this feature can be found in apps/opencs/model/tools/factioncheck. And don't forget to register your CheckStage in apps/opencs/model/tools/tools.

OpenCS treats each reference as a top level record (even though the ESX format does not do this). Now you need to check for each of these reference records, that they do not contain garbage. For references there are quite a few things to check. For example, if the mRefID does contain the ID of a referenceable, that does not exist (either because it is really not there or because it is flagged as deleted), that would be a problem that needs to be reported. If mOwner is not empty the same needs to be checked for NPCs (a subset of referencables). mSoul and mFaction are further candidates. If mFaction is there, then it should be checked if mFactIndex is valid. And so on.

The reference records can be found in apps/opencs/model/word/ref and components/esm/cellref.

You need to go through both of these structs and find out for each member variable, if and in what way they need to be checked.
User avatar
nopoe
Posts: 112
Joined: 23 Dec 2012, 03:42
Location: CA, United States (UTC-8)

Re: #831 Editor: References Verifier

Post by nopoe »

Sounds complicated, but I'll poke around in the code until I have a better idea of what I don't know. If I have more questions I'll post them here. Thanks for the tips!
User avatar
nopoe
Posts: 112
Joined: 23 Dec 2012, 03:42
Location: CA, United States (UTC-8)

Re: #831 Editor: References Verifier

Post by nopoe »

The difficulty of my class spiked right when I volunteered again, so I think I might not have time for this, unfortunately. I haven't even been able to get enough time to set up a build environment. Sorry, I just really can't afford to overextend myself at the moment.
Post Reply