How our settings system work?

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

How our settings system work?

Post by sirherrbatka » 22 Jun 2015, 20:06

…or at least where are the files with configuration located.

This is silly question. I spend around hour trying to figuer out how things works (it surely been a moment) but came to conclusion that I have no idea where are the files that are supposed to be parsed by the user settings object located. Small input would be very usefull.

User avatar
DanielCoffey
Posts: 43
Joined: 20 Jun 2015, 11:14
Location: Edinburgh, UK

Re: How our settings system work?

Post by DanielCoffey » 22 Jun 2015, 20:17

Are you referring to (on Windows at least) Documents \ My Games \ OpenMW \ openmw.cfg (and settings.cfg in the same folder)?
Caselabs S8 : Intel 4770K 4.5GHz 1.275V / 32Gb 1600 / ASUS 780 Ti 3Gb 1274 boost, 7800 mem / Samsung 850 Pro 256Gb, Samsung 840 Pro 256Gb x2, Caviar Green 1Tb / Dell U2713H 2560x1440 / Corsair AX860I / APC SMT1000I / Linux Mint 18 Cinnamon

User avatar
jirka642
Posts: 112
Joined: 23 Aug 2014, 11:39
Location: Czech Republic
Contact:

Re: How our settings system work?

Post by jirka642 » 22 Jun 2015, 20:28

Aren't all settings files located in standard paths https://wiki.openmw.org/index.php?title=Paths ?
On GitHub as kunesj, on GitLab as kunesj.
OS: Linux Mint 18, CPU: Intel Core i5-3330, RAM: 16GB, GPU: GeForce GTX 650Ti, OpenMW: from source

User avatar
cc9cii
Posts: 434
Joined: 28 Mar 2013, 04:01

Re: How our settings system work?

Post by cc9cii » 22 Jun 2015, 22:09

Have a look at

components/config
components/settings
components/files/configurationmanager.cpp
apps/launcher/maindialog.cpp
apps/opencs/editor.cpp
etc

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

Re: How our settings system work?

Post by sirherrbatka » 23 Jun 2015, 09:25

Thanks.

PS
I guess i was tired. Everything i need at the moment is in the usersettings file.

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

Re: How our settings system work?

Post by sirherrbatka » 23 Jun 2015, 18:26

One additional question. From what I seen, currently opencs lack settings that is suitable for adding complex types to the settings file. That's the case with filter page, however. We need to be able create new filter entry and for each entry specify applicable table plus list of columns that are supposed to be handled. Initially i thought that i should do this with the current framework, and simply extend it if that's required, however; i need to be sure before procedding any further. Could you please answer me, zini?

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

Re: How our settings system work?

Post by Zini » 24 Jun 2015, 09:26

The whole setting system needs a bit of a renovation (it had lots of problems initially and all the fixes I added later are of a makeshift nature). But I don't think that it should affect your task noticeably. You should get away with writing your own Page class (view) and then insert an instance of it in CSVSettings::Dialog::buildPages. It should be possible to extend/re-use at least parts of the existing model (updating and settings storage maybe) and then add whatever is needed.
Sorry, that's all I got for now.

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

Re: How our settings system work?

Post by sirherrbatka » 24 Jun 2015, 18:43

That's enough. I think I know what needs to be done, but will be able to do something next week and nothing this week. Also, TOME is seriously addictive game. Stay away of it.

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

Re: How our settings system work?

Post by sirherrbatka » 17 Aug 2015, 17:41

Sorry that it takes so much time. Somehow i couldn't really motivate myself to work on this.

Anyway:

Graffy, could you please provide some hints on how you suggest to create nested settings models with the current code? I decided that the best way to handle this is to have 3 level tree (root, category, boolean values for each column). However CSMSetting appears to be flat by design. Am I mistaken? If not should i proceed and rebuild settings to reflect my needs (i don't think i can do this, i don't fully understand design goals of current framework) or perhaps i should simply attach some label to each value and filter with it (ugly, but at least should work).

PS
I probabbly should reread this topic before asking new question.

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

Re: How our settings system work?

Post by Zini » 19 Aug 2015, 15:13

Not sure if Graffy is still around.

Its no wonder that you have problems with understanding the design goals, because the current implementation missed the design goals. Partially my fault, I guess. Apparently I failed to communicate the idea to graffy correctly and when accepting the code, I didn't look deep enough to identify the scope of the problem.

Most of the view part is already slated for rewrite. If you wish to re-do the whole thing (view and model), I am okay with that. But it would be a lot of work.

I don't have the time to elaborate on the intended design for the settings system right now. But if you are interested I can do a write-up later this week.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests