Sadly, I expirence problems not only in the Referencable table. At the moment Everything seems to work just fine when editing existing file (well, i tested only the Morrowind.esm, but I don't expect any surpises) but when working on the new file, situation looks quite different ─ and I suspect that this may related to some flaws in the OpenCS. Basicly: there is difference in beetwen added record, and base records, as I described. I don't think I can find the reason behind this behavior.
Well, I think I will focus now on usual checking for illformated code and illnamed variables and send a pull request in next few days.
Record Cloning
- sirherrbatka
- Posts: 2159
- Joined: 07 Aug 2011, 17:21
Re: Record Cloning
Ah, and one more thing. It seems that I need to know in the cell creator if I'm cloning exterior or interior (to show or not to show x/y controls). I guess I need to emit signal from this creator, pass it all way up to the table, search for record and pass it all the way down to the creator. That's the easy part.
But how I would actually set x and y in the exterior? I opt for checking for it at the runtime or with the help of specialised template in the collections, however collections do not know about any other objects in the OpenCS and they do not use signals/slots mechanism so I would have no way to request fetching x/y coordinates. It seems that instead I would have to x/y to some kind of buffor (avaible for collection<ESM::Cells>) but I have no idea how proper solution would look like. I'm still very new to the templates metaprogramming.
But how I would actually set x and y in the exterior? I opt for checking for it at the runtime or with the help of specialised template in the collections, however collections do not know about any other objects in the OpenCS and they do not use signals/slots mechanism so I would have no way to request fetching x/y coordinates. It seems that instead I would have to x/y to some kind of buffor (avaible for collection<ESM::Cells>) but I have no idea how proper solution would look like. I'm still very new to the templates metaprogramming.
Re: Record Cloning
I can not confirm the problem outside of referenceables that you describe. It took various samples and all the tables I checked looked okay.
Edit: Actually, the CellCreator already stores a reference to the Data object from which you can get the tables. I presume you are either modeling a creator class based on that or derive from CellCreator.
No. You should check the table directly. Store a pointer/reference to the table in the creator.I guess I need to emit signal from this creator, pass it all way up to the table, search for record and pass it all the way down to the creator.
The cell coordinates are encoded in the ID. You just have to decode the ID again.But how I would actually set x and y in the exterior?
Edit: Actually, the CellCreator already stores a reference to the Data object from which you can get the tables. I presume you are either modeling a creator class based on that or derive from CellCreator.
- sirherrbatka
- Posts: 2159
- Joined: 07 Aug 2011, 17:21
Re: Record Cloning
Sorry, I meant my cloning problem, not lack of ID problem.I can not confirm the problem outside of referenceables that you describe.
Ok, this makes thing trivial.The cell coordinates are encoded in the ID. You just have to decode the ID again.
And this will be not needed.No. You should check the table directly. Store a pointer/reference to the table in the creator.
It is quite obvious once you know ^^'
- sirherrbatka
- Posts: 2159
- Joined: 07 Aug 2011, 17:21
Re: Record Cloning
Ok, mostly working.
Another question! This time not related to my inability to read code
Is OpenCS should able to create new exterior cells in the Morrowind.esm?
Another question! This time not related to my inability to read code
Is OpenCS should able to create new exterior cells in the Morrowind.esm?
- sirherrbatka
- Posts: 2159
- Joined: 07 Aug 2011, 17:21
Re: Record Cloning
I was not sure if exterior cell matrix has any limitations.
- sirherrbatka
- Posts: 2159
- Joined: 07 Aug 2011, 17:21
Re: Record Cloning
Good point. But I now that there was some sort of limit in oblivion (in the engine itself, not in the file format).
Ok, status report. Types are added to data. Cloning works but not for base records ─ I don't know why but this may be some sort of bug. Cell cloning was the only interesting part. Decoding id to get coordinates works just fine, but feels hackish. I want to create something that is actually designed. Zini's patience seems to not be exhausted yet.
Ok, status report. Types are added to data. Cloning works but not for base records ─ I don't know why but this may be some sort of bug. Cell cloning was the only interesting part. Decoding id to get coordinates works just fine, but feels hackish. I want to create something that is actually designed. Zini's patience seems to not be exhausted yet.