RegularEngine/Campaign Mode
The RegularEngine package allows for manipulation of levels based on persitent campaign information.
The mechanism is fairly simple. The GRI is responsible for know what maps belong to which team. The Gameinfo does it's normal routine all the way until the end of the game, and then interacts with the Gamerules to determine voting. After voting, the gamerules overrides the normal maplist via HandleRestartGame and sends the campaignto the appropriate map. If one team controls all the maps, the campaign restarts.
So, it flows like this:
- Gameinfo runs gametype as normal.
- At CheckEndGame, the gamerules intercede and setup voting based on the winner.
- The gamerules has the GRI update it's campaign information - which is saved via config vars.
- If a player is on the winning team, they open a Map Menu which allows them to vote. Otherwise, they see a Map overview in which they can't vote.
- If a a bot is on the winning team, they vote semi-randomly.
- The gamerules then handles the game restart and the campaign moves on.
Currently, this is pretty bare bones. There's no victory party at the end of a campaign, it just restarts. Riftwar had some random things like Artifacts a team could have, etc. But the setup would be about the same.