Builder API Reference
This page collects the main builder methods, advanced item-instance notes, and item-specific best practices.
StorableItemDefinitionBuilder Methods
WithBasicInfo(id, name, description, category)- Sets core item propertiesWithStackLimit(limit)- Sets maximum stack size (1-999)WithIcon(sprite)- Sets the item iconWithPricing(basePrice, resellMultiplier)- Configures economic propertiesWithLegalStatus(status)- Sets legal or illegal statusWithEquippable(equippable)- Attaches an equippable componentWithStoredItem(prefab)- Assigns a customStoredItemprefabWithDemoAvailability(available)- Sets demo availabilityBuild()- Registers and returns the item
EquippableBuilder Methods
CreateBasicEquippable(name)- Creates a basic equippableCreateEquippable<T>(name)- Creates a typed equippable for customMonoBehaviourclassesCreateViewmodelEquippable(name)- Creates a viewmodel equippable with 3D model supportWithInteraction(canInteract, canPickup)- Configures interaction capabilitiesWithViewmodelTransform(position, rotation, scale)- Configures first-person transformWithAvatarEquippable(assetPath, hand, animationTrigger)- Configures third-person avatar behaviorWithUseCallback(callback)- Registers a callback when the item is usedBuild()- Finalizes and returns the equippable
FurnitureDefinitionBuilder Methods
FurnitureCreator.CloneFrom(donor)- Starts a presentation-only variant from native grid or surface furnitureWithBasicInfo(id, name, description)- Sets the stable ID and player-facing textWithModel(model)- Supplies the model cloned into all native furniture representationsConfigureModel(callback)- Modifies the isolated model owned by aCloneFrombuilderWithPlacement(mode)- Selects grid or surface placementWithFootprint(width, depth)- Sets a grid footprint in 0.5 metre tilesWithSurfacePlacement(types, allowRotation)- Selects wall/roof compatibilityWithBuildSound(soundType)- Selects the native completion sound; plastic furniture uses the metal fallbackWithPricing(basePrice, resellMultiplier)- Configures economic propertiesWithStackLimit(limit)- Sets the inventory stack limitWithIcon(sprite)/WithGeneratedIcon(resolution)- Configures the inventory iconBuild()- Composes the native prefabs, registers, and returns the furniture definition
Custom ghosts for cloned buildables
Use WithGhostVisual(visualFactory, replaceExistingVisual) when a buildable cloned from a native
machine or station needs a different placement model. Furniture created through FurnitureCreator
does not call this method: WithModel(...) automatically supplies its placed, stored, icon, and
ghost visuals.
GameObject ghostModel = LoadMachineModel();
ghostModel.SetActive(false);
var machine = BuildableItemCreator.CloneFrom("brickpress")
.WithBasicInfo(
"my-mod:tablet-press",
"Tablet Press",
"A compact manual tablet press.",
ItemCategory.Equipment)
.WithGhostVisual(
parent => Object.Instantiate(ghostModel, parent, false),
replaceExistingVisual: true)
.Build();
The factory runs on Unity's main thread whenever the native grid, procedural-grid, or surface
placement system creates a ghost. It must create and return a fresh GameObject; do not return the
shared source object. S1API parents the result when necessary, activates it, and disables its
colliders, navigation, networking, canvases, and lights so it behaves as a placement visual.
Set replaceExistingVisual: true when the custom visual replaces the cloned native model. Buildables
that do not call this method retain the game's normal ghost behavior. If the factory throws or
returns null, S1API removes the partial visual and restores any inherited renderers it hid.
Advanced: Custom Item Instances
For items with custom runtime state, such as extra fields that must serialize, you will need to:
- Create a custom
ItemInstanceclass inheriting from the game'sStorableItemInstance. - Create a custom
ItemDataclass for serialization. - Create a custom
ItemLoaderclass for deserialization. - Override
GetDefaultInstance()in your custom definition class.
Best Practices
- Register regular items after
Mainloads and runtime additives before save data loads when possible - Use callbacks for simple use behavior and custom equippable types for complex flows
- Load and register avatar prefabs before creating items that depend on them
- Always validate icon loading before attaching the sprite to the builder
- Test both Mono and Il2Cpp environments when changing item behavior