> 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/readme.md).

# Home

![StoneForge: a mod loader for Stoneshard](https://766910865-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWUXclGZZ10Asv8K4Bkib%2Fuploads%2Fgit-blob-2ae07badcebed281d2418153af6bdd41b5cc15ff%2Fbanner-wide.png?alt=media)

StoneForge is a C# mod loader for Stoneshard on Windows. Mods are source folders with a `mod.json` manifest, C# code and optional assets and GML bindings. StoneForge compiles and checks them when the game starts, and provides context APIs for items, consumables, buffs, skills, UI and game hooks.

## Where to start

* **Playing with mods:** [Installation](/stoneforgeteam-docs/getting-started/installation.md). StoneForge runs on the game's default (native) branch and the VM modbranch; mods with GML need the modbranch: see [Native and VM branches](/stoneforgeteam-docs/getting-started/game-branches.md). [MSL mods](/stoneforgeteam-docs/getting-started/msl-mods.md) (`.sml`) work too, on the modbranch. Your saves are [backed up](/stoneforgeteam-docs/getting-started/save-backups.md). If the game crashes, see [crash windows and reports](/stoneforgeteam-docs/development/crash-reports.md); to report a bug, use the Esc menu's [Report a bug](/stoneforgeteam-docs/getting-started/bug-reports.md).
* **Your first mod:** [Writing a mod](/stoneforgeteam-docs/getting-started/writing-a-mod.md), then [the mod context](/stoneforgeteam-docs/core-concepts/mod-context.md), [the keyboard and mouse](/stoneforgeteam-docs/core-concepts/input.md) and [game events](/stoneforgeteam-docs/core-concepts/events.md). Mods can [use other mods](/stoneforgeteam-docs/core-concepts/other-mods.md) and be [translated](/stoneforgeteam-docs/core-concepts/localization.md). The [profiler](/stoneforgeteam-docs/core-concepts/profiler.md) (Ctrl+Shift+P) shows what each mod costs a frame. The [Example Mod](https://github.com/StoneForgeTeam/ExampleMod) shows most of the API in one mod.
* **How it reaches into the game:** [How GML maps to C# code](/stoneforgeteam-docs/gml-and-c-code/overview.md): values, instances, calling the game's scripts and built-ins, and hooking its scripts and events.
* **Adding content:** [items](/stoneforgeteam-docs/content/items.md), [buffs](/stoneforgeteam-docs/content/buffs.md), [skills](/stoneforgeteam-docs/content/skills.md), [damage](/stoneforgeteam-docs/content/combat.md), [effects](/stoneforgeteam-docs/content/fx.md) and [game objects](/stoneforgeteam-docs/content/game-objects.md).
* **UI:** [screens and elements](/stoneforgeteam-docs/ui/screens-and-elements.md), [windows](/stoneforgeteam-docs/ui/windows.md), [drawing](/stoneforgeteam-docs/ui/drawing.md), [dialogs](/stoneforgeteam-docs/ui/dialogs.md), [the main menu](/stoneforgeteam-docs/ui/main-menu.md), [the Esc menu](/stoneforgeteam-docs/ui/esc-menu.md), [right-click menus](/stoneforgeteam-docs/ui/context-menus.md), [NPC dialogues](/stoneforgeteam-docs/ui/npc-dialogues.md).
* **The world:** [the player](/stoneforgeteam-docs/world/player.md), [units and turns](/stoneforgeteam-docs/world/units.md), [time and the world map](/stoneforgeteam-docs/world/time-and-map.md), [rooms and saves](/stoneforgeteam-docs/world/rooms-and-saves.md), [locations and ground items](/stoneforgeteam-docs/world/locations-and-items.md), [inventory and containers](/stoneforgeteam-docs/world/inventory-and-containers.md), [loot tables](/stoneforgeteam-docs/world/loot-tables.md), [custom quests and contracts](/stoneforgeteam-docs/world/quests-and-contracts.md), [character looks](/stoneforgeteam-docs/world/character-look.md).
* **Working on StoneForge itself:** [Building and testing](/stoneforgeteam-docs/development/building-and-testing.md), the [developer host](/stoneforgeteam-docs/development/developer-host.md), [crash reports](/stoneforgeteam-docs/development/crash-reports.md) and the [repository layout](/stoneforgeteam-docs/development/repositories.md).

## Repositories

| Repository                                                         | Contents                                                                     |
| ------------------------------------------------------------------ | ---------------------------------------------------------------------------- |
| [StoneForge](https://github.com/StoneForgeTeam/StoneForge)         | The loader, API, native bridge, patcher, generators, tests and build tooling |
| [ExampleMod](https://github.com/StoneForgeTeam/ExampleMod)         | The sample mod                                                               |
| [StoneForgeDocs](https://github.com/StoneForgeTeam/StoneForgeDocs) | This documentation                                                           |


---

# 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/readme.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.
