Free and Open Source real time strategy game with a new take on micro-management

Campaign Creation

From Globulation2

Jump to: navigation, search

As of version 0.8.21 globulation2 has one built-in campaign. The campaign system is designed with only one campaign in mind however adding more is possible with modifications. In order to allow more campaigns to be added the following modifications will need to be made. Within "Settings.cpp" the INT variable campaignPlace (which determines the highest level reached by the player so far) will need to be turned into an array to allow the system to keep track of each campaign seperately by each element of the array. This in turn will require the sections for loading and saving the preferences.txt file to be modified as well. Second within "ChooseMapScreen.cpp" most of this entire file will need to be rewritten to add more buttons for the new maps as well as another button to change campaigns. Also notice that the variable campaignPlayed (also designated within settings though isn't ever saved in preferences.txt) denotes to the system what map is being played. This will need to be modified so that when the level is complete the system will be able to update not only which level was completed but campaign the map was played on. If there are not going to be more then 10 maps per campaign and no more then 9 campaigns an easy way would be to simply keep it as an int and have the first digit represent the campaign and the second the map completed however this is just my recommendation. The last file to be edited will be "GameGui.cpp". Please note that when a campaign is successfully won it does not go to the regular end game screen but continues on which is why it must be updated with the game GUI itself. The function required is GameGUI::checkWonConditions(void) (starts at line 3532). There are two win conditions in here that need to both be updated.

Misc