redeclipse / base

Base environment for Red Eclipse and associated source files.
https://redeclipse.net/
436 stars 89 forks source link

Customizable campaign system #1425

Open MirceaKitsune opened 1 year ago

MirceaKitsune commented 1 year ago

Issue for the campaign system discussed on Discord. I suggested implementing a ladder mechanism similar to the Unreal Tournament championship, especially after the new menu removed the old race challenge for the Port levels which would be easy to reimplement under this system. Campaigns are NOT to be confused with a single player mode where the player fights monsters to advance, something like Doom would be a separate suggestion for another time... this is pretty much a simple list to execute existing maps and game modes played against bots in a predefined sequence, designed so players can create and share a list of challenges which can even be organized as a little story.

Functionality: Each campaign is defined in its own text file or config (whichever implementations is best). A series of levels are specified in order, support for branching / reconnecting paths would be appreciated but ultimately optional. You start by playing the first level in order to unlock the next one, a campaign is won once the last level on the list has been beaten. Once a match is finished the campaign screen appears with the next level now unlocked and selected, instead of the map voting screen that normally shows up after a standard match. Level definitions must contain an unique title and description which will show up in their entry, ideally alongside a preview thumbnail of the map for that level so it's easy to know where you'll be playing next... for example: Title Qualification Round 3, Team Deathmatch on Echo description You have advanced to the third round, this time you will face 4 enemies on a lab known as Echo, score 30 frags in under 5 minutes and you may advance into the official fights organized by Alpha Corporation.

Each level must be able to temporarily define and override custom settings for that match. Ideally any server and client setting can be supported, this way the campaign creator decides on any customization by adding any setting and its value to the list. Most essential ones that should be readily available in the campaign editor are:

1367 is a separate but related issue worth noting, not restricted to campaigns but needed to do them right. Bots are currently based on random values thus you can't create custom teams of fixed characters to fight against: Once that's implemented campaigns will also be able to support predefined bot teams and maybe let you choose your teammates. In the meantime the current bot randoms could also be customized by campaign levels as a workaround.

An optional feature I imagined with a campaign system is making some vanity items unlockable: They will be grayed out and impossible to select for new players, but one you've beaten certain levels or won the campaign they become available to wear. Obviously some players may not like this and want everything unlocked from the start, an "unlock all" button for those who don't want to play campaigns to access every wearable should thus come with it... oppositely campaigns should have a reset button so you can restart from scratch after beating them. In any case it would be nice to have some sort of cup or achievement showing on the main menu when a campaign is beaten to remind you of your success.

Lastly, if this isn't too much to hope for, it would be awesome if a campaign editor menu existed. It would be a new menu within the main menu that lets you create a new campaign config then add / remove / edit the entries of levels... when editing a level you'd have fields to write its title / description / game mode / map / variant / time and score, followed by other mutators and settings you want to override during that level (eg: bot_skill_min and bot_skill_max to define the difficulty). If this is too much it's not a problem having to write campaigns using a text editor.

MirceaKitsune commented 1 year ago

Figured I might also list how I envisioned the implementation steps for the base system, not including secondary details that can be slowly added later: Hoping I can help a bit more by breaking it down and laying out the system a step-based approach, at least the way I understand it would work.

  1. First is a new menu. Its functionality is merely reading a series of vars set by each campaign cfg and using the data to generate a list of levels as title / description / map-thumbnail per entry. Essential are just the list itself and two buttons to cycle the selected campaign which refresh the level list from the active entry.
  2. Once a menu exists, copying the functionality of the Offline Match menu into it: The start button launches a new match with bots using the map defined by the selected level, first applying its other settings (variable overrides).
  3. The first customization that needs to be done to the match itself is having it show the campaign menu after a match ends, instead of the voting one and starting a new vote session like it normally does.
  4. If the match was won and the last level currently unlocked, increase the index variable of that campaign by 1: The menu will use it to gray out later levels so they can't be played or read until the current level was beaten.