Content definitions
Namespace: StellarStriderLib. Properties are get/set unless noted. Register through ModRegistry and leave definitions unchanged. Required values may default to null in C#.
Source: Definitions.cs and LoadingWallpaperDefinition.cs.
CategoryDefinition
| Property | Type | Default | Meaning |
|---|---|---|---|
Id | string | null | Required local ID |
Name | string | null | Required nonblank display label |
Icon | UnityEngine.Texture | null | Optional category icon |
SortOrder | int | 0 | Category ordering value |
PartDefinition
A donor-based part. See Content registration and Sockets and shapes.
| Property | Type | Default | Meaning |
|---|---|---|---|
Id | string | null | Required local ID |
Name | string | null | Required nonblank display label |
Description | string | empty string | Display description |
Donor | string | null | Required exact asset name of an available native donor |
AllowMove | bool | false | Permit donor's native pickup/move action; other interactions remain |
Category | string | null | Required local or fully namespaced category key |
Models | MeshDefinition[] | null | Retain donor visuals; explicit array replaces them |
Sockets | SocketDefinition[] | null | Retain donor sockets; empty removes them |
Size | UnityEngine.Vector3? | null | Retain donor footprint, or set finite positive dimensions |
PhysicsShapes | BoxShape[] | null | Retain donor solid geometry; empty disables solid collision |
InteractionShapes | InteractionShapeDefinition[] | null | Retain donor triggers; entries override selected existing interactions |
Callbacks | PartCallbacks | null | Optional instance lifecycle/simulation callbacks |
State | PartStateDefinition | null | Optional declared custom fields |
Mass | float? | null | Retain donor mass, or set a finite positive value |
BuildingCost | ItemCost[] | null | Retain donor cost; empty makes it free |
ConfigureMesh | Action<PartBuildContext, GameObject, MeshDefinition> | null | Runs immediately after each declared replacement mesh is added |
Configure | Action<PartBuildContext> | null | Runs on the generated prefab after sockets and shapes |
MeshDefinition is in StellarStriderLib.Models; GameObject is in UnityEngine. Delegate types use System.Action.
ConfigureMesh runs for declared replacement meshes before final Configure. Assets.AddMesh does not invoke it automatically.
An empty Models array removes visuals. Preserve required donor UI with selective replacement. Empty InteractionShapes makes no changes; empty Boxes removes the selected target's colliders.
Do not change Settings.id. Cross-content lookups wait for WorldBound. Invalid values fail registration; missing donors/references or prefab failures stop world binding.
ItemCost
| Property | Type | Default | Meaning |
|---|---|---|---|
Item | ItemRef | default struct | Set explicitly to a native or mod item reference |
Quantity | int | 0 | Required positive quantity |
Used for building costs and research costs. Registering an item does not make it obtainable.
SocketDefinition
| Property | Type | Default | Meaning |
|---|---|---|---|
Id | byte | 0 | Unique ID within this part; preserve IDs expected by donor logic |
Type | Ships.Interface.Model.Parts.CableType | enum zero | Set to the cable type expected by the donor |
Position | UnityEngine.Vector3 | zero | Part-local socket position |
Rotation | UnityEngine.Vector3 | zero | Part-local Euler angles in degrees |
ItemDefinition
| Property | Type | Default | Meaning |
|---|---|---|---|
Id | string | null | Required local ID |
Name | string | null | Required nonblank display label |
Mass | float | 1 | Finite positive mass |
MaxStackSize | byte | 100 | Stack size, 1–255 |
Models | MeshDefinition[] | empty | Inventory model meshes |
Configure | Action<ItemBuildContext> | null | Configure generated item settings/prefab |
There is no donor setting for an item. Configure must not change its assigned numeric ID.
FluidDefinition
Inherits all ItemDefinition properties, adding:
| Property | Type | Default | Meaning |
|---|---|---|---|
Color | UnityEngine.Color | white | Fluid display colour |
Use RegisterFluid for a fluid or RegisterGas for both native fluid and gas flags. Both use the shared item namespace and ID sequence.
ResearchTreeDefinition
| Property | Type | Default | Meaning |
|---|---|---|---|
Id | string | null | Required local tree/group ID |
Nodes | ResearchNodeDefinition[] | empty | Non-null collection of nodes to register together |
A tree groups layout. Node keys are owned by the mod, not nested under the tree key.
ResearchNodeDefinition
| Property | Type | Default | Meaning |
|---|---|---|---|
Id | string | null | Required local ID, unique across the mod's research trees |
Name | string | null | Required nonblank display label |
Prerequisites | ResearchRef[] | empty | Parent research; empty creates a root |
Costs | ItemCost[] | empty | Research costs; empty makes it free |
UnlockedParts | PartRef[] | empty | Parts unlocked by this node |
AvailableInDemo | bool | true | Native demo availability flag |
ExclusiveToDemo | bool | false | Native demo exclusivity flag |
Use non-null arrays. Cycles and missing references fail loading. Explicit part unlocks replace donor inheritance; native unlocks are preserved. See Research.
PartBuildContext
Passed to prefab configuration delegates; no public constructor. All properties are read-only.
| Property | Type | Meaning |
|---|---|---|
Settings | Ships.Interface.Settings.PartSettings | Generated world-specific part settings |
Prefab | UnityEngine.GameObject | Settings.part |
Assets | StellarStriderLib.Models.AssetScope | Owning assembly's asset scope |
ItemBuildContext
Passed to item configuration; no public constructor. All properties are read-only.
| Property | Type | Meaning |
|---|---|---|
Settings | Items.Model.ItemSettings | Generated world-specific item settings |
Prefab | UnityEngine.GameObject | Settings.itemObject |
Assets | StellarStriderLib.Models.AssetScope | Owning assembly's asset scope |
LoadingWallpaperDefinition
| Property | Type | Default | Meaning |
|---|---|---|---|
Id | string | null | Required local ID, unique among this mod's wallpapers |
TextureResource | string | null | Required nonblank embedded image resource or ZIP-entry reference |
Registration copies these values. Bad image data is logged and skipped at loading; an empty image pool uses black. Wallpapers stay client-local and do not consume numeric IDs. See Loading wallpapers.