Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 96 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,116 @@
# Starlight Starter Kit: Basics
# Resonite Modding Wiki

[![Built with Starlight](https://astro.badg.es/v2/built-with-starlight/tiny.svg)](https://starlight.astro.build)
[![Resonite](https://img.shields.io/badge/Resonite-Modding-blue)](https://resonite.com)

```
pnpm create astro@latest -- --template starlight
```
The official documentation site for Resonite modding, providing comprehensive guides for creating mods using BepisLoader and the BepInEx framework.

## 📚 Documentation Overview

This wiki contains documentation for:

- **Getting Started** - Installation guides for mod loaders and using existing mods
- **Creating Mods** - Step-by-step tutorials for developing your own Resonite mods
- **Guides** - Advanced topics including:
- Configuration management
- Localization with BepisLocaleLoader
- Debugging and troubleshooting
- **BepInEx API Reference** - Auto-generated documentation for BepInEx classes and methods

## 🚀 Quick Start

### For Users

Visit the live documentation at [modding.resonite.net](https://modding.resonite.net/) to:

- Learn how to install mod loaders
- Browse and install community mods
- Troubleshoot common issues

### For Developers

Get started creating Resonite mods:

1. Follow the [Installation Guide](/getting-started/installation) to set up BepisLoader
2. Create your first project using the [BepInEx Template](https://github.com/ResoniteModding/BepInEx.Templates)
3. Learn from the [Writing Code](/creating-a-mod/writing-code) guide
4. Publish to [Thunderstore](https://thunderstore.io/c/resonite/)

> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
## 🛠️ Development

## 🚀 Project Structure
### Prerequisites

Inside of your Astro + Starlight project, you'll see the following folders and files:
- Node.js 18+
- pnpm package manager

### Local Development

```bash
# Install dependencies
pnpm install

# Start dev server at localhost:4321
pnpm dev

# Build for production
pnpm build

# Preview production build
pnpm preview
```

## 📁 Project Structure

```
.
├── public/
├── public/ # Static assets (favicons, etc.)
├── src/
│ ├── assets/
│ ├── assets/ # Images and other assets
│ ├── components/ # Custom Astro components
│ ├── content/
│ │ ── docs/
│ └── content.config.ts
── astro.config.mjs
├── package.json
└── tsconfig.json
│ │ ── docs/ # Documentation content (MDX files)
└── config.ts # Content collection config
│ └── styles/ # Global styles
├── astro.config.mjs # Astro configuration
└── package.json # Project dependencies
```

Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name.
## 📝 Contributing

We welcome contributions! Here's how you can help:

### Adding/Updating Documentation

1. Fork this repository
2. Create a new branch for your changes
3. Edit or add MDX files in `src/content/docs/`
4. Test your changes locally with `pnpm dev`
5. Submit a pull request

### Documentation Guidelines

- Use clear, concise language
- Include code examples where appropriate
- Test all code snippets
- Follow the existing file structure
- Add appropriate frontmatter metadata

Images can be added to `src/assets/` and embedded in Markdown with a relative link.
### Reporting Issues

Static assets, like favicons, can be placed in the `public/` directory.
Found an error or have a suggestion? Please [open an issue](https://github.com/your-repo/issues) with:

## 🧞 Commands
- Page URL or file path
- Description of the issue
- Suggested fix (if applicable)

All commands are run from the root of the project, from a terminal:
## 🔧 Technologies

| Command | Action |
| :--------------------- | :----------------------------------------------- |
| `pnpm install` | Installs dependencies |
| `pnpm dev` | Starts local dev server at `localhost:4321` |
| `pnpm build` | Build your production site to `./dist/` |
| `pnpm preview` | Preview your build locally, before deploying |
| `pnpm astro ...` | Run CLI commands like `astro add`, `astro check` |
| `pnpm astro -- --help` | Get help using the Astro CLI |
- [Astro](https://astro.build) - Static site generator
- [Starlight](https://starlight.astro.build) - Documentation theme
- [MDX](https://mdxjs.com) - Markdown with components
- [Svelte](https://svelte.dev) - Interactive components
- [TypeScript](https://www.typescriptlang.org) - Type safety

## 👀 Want to learn more?
## 📄 License

Check out [Starlight’s docs](https://starlight.astro.build/), read [the Astro documentation](https://docs.astro.build), or jump into the [Astro Discord server](https://astro.build/chat).
This documentation is licensed under [MIT License](LICENSE).
2 changes: 1 addition & 1 deletion src/content/docs/creating-a-mod/initial-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ You'll need BepInEx (via BepisLoader) installed to develop mods. Follow our [ins
:::note[Console Window]
If you've used BepInEx before, you may notice the console window doesn't appear — this is disabled by default in BepisLoader.

You can enable the console by opening `BepInEx/config/BepInEx.cfg` and in the `[Logging.Console]` section, setting `Enabled = true`
You can enable the console by opening `BepInEx/config/BepInEx.cfg` and in the `[Logging.Console]` section, setting `Enabled = true`, mod managers also let you easily access config options and edit them.
:::

## Installing a Decompiler
Expand Down
57 changes: 57 additions & 0 deletions src/content/docs/creating-a-mod/packaging-and-publishing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,63 @@ Before uploading your mod, you need to have built it into a `.dll`.

The [Resonite BepInEx Template](https://github.com/ResoniteModding/BepInEx.Templates) comes with Thunderstore packaging built-in, using [TCLI](https://github.com/thunderstore-io/thunderstore-cli).

### Understanding thunderstore.toml

TCLI uses a `thunderstore.toml` configuration file to define how your mod should be packaged. This file is created automatically when using the template and controls everything about your package.

Here's what each section does:

```toml title="thunderstore.toml"
[config]
schemaVersion = "0.0.1"

[package]
namespace = "AuthorName" # Your Thunderstore team name
name = "ProjectName" # Your mod's name (no spaces/special chars)
versionNumber = "1.0.0" # Version from your .csproj file
description = "Example mod description" # Max 250 characters
websiteUrl = "https://github.com/ResoniteModding/ProjectName" # Your GitHub/website URL
containsNsfwContent = false

# Dependencies your mod needs
[package.dependencies]
ResoniteModding-BepisLoader = "1.3.1"
ResoniteModding-BepisResoniteWrapper = "1.0.0"

[build]
icon = "./icon.png"
readme = "./README.md"
outdir = "./build"

# Copy compiled DLL to plugins folder
[[build.copy]]
source = "./ProjectName/bin/Release/ProjectName.dll"
target = "plugins/ProjectName/"

# Include debug symbols (optional but recommended)
[[build.copy]]
source = "./ProjectName/bin/Release/ProjectName.pdb"
target = "plugins/ProjectName/"

# Optional: Include CHANGELOG
# [[build.copy]]
# source = "./CHANGELOG.md"
# target = "/"

[publish]
repository = "https://thunderstore.io"
communities = ["resonite"]

[publish.categories]
resonite = ["mods"] # Categories for your mod
```

:::note[Categories]
You can always change your mod's categories later on Thunderstore's website after publishing. The categories in `thunderstore.toml` are just the initial settings.
:::

### Building Packages

If you used the template, you have two options for building packages:

### Using TCLI directly
Expand Down
34 changes: 27 additions & 7 deletions src/content/docs/creating-a-mod/writing-code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,36 @@ public class Plugin : BasePlugin

```

This is a very basic BepInEx 6 plugin.
This is a very basic BepInEx 6 plugin that uses **BepisResoniteWrapper** - a library that provides commonly-used hooks and events for Resonite mods.

Work in progress documentation, more will be added. For now, for more info, see BepInEx's own documentation:
## BepisResoniteWrapper

[BepisResoniteWrapper](https://github.com/ResoniteModding/BepisResoniteWrapper) is already included in the template as a dependency. This library simplifies mod development by providing ready-to-use events for common Resonite modding scenarios. In the example above, we're using the `OnEngineReady` event to safely access FrooxEngine functionality after the engine has fully initialized.

### Available Events

- **`ResoniteHooks.OnEngineReady`** - Fired when the Resonite engine has finished initializing
- Safe to access `Engine.Current` and all FrooxEngine classes
- This is where most of your mod's initialization should happen

:::tip[Why use OnEngineReady?]
Many FrooxEngine classes and systems aren't available when your plugin first loads. Using `OnEngineReady` ensures everything is initialized before your mod tries to access it, preventing crashes and errors.
:::

To use additional events or hooks, check the [BepisResoniteWrapper documentation](https://github.com/ResoniteModding/BepisResoniteWrapper) or explore other mods for examples.

## Writing Your First Patch

Work in progress documentation, more will be added.

:::tip[Learning from Examples]
While these docs are being expanded, you can learn a lot by looking at the source code of existing mods on [Thunderstore](https://thunderstore.io/c/resonite/). Many mod developers share their code on GitHub, and you can find links to their repositories on their mod pages.
:::

For now, for more info, see BepInEx's own documentation:

<LinkButton
href="https://docs.bepinex.dev/articles/dev_guide/plugin_tutorial/2_plugin_start.html#plugin-structure"
href="https://docs.bepinex.dev/master/articles/dev_guide/plugin_tutorial/2_plugin_start.html?tabs=tabid-coreclr"
variant="minimal"
icon="external"
>
Expand Down Expand Up @@ -109,10 +133,6 @@ For patching/hooking methods, you can use [MonoMod](https://github.com/MonoMod/M

All of these libraries are compatible with each other as HarmonyX and MonoDetour simply use MonoMod.RuntimeDetour under the hood.

## Writing Your First Patch

work in progress.

<LinkCard
title="Publishing Your Mod"
href="/creating-a-mod/packaging-and-publishing"
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/getting-started/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Mod managers handle all the technical setup for you. They automatically install
<Card title="Gale" icon="rocket">
<p>Modern, lightweight mod manager with clean interface.</p>
<LinkButton
href="https://github.com/Kesomannen/gale?tab=readme-ov-file#installation"
href="https://kesomannen.com/gale"
target={'_blank'}
rel={'external'}
>
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/guides/configuration.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Custom Config
title: Configuration
description: Create mod configurations for your mods
sidebar:
order: 2
Expand Down
Loading
Loading