Thanks for starting this thread off, spara.
On the specific points raised, 1.79/1.80 will include some helpful features for cooperative OXPers.
ship.autoWeapons parameter is basically a "does the game have permission to modify this ship's capabilities by script" flag. It defaults to false if not set; well-behaved modification OXPs should only change ships where it's true, and the core Oolite code does likewise. Skilled NPCs will have a re-release to take advantage of that; I'd strongly encourage authors of similar OXPs to do the same once it's available.
- The new system populator lets an OXP override elements of standard population, but it also lets OXPs override what population function is used for a system - perhaps to one under their sole control. So if you need to make sure no other well-behaved OXPs are also modifying a system crucial to a mission, you will be able to do so relatively easily, eventually.
If there are other types of conflict which could be avoided with better tools, I'd like to implement those tools as well.
While it's true that it's very easy for OXPs to change things in a way that other OXPs are relying on, I think it goes further than that: mission OXPs to a greater or lesser extent need a stable baseline environment. Even without adding other OXPs, we don't provide that. For a few examples:
- NPC AI and capability varies between core versions of the game, sometimes more subtly than others
- the core Nova mission can take out any Chart 4 system
- the difference in power between a ship with a cloak and a ship without is huge, if the player feels so inclined.
- the equipment of the player varies in availability and power
- even small bugfixes can make a difference to the game environment
There are quite a few OXP missions which play somewhat differently in 1.77 than in 1.76, even without any other OXPs added. If you desperately want very particular NPC behaviour you can
now write it yourself with
, but you really have to be comfortable with vector maths and other low-level behaviour at a much more detailed level than normal.
The Nova mission is perhaps a good example. I think it's an excellent mission - by far my favourite of the ones in the core game. Very simply done, very short, perhaps one weakness in that it's a little contrived in how it makes the player interact with the situation, but (and speaking just about my personal reactions to it, here):
- The player just stumbles into it. We know from a meta-game perspective this isn't true, but they could easily have taken a different jump and only heard about it in the news a few days later, or seen fleets of refugee ships heading in-system on a nearby spacelane, or they could have been in a different chart at the time.
- As a result of that, there's no gamey "reward". 100g gemstones is a reward, but probably doesn't compensate for the value of the lost cargo. The player shouldn't care about that detail, of course.
- It was - at least for me - one of the few genuinely scary moments I've seen in a computer game. By the time you get that far, assuming you're not trying to set some record for traversing the Eight, you'll have an iron-ass, you'll probably have a Dangerous if not Deadly combat rating, and even an Anarchy spacelane after a 6.8 jump doesn't present a massive challenge. And then there's a flash of light, a sphere of plasma expanding towards you, your hull temperature rising at a rate you've never seen before, and the countdown of the galactic drive feeling very slow.
- Once you've survived the immediate aftermath, you never quite escape. I still jump on entering certain systems, where the relative positions of objects mean that the sun is right in front of you, burning brightly ... and the planet is a bit off to the side, and of course in shadow, so it takes you a while to see it's there and you haven't just jumped into another nova, too late.
- That of course is the worst of it: the Cooperative is huge, stable ... and inescapable. That one of its stars might suddenly flare up and demolish a system is unthinkable. But suddenly, it happens - and at very short notice: you might have successfully - and by sheer luck - completed the evacuation of the station, but there's no way more than a tiny fraction of the planet's billions of inhabitants were evacuated in the days - or perhaps only hours - there was to prepare. It's a tragedy in itself - but could it happen again? Are all of the Cooperative's remaining 2047 systems doomed to the same fate? It suddenly makes a volume of space that seemed so large you might not ever visit all of it feel uncomfortably claustrophobic.
Of course, from an OXP/compatibility point of view, it's a terrible mission. It can take out a random system in Chart 4 - might be a relatively unimportant one from a meta-game perspective, might be somewhere like Isma or Bien or Soenisti which drastically changes the topology if you can't jump through it, might be anywhere. It makes it impossible to reliably set a mission in that chart that relies on a particular system existing or being reachable. If it wasn't in the core game it would probably be one of the most complained about OXPs by other writers (there are anyway plenty of suggestions in the forum archives to specify which system it happens in).
So there's a fundamental problem: a "well-behaved" mission OXP would leave everything as they found it afterwards - but that limits the scope of the stories you can tell to those where nothing major was at stake in the first place, which is not, I think, a limitation suited to mission OXPs in general. Indeed, that second Xeptatl's Sword incompatibility, assuming it's the one I think it is, was the result of the player having earlier failed a different OXP mission with localised but real consequences.
So perhaps the question to ask is: can mission OXPs be made resilient to changes to other bits of the game? What tools could the core game provide to make that resilience easier to write?