Custom Game Modes

From Shapez 2 Wiki
Jump to navigation Jump to search

Overview

The game allows to import custom scenarios and custom scenario presets as json files. This uses file manipulation inside the game folder, you can access it by for example clicking the 'Show Folder' button in the 'Play' menu and going in the parent folder of the folder that just opened.

You can open json files like regular text files or you can use an editor that supports editing them.

To make custom content, you can take and edit what's already in-game. To do that, open the console in-game by pressing F1, then type debug.export-game-data. In the previously mentioned game folder, a new folder should have been created called basedata- followed by a number. In that folder, you can find the json files for the content already in-game.

Custom Scenarios

Custom scenario files must be put in the custom-scenarios folder in the game folder. The in-game scenario files are in the scenarios folder of the exported data folder.

Main Object Format

  • FormatVersion number: The format version of the file, currently 2. Note : due to the game checking the format version in the raw json string, this value needs to be specified exactly as "FormatVersion": 2,, i.e. with a space after the :
  • GameVersion number: The game version number this scenario was made for. Currently doesn't have any impact.
  • UniqueId string: The ID used by the game to indentify the scenario, so it has to be unique, it also means the scenario file name doesn't matter.
  • IsTutorial bool (default: false): Indicates if the scenario is a tutorial scenario.
  • SupportedGameModes array: An array of strings indicating the game modes supported by this scenario, currently only "RegularGameMode" is used.
  • NextScenarios array: An array of strings of scenario IDs that can be selected after completing the current scenario. Empty array to indicate none.
  • ExampleShapes array: An array of strings of shape codes indicating shapes that will be displayed as example shapes in the scenario selection screens.
  • Title string: The scenario's title.
  • Description string: The scenario's description.
  • PreviewImageId string: The ID of the image that will show in the background in the scenario selection screens.
  • ResearchConfig object: An object containing configuration data for the scenario with the following keys:
    • BaseChunkLimitMultiplier number (Percentage): Multiplies the platform limit rewards.
    • BaseBlueprintRewardMultiplier number (Percentage): Multiplies the blueprint points rewards.
    • MaxShapeLayers number: Determines the maximum number of layers shapes can have.
    • InitialResearchPoints number (default: 0): Controls the number of research points given when starting a save with the scenario. Will be added to any research points rewards given by initially unlocked milestones and tasks.
    • ShapesConfigurationId string: Determines which types of shapes the scenario uses, DefaultShapesQuadConfiguration for quad shapes and DefaultShapesHexagonalConfiguration for hex shapes.
    • ColorSchemeConfigurationId string: TBD, currently DefaultColorSchemeRGBFlex.
    • ResearchLevelsAreProgressive bool: true: Classic display of milestone shapes. false: Display milestone shapes on one line and without arrows in between.
    • BlueprintCurrencyShapes array: An array indicating the shapes that will give blueprint points, each element is an object with the following keys:
      • Shape string: The shape code of the shape.
      • RequiredUpgradeIds array: An array of upgrade IDs required to unlock that shape.
      • RequiredMechanicIds array: An array of mechanic IDs required to unlock that shape.
      • Amount number: The amount of blueprint points given when delivering that shape.
    • IntroductionWikiEntryId string: The ID of the knowledge panel entry that should be displayed when starting a save with this scenario.
    • InitiallyUnlockedUpgrades array: An array of strings of upgrade IDs that should be unlocked when starting a save with this scenario.
    • TutorialConfig string: What tutorial to use, currently TCMainTutorial for the tutorial and TCNoTutorial for no tutorial.
  • Progression object: What is included in the research screens, it has the following keys:
    • Levels object: It has the following keys:
      • Levels array: An array of milestones, each element is an object with the following keys:
        • Definition object: Information about the milestone, it has the following keys:
          • Id string: The milestone's ID.
          • VideoId string: The ID of the video that will show when unlocking the milestone.
          • PreviewImageId string: The ID of the image that will show in the milestones screen.
          • Title string: The milestone's title.
          • Description string: The milestone's description.
          • WikiEntryId string/null (default: null): The knowledge panel entry that will be opened when clicking the 'more information' button in the unlock screen.
        • Lines object: It has the following keys:
          • Lines array: An array of the shape lines required to unlock the milestone, each element is an object with the following keys:
            • ReusedAtNextMilestone bool (default: false): Is true if the final shape is reused in the next milestone.
            • ReusedAtNextMilestoneOffset number (default: 0): No effect currently.
            • ReusedAtSameMilestone bool (default: false): Is true if the final shape is resued in another line of the milestone.
            • ReusedAtSameMilestoneOffset number (default: 0): Indicates in which line it is reused, -1 for above and 1 for below.
            • ReusedForPlayerLevel bool (default: false): Is true if the final shape is reused in the operator level screen.
            • StartingOffset number (default: 0): Indicates by how many shapes the line should be pushed to the right when rendered in the milestones screen.
            • Shapes array: An array of shapes contained in the line, each element is an object with the following keys:
              • Shape string: The shape code.
              • Amount number: The amount required.
        • Rewards object: It has the following keys:
    • SideQuestGroups object: It has the following keys:
      • SideQuestGroups array: An array of tasks, each element is an object with the following keys:
        • Title string: The task line's title.
        • RequiredUpgradeIds array: An array of strings of required upgrade IDs to unlock that task line.
        • RequiredMechanicIds array: An array of strings of required mechanic IDs to unlock that task line.
        • SideQuests array: An array of tasks in the line, each element is an object with the following keys:
          • Id string: The task's ID.
          • IsFollowupForLevel bool (default: false): No effect currently.
          • Rewards array: An array of rewards objects.
          • Costs array: An array of costs for the task, each element is an object with the following keys:
            • Shape string: The shape code.
            • Amount number: The amount required.
    • SideUpgrades object: It has the following keys:
      • UpgradeCategories array: An array of strings of category IDs indicating which categories the upgrades will be grouped into.
      • SideUpgrades array: An array of unlockable upgrades, each element is an object with the following keys:
        • Id string: The upgrade's ID.
        • PreviewImageId string: The ID of the image that will show in the upgrades screen.
        • VideoId string/null (default: null): TBD.
        • Title string: The upgrade's title.
        • Description string: The upgrade's description.
        • Hidden bool (default: false): Is true if the upgrade is hidden in the upgrades screen and requires cheats to unlock.
        • Category string: The category ID in which this upgrade should be displayed.
        • RequiredUpgradeIds array: An array of strings of required upgrade IDs to unlock that upgrade.
        • RequiredMechanicIds array: An array of strings of required mechanic IDs to unlock that upgrade.
        • Rewards array: An array of rewards objects.
        • Costs array: An array of costs objects.
    • LinearUpgrades object: It has the following keys:
      • ConverterHubOutputCountUpgradeId string/null (default: null): TBD.
      • HubInputSizeUpgradeId string: The ID of the upgrade to increase the number of vortex inputs.
      • ShapeQuantityUpgradeId string: The ID of the upgrade to multiply delivered shapes.
      • SpeedsToLinearUpgradeMappings object: A mapping for which upgrade ID controls which upgradeable value, it has the following keys:
        • BeltSpeed string
        • CutterSpeed string
        • StackerSpeed string
        • PainterSpeed string
        • TrainSpeed string
        • TrainCapacity string
      • LinearUpgrades array: An array of upagrades with levels, like speed upgrades, each element is an object with the following keys:
        • Id string: The upgrade's ID.
        • Title string: The upgrade's title.
        • DisplayType number: Indicates how the value of each level should be displayed : 1: A speed, 2: A percentage, 3: The number as is, 4: The number divided by 100.
        • Levels array: An array of levels for the upgrade, each element is an object with the following keys:
          • Value number: The value of the level, displayed according to DisplayType.
          • Cost object/null (default: null): A costs object, null for the first level.
        • RequiredUpgradeIds array: An array of strings of required upgrade IDs to unlock that upgrade.
        • RequiredMechanicIds array: An array of strings of required mechanic IDs to unlock that upgrade.
        • Category string: The category ID in which this upgrade should be displayed.
  • StartingLocation object: Configuration for the starting area, it has the following keys:
    • InitialViewport object: Configuration about the camera's starting position, it has the following keys:
      • PositionX number (default: 0): The X position.
      • PositionY number (default: 0): The Y position.
      • Zoom number (default: 0): The zoom.
      • RotationDegrees number (default: 0): The rotation.
      • Angle number (default: 0): The angle.
      • BuildingLayer number (default: 0): The building floor.
      • IslandLayer number (default: 0): The platform floor.
      • ShowAllBuildingLayers bool: Wether or not to have all building floors visible.
      • ShowAllIslandLayers bool: Wether or not to have all platform floors visible.
    • InitialIslands object: It has the following keys:
      • InitialIslands array: An array of initially placed platforms, each element is an object with the following keys:
        • Position_GC object: Position of the platform with the following keys:
          • x number (default: 0): The X position.
          • y number (default: 0): The Y position.
          • z number (default: 0): The Z position.
        • Rotation number (default 0): The platform's rotation.
        • LayoutId string: The type of platform.
    • FixedPatches object: It has the following keys:
      • FixedPatches array: An array of shape patches whose exact position is predetermined, each element is an object with the following keys:
        • Shape string: The shape code of the shape.
        • Position_LC object: Position of the patch's origin with the following keys:
          • x number (default: 0): The X position.
          • y number (default: 0): The Y position.
          • z number (default: 0): The Z position.
        • LocalTiles array: An array of each individual tile of the patch, each element is an object with the following keys:
          • x number (default: 0): The X offset from the origin.
          • y number (default: 0): The Y offset.
          • z number (default: 0): The Z offset.
    • StartingChunks object: It has the following keys:
      • StartingChunks array: An array of shape and fluid patches which must generate in each sector, but the position inside that sector is random, each element is an object with the following keys:
        • SuperChunk object/null (default: null): Position of the super chunk concerned with the following keys (can be null if both coordinates are 0):
          • x number (default: 0): The X position.
          • y number (default: 0): The Y position.
        • GuaranteedShapePatches array: An array of strings of shape codes.
        • GuaranteedColorPatches array: An array of strings of color codes.
  • PlayerLevelConfig object: An object containing configuration data for the operator level screen with the following keys:
    • IconicLevelShapes object: It has the following keys:
      • LevelShapes array: An array of strings of shape codes indicating the operator level shape badges.
    • IconicLevelShapeInterval number: Indicates the number of levels each shape badge should last, for example 1 would change the badge every level, and 5 would change every 5 levels.
    • GoalLines array: An array of operator goal lines, each element is an object with the following keys:
      • Id string: The ID of the goal line.
      • Randomized bool (default: false): Is true if the goal line should be randomized.
      • RandomizedUseCrystals bool (default: false): Is true if the goal line is randomized and should use crystals.
      • Shape string/null (default: null): The shape code if it's not randomized.
      • StartingAmount number: How much shapes should be required at the first level.
      • ExponentialGrowthPercentPerLevel number: How much each level will increase the number of shapes required.
      • RequiredUpgradeIds array: An array of strings of required upgrade IDs to unlock that goal line.
      • RequiredMechanicIds array: An array of strings of required mechanic IDs to unlock that goal line.
    • Rewards array: An array of rewards for advancing one operator level, each element is an object with the following keys:
      • MinimumLevel number (default: 0): Indicates starting at which operator level these rewards should be given. The rewards of other objects in the array are ignored if they have a lower MinimumLevel.
      • Rewards array: An array of rewards objects.
  • Mechanics object: It has the following keys:
    • Mechanics array: An array of mechanics unlocked throughout the progression (layers, blueprints, platforms, fluids, trains, etc), each element is an object with the following keys:
      • Id string: The mechanic's ID.
      • Title string: The mechanic's title.
      • Description string: The mechanic's description.
      • IconId string: The ID of the mechanic's icon.
    • BuildingLayerMechanicIds array: An array of strings of mechanic IDs for the building floor mechanics.
    • IslandLayerMechanicIds array: An array of strings of mechanic IDs for the platform floor mechanics.
    • IslandLayersUnlockOrder array: An array of numbers representing the order in which each platform floor index should unlock.
    • BlueprintsMechanicId string: The mechanic ID for unlocking blueprints.
    • RailsMechanicId string: The mechanic ID for unlocking trains.
    • IslandManagementMechanicId string: The mechanic ID for unlocking platform building.
    • PlayerLevelMechanicId string: The mechanic ID for unlocking the operator level screen.
    • TrainHubDeliveryMechanicId string: The mechanic ID for unlocking throwing trains into the vortex.
  • ConvertersConfig object: It has the following keys:
    • Configs object: TBD.
  • ResearchStationConfig object: It has the following keys:
    • Recipes object: TBD.
  • RailColorsConfig object: It has the following keys:
    • RailColors array: An array of configuration for the rail colors, each element is an object with the following keys:
      • Id object: It has the following keys:
        • RailColorId string: The ID of the rail color to configure the displayed color.
      • Tint string: The color in hexadecimal format.
  • ToolbarConfig object: Configuration for the toolbar. Due to a current game issue, this has to be set to "#include_raw:Scenarios/Shared/Toolbar/ToolbarConfig" for some custom scenarios to load in-game. Otherwise, the object has the following keys:
    • ToolbarDataJson string: A string of JSON encoded toolbar data.

