All missions are driven by a specific JSON file. This file contains general information about the mission and array of steps that can be completed by the player. Let's look at this json structure:
{
"Id": "Mission 5B",
"MissionName": "Drink And be Merry",
"ObjectiveText": "Stop the Horsemen Virus",
"FilesToRestore": [
{
"filePath": "/Documents/Supply Chain Control/bl4ck327abe266plg552d63c4c523c4s.tar6h",
"fileSystemName": "FS_Network_5_Workstation_04",
"prefabGuid": "941fd42c-f212-488c-bc22-91aaad9760d9",
"creatorUser": "",
"fileAttributes": [ 3, 128, 9 ]
}
],
"CustomNetworkName": "",
"StatisticsTimerEasy": 0,
"StatisticsTimerMedium": 0,
"StatisticsTimerHard": 0,
"SpecialAvatarIndex": -1,
"NotesCharacter": 0,
"MapColor": {
"_colorLightSingle": {
"r": 0.8156862854957581,
"g": 0.5490196347236633,
"b": 0.33725491166114809,
"a": 1.0
},
"_colorLightSecondary": {
"r": 0.7176470756530762,
"g": 0.7411764860153198,
"b": 0.3176470696926117,
"a": 1.0
},
"_colorGround": {
"r": 0.18431372940540315,
"g": 0.3333333432674408,
"b": 0.14901961386203767,
"a": 1.0
}
},
"MusicSnapshotIndex": 0,
"ToolbarAppsStates": [
{
"Application": 0,
"Locked": true,
"IsEnabled": true
},
{
"Application": 1,
"Locked": true,
"IsEnabled": true
},
{
"Application": 2,
"Locked": true,
"IsEnabled": true
},
{
"Application": 3,
"Locked": false,
"IsEnabled": true
},
{
"Application": 5,
"Locked": true,
"IsEnabled": true
}
],
"StorySteps": [ ... ]
}
Id is a unique mission identifier. MissionName and ObjectiveText is visual information for players, mostly used in in-game popups.
FilesToRestore is a specific array, which is used for restoring files before mission start. It isn’t used for Mission Editor - missions, created by players. You can use it to restore file’s attributes and restore zion files in most cases. But this is only for pre-created files in the network. If you need to create a new file, use the terminal commands below. File attributes possible values:
Hidden = 2,
Immutable = 3,
System = 4,
Story = 5,
UserCreated = 6,
WebRoot = 7,
MainWebPage = 8,
VIRUS_Horseman = 9,
ZippedArchive = 10,
Directory = 16,
Database_DataFile = 17,
LogFile = 18,
Normal = 128,
Image = 2048,
WordlistShort = 262_144,
WordlistMedium = 524_288,
WordlistLong = 1_048_576,
WordlistExtraLong = 2_097_152,
WordlistImpossiblyLong = 4_194_304,
WordlistNumbers = 8_388_608,
WordlistSymbols = 16_777_216
CustomNetworkName is the file name of the network, which was created by Forge tool. Essential parameter for every new mission.
ToolbarAppsStates - the state of the toolbar (windowed) application. It's possible to set such apps: Manual, Explorer, Notes, SkillTree, and WebBrowser. If an app is Locked, it won't be visible on the toolbar at all. If the app isn't locked, but not enabled, it will be visible but won't be clickable and will have a gray tint icon. To set it enabled during the mission gameplay, use the "appbtnunlock" command.
The list of steps is the most important part of this json. It is the list of steps, which has definitive order of execution. It means the story has only one start and finish like the correct Block Diagram. The level will be marked as completed when the last step is executed. After the program reaches this point, it shows the “Mission Complete” caption and saves it as passed.
"StorySteps": [
{
"Id": "N_5_B_Intro_1",
"GoalName": "",
"OrderProcessingType": 1,
"CommandsWhenStart": [
"nitroapp Rascal \\"We%27re%20now%20in%20OGI%E2%80%99s%20main%20network%2C%20and%20we%20only%20have%20a%20few%20minutes%20before%20the%20entire%20supply%20chain%20comes%20to%20a%20halt.%20We%20need%20to%20find%20The%20Famine%20Horsemen%20Virus.\\" _ 1 true",
"autoconnect N_5_Workstation_01",
"smdelay 1",
"nitrocaption 1"
],
"CommandsWaitingFor": [
{
"Name": "nitrocaption",
"DeviceName": "",
"ArgsWaitingFor": [ "1" ]
}
]
},
{
"Id": "N_5_B_Intro_2",
"GoalName": "",
"OrderProcessingType": 1,
"CommandsWhenStart": [
"nitrocaption 0",
"nitroapp Rascal \\"You%20should%20find%20the%20IP%20address%20of%20the%20%3Ci%3EOperations%20server%3C%2Fi%3E%20while%20looking%20for%20various%20ports%20and%20hosts%20on%20this%20network.\\" _ 1 true",
"smdelay 1",
"nitrocaption 1"
],
"CommandsWaitingFor": [
{
"Name": "nitrocaption",
"DeviceName": "",
"ArgsWaitingFor": [ "1" ]
}
]
},
{
"Id": "N_5_B_ReadHorsemen_2",
"GoalName": "Find the AZS Security Username",
"OrderProcessingType": 2,
"CommandsWhenStart": [
"nitrocaption 0",
"nitroapp Rascal \\"Neutralizing%20the%20previous%20virus%20made%20the%20file%20readable.%20Try%20to%20open%20the%20virus%20file%20for%20any%20valuable%20info.\\" _ 1 true"
],
"CommandsWaitingFor": [
{
"Name": "cat",
"DeviceName": "N_5_Workstation_04",
"ArgsWaitingFor": [ "/Documents/Supply Chain Control/bl4ck327abe266plg552d63c4c523c4s.tar6h" ]
}
]
},
{
"Id": "N_5_B_ReadHorsemen_1",
"GoalName": "",
"OrderProcessingType": 1,
"CommandsWhenStart": [
"nitrocaption 0",
"nitroapp Rascal \\"Good%20job%21%20Let%20me%20send%20this%20update%20to%20Gungnir%20and%20get%20more%20instructions.%20\\" _ 1 true",
"!updntp \\"%3Cb%3EAZS%20Security%20Username%3A%3C%2Fb%3E%20kunwu\\""
],
"CommandsWaitingFor": [ ]
}
]
Structure of single step:
Id - unique identifier of step, which is used mostly for identifying goals. GoalName - name of goal if reaching this step is considered as goal completion. Leave this empty if the current step is not a goal. OrderProcessingType - how this step will be checked in the steps array. There are three possible options:
0 (CheckAndContinueToNext, Required Step in the Mission Editor) - this step will be checked anyway, both first iteration and next iterations. If checking of commands fails, the program will move to the next step.
1 (ContinueToNextButNotCheck, Nitro Step in the Mission Editor) - this step is checked only for the first iteration (current step). If it fails, the flow will move to next steps anyway. But the next steps with this type (Nitro Step) won't be compared anymore, it will be skipped. So this step aims to be used for Nitro Messages because a user can skip long messages sequence by performing some required action.
2 (BreakIfCheckWasFalied, Required Goal in the Mission Editor) - if a program reaches this step and fails, it stops iterations. This is for necessary steps, mostly goals which can’t be skipped.
3 (BlockOfGoals, Multi Step in the Mission Editor) - container of goals. These goals can be ordinary, hidden, or optional. It behaves the same as the Required Goal (2) step type. Game flow checks user input from left to right (from the Mission Editor perspective). Order can be changed in the Mission Editor too. However, the order of completion isn't important at all, it sometimes can be used for a sequence of nitro messages, like in the 2B mission.