SS14 ECS Components
Architecture guide for Component in Space Station 14 — data containers, attributes, networking, state-as-component pattern, and marker components
от makura-games★ 74 звезды на GitHub
Установить SS14 ECS Components в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Component - components in ECS
Limit of responsibility
This skill covers component architecture, attributes, and data patterns.
Strict naming standards (suffix Component, linking with System, dependency aliases, file naming/prototype/localization rules) are maintained in ss14-naming-conventions.
If the local naming example differs from ss14-naming-conventions, use ss14-naming-conventions.
What is Component
A component is a pure data container with no logic. Components are attached to Entities and define their properties. All logic for working with component data is located in the corresponding system (EntitySystem).
The main rule: components do not contain methods with logic. They only store data and configuration.
Basic structure
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class MyComponent : Component
{
[DataField, AutoNetworkedField]
public float Speed = 5f;
[DataField]
public SoundSpecifier? ActivationSound;
}
Required class attributes
[RegisterComponent]
Registers a component in the engine. Required for all components. Without it, the component will not be available for use.
[NetworkedComponent]
Indicates that the component is synchronized over the network between the server and client. Used in conjunction with [AutoGenerateComponentState].
[AutoGenerateComponentState] and [AutoGenerateComponentState(true)]
Automatically generates code to serialize/deserialize component state during network synchronization.
The (true) option additionally generates a AfterAutoHandleState method that is called after the state is applied - useful for performing side effects after a network update.
[AutoGenerateComponentPause]
Generates code to automatically pause timer fields (TimeSpan) when the card is paused. Works in conjunction with [AutoPausedField].
Field attributes
[DataField]
Marks a field for deserialization from YAML prototypes. The field name in YAML is the camelCase version of the field name in C#:
[DataField]
public float BaseSpeed = 5f; // → baseSpeed in YAML
[DataField(required: true)]
public EntProtoId EntityId; // Required, error if not specified
⚠️ Anti-pattern: string name in DataField (legacy)
Do not specify a string field name in
DataField. This is an outdated approach. The name in YAML is always equal to the name in C# with a lower case letter:// ❌ Legacy - DO NOT do this [DataField("counter")] public int Counter; [DataField("baseSpeed")] public float BaseSpeed; // ✅ Correct - the name is displayed automatically [DataField] public int Counter; // → counter in YAML [DataField] public float BaseSpeed; // → baseSpeed in YAML
⚠️ Anti-pattern: DataField on runtime fields
[DataField]is needed only for fields that are specified via YAML prototypes. Fields that are generated in code during the game should not have[DataField]:// ❌ Wrong - EntityUid is generated in code, not in YAML [DataField] public EntityUid? CurrentTarget; [DataField] public HashSet<EntityUid> ActiveTargets = []; [DataField] public TimeSpan? RageStartTime; // Set by the system, not by prototype // ✅ Correct - without DataField, only AutoNetworkedField if synchronization is needed [AutoNetworkedField] public EntityUid? CurrentTarget; [AutoNetworkedField] public HashSet<EntityUid> ActiveTargets = []; [AutoNetworkedField] public TimeSpan? RageStartTime; // ✅ Correct - DataField is only for the configuration from the prototype [DataField] public float MaxSpeed = 8f; // Configured in YAML [DataField] public TimeSpan RageDuration = TimeSpan.FromMinutes(4); // Configured in YAML
[AutoNetworkedField]
Marks a field for automatic network synchronization. Only used in conjunction with [AutoGenerateComponentState] on the class:
[DataField, AutoNetworkedField]
public int Counter;
[AutoNetworkedField]
public TimeSpan? StartTime;
[AutoPausedField]
Marks a field of type TimeSpan to automatically pause when the card is paused. Used with [AutoGenerateComponentPause]:
[AutoNetworkedField, AutoPausedField]
public TimeSpan? ActivationTime;
[ViewVariables]
Makes the field visible in the debug View Variables (VV) panel:
[ViewVariables] // By default, access = (VVAccess.ReadWrite), you do NOT need to register it again!
public float DebugValue;
[ViewVariables(VVAccess.ReadOnly)]
public int ReadOnlyValue;
[Access]
Restricts access to the fields/properties of the component. Only the specified types can write to fields:
[RegisterComponent, NetworkedComponent, Access(typeof(SharedMySystem))]
public sealed partial class MyComponent : Component
{
// Only SharedMySystem and descendants can change fields
}
`
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл SS14 ECS Components?
Architecture guide for Component in Space Station 14 — data containers, attributes, networking, state-as-component pattern, and marker components
Как установить скилл SS14 ECS Components?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл SS14 ECS Components запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…