wheybags / freeablo

[ARCHIVED] Modern reimplementation of the Diablo 1 game engine
GNU General Public License v3.0
2.16k stars 193 forks source link

System/User Config File Support #80

Open doggan opened 10 years ago

doggan commented 10 years ago

I'm thinking to add support for a system config file + overridable user config file, that would be used to store basic engine settings.

Let me know what you think. Thanks!

wheybags commented 10 years ago

I think you've got the right idea here. However, I think it pulls in some related issues - having freeablo read anything from the current directory was only ever intended to be a temporary measure, so faio needs to be updated to read from (~/.config/freeablo, or %APPDATA%\freeablo). This folder should contain a freeablo.ini file with game settings, and the resources folder. The game could also check for a freeablo.ini at /etc/freeablo.ini, and Program Files/freeablo/freeablo.ini, and if it exists, load that first, then overwrite it's settings with those from the local one.

When we get around to writing a game launcher, it should include a generator for the config file, that would copy in diabdat.mpq and diablo.exe as required, and set the paths in the config.

doggan commented 10 years ago

How would you like to proceed? I could get the settings files working (as I described above) from the current directory for the first step. Then as a future issue we could update the FAIO interface to handle reading/writing to the correct user directories, and move the settings files at that time. The FAIO interface changes would be a much bigger task, which is why I thought it would be good to split the work up.

wheybags commented 10 years ago

Sound cool, yeah

On Tue, May 6, 2014 at 3:49 PM, shyam notifications@github.com wrote:

How would you like to proceed? I could get the settings files working (as I described above) from the current directory for the first step. Then as a future issue we could update the FAIO interface to handle reading/writing to the correct user directories, and move the settings files at that time. The FAIO interface changes would be a much bigger task, which is why I thought it would be good to split the work up.

— Reply to this email directly or view it on GitHubhttps://github.com/wheybags/freeablo/issues/80#issuecomment-42312064 .