Another way to force scenarios to be played in a specific order would be some kind of password/key system written in lua. Whenever you finish one scenario, you get the key for the next scenario. Parts of the key could be generated automatically and contain information about the last game, i.e. how many resources were left from the last game...
An example of how to implement such a system can be found here. It's written in Jass, the scripting language of Warcraft III, but it shouldn't be too difficult to port it to lua. The example probably isn't perfect yet and would need to be optimized for your specific project, but you'll get the idea.
However, it would need the following additional lua functionality to make such a system work:
- An event-type which is called when a player enters a chat message
- A function which returns the last entered chat string
It would be much better to implement a system where the user doesn't see any of that. I'm thinking that perhaps a campaign should be thought of as a complete game that is implemented using a scripting language, but I don't know enough to get that technical.
Anyway, just for fun I'm thinking of a story that would be interesting to implement as an RTS/RTT campaign (totally from my imagination):
Japan is in a civil war as multiple Feudal Lords are fighting to take control of the country and become emperor. There are also many Feudal Lords who are trying to stay out of it, or who want to remain independent and are trying to stop anyone from becoming emperor. You belong to such an alliance of independent Lords. The Lord against whom you are fighting is Lord Yuu, and he's beating you. That's when Lord Itachi (I'm just pulling names out of a hat), one of Lord Yuu's strongest subordinates, secretly sends you a message: Lord Yuu has kidnapped Lord Itachi's daughter and is using her as a hostage to force Lord Itachi to serve him. If you rescue Lord Itachi's daughter he will generously reward you and switch to your side, which will completely turn the tables on Lord Yuu, but if any harm comes to her, Lord Itachi will come after you with a vengeance. Just accepting the offer is risky as you would have to divert vital forces away from the battlefield, and the chances of success aren't good since she is heavily guarded. Will you take the risk? If you do and succeed you get a big break and can finally go on the offensive, but should the princess die, Lord Itachi, who has been holding back as much as he could, might now turn his full force personally against you, making the war even more desperate, or he might first turn on Lord Yuu and come after you once Lord Yuu is defeated. Even that possibility isn't very appealing, as your forces are severely weakened and you would have almost as much of a hard time against Lord Itachi as you did against Lord Yuu, not to mention that since Lord Itachi would be an independant Lord like yourself, and since he would be part of the alliance that defeated Lord Yuu, your allies might not even stand with you.
How about implementing that story as a campaign? Obviously the story I wrote focuses on one scenario within the campaign, but the scenario is only interesting because of the consequences it will have on the campaign, both from the choices you make and the success or failure of the mission. Whether you accept Lord Itachi's request or not, whether you rescue the princess, fail to rescue her (can't reach her or she gets recaptured), or get her killed, all these outcomes will still move the story forward, but each would move it forward along a different path.
This is a scenario and campaign I would like to play.