Fork me on GitHub
  February 22, 2018, 01:06:52 pm
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Config Format Discussion  (Read 1190 times)
deoxxa
Administrator
Newbie
*****
Posts: 28


View Profile
« on: December 08, 2010, 11:18:57 am »

From IRC earlier:

Quote
<deoxxa> i think we need to rework the config file format
 <deoxxa> right now it's a bit ad-hoc
 <Psoden> mm..
 <deoxxa> i think the way the lighttpd config file works would be good for mineserver
 <deoxxa> http://redmine.lighttpd.net/attachments/659/lighttpd.conf
 <deoxxa> it's not very complex either
 <fogWork> For noobs it might be, but who cares, right? Wink
 <deoxxa> heh
 <deoxxa> even for noobs it's not that bad
 <deoxxa> i like the way you can add items to arrays in the lighttpd config though
 <deoxxa> core.plugins = ("plugin_a", "plugin_b");
 <deoxxa> core.plugins += ("plugin_c");
 <deoxxa> that way you could just have a separate config file for each plugin
 <deoxxa> then do `include "plugin_a.cfg";`
 <deoxxa> in which there'd be `core.plugins += ("plugin_a");` and other stuff
 <fogWork> I like it
 <deoxxa> of course that would require all the plugins to be in the same place
 <deoxxa> or the plugin name could be relative to the config file it's defined in
 <deoxxa> so you'd have something like `include "plugins/admin/plugin.cfg";`
 <deoxxa> then in plugins/admin/plugin.cfg it would have `core.load_plugin "bin/admin.dll";` (or .so)
 <deoxxa> depends on how we want to structure it
 <deoxxa> because there's a possibility that a plugin "package" could consist of more than one actual plugin
 <deoxxa> if we make people structure things a certain way, it would enforce some form of order
 <deoxxa> but it could also restrict them
 <fogWork> Plugins loading plugins \o/
 <lukegb> fogWork: plugins loading plugins loading plugins that load the first plugin
 <fogWork> That freaked me out a bit ;/
 <deoxxa> for things like map generation, each stage could be a separate dll
 <deoxxa> and if you're only using one part of the map generation stuff, such as heightmap generation, you might not need the rest of them
 <deoxxa> so you don't really want them all loaded
 <deoxxa> (a bit of a lame example, but bite me)

I went a bit into the plugin system specifics there, but I'd like to mainly discuss the config file format. Thoughts?
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!