Addon creating

From Frontier Pilot Simulator Wiki
Jump to: navigation, search

To add a new task to the game, you need to create a new addon, enter the necessary game data and load the addon on Steam. Creating an Addon To create a new add-on, we will use the Steamwork Mods Tools utility (more). 1. Make sure that the Steam client is running. 2. Run the Steamwork Mods Tools utility and click "Create Addon".

caption

3. Enter the name of the add-on "ExampleAddon".

caption

4. Fill in the description (the "Description" field), temporarily restrict access to the add-on (the "Visibility" field) and save the information by clicking the "Save" button.

caption

On this the framework of the future add-on is ready.


Creating game data

All game data is stored in JSON format, you can use any text editor for editing.

As an example, we can add a simple task: player located in BridgePoint and we want him to fly and land in Astlan-1 Spaceport. To do this, we need to find out the internal names of these bases, create a new task, and create the necessary message texts.

Preparation From the Bases list, we find out that the base "Bridgepoint" has the internal name "bases_colony_spaceport", and "Spaceport Astlan-1" - "bases_spaceport". Create an assignment Job descriptions are located at the World \ Quests folder. To add a new task, we need to create these folders in the add-on data and add a file with an arbitrary name containing our task.

1. Press the "Open" button in the Steamwork Mods Tools utility it will open the location of the add-on game data.

2. Create a "World" folder there then the "Quests" folder in it, and ExampleQuest.json file in "Quests" Folder

caption

3. Add the following content to the created file (more details in Task Descriptions): [

   {
       "Name": "ExampleAddonQuest1",
       "States": [
           {
               "QuestState": "Open",
               "ConditionDescrs": [
                   {
                       "ConditionType": "PlayerInCity",
                       "ObjectName": "bases_colony_spaceport"
                   }
               ],
               "ActionDescrs": [
                   {
                       "ActionType": "Message",
                       "Text": "ExampleAddonQuestOpenMessage"
                   }
               ]
           },
           {
               "QuestState": "Complete",
               "ConditionDescrs": [
                   {
                       "ConditionType": "PlayerInCity",
                       "ObjectName": "bases_spaceport"
                   },
                   {
                       "ConditionType": "PlayerAtLandingZone"
                   }
               ],
               "ActionDescrs": [
                   {
                       "ActionType": "Message",
                       "Text": "ExampleAddonQuestCompleteMessage"
                   }
               ]
           }
       ]
   }

]

Creating texts

The text data files are located in folders with the corresponding names of the supported languages, which are sub-folders of Localization (for more information on creating texts). To add new texts we need to create these folders and a file with an arbitrary name containing new texts.


As an example, we will add text messages only in English. 1. Create the "Localization" folder in the add-on, the "English" folder in it, and ExampleLocalization.json file in the "English" folder

caption

2. Add the following contents to the created file: {

   "ExampleAddonQuestOpenMessage": "You have to visit spaceport as soon as possible!",
   "ExampleAddonQuestCompleteMessage": "Well done, commander"

}

Checking the addon

Now we can run the game and test the add-on.

Publication of the addon After the addon is verified, you can publish it. Open the Steamwork Mods Tools. Choose your addon in the list. Make it available for other players (the "Visibility" field). Click the "Update On Steam" button.

Example of multiple tasks in one quest:

{

       "Name": "bases_spaceport_landing", // Перелететь реку
       "States": [
           {
               "QuestState": "Open",
               "ConditionAliases": [],
               "ConditionDescrs": [
                   {
                       "ConditionType": "PlayerInCity",
                       "ObjectName": "bases_colony_spaceport",
                   },
                   {
                       "ConditionType": "QuestState",
                       "ObjectName": "bases_spaceport_prolog",
                       "QuestState": "Complete",
                   }
               ],
               "ActionDescrs": [
                   {
                       "ActionType": "Message",
                       "Text": "quest_astlan_main_1_open"
                   }
               ],
               "Marks": [
                   {
                       "TargetDescr": "Target_spaceport_landingzone",
                       "TargetMark": "MarkFlyToIcon_QuestMain",
                       "IconText": "Astlan_Fly_Here",
                   }
               ],
           },
           {
               "QuestState": "Complete",
               "ConditionAliases": [],
               "ConditionDescrs": [
                   {
                       "ConditionType": "PlayerDistanceToTarget",
                       "ObjectName": "Target_spaceport_landingzone",
                       "Count": 40,
                       "Invert": true,
                   },
                   {
                       "ConditionType": "PlayerAtLandingZone",
                   }
               ],
               "ActionDescrs": [
                   {
                       "ActionType": "Message",
                       "Text": "quest_astlan_main_1_complete"
                   },
               ],
               "Marks": []
           }
       ]
   },


{

       "Name": "bases_spaceport_buy_sell_phase1", // покупка груза на космотпорте
       "States": [
           {
               "QuestState": "Open",
               "ConditionAliases": [],
               "ConditionDescrs": [
                   {
                       "ConditionType": "QuestState",
                       "ObjectName": "bases_spaceport_landing",
                       "QuestState": "Complete",
                   },
               ],
               "ActionDescrs": [
                   {
                       "ActionType": "Message",
                       "Text": "quest_astlan_main_buy_2.1_open"
                   },
               ],
               "Marks": [
                   {
                       "TargetDescr": "Target_spaceport_landingzone",
                       "TargetMark": "CargoBuyIcon_QuestMain",
                       "IconText": "Astlan_Buy_Product_Here",
                   }
               ],
           },
           {
               "QuestState": "Complete",
               "ConditionAliases": [],
               "ConditionDescrs": [
                   {
                       "ConditionType": "PlayerHasProduct",
                       "ObjectName": "product_components_food",
                       "Count": 1
                   },
               ],
               "ActionDescrs": [
                   {
                       "ActionType": "Message",
                       "Text": "quest_astlan_main_buy_2.1_complete"
                   },
               ],
               "Marks": []
           },
       ]
   },