# Example Palace Server Data

This folder contains starter configuration files for a new Palace server.

## Quick Setup

1. Copy this folder to `psdata/`:
   ```bash
   cp -r psdata-example psdata
   ```

2. Copy room images to `psdata/media/`:
   ```bash
   cp -r media/* psdata/media/
   ```

3. Start the server:
   ```bash
   ./start.sh
   ```

## Files

| File | Description |
|------|-------------|
| `pserver.prefs` | Server preferences (name, passwords, permissions) |
| `pserver.pat` | Room layout (rooms, doors, scripts) |

## Configuration

### Server Name

Edit `pserver.prefs` and change:
```
SERVERNAME "My Palace Server"
```

### Passwords

The default passwords are:
- **Wizard/Operator**: `wizard`
- **God/Owner**: `palace`

To change passwords, connect to your server and use:
```
`setpass wiz newpassword
`setpass god newpassword
```

Or use the command line:
```bash
./pserver -wiz-pass "newwizpass" -god-pass "newgodpass"
```

### Permissions

The `PERMISSIONS` value is a bitmask controlling server features:

| Flag | Value | Description |
|------|-------|-------------|
| Allow Guests | `0x0001` | Allow unregistered users |
| Allow Cyborgs | `0x0002` | Allow automated scripts |
| Allow Painting | `0x0004` | Allow drawing on backgrounds |
| Allow Custom Props | `0x0008` | Allow custom avatars |
| Allow Wizards | `0x0010` | Enable wizard commands |
| Wizards May Kill | `0x0020` | Wizards can disconnect users |
| Wizards May Author | `0x0040` | Wizards can edit rooms |
| Players May Kill | `0x0080` | Users can vote-kick |
| Death Penalty | `0x0200` | Killed users must wait |
| Kill Flooders | `0x0800` | Auto-kick spammers |
| No Spoofing | `0x1000` | Prevent chat impersonation |
| Member Rooms | `0x2000` | Users can create rooms |

Default: `0x2E7F` (most features enabled)

## Adding Rooms

Edit `pserver.pat` to add new rooms:

```
ROOM
    ID 100
    NAME "My New Room"
    PICT "myroom.gif"
    DOOR
        ID 1
        DEST 86
        OUTLINE x1,y1 x2,y2 x3,y3 x4,y4
        LOC clickX,clickY
    ENDDOOR
ENDROOM
```

Room images go in `psdata/media/`. Supported formats: GIF, JPEG, PNG.
Standard size: 512x384 pixels.
