# 🚀 Setup Guide

This document provides instructions for **Users**. It explains how to integrate the package directly into your game project. If you want to customize the player, please refer to the [Build Guide](<https://cri-middleware.github.io/SSPlayerForRenPy/development/build/index.md>).

## 1\. Requirements

- **Ren'Py**: Version 8.x series (Python 3 based) is required.
- **SpriteStudio**: projects made in SpriteStudio 7.6 or later.

## 2\. Placing the Library

Download the latest package — [`SSPlayerForRenPy.zip`](<https://github.com/cri-middleware/SSPlayerForRenPy/releases/latest/download/SSPlayerForRenPy.zip>) (stable link, always the latest release; to pick a specific version, see [GitHub Releases](<https://github.com/cri-middleware/SSPlayerForRenPy/releases>)). Extract it, and copy the **`spritestudio/`** folder inside it directly into your project's `game/` directory.

> **Internal Structure**: This folder contains all the Python scripts (e.g., `spritestudio.rpy`) and native libraries for each platform (Windows / macOS / Linux, Android, iOS and Web), plus this documentation as Markdown (`README.md`, `docs/`) for the release it came from, readable offline. `spritestudio.rpy` leaves the documentation out of the games you build.

## 3\. Placing Playback Data (`.ssab`)

Animation projects (`.sspj`) created in SpriteStudio are played as `.ssab`, the runtime format every SpriteStudio Player reads.

Put the project in `SpriteStudio_Source/`, beside `game/`, and press **Launch Project** in the Ren'Py launcher: the Auto Importer converts it into `game/ss_assets/<project>/` before the game starts.

To convert without Ren'Py running, use **SSConverter GUI** (a desktop app you drop the project onto), **`ssconverter-cli`** (for batch scripts and CI) or **`ssconverter-web`** (in the browser, with nothing to install).

For more details, please refer to **[Asset Import](<https://cri-middleware.github.io/SSPlayerForRenPy/import/index.md>)**.

The setup is now complete. For how to actually call it in your game, please see [Usage Guide](<https://cri-middleware.github.io/SSPlayerForRenPy/usage/index.md>).

## 4\. Updating / Removing the Library

**To update, replace the whole `game/spritestudio/` folder: delete it, then copy the new one in.**

Ren'Py compiles each `.rpy` into a `.rpyc` beside it and keeps running that `.rpyc` even after the `.rpy` is gone, so deleting the old folder first is what leaves only the new version's scripts and libraries.

1. Delete `game/spritestudio/` from your project.
2. Extract the new `SSPlayerForRenPy.zip` and copy its `spritestudio/` folder into `game/`.
3. Launch your game in developer mode and check the startup log line (or call `ss_diagnostics()` from the console, **Shift+O**) — see [Usage Guide](<https://cri-middleware.github.io/SSPlayerForRenPy/usage/index.md>).

Your content is untouched by this: converted `.ssab` data (e.g. `game/ss_assets/`) and your `SpriteStudio_Source/` projects live outside this folder.

**To remove the player**, delete `game/spritestudio/` — the folder carries its own packaging rules, so nothing is left behind inside it. Anything you added yourself stays and can be removed when you no longer need it: the `.ssab` classification lines in your `options.rpy` (see [Exporting your Game](<https://cri-middleware.github.io/SSPlayerForRenPy/export/index.md>)), your converted data, and the `show` lines and `SSPlayer(...)` calls in your scripts.
