GSoC Project: A New Adventure - Update #1
The first milestone in the campaign creation phase is over, so it's time for an update.
The first step in creating a campaign was allowing certain variables to be passed between missions so that the story could modify based on the action taken/decisions made on previous missions. It is now possible to save and request these variables from within a Lua script by calling SaveCampaignVar and GetCampaignVar. The first function takes two arguments, the variable's name and its value, and creates/modifies an entry in the selected team's ini file, in the section corresponding to the campaign. GetCampaignVar takes a single argument, the name of the variable and returns a string value, so it is up to the creator of the script to convert it to whatever type necessary. It is also required that the progress is modified if it is the case.
In order for a new campaign to be added to the game, a directory with the name of the campaign needs to be added in Data/Missions/Campaign. In this directory there has to be a campaign.ini file and scripts for each mission. campaign.ini has to contain the following lines:
ResetRetry=1 or 0 // whether the progress should be reset in case the player decides to retry a previous level
In addition to these, there needs to be a section for each mission, containing its name and the name of the script (Name and Script).
Name=Ultimate Hedge Mission
The next step was creating a frame for the story of the campaign. The story in its current state can be found at the links below. Suggestions are welcome!