Rewards Object Format

  • $type string: The type of reward, can be BuildingReward, IslandGroupReward, MechanicReward, WikiEntryReward, BlueprintCurrencyReward, ChunkLimitReward, or ResearchPointsReward.
  • BuildingDefinitionGroupId string/null (default: null): The building variant ID if it's a building reward.
  • GroupId string/null (default: null): The platform group ID if it's a platform group reward.
  • MechanicId string/null (default: null): The mechanic ID if it's a mechanic reward.
  • EntryId string/null (default: null): The entry ID if it's a knowledge panel entry reward.
  • Amount number/null (default: null): The amount if it's a blueprint points, platform limit, or research points reward.

Costs Object Format

  • $type string: The type of cost, can only be ResearchPointsCost.
  • Amount number: The amount of research points required.

Custom Scenario Presets

Custom scenario preset files must be put in the custom-scenario-parameter-presets folder in the game folder. The in-game scenario preset files are in the scenario-parameter-presets folder of the exported data folder.

Main Object Format

  • Version string: The format version as a string, currently "1".
  • UniqueId string: The ID used by the game to indentify the scenario preset, so it has to be unique, it also means the scenario preset file name doesn't matter.
  • Title string: The scenario preset's title.
  • Description string: The scenario preset's description.
  • Parameters object: The actual data of the scenario preset, it has the following keys:
    • MapGenerationParameters object: The configuration of the map generation settings, it has the following keys:
      • FluidsSpawnPrimaryColors bool: Wether or not to spawn fluid patches of the primary colors.
      • FluidsSpawnSecondaryColors bool: Wether or not to spawn fluid patches of the secondary colors.
      • FluidsSpawnTertiaryColors bool: Wether or not to spawn fluid patches of the tertiary colors.
      • FluidPatchLikelinessPercent number: The likeliness of fluid patches as a percentage.
      • FluidPatchBaseSize number: The base size of fluid patches.
      • FluidPatchSizeGrowPercentPerChunk number: How much fluid patches should grow per chunk as a percentage.
      • FluidPatchMaxSize number: The maximum size of fluid patches.
      • ShapePatchLikelinessPercent number: The likeliness of shape patches as a percentage.
      • ShapePatchBaseSize number: The base size of shape patches.
      • ShapePatchSizeGrowPercentPerChunk number: How much shape patches should grow per chunk as a percentage.
      • ShapePatchMaxSize number: The maximum size of shape patches.
      • ShapePatchShapeColorfulnessPercent number: The colorfulness of shape patches as a percentage.
      • ShapePatchRareShapeLikelinessPercent number: The likeliness of rare shapes in shape patches as a percentage.
      • ShapePatchVeryRareShapeLikelinessPercent number: The likeliness of very rare shapes in shape patches as a percentage.
      • ShapePatchGenerationLikeliness array: An array of generation settings for each type of shape patch, each element is an object with the following keys:
        • GenerationType string: The type of generation this object affects.
        • MinimumDistanceToOrigin number: The minimum distance from the center of the map for this type of shape patch to generate.
        • LikelinessPerMille number: The likeliness of this type of shape patch.
    • GameRuleParameters object: The configuration of the game rules, it has the following keys:
      • RuleIds array: An array of strings of game rule IDs that should be enabled.
    • ScenarioId string: The ID of the scenario this scenario preset should use.

Custom Difficulty Presets

The game currently doesn't support loading custom difficulty presets as json files, however you can still find the in-game ones in the difficulty-presets folder of the exported data folder.

Main Object Format

  • Version string: The format version as a string, currently "1".
  • UniqueId string: The ID used by the game to indentify the difficulty preset.
  • Title string: The difficulty preset's title.
  • Parameters object: The actual data of the difficulty preset, it has the following keys:
    • ResearchShapeCostMultiplier number: The Goal Multiplier as a percentage.
    • ChunkLimitMultiplier number: The Platform Limit multiplier as a percentage.
    • BlueprintCostMultiplier number: The Copy/Paste Cost multiplier as a percentage.