Write an Morrowind.ini to openmw.cfg converter

Everything about development and the OpenMW source code.
XseuguhX
Posts: 8
Joined: 25 Dec 2011, 17:28

Write an Morrowind.ini to openmw.cfg converter

Post by XseuguhX »

Hello,
I'm very interresting by this project. How good it would be if it was possible to play Morrowind on Linux !
I'm now doing my first year of computer's IUT.
I would like to contribute, and I found on your bug tracker the Task #113, which seems to be enough easy for me (I hope).
However, I wasn't able to find this file. Where is it ? Isn't it somewhere here (http://bugs.openmw.org/projects/openmw/repository) ?

Do you think there is work for me ?

I apologize for my english, I wish it is better !

XseuguhX
Last edited by XseuguhX on 26 Dec 2011, 21:53, edited 2 times in total.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Introduce myself

Post by Zini »

I am not entirely sure which file you are talking about. Morrowind.ini is a part of a Morrowind installation and therefore not in the repository. opnemw.cfg files are generated during the build process from various templates in the files directory.
XseuguhX
Posts: 8
Joined: 25 Dec 2011, 17:28

Re: Introduce myself

Post by XseuguhX »

I was talking about openmw.cfg.
I found it in the binaries for windows, but it only contain a data item and a ressources one.
Is it the real one ?
I have Morrowind installed on my computer, and I have reading Morrowind.ini. I found that there were a lot more item !
Should I compile the whole OpenMW project to have the "real" openmw.cfg ?
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Introduce myself

Post by Zini »

You need to compile OpenMW anyway, if you want to work on it. But you won't get different openmw.cfg file during the build process. It's actually a bit early for the task you selected, because we aren't using a lot of settings from the ini file yet (and some we will probably never be use). But that doesn't mean you can't get started on this task.

You can get at list of supported items for openmw.cfg by running openmw with the --help switch. Most of these are specific to OpenMW and are not present in the ini file. I guess for now we only have master, plugin and fps.

Here a couple of hints for the implementation:

The importer would be best implemented as a separate command line tool for now. It should take the name of an ini file and the name of an openmw.cfg file as arguments (maybe plus some more options later). You can use boost program options for parsing the command line.

You should read in both the ini file and the cfg file and replace those parts of the cfg file that are provided by the ini file. Make sure the rest of the openmw.cfg file is written back unchanged.

Ignore ini settings for now that are not used in openmw.cfg. We can add these later (if you finish with this task, I have another one that will add a few more settings).

The source for the tool should be placed into a suitable new subdirectory of the apps directory (apps/iniimporter maybe?). I suggest naming the executable omwiniimporter.

btw. If you are set on taking this task, I will rename this thread and move it to the development forum (where all our development discussions are taking place).
XseuguhX
Posts: 8
Joined: 25 Dec 2011, 17:28

Re: Introduce myself

Post by XseuguhX »

Okay, think you for hints.
I will work on this task.
Thinck you for moving this topic !
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Introduce myself

Post by Zini »

It seems that the forum software doesn't let me modify the thread title after I moved the thread. Bad forum software, bad!

Anyway, for reference here is a link to the task we are talking about: Morrowind.ini Importer

You should also register on our bug tracker so I can assign to the task to you.
XseuguhX
Posts: 8
Joined: 25 Dec 2011, 17:28

Re: Introduce myself

Post by XseuguhX »

Perphaps it is possoble for me to change the name of this topic, isn't it ?
If yes, how can I do that ?
The link you give me is where I found this task. I'm already register on the bug tracker. My nickname is the same as here, XseuguhX. It is easier.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Introduce myself

Post by Zini »

Perphaps it is possoble for me to change the name of this topic, isn't it ?
If yes, how can I do that ?
Sorry, no idea.
The link you give me is where I found this task. I'm already register on the bug tracker. My nickname is the same as here, XseuguhX. It is easier.
Task assigned.
XseuguhX
Posts: 8
Joined: 25 Dec 2011, 17:28

Re: Write an Morrowind.ini to openmw.cfg converter

Post by XseuguhX »

Zini wrote: You should read in both the ini file and the cfg file and replace those parts of the cfg file that are provided by the ini file. Make sure the rest of the openmw.cfg file is written back unchanged.
Description of Task #113 wrote: Write a Morrowind.ini importer tool, that can create openmw.cfg files
So, should the importer create a new openmw.cfg file and write in it or should it open an existing openmw.cfg file and write between existing lines ?
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Write an Morrowind.ini to openmw.cfg converter

Post by Zini »

The task description isn't fully correct or rather it is not fully correct anymore since we changed how some parts of the configuration system works. Please use the existing openmw.cfg file as base and only change those settings defined in the ini file. But if the openmw.cfg does not exist, the converter should create it instead with only the settings from the ini file.
Post Reply