Jump to content

Moving the config into the database


Guest lillecarl
 Share

Recommended Posts

Hello guys! I'm thinking about moving the configs into the database, just having "critical" data in the mangosd.conf etc... like mysql info etc... It would make it much easier to do changes to the config! I just wanna check if there are some people intrested before i start looking into it, I'm not sure if I'm able to do it, but it would be really awesome imo! So tell me if there are some interest in this!

- LilleCarl

Link to comment
Share on other sites

What I like about the current config files... mangosd.conf, realmd.conf, and the others... is it doesn't get much more simple than a self-documented text file that you simply plug in the values you need or like best. If anything, I wish there were even more options in the config files!

This leads to my question about your idea. How would moving the configuration into the database make things easier? Would you use GM commands in the mangosd console or in-game chat to set the values? Will you have to enter the values manually into each database entry? Will you include on-line help, so you can type something like .config to list all the settings which can then have more detailed help for each setting listed by typing /help rate.creature.aggro? Or will it be a plain text document that explains everything?

If your proposal does have big advantages over using conf files, please do explain further and offer an example or two to give a better idea of how it would work.

Link to comment
Share on other sites

A new command table called "config" could be adeed easily yes, and as for examle .config list would list all configs you are able to change. And as another example .config progressbars 0 would disable startup progressbars..

Another advantage is that when devs add new commands they can write a simple sql query to add the new command to the database instead of rewriting the config file, which makes it easier for the "git pull" people to keep their config up 2 date

- LilleCarl

Link to comment
Share on other sites

Vladimir, I'm thinking about moving everything except the critical config options to the database, And you would be able to set the config with in game commands. I think it would be good, because the ease of updating the config if there are new config entries added to the core, i would like to add a few customization's to the core, like Duels resetting hp on the end, and another one for resetting cd's aswell, sure this can be done with the current system, but i pretty much do not like the need of changing text files. I hope you understand my point there =)

Link to comment
Share on other sites

That's an interesting idea, however I think moving the configs to the DB won't resolve any conflicts such as if the config options/names change (I suppose an sql script could rename options as needed) but if an option is split into 2 separate options it won't be any benefit if it's in the DB, not saying the conf file isn't susceptible to this either though.

Currently the way I maintain my configs is with a simple script that uses sed to replace specific options to the value I want regardless of what they are/were. The benefit to using a script like this is say if a new option is added i don't have to manually add that option to my existing conf, i just copy the base conf from the repo and run my script, occasionally i do have to add new sed rules to my script to account for new options

The nice thing about the conf files is that, if i'm not mistaken, there are a few options that can't be reloaded while the server is running and with a DB based config you'd have to start the server change the configs and then completely restart it again

Link to comment
Share on other sites

DELETE FROM config WERE command = 'account create';

INSERT INTO config etc.... completely doable

And no the configs would be able to do everything and more then the current file actually would be able to, you do not have to restart the server twice for that. You can query the database aswell as you can "query" a file. The difference will only be the ease of doing everything

EDIT: The thing i meant is that you will not have to manually copypaste the "new config entries" into your current config file, it can just be added via a sql query

Link to comment
Share on other sites

Regardless of what the "community" decides, you are free to modify MaNGOS in any way you like. That's the beauty of open source, it allows you to make changes. Even if few like your idea, it should not stop you from at least implementing it for your own use. It may be that others will also like it, once they have a chance to see it in action.

History has shown that most new ideas were met with scorn and ridicule, at first. Do not allow others to discourage you from pursuing your passion. Imagine how this world would be without the electric light, airplane, telephone, and many other works if their creators had allowed the doubters to influence them.

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use