Skip to content

Creating Room Types

This guide creates a genre-neutral example: a medieval Blacksmith room.

Authoring chain

Room Tag→ Object Definition→ Placeable Prefab→ Room Type→ Available Types

1. Create or reuse tags

Choose:

Assets > Create > Pixit Games > Space Station Survival > Room Tag

Create these assets if the project does not already contain equivalent concepts:

Crafting
Heat
Storage
Comfort

Use stable IDs such as:

tag.crafting
tag.heat
tag.storage
tag.comfort

IDs should be unique and should not change after content ships.

2. Define the room objects

Choose:

Assets > Create > Pixit Games > Space Station Survival > Station Object

Example Anvil:

Id: object.anvil
Display Name: Anvil
Room Tags:
  Crafting: 1

Example Forge:

Id: object.forge
Display Name: Forge
Room Tags:
  Heat: 1
  Crafting: 1

Example Tool Rack:

Id: object.tool_rack
Display Name: Tool Rack
Room Tags:
  Storage: 1

Assign each object definition to the StationPlaceable on its wrapper prefab. A visible model without an object definition contributes no semantic tags.

3. Create the room type

Choose:

Assets > Create > Pixit Games > Space Station Survival > Room Type

Configure:

Id: room.blacksmith
Display Name: Blacksmith
Classification Priority: 70

Required Tags:
  Crafting >= 2
  Heat >= 1

Optional Tags:
  Storage
  Comfort

The Anvil and Forge together satisfy the type. A Tool Rack raises the optional score.

4. Add level rules

Example progression:

Level Required scores Minimum optional score
1 Crafting 2, Heat 1 0
2 Crafting 3, Heat 1 1
3 Crafting 4, Heat 2 3

Use higher required scores for functional capacity and optional scores for quality or decoration.

5. Register the room type

Select the scene's StationRoomGrid and add the new type to Available Room Types.

The generated visual demo currently supplies its available types from VisualPlacementDemoBuilder. If the scene will be regenerated, also add the asset to that builder or reconnect it after generation.

Recommended project extension

Larger projects should maintain a project-specific room-type catalog and use it when configuring StationRoomGrid. This avoids hard-coded asset paths in demo builders.

6. Add build-menu content

If the defining object is new, also create a ConstructionPieceDefinition, assign its wrapper prefab, footprint, category, icon, and room requirement, then add it to the construction catalog.

Classification conflicts

One room can satisfy several types. Priorities should express which identity wins.

Example:

Storage Room priority: 20
Blacksmith priority:   70
Crew Quarters priority:100

A Forge room containing storage remains Blacksmith. A mixed room satisfying Crew Quarters may become Crew Quarters because its priority is higher. Split functional spaces into separate enclosed rooms or adjust priorities when that result is undesirable.

Room identity versus gameplay

A room type identifies and levels a room; it does not automatically invent new production logic.

  • Tag contributions classify the room.
  • Resource rates on object definitions produce or consume resources.
  • StationDevice controls operational state.
  • WorkerRequirement gates a machine behind crew staffing.
  • Project-specific managers can react to OnRoomTypeChanged for unique behaviour.

For example, defining a Kitchen identifies the space. Food production still belongs to its Stove, preparation device, inventory integration, or custom gameplay system.