Thargoid wrote:I must admit that for my OXPs I don't see much more I could do with numeric values than I can with the existing four binary flags.
Second that. For most oxps it will be enough options, but I can imagine cases were numeric values would be very useful. That's why I already thought about an additional handling for special oxps. This wouldn't change the current handling in and for already supported oxps.
Kaks wrote:And now I'll try to explain myself a bit more: I don't think there's anything wrong with the way OXPConfig does things, but it looks to me that PG was asking for something with a bit more flexibility, and if I ever get enough time I might just be able to do so.
Yupp. You're right. Flexible is another thing. I've had four reasons to choose 4 fixed boolean properties. a.) my limited skills b.) it's a lot easier to handle (for OXPConfig) with only 4 fixed properties c.) it needs only 4 Bits to store them, so 1 string (like oxpConfig_settings = "|235990628|50286";) represents all included oxps d.) the screens have only limited space to display things, so a option like I_REALLY_DONT_WANT_ALL_THESE_DAMNED_STARWARS_SHIPS takes too much space and will possibly cripple the screen.
But, hey. If you'd take this oxp to a new stage I'd be very happy (and I can learn some more things) :-)
Kaks wrote:Well, this morning I blithely assumed most configurable oxps would check their configurable stuff only inside a shipWillLaunchFromStation event, and that OXPConfig would have had the time to update the internal script variables.
That's why OXPConfig has another approach. In v1.72+v1.73 reset() is the first handler with access to stored settings in savedgames. For v1.74 things have changed (no reset() anymore, a new instance of the script is created), so a new handling has to be done. And the current version has some relics from older versions were I've stored the settings in another format. It's time to get rid of them.
Kaks wrote:A way to do so is to add a pseudo event inside the main script oxp, to handle the changed variables. It could look something like this: this.configOptionsChanged();
Hehe, it seems we're thinking about the same things. I've thought about a notification when a oxp is changed
Code: Select all
try { worldScripts[this.currentOxp[0]].oxpcNotifyOnChange(); }
catch(e) { if(typeof(e) != 'object') worldScripts[this.currentOxp[0]].oxpcNotifyOnChange(); }
while this.currentOxp[0] contains the changed scriptname.
Kaks wrote:I personally think that the opt-in idea behind OXPConfig is a pretty sensible one. There might not be too many OXPs compatible with it, but we've got more than this time last year!
Don't get me wrong. I'm not complaining about it. It was just a hint that the whole approach to give players some more options is possibly not necessary for most oxps. A ship-oxp (e.g. Executive Spaceways) won't need it, it only makes sense for oxps with more than one feature (e.g. Thargoids WelcomeMat or my Vector).
PhantorGorth wrote:This method you have come up with supports enumerated list of options. How could we support numeric values that can be within a fixed range? (I am sure OXP developers would want that.)
This would mean to add some more optional options (like stepping and range) and a lot more work on the GUI handling.
BTW: I'm not sure that adding a version handling is such a good idea. It will blow up the whole thing, but maybe you have already an idea to avoid it? OXPConfig (or whatever it will be called then) was meant to be a small tool with some basic options, easy to handle/understand for the end-user (not for the scripters). Adding too much stuff will need a lot more screens and it will be complicated to step through all levels then.
One way to avoid unnecessary screens would be to use the cursorcoords and declaring clickable fields, but unfortunately we don't have these options yet (the coords are only valid for the star charts). I think Ahruman has already thought about it (as always :-)) and maybe someday we'll get this option???
As I've said above - if we'll get a new quality for a configuration tool it would be a dream :-)