Generic Chapters and Levels

KB
Version 24
Updated over 1 year ago
1 chunks
View in Confluence

Content

 

Introduction

In this guide you’ll learn how to:

  • Set up Level Layouts

  • Set up Layout Banks

  • Create Chapter Sets and enable them in Game Settings

Table of Contents

 


Setting up Level Layouts

Some parts of this process are done via API. Please read the instructions below before getting started:

Prerequisites

This process is done via API. In order to do that, please make sure you have access to or Level Editor. If you don’t have access, please request it to IT.

To use the API, you’ll need a user token generated from Game Server. Read the instructions below to generate one.

 Generating a User Token

  1. In Game Server, navigate to Profile

  2. Click [Generate User Token]. A new alphanumeric user token will be generated. Copy and store it in a safe location.

  3. Use this new user_token in your API Calls

Once you have your user_token, it’s time to create your Level Layouts. These Level Layouts will then be used in Game Server UI to create Layout Banks and Chapter Sets.

Below you’ll find all the API calls you need to go ahead and create your Level Layouts:

 Creating a Level Layout - POST {{host}}/api/internal/discovery/level_layouts

Example request URI: https://game-server-staging.tripledotapi.com/api/internal/discovery/level_layouts

Query parameters:

| Parameter | Type | Description |

| --- | --- | --- |

| user token | string | You user token generated in Game Server > Profile |

| app_id | string | Your app ID For Discovery, use 12 |

| bank_id | string | ID of the level |

| name | string | Name of the level |

| content_hash | string | Generated in the client |

| valid_for_use | string | True/False |

| type | string | Your type of level. Use “classic" or "match_four" or "goals" |

| data | string | Your level layout. Example: "data": { "boardtemplate": "9x93x3", "mindifficulty": 0, "maxdifficulty": 0, "stepsize": 0, "stepfrequency": 0 }, |

| token | string | |

Example call:

{
    "user_token": "{{user_token}}", //https://game-server-staging.tripledotapi.com/admin/admin_users
    "app_id": 12,
    "bank_id": 299,
    "name": "new level layout2",
    "content_hash": "42425tsg34tkngwlg2kjgk2j3gf2",
    "valid_for_use": false,
    "type": "classic", //or "match_four" or "goals"
    "data": {
      "board_template": "9x9_3x3",
      "min_difficulty": 0,
      "max_difficulty": 0,
      "step_size": 0,
      "step_frequency": 0
   },
   "token" : null
}

Responses:

200 OK application/json - Returns a full JSON

 Updating a Level Layout - PATCH {{host}}/api/internal/discovery/level_layouts

Example request URI: https://game-server-staging.tripledotapi.com/api/internal/discovery/level_layouts/5987

Query parameters:

| Parameter | Type | Description |

| --- | --- | --- |

| user token | string | You user token generated in Game Server > Profile |

| app_id | string | Your app ID For Discovery, use 12 |

| bank_id | string | ID of the level |

| name | string | Name of the level |

| content_hash | string | Generated in the client |

| valid_for_use | string | True/False |

| type | string | Your type of level. Use “classic" or "match_four" or "goals" |

| data | string | Your level layout. Example: "data": { "boardtemplate": "9x93x3", "mindifficulty": 0, "maxdifficulty": 0, "stepsize": 0, "stepfrequency": 0 }, |

Example call:

{
    "user_token": "{{user_token}}",
    "app_id": 12,
    "bank_id": 299,
    "name": "updated level layout",
    "content_hash": "42425tsg34tkngwlg2kjgk2j3gf2",
    "valid_for_use": false,
    "type": "classic", //or "match_four"
    "data": {
      "board_template": "9x9_3x3",
      "min_difficulty": 0,
      "max_difficulty": 20,
      "step_size": 1,
      "step_frequency": 0
   }
}

Responses:

200 OK application/json

 More API Calls

Get all banks: GET {{host}}/api/internal/discovery/banks?per=23&page=1&user_token={{user_token}}&app_id={{app_id}}

Get all level layouts: GET {{host}}/api/internal/discovery/level_layouts?per=23&page=1&bank_id={{bank_id}}&user_token={{user_token}}&app_id=12

Show level layouts: GET {{host}}/api/internal/discovery/level_layouts{{layout_id}}?user_token={{user_token}}&app_id=12

Delete a level layout : DEL {{host}}/api/internal/discovery/level_layouts/13

Creating Layout Banks

Once you’ve set up your Level Layouts, you can create Layout Banks with them.

  1. Navigate to Levels & Chapters > Layout Banks and click [+New].

  2. Add a name for your Bank, add a description, labels if needed, and click [Save].

  3. Once your Bank has been created, you can add your Layouts via API.

