more support for modular ruleset loading

What would you like to see in Freeciv? Do you have a good idea what should be improved or how?
Post Reply
User avatar
i1abnrk
Posts: 6
Joined: Tue Nov 11, 2014 6:17 pm
Location: Wisconsin, USA
Contact:

more support for modular ruleset loading

Post by i1abnrk »

While working on an AI module, I am trying to load definitions from a ruleset file. In order to facilitate this I have duplicated static functions from ruleset.c into my ruleset handler. It would be useful to myself and future modders to have easier access to these functions as a header def or macro, etc. as you have recently done with ruleset_error. Specifically, the following functions: check_ruleset_capabilities, valid_ruleset_filename, openload_ruleset_file. This ensures some degree of uniformity with giving a ruleset end user predictable behavior.
cazfi
Elite
Posts: 3093
Joined: Tue Jan 29, 2013 6:54 pm

Re: more support for modular ruleset loading

Post by cazfi »

I recommend you to open ticket about this to our tracker (patch, not bug, as this is sort of new feature): https://gna.org/patch/?func=additem&group=freeciv
That's where developers see it, and real discussion about it can take place (I, for one, would want to understand your use-case, why do you want to create a ruleset format specific to certain AI type <-> AI type specific to ruleset format) To make that work properly much more is needed than making ruleset loading functions accessible from custom AI.
User avatar
i1abnrk
Posts: 6
Joined: Tue Nov 11, 2014 6:17 pm
Location: Wisconsin, USA
Contact:

Re: more support for modular ruleset loading

Post by i1abnrk »

Before I open a ticket, I need to further investigate ai_traits which is new. My original work started on 2.4.2 before traits existed. My use-case may be unique and perhaps the duplicate functions are in fact the way to go. I expect a week or two.
Post Reply