#652: GMST Verifier

Involved development of the OpenMW construction set.
User avatar
sirherrbatka
Posts: 2121
Joined: 07 Aug 2011, 17:21

Re: #652: GMST Verifier

Post by sirherrbatka » 19 Dec 2013, 15:48

Cool. I will start with referencables. Quite a lot things needs checking there.

User avatar
sirherrbatka
Posts: 2121
Joined: 07 Aug 2011, 17:21

Re: #652: GMST Verifier

Post by sirherrbatka » 20 Dec 2013, 18:43

Pardon my ignorance. :oops:

It seems that RefIdDataContainer getRecord returns const RecordBase&. RecordBase seems to contain basic information like if record was modified/added/removed. However, I don't understand how those are applied to concrete records since they do not have RecordBase as it's ancestor, and how should I "transform" it into concrete (for instance ESM::Book) record type.Can I ask for a directions? :|

User avatar
Zini
Posts: 5134
Joined: 06 Aug 2011, 15:16

Re: #652: GMST Verifier

Post by Zini » 20 Dec 2013, 19:46

The returned RecordBase is actually a Record<Type>. You can get the ESX record by calling get() on this.

User avatar
sirherrbatka
Posts: 2121
Joined: 07 Aug 2011, 17:21

Re: #652: GMST Verifier

Post by sirherrbatka » 20 Dec 2013, 19:47

Lgro, the awesome one helped me! Ok, now I can do this.

PS
I need to learn about templates finally.

User avatar
sirherrbatka
Posts: 2121
Joined: 07 Aug 2011, 17:21

Re: #652: GMST Verifier

Post by sirherrbatka » 21 Dec 2013, 15:55

Ok, my verifer works! Well, kind off…

It seems that I have to restart OpenCS to refresh changes in the referencables. Also: after editing any referencable record (removing name for the sake of testing) I'm not getting "modified" (star icon) status instantly, even mReferencables.getSize(); does not change instantly after adding record (based on cout from my checkstage). Is it a bug, or just a missing feature, or maybe I'm doing it wrong?

Sorry for extra trouble, thanks in advance.

User avatar
Zini
Posts: 5134
Joined: 06 Aug 2011, 15:16

Re: #652: GMST Verifier

Post by Zini » 21 Dec 2013, 16:21

I don't follow. What do you mean by refresh? Can you give a step by step description about how to reproduce the problems you see?

User avatar
sirherrbatka
Posts: 2121
Joined: 07 Aug 2011, 17:21

Re: #652: GMST Verifier

Post by sirherrbatka » 21 Dec 2013, 17:14

Yeah, I'm confusing.

About the status:
1) start opencs
2) create a new addon
3) try to alter any referencable record
4) Modified column field is still base, despite changes being made.
5) Try to delete any referencable record.
6) Exception will be caught. Modifired column field still base.

My issue:
1) start OpenCS builded from my branch
2) edit game file
3) try to use verifer.
3) alter some referencable record (only potions, books, activators are handled currently) to invalid state. Changing model string to empty will do.
4) try to use verifer.
5) repeat 3 and 4, then go to 6
6) verifer is not catching invalid records. save game.
7) restart opencs, load to editing same game file.
8) start verifer
9) records are listed as invalid properly.

I don't know what excatly happens here. I think that my code is in fact correct and there is something wrong in other part of OpenCS, however I'm not quite sure what is going on. Any insight would be very helpfull.

User avatar
Zini
Posts: 5134
Joined: 06 Aug 2011, 15:16

Re: #652: GMST Verifier

Post by Zini » 21 Dec 2013, 17:31

I can confirm that we have a bug here. Or several. Modifying a record does not update its status and deleting one does not work either. Probably some flaw in the logic of the container. Please file a bug report. Not much we can do about that right now, I am afraid.

User avatar
sirherrbatka
Posts: 2121
Joined: 07 Aug 2011, 17:21

Re: #652: GMST Verifier

Post by sirherrbatka » 21 Dec 2013, 18:14

Oh, good. I will make a bug report and proceed with a task ignoring those issues. Thanks for taking your time to check this. :)

User avatar
sirherrbatka
Posts: 2121
Joined: 07 Aug 2011, 17:21

Re: #652: GMST Verifier

Post by sirherrbatka » 28 Dec 2013, 16:00

Hey there.

Referencable verifer almost finished, however there a few questions.

1) It seems that some portable lights have negative duration. What is the purpose of this? Maybe infinite duration?
2) I need to check if npc has valid race, but how I should get the races? I guess I need to pass it with constructor. Same for factions, i think.
3) Reputation and disposation. I have no idea what reputation is for, and if disposation is just modifer or flat value.
4) I'm not quite sure what else I must check in npc. Hints are very welcome.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest