# 01 — Project Setup

Set up the Unity project you will use to build all your rooms.

---

## Step 1: Install Unity 2018.2.4f1

> **This exact version is mandatory.** Unity 2018.3, 2018.2.5, or any other version will produce bundles the game cannot load.

1. Download and install **Unity Hub** from unity.com/download
2. In Unity Hub → **Installs** → **Install Editor** → **Archive** tab
3. Find **2018.2.4f1** (the "f1" suffix matters) and click **Unity Hub** next to it
4. In the install options, no extra modules are needed on Windows
5. Click **Install** and wait (10–20 minutes)

---

## Step 2: Open the room template

The repository includes a ready-made Unity project at `unity-templates/room-template/`.

1. In Unity Hub → **Open**
2. Navigate to `unity-templates/room-template/` and click **Select Folder**
3. Unity Hub detects version `2018.2.4f1` automatically from `ProjectSettings/ProjectVersion.txt`
4. Unity opens — the first load may take a few minutes

> **Note**: if Unity shows "Enter Safe Mode" because of compile errors on first open, click **Ignore** — this sometimes happens before all assets are imported.

---

## Step 3: Install the Asset Bundle Browser (optional)

The Asset Bundle Browser lets you inspect which assets are in each bundle. It is not required to build bundles, but useful for debugging.

1. Search GitHub for **Unity-Technologies/AssetBundles-Browser** and download the ZIP
2. Extract it — inside you will find sub-folders including `Editor/`
3. Copy the `Editor/` folder into `unity-templates/room-template/Assets/`
4. Unity recompiles automatically
5. Verify: **Window** menu should now show **AssetBundle Browser**

---

## Step 4: The build script

`Assets/Editor/BuildBundles.cs` is already included in the template. Once Unity compiles it, the menu **Build → Asset Bundles (Windows)** appears.

No setup needed — it is ready to use.

---

## Step 5: Create `rooms.json`

Every room pack lives in a subfolder of `BepInEx\data\fantastic-jam-DKReforged\rooms\`. A `rooms.json` file in that subfolder configures how the mod loads it.

Create the folder and file for your pack now:

1. In your game installation, create:
   ```
   BepInEx\data\fantastic-jam-DKReforged\rooms\my-pack\
   ```
2. Inside it, create `rooms.json`:
   ```json
   {
     "pool": "NormalRoomStructures",
     "author": "YourName",
     "description": "My first room pack"
   }
   ```

**Pool values:**

| Value | When the room appears |
|---|---|
| `NormalRoomStructures` | Standard combat room (default) |
| `ArenaRoomStructures` | Open arena-style room |
| `PuzzleRoomStructures` | Puzzle / key room |
| `SpecialRoomStructures` | Rare special room (~2% chance) |
| `HallWayStructures` | Corridor between rooms |

> You can change `pool` at any time without rebuilding the bundle.

---

## Next

→ [02-simple-room.md](02-simple-room.md) — build your first room
