For away missions, the game needs to know where "home" is, hence the 'base' property (for want of a better property name). Home might not necessarily be the previous mission! Eg. One away mission might lead to another away mission immediately afterwards. The current scripting system deals with this in different ways, I think it's the expand / miss_keep / between settings I mentioned earlier in this topic (but not sure and certainly have no idea how those work). I was thinking it would be better to simply let a mission state where it's "home" is if it's an away mission. Also, presence of 'base' property could be used to prevent the user from building a HQ - because they already have a HQ back at 'base' and they're not meant to be setting up another one.
As for 'optional', I really would like to see that added. I desperately want a campaign that has optional side missions, secret levels, etc., things that would add replayability to the cam. The first time through a cam will usually be just focussed on winning, but once won people will often go back to a) do better and b) find stuff they missed the first time.
JS will be used to select which mission happens next, that was always my plan. But I wanted <campaign>.ini to list all the missions so it was clear by looking at that one file what all the missions are and where to go to find out more about them. The <mission>.ini files (one per mission, same format as <mapname>.ini) state which scripts are loaded, which map is used, etc. Everything else happens in the scripts once the game starts (think of it as custom rules.js, AIs etc).
In the example I gave for <campaign>.ini, my intention was that at the end of mission 1 you choose your destiny - you could go straight to mission 3, or you could do mission 2 (optional) before mission 3. The decision would be triggered by player actions and handled in the JS in mission 1. For example, go to LZ 2 for mission 2, or LZ 3 for mission 3.
The reason I want campaign/mission requirements in the <campaign>.ini is mainly for UI purposes... My ultimate desire would be that we could take, for example, a satellite photo of USA and for each campaign set what sector it appears in (and have some way of representing sectors on the USA map). Then for each mission, specify a more exact location. The player would then be able to see their progress on the map, as new missions become available they could see them appearing as blobs, with green blobs indicating completed missions, yellow blobs showing optional (but not yet completed) missions and red blobs showing mandatory missions that are available next. Blue blobs would show which missions are currently "in progress" (eg. you saved game to come back later). As more missions get unlocked, more blobs would appear on the map.
At some point in future, when WZ allows control over GUI from scripts, I'm going to implement that. I just want some of the architecture ready for when that happens.
As for sorting campaigns, their 'requires' property could be used. So cam2 would require cam1, and thus appear after cam1. Cam 3 would require cam1 and cam 2, and thus appear after those cams, etc. I'd also like to have png image for each campaign, so instead of showing boring menu we could at some point in future have graphical menu - bit like the pics
here.
I know a lot of that stuff is a long way off, but if we're developing architecture we should at least do some future planning (even if just thought exercises) to reduce the chances of those future things breaking lots of stuff. It can help to guide implementation of the stuff we do now, so as not to rule out the stuff we want in future.
Anyway, semantics aside, what do you think of the overall concept of drastically reducing the number of files needed for a campaign? Things like the <campaign>.ini, <mission>.ini, audio.ini and sequences.ini? By my rough estimation that would allow removal of over 100 files just from the current campaigns. (all the messages, beacons, etc., would be done inside scripts, all the subtitles would be defined centrally in audio.ini or sequences.ini, and so on.)
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO