Page 1 of 1
more support for modular ruleset loading
Posted: Tue Nov 11, 2014 7:47 pm
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.
Re: more support for modular ruleset loading
Posted: Tue Nov 11, 2014 8:21 pm
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.
Re: more support for modular ruleset loading
Posted: Tue Nov 11, 2014 9:53 pm
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.