Planet
navi homeaboutscreenshotsdownloaddevelopmentforum

How to add a level to the Campaign Menu:

There are severel steps you have to follow, if you want to add a level to the campaign menu:

  • Create a two buttons for the level in CampaignMenu.layout as done for other levls
  • Add the level to CampaignMenu.lua
  • Add the level to the LevelManager?:
    • The LevelManager? only knows the level listed in config/orxonox.ini. Therefore you have to add your level to this file. Search for [LevelManager?] and enter campaignMissions_[i]="yourlevelname".
    • Next step is to include your level into the structure of the campaign.
      When you know where you want to include the level, you go to the LevelManager?, search for the function buildallLevelStatus() and include your level into the structure of the campaign.
      • How to include it:
        You have to make a new v={1,0,2,….} (This says, what happens with the jth-levels when your level is allready won: activated(1), not activated(0), or only visible(2). With this vector you include your level into the campaign mode) and then allLevelStatus_[i]→nextLevels=v; (as it is done for all the others).
        You also have to think at what point of the mission your level should be shown or not. To implement that, you have to add a 0/½ to all the other v's.(same principle as for your own v)
        At the end all v's (also the one used to initilize) should have the length of your campaignMission_ (=number of levels).
  • In the file StoryModeMap?.oxw create a new Planet for your level. You should place your MissonButton? over the Planet and your MissonText? somewhere arround the Planet.
Last modified 4 months ago Last modified on Dec 12, 2016, 3:01:41 PM