Skip to content

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 ​

PropertyTypeDefaultMeaning
IdstringnullRequired local ID
NamestringnullRequired nonblank display label
IconUnityEngine.TexturenullOptional category icon
SortOrderint0Category ordering value

PartDefinition ​

A donor-based part. See Content registration and Sockets and shapes.

PropertyTypeDefaultMeaning
IdstringnullRequired local ID
NamestringnullRequired nonblank display label
Descriptionstringempty stringDisplay description
DonorstringnullRequired exact asset name of an available native donor
AllowMoveboolfalsePermit donor's native pickup/move action; other interactions remain
CategorystringnullRequired local or fully namespaced category key
ModelsMeshDefinition[]nullRetain donor visuals; explicit array replaces them
SocketsSocketDefinition[]nullRetain donor sockets; empty removes them
SizeUnityEngine.Vector3?nullRetain donor footprint, or set finite positive dimensions
PhysicsShapesBoxShape[]nullRetain donor solid geometry; empty disables solid collision
InteractionShapesInteractionShapeDefinition[]nullRetain donor triggers; entries override selected existing interactions
CallbacksPartCallbacksnullOptional instance lifecycle/simulation callbacks
StatePartStateDefinitionnullOptional declared custom fields
Massfloat?nullRetain donor mass, or set a finite positive value
BuildingCostItemCost[]nullRetain donor cost; empty makes it free
ConfigureMeshAction<PartBuildContext, GameObject, MeshDefinition>nullRuns immediately after each declared replacement mesh is added
ConfigureAction<PartBuildContext>nullRuns 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 ​

PropertyTypeDefaultMeaning
ItemItemRefdefault structSet explicitly to a native or mod item reference
Quantityint0Required positive quantity

Used for building costs and research costs. Registering an item does not make it obtainable.

SocketDefinition ​

PropertyTypeDefaultMeaning
Idbyte0Unique ID within this part; preserve IDs expected by donor logic
TypeShips.Interface.Model.Parts.CableTypeenum zeroSet to the cable type expected by the donor
PositionUnityEngine.Vector3zeroPart-local socket position
RotationUnityEngine.Vector3zeroPart-local Euler angles in degrees

ItemDefinition ​

PropertyTypeDefaultMeaning
IdstringnullRequired local ID
NamestringnullRequired nonblank display label
Massfloat1Finite positive mass
MaxStackSizebyte100Stack size, 1–255
ModelsMeshDefinition[]emptyInventory model meshes
ConfigureAction<ItemBuildContext>nullConfigure 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:

PropertyTypeDefaultMeaning
ColorUnityEngine.ColorwhiteFluid 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 ​

PropertyTypeDefaultMeaning
IdstringnullRequired local tree/group ID
NodesResearchNodeDefinition[]emptyNon-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 ​

PropertyTypeDefaultMeaning
IdstringnullRequired local ID, unique across the mod's research trees
NamestringnullRequired nonblank display label
PrerequisitesResearchRef[]emptyParent research; empty creates a root
CostsItemCost[]emptyResearch costs; empty makes it free
UnlockedPartsPartRef[]emptyParts unlocked by this node
AvailableInDemobooltrueNative demo availability flag
ExclusiveToDemoboolfalseNative 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.

PropertyTypeMeaning
SettingsShips.Interface.Settings.PartSettingsGenerated world-specific part settings
PrefabUnityEngine.GameObjectSettings.part
AssetsStellarStriderLib.Models.AssetScopeOwning assembly's asset scope

ItemBuildContext ​

Passed to item configuration; no public constructor. All properties are read-only.

PropertyTypeMeaning
SettingsItems.Model.ItemSettingsGenerated world-specific item settings
PrefabUnityEngine.GameObjectSettings.itemObject
AssetsStellarStriderLib.Models.AssetScopeOwning assembly's asset scope

LoadingWallpaperDefinition ​

PropertyTypeDefaultMeaning
IdstringnullRequired local ID, unique among this mod's wallpapers
TextureResourcestringnullRequired 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.

StellarStriderLib documentation · Mods for StellarDrive