Docs/Installation & Setup

Installation & Setup

Copy the Mistscale addon into your Godot project and configure the singleton.

Godot has no package manager for addons like this — you copy a folder in, enable it, and configure it with one call. Three steps.

1. Copy the addon in

The addon is distributed as a folder named addons/mistscale_sdk/, published as @mistscale/godot-sdk on npm (for versioned distribution) and available directly in the mistscale-sdk repository's godot/ directory on GitHub.

  1. 1

    Download the addon (from GitHub, or npm/unpkg if you prefer a versioned tarball).

  2. 2

    Copy the addons/mistscale_sdk folder into your own project's addons/ directory (create addons/ if this is your first addon).

  3. 3

    Reopen the project. Open Project Settings → Plugins and enable "MistScale SDK".

No in-editor package manager install
Unlike npm or Unity's Package Manager, Godot addons are always installed by copying files — the npm package exists purely for versioning and CDN distribution, not for an in-engine install step.

2. Configure the singleton

Enabling the plugin registers MistscaleSDK as a global autoload. Configure it once, early — a good place is an _ready() in your title screen or your own bootstrap autoload:

bootstrap.gd
func _ready() -> void:
    var error = MistscaleSDK.configure("ms_your_key_here")
    if error != null:
        push_error(error.message)

configure() returns null on success, or a MistscaleError if the key is missing or malformed — this check never makes a network call, so a bad key fails immediately and locally.

3. Get an API key

  1. 1

    Open your project in the Mistscale dashboard.

  2. 2

    Go to Project Settings → API Keys.

  3. 3

    Create a key. It's shown once — copy it immediately.

  4. 4

    Pass it to configure(), as shown above.

configure() parameters

api_key
Required. Your project API key, starting with ms_.
control_plane_url
REST API base URL. Defaults to the production Mistscale API; leave it unless support tells you otherwise.
npc_service_url
Realtime NPC endpoint your connections open against. Defaults to production; leave it unless support tells you otherwise.
player_id
Default player id used for every connection you open. Auto-generated if you don't set one.
request_timeout_seconds
Timeout for REST calls. Defaults to 15.0.
Requires Godot 4.3+
The addon uses HTTPRequest.timeout and HTTPRequest.RESULT_TIMEOUT, both added in Godot 4.3. Earlier 4.x versions are not supported.