> For the complete documentation index, see [llms.txt](https://stoneforgeteam.gitbook.io/stoneforgeteam-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://stoneforgeteam.gitbook.io/stoneforgeteam-docs/getting-started/game-branches.md).

# Native and VM branches

Stoneshard on Steam comes in two builds, and StoneForge runs on both (since 0.7.0):

| Branch                 | Build        |                                                                                 |
| ---------------------- | ------------ | ------------------------------------------------------------------------------- |
| **The default branch** | Native (YYC) | The game everyone gets. Its GML is compiled into `StoneShard.exe`.              |
| **The VM modbranch**   | VM           | A beta branch for modding. Its GML is in `data.win`, run by GameMaker's runner. |

To switch, right-click Stoneshard in Steam > **Properties** > **Betas**, and pick the modbranch (or none, for the default branch). Install StoneForge again after switching: each build has its own game files.

## What works where

C# mods work on both. On the native build there's no GML to add to, so StoneForge does in C# what it did in GML; a few things still need the VM modbranch.

|                                                                                           | Native branch                                                                       | VM modbranch                                                                    |
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| C# mods: items, buffs, skills, UI, events, hooks...                                       | Yes                                                                                 | Yes                                                                             |
| [A mod's own GML](/stoneforgeteam-docs/gml-and-c-code/gml-bindings.md) (its `GML` folder) | **No**: the mod isn't loaded, and its page in the Mods window says why              | Yes                                                                             |
| [Script hooks](/stoneforgeteam-docs/gml-and-c-code/hooks.md#script-hooks)                 | Any script, nothing to declare                                                      | The scripts the mod declares with `[assembly: HookScript]`, from the next start |
| [MSL mods](/stoneforgeteam-docs/getting-started/msl-mods.md) (`.sml` packages)            | **No**: they show in the Mods window with an error, and aren't applied              | Yes                                                                             |
| [A mod's game objects](/stoneforgeteam-docs/content/game-objects.md)                      | Run their parents' events: an event no ancestor has never runs (the log says which) | Have every event of their own                                                   |

{% hint style="warning" %}
**GML and MSL mods only work on the VM modbranch.** A mod with a `GML` folder isn't loaded on the native branch, and `.sml` packages aren't applied there. If your mod needs GML, say so on its page, and tell players to switch to the modbranch.
{% endhint %}

## Writing mods for both

* Declare the scripts you hook with `[assembly: HookScript]` anyway. The native build doesn't need it, and the VM build does.
* Give a [game object](/stoneforgeteam-docs/content/game-objects.md) a parent that has the events you override, or they won't run on the native build.
* Keep to C#: a mod with GML runs only on the VM modbranch.

`Game.IsNative` says which build the game is.

## Building StoneForge

StoneForge's typed game API is generated from the game's GML, which only the VM build's data has. Build StoneForge once with the game on the VM modbranch: the data it reads is kept in `%LOCALAPPDATA%\StoneForge\GameData`, and builds against the native branch use it. See [Building and testing](/stoneforgeteam-docs/development/building-and-testing.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://stoneforgeteam.gitbook.io/stoneforgeteam-docs/getting-started/game-branches.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
