ResourceRules
< Modding | Resources (modding)Modding/Resources/ResourceRules
Jump to navigation
Jump to search
Work in Progress
This page is currently WORK IN PROGRESS. Some things may be missing.
Feel free to contribute and don't worry about perfection - other editors can make corrections if necessary. Just get creating!
.rules
file/node location: Cosmoteer.Resources.ResourceRules
Stores the rules for a particular type of resource.
Defines everything about a resource that is neither how a part handles it, nor how it exists in space (see Nugget (modding) for that).
Inherits nothing.
Used by all resources.
Name | Type | Required? | Default value | Description |
---|---|---|---|---|
ID | ID<ResourceRules> | Yes | - | Identifier of the resource, which must be unique game-wide. |
NameKey | KeyString | Yes | - | Language key to the singular name of the resource. |
PluralNameKey | KeyString? | - | - | Language key to the plural name of the resource. |
DescriptionKey | KeyString? | - | - | Language key to the resource's description. |
BuyPrice | int | - | - | How many credits to buy a single one of this resource. |
SellPrice | int? | - | - | How many credits gained from selling a single one of this resource. |
Icon | ISprite? | - | - | |
IconButtonVerticalOffset | float | - | - | Presumably moves the icon up by that amount in the user interface for better centering. |
Overlay | ISprite? | - | - | |
QuantityDisplayDivisor | float | - | 1 | |
QuantityDisplayFormat | string | - | "n0" | |
MaxPerNugget | int | - | 1 | |
CarrySpeed | float | - | 1 | Presumably, how fast/slow crew is while carrying this resource. |
MaxStackSize | int | - | - | Presumably, how many you can stack in a single storage tile.
|
ReturnToStorage | bool | - | true | |
LoseExcessOnDelivery | bool | - | - | Presumably, whether or not any resources that the delivery destination can't take, disappear.
Batteries should have "true". |
FlexGridPriorityKey | ID<PartComponentRules> | - | - | Certainly for use with FlexResourceGrid. |
FlexGridDefaultPriority | int | - | 1 | Certainly for use with FlexResourceGrid. |
DropRates
(ReadContentOnly) |
ResourceRules.NuggetDropRates | - | new | Presumably, a struct representing the chance of this resource being created in space when a part containing it is destroyed. |
NuggetSprites
(Non-serialized, readonly) |
AtlasSprite[][]? | - | - | |
StackSprites | AtlasSprite[]? | - | - | |
ResourcesPerStackSprite | int | - | 1 | Presumably, how many of this resource is actually contained in a single visible nugget in a stack. |
StackReceiveMediaEffects | MultiMediaEffectRules? | - | - | |
StackPickupMediaEffects | MultiMediaEffectRules? | - | - | |
NuggetPickupMediaEffects | MultiMediaEffectRules? | - | - | |
DeathHitEffects | MultiHitEffectRules? | - | - | |
DeathMediaEffects | MultiMediaEffectRules? | - | - | |
BaseResourceQuads
(Non-serialized) |
CrewQuadStatic[][]? | - | - |
Notes
Nothing yet.
Examples
This subsection is currently work-in-progress: Some things may be missing.
Feel free to contribute to make it better!
(Add bullet.rules NuggetSprites example)