So how could I install an OXP automatically? How would OoliteCommunicator find the Addons folder at runtime to inject the OXP just before Oolite gets started? Or can I do such stunts via the debug console?
There is currently no JS interface to disable or enable an OXP, unless the OXP gives you one itself. I've done this in a couple of mine - having a $disabled flag or some such to quickly turn things on or off. So, if you're looking for a way to harmonise two player's game worlds, the facilities aren't currently available to do this programmatically. You might be stuck with some manual intervention, I'm afraid.
However, you can check to see if an OXP is installed using worldScripts or worldScriptNames.
This would at least allow at runtime to check if preconditions are met. My intention was to make it dead easy for users to run my addon.
However, you can check to see if an OXP is installed using worldScripts or worldScriptNames.
I might be wrong, but as much as I remember, there are multiple OXP's without a worldScript.
So a_c’s advice is probably better then - use Oolite.resourcePaths.
Yes, I am aware of resource paths. However that at most tells me the directory to search in, and I'd still have to check what version that OXP is.
I was hoping for more but that does not exist.
However, you can check to see if an OXP is installed using worldScripts or worldScriptNames.
I might be wrong, but as much as I remember, there are multiple OXP's without a worldScript.
You are dead right there. On the other hand it is not an issue as I would not be checking for any OXP but for the one I wrote - and that one has a world script. So if it is missing I would know and have to act by injecting it into one of the AddOns folders. If it exists I would know where it is and could check the version, upgrading it if necessary. All this 'I would' obviously carried out by the OoliteCommunicator - or the new name Nexus.