Once your Level Layouts have been uploaded, you’ll be able to visualise the details via Game Server, as well as editing the difficulty and other details.

Any changes made to Layout Banks need to be saved by clicking [Save] on the upper right corner.

Creating a Chapter Set

Chapters Sets are the container where you’ll find all your Layout Banks.

  1. Navigate to Levels & Chapters > Chapter Sets. A table is shown with all the existing Sets, their availability and where they’re being used. Click [+New] to create a new Set.

  2. Name your Chapter Set, and start configuring Chapter Structure:

[Mass Operations] allows you to batch update Chapters. Keep in mind that only the changed fields will be applied and overridden.

Chapter Sets & Layout Banks Validations

Editing Layouts is not allowed when they are being used in Chapter Sets. To make any modifications, create a new entity (or duplicate) and then choose it in the Chapter Set.

Note that you must have editor privileges on the layout bank page to make any edits. Also, you cannot alter a layout bank that has already been used.

Make sure that that each level is given a unique name, and that the level is marked as "valid for use" with a value of "true." Failure to do so will result in the level not being displayed in the list of available layouts for Chapter Sets.

Enabling your Chapter Sets in Game Settings

Once you’ve configured your Chapter Sets, it’s time to enable them in Game Settings so that they can be sent to players. 

To do so, navigate to Game Settings, and click the green plus button to enable Chapter Sets. Once done, select your Chapter Set from the dropdown.

Chapter Sets are A/B testable entities, which allows you to create experiments with them. Read more about A/B Experiments here.

 

Chunks 1

1
  **Introduction** In this guide you’ll learn how to: - Set up Level Layouts - Set up La...
Vectorized

 

**Introduction**

In this guide you’ll learn how to:

- Set up Level Layouts

- Set up Layout Banks

- Create Chapter Sets and enable them in Game Settings

**Table of Contents**

 

* * *

## Setting up Level Layouts

Some parts of this process are done via API. Please read the instructions below before getting started:

### Prerequisites

