While building a 1.0 release of Povray Planets - i have found myself attempting to either detect and hook APIs like Deep Horizons, or Famous Planets 2 .. in some cases there just does not seem to be a nice way to trump another OXP - in the case System Demux.homePlanet
For me - this can be the worst kind of action-at-a-distance, so there is logging sprinkled everywhere to indicate what is happening.
Is this done elsewhere ? Examples or suggestions from the OXPlite would be most helpful.
While building a 1.0 release of Povray Planets - i have found myself attempting to either detect and hook APIs like Deep Horizons, or Famous Planets 2 .. in some cases there just does not seem to be a nice way to trump another OXP - in the case System Demux.homePlanet
Is this done elsewhere ? Examples or suggestions from the OXPlite would be most helpful.
To disable System Demux entirely for a system (specifically, Lezaer in G3), I use:
if (worldScripts["System Redux"]) {
if (worldScripts["System Redux"].startUp) {
// make sure this has started first
worldScripts["System Redux"].startUp();
}
worldScripts["System Redux"].changeSystems([[],[],[5],[],[],[],[],[]]);
}
And DH_Systems has a full API created to allow other OXP's to control it's behavior. And as I have mentioned previously, I have an updated script for DH_Systems (intended as v2) that was designed to allow most/all of the planet texturing OXPs to work together. I ran into some issues that I found unacceptable (bloating of the save-game file due to the way system.info() works), but if you want the code, I'll happily share it.
I'd think Monkeypatches are evil and should be treated as last resort option. Often enough there are other ways. When seeing that more and more OXPs are using it - conflicting behaviours are likely to happen. And it causes more and more additional work for other OXPs which is bad for performance. The same goes for 'global' behaviour changes - this will cause extra work for OXPs and/or adds incompatibilities. For my own OXPs I'm trying to avoid behaviour changes on a global level. If I have to change something I'm trying to do it locally and/or only for a period of time.
But as we have no etiquette (neither for Monkeypatches nor for global behaviour changes) it boils down to your ability/preference. Still - it's best to avoid Monkeypatches. And Cmd. Cheyds API looks like a good thing to sort the planet/moon business without the need of drastical actions.