This process is done via API. In order to do that, please make sure you have access to [](https://tripledotstudios.postman.co/workspace/Tripledot-Studios~27e83636-a522-451e-8a35-a9e93f6ebe81/request/11806556-08c0fd26-7d35-4058-b39c-1e60ecde67a0) or Level Editor. If you don’t have access, please request it to IT.

To use the API, you’ll need a user token generated from Game Server. Read the instructions below to generate one.

 Generating a User Token

1. In Game Server, navigate to **Profile**

2. Click **[Generate User Token].** A new alphanumeric user token will be generated. Copy and **store it in a safe location.**

3. Use this new `user_token` in your API Calls

Once you have your `user_token`, it’s time to create your Level Layouts. These Level Layouts will then be used in Game Server UI to create Layout Banks and Chapter Sets.

Below you’ll find all the API calls you need to go ahead and create your Level Layouts:

 Creating a Level Layout - POST {{host}}/api/internal/discovery/level\_layouts

**Example request URI:** `https://game-server-staging.tripledotapi.com/api/internal/discovery/level_layouts`

**Query parameters:**

| **Parameter** | **Type** | **Description** |

| --- | --- | --- |

| `user token` | _string_ | You user token generated in _Game Server \> Profile_ |

| `app_id` | _string_ | Your app ID For Discovery, use `12` |

| `bank_id` | _string_ | ID of the level |

| `name` | _string_ | Name of the level |

| `content_hash` | _string_ | Generated in the client |

| `valid_for_use` | _string_ | True/False |

| `type` | _string_ | Your type of level. Use “classic" or "match\_four" or "goals" |

| `data` | _string_ | Your level layout. Example: "data": { "board_template": "9x9_3x3", "min_difficulty": 0, "max_difficulty": 0, "step_size": 0, "step_frequency": 0 }, |

| `token` | string | |

Example call:

{
"user_token": "{{user_token}}", //https://game-server-staging.tripledotapi.com/admin/admin_users
"app_id": 12,
"bank_id": 299,
"name": "new level layout2",
"content_hash": "42425tsg34tkngwlg2kjgk2j3gf2",
"valid_for_use": false,
"type": "classic", //or "match_four" or "goals"
"data": {
"board_template": "9x9_3x3",
"min_difficulty": 0,
"max_difficulty": 0,
"step_size": 0,
"step_frequency": 0
},
"token" : null
}

**Responses:**

200 OK _application/json -_ Returns a full JSON

 Updating a Level Layout - PATCH {{host}}/api/internal/discovery/level\_layouts

**Example request URI:** ` https://game-server-staging.tripledotapi.com/api/internal/discovery/level_layouts/5987`

**Query parameters:**

| **Parameter** | **Type** | **Description** |

| --- | --- | --- |

| `user token` | _string_ | You user token generated in _Game Server \> Profile_ |

| `app_id` | _string_ | Your app ID For Discovery, use `12` |

| `bank_id` | _string_ | ID of the level |

| `name` | _string_ | Name of the level |

| `content_hash` | _string_ | Generated in the client |

| `valid_for_use` | _string_ | True/False |

| `type` | _string_ | Your type of level. Use “classic" or "match\_four" or "goals" |

| `data` | _string_ | Your level layout. Example: "data": { "board_template": "9x9_3x3", "min_difficulty": 0, "max_difficulty": 0, "step_size": 0, "step_frequency": 0 }, |

**Example call:**

{
"user_token": "{{user_token}}",
"app_id": 12,
"bank_id": 299,
"name": "updated level layout",
"content_hash": "42425tsg34tkngwlg2kjgk2j3gf2",
"valid_for_use": false,
"type": "classic", //or "match_four"
"data": {
"board_template": "9x9_3x3",
"min_difficulty": 0,
"max_difficulty": 20,
"step_size": 1,
"step_frequency": 0
}
}

**Responses:**

200 OK _application/json_

 More API Calls

**Get all banks:** `GET {{host}}/api/internal/discovery/banks?per=23&page=1&user_token={{user_token}}&app_id={{app_id}}`

**Get all level layouts:** `GET {{host}}/api/internal/discovery/level_layouts?per=23&page=1&bank_id={{bank_id}}&user_token={{user_token}}&app_id=12`

**Show level layouts:** `GET {{host}}/api/internal/discovery/level_layouts{{layout_id}}?user_token={{user_token}}&app_id=12`

**Delete a level layout** : `DEL {{host}}/api/internal/discovery/level_layouts/13`

## Creating Layout Banks

Once you’ve set up your Level Layouts, you can create Layout Banks with them.

1. Navigate to **Levels & Chapters \> Layout Banks** and click **[+New].**

2. Add a name for your Bank, add a description, labels if needed, and click **[Save].**

3. Once your Bank has been created, you can add your Layouts via API.

Once your Level Layouts have been uploaded, you’ll be able to visualise the details via Game Server, as well as editing the difficulty and other details.

![](https://tripledotstudios.atlassian.net/wiki/download/thumbnails/2852126735/image-20231005-105630.png?version=1&modificationDate=1696503393607&cacheVersion=1&api=v2&width=747&height=468)

Any changes made to Layout Banks need to be saved by clicking **[Save]** on the upper right corner.

## Creating a Chapter Set

Chapters Sets are the container where you’ll find all your Layout Banks.

1. Navigate to **Levels & Chapters \> Chapter Sets**. A table is shown with all the existing Sets, their availability and where they’re being used. Click **[+New]** to create a new Set.

2. Name your Chapter Set, and start configuring Chapter Structure:

**[Mass Operations]** allows you to batch update Chapters. **Keep in mind that only the changed fields will be applied and overridden.**

**Chapter Sets & Layout Banks Validations**

Editing Layouts is **not allowed** when they are being used in Chapter Sets. To make any modifications, create a new entity (or duplicate) and then choose it in the Chapter Set.

Note that you must have editor privileges on the layout bank page to make any edits. Also, you cannot alter a layout bank that has already been used.

Make sure that that each level is given a unique name, and that the level is marked as "valid for use" with a value of "true." Failure to do so will result in the level not being displayed in the list of available layouts for Chapter Sets.

## Enabling your Chapter Sets in Game Settings

Once you’ve configured your Chapter Sets, it’s time to enable them in Game Settings so that they can be sent to players. 

To do so, navigate to Game Settings, and click the green plus button to enable Chapter Sets. Once done, select your Chapter Set from the dropdown.

![](https://tripledotstudios.atlassian.net/wiki/download/thumbnails/2852126735/image-20230214-142311.png?version=1&modificationDate=1676384594954&cacheVersion=1&api=v2&width=789&height=367)

Chapter Sets are A/B testable entities, which allows you to create experiments with them. Read more about A/B Experiments [here](/wiki/spaces/KB/pages/2581889051/Setting+up+A+B+Experiments).

 

Vector dimensions: 1536

Details

Confluence ID
2852126735
Space Key
Version
24
Created
November 06, 2025 at 11:34 AM
Last Updated
November 06, 2025 at 11:34 AM
Last Modified (Confluence)
June 14, 2024 at 07:46 AM
Content Size
7.26 KB