SS14 Naming Conventions
This skill sets a single strict naming standard for SS14 code, prototypes and localization :)
Use it as a guideline: if new code/content doesn't follow the rules below, it's a bug, not a "style variation."
Reading order
- Read
references/fresh-pattern-catalog.mdfirst. - Then read
references/rejected-snippets.md. - At the end, check the terminology and boundaries of the docs in
references/docs-context.md.
Source of truth
- The source of truth for the rules is the current code base.
- Documentation is needed for intent, terms and explanations, but does not overwrite the behavior of live code.
- Examples older than cutoff
2024-02-20and fragments with TODO/HACK/FIXME on the topic of naming should not be used as a standard.
Mental model
- Names in SS14 are a contract between C#, YAML and FTL.
- Basic purpose of a name: quickly convey the role of an entity/type/key without exposing the implementation.
- Good naming minimizes renaming when expanding functionality.
- The new code must be in English in the identifiers and fallback fields of the prototypes.
Strict rules (MUST/SHOULD)
1) Components
- MUST: the component name ends with
Component. - MUST: name format is
CamelCase. - MUST: the name reflects the behavior in 1-3 words.
- SHOULD: give priority to forms with an adjective, for example
ClickableComponent. - MUST: if there is a paired system, the base part of the system and component name is the same.
- MUST: do not write the suffix
Componentin the YAML prototype of- type:.
2) Systems
- MUST: the system name ends with
System. - MUST: name format is
CamelCase. - MUST: if there is a target component, use the same base part (
XxxComponent<->XxxSystem). - MUST: if there is no target component, the system name describes the action in 1-3 words.
3) Dependency fields
- MUST: private dependencies start with
_. - MUST: build the dependency name from the base part of the type without
System/Manager. - MUST:
TransformSystem->_transform,IPlayerManager->_player. - MUST: adhere to the canonical short forms:
IGameTiming->_timing,IRobustRandom->_random,EntityWhitelistSystem->_whitelist. - SHOULD: avoid noisy options like
_transformSystem/_playerManagerif there is an established short alias.
4) Prototype ID
- MUST: ID format -
CamelCase. - MUST: when inheriting from
BaseXxx, write the base name in the child ID without the prefixBase. - MUST: when developing the inheritance chain, increase suffixes on the right (
Meat->MeatCat). - MUST: if the entity is unique to the fork and especially if it is a forked copy of the vanilla entity, add the fork prefix (
ScpXxx,SunriseXxx). - MUST NOT: use snake_case, kebab-case or lowercase ID for new production code.
5) Name/Description in prototypes and localization
- MUST:
nameanddescriptionfallback in YAML be written in English. - MUST: fallback content in YAML matches the meaning of the English localization.
- MUST: the name of the entity in localization is in lower case, maximum 3 words.
- MUST: description of the entity - with a capital letter, maximum 3 sentences.
- SHOULD: do not use quotes unless escaping is required.
6) Localization keys
- MUST: regular localization keys -
kebab-case(word1-word2-word3). - MUST: for entities use the format
ent-MyEntity,.desc,.suffix. - MUST: a regular key reflects the meaning of the action/state (
item-pick-up-start). - SHOULD: build new variations by adding suffixes to an existing key, rather than creating an unrelated new tree.
7) Localization content
- MUST: content is written in the language of a specific locale.
- MUST: write the name/desc of entities in IC style as an external observable description.
- MUST: Explicitly mark OOC text with the prefix
OOC:. - MUST NOT: Mix in-game descriptions with OOC instructions without a marker.
8) Variables in the code
- MUST: format -
camelCasefor local/parameters, private fields with_. - MUST: the name reflects the essence of the data.
- MUST: if the variable stores a component, use the base part of the component name (
ActiveScp096RageComponent->scp096Rage). - MUST NOT: use meaningless names (
data,value2,tmp) outside the micro-area.
9) File names
- MUST:
yml/ftl/swsl—snake_case. - SHOULD: maximum 2 words if the context is already expressed by folders.
- MUST: C# file in
CamelCase, the name matches the key class. - SHOULD: if there are several classes/partial parts in the file, the file name describes the subsection in a maximum of 2 words.
Decision Tree
- Do you need a new ECS data container?
Select a basic action/property -> create XxxComponent.
- Do you need logic for the component?
Use the same database -> XxxSystem.
- Are you adding a component to the prototype?
Write - type: Xxx without Component.
- Selecting a dependency alias?
Remove System/Manager -> reduce to canonical form (_timing, _random, _transform, _player, _whitelist).
- Are you creating a fork-only or fork copy of vanilla?
Add a fork prefix to the ID (Scp*, Sunrise*).
- Are you creating a localization key?
Entity: ent-MyEntity; regular string: kebab-case.
Patterns ✅
ClickableComponent+ClickableSystemwith a common base part.- type: Clickablein YAML instead ofClickableComponent.- Alias
IGameTimingas_timing. - Alias
IRobustRandomas_random. - Alias
TransformSystemas_transform. - Alias
IPlayerManageras_player. - Alias
EntityWhitelistSystemas_whitelist. - ID in the style
Scp096CryOutwith a clear domain prefix. - Fork ID with the prefix
Sunrise*for unique fork content. ent-BasePart = body partas a short external name of the entity.armable-examine-armedis like a regularkebab-casenon-entity string key.- Private component field
scp096Rageaccording to the basic part of the type.
Anti-patterns ❌
Clickableas the name of a C# component without theComponentsuffix.ClickableComponentSysteminstead ofClickableSystem.- type: ClickableComponentin YAML.TransformSystem->_transformSystemin the code if there is a canonical_transform.IPlayerManager->_playerManagerin the gameplay system if_playeris possible.- New prototype ID in snake_case or kebab-case.
- Fork copy of the vanilla entity without the fork prefix.
- Non-English
name/descriptionfallback in YAML. - Regular localization key in
PascalCaseor with_. - OOC hint in
.descwithout theOOC:marker. - Description longer than 3 sentences or name longer than 3 words.
- Private fields without
_(except constants).
Code examples
Example 1: paired naming of a component and a system
[RegisterComponent]
public sealed partial class ClickableComponent : Component
{
}
public sealed class ClickableSystem : EntitySystem
{
[Dependency] private SharedTransformSystem _transforms = default!;
}
Comment: the base part Clickable is the same for the pair Component/System; This is a canon related naming.
Example 2: correct dependency alias for whitelist
public sealed partial class ChangeNameInContainerSystem : EntitySystem
{
[Dependency] private EntityWhitelistSystem _whitelist = default!;
}
Comment: The short canonical alias _whitelist is used, not _whitelistSystem.
Example 3: correct dependency alias for transform
public sealed class EntityPickupAnimationSystem : EntitySystem
{
[Dependency] private TransformSystem _transform = default!;
}
Comment: the base of type Transform is moved to _transform.
Example 4: correct dependency alias for random/player
public sealed class DrugOverlaySystem : EntitySystem
{
[Dependency] private IPlayerManager _player = default!;
[Dependency] private IRobustRandom _random = default!;
}
Comment: Manager/Random have been normalized to stable short names.
Example 5: YAML component without Component suffix
- type: entity
id: FloorWaterEntity
components:
- type: Clickable
Comment: YAML uses the base part of the component name.
Example 6: fork prefix + CamelCase for prototype ID
- type: entity
id: Scp096CryOut
name: emit mournful scream
Comment: Scp prefix and CamelCase are respected; action name in English.
Example 7: Sunrise prefix in fork content
- type: guideEntry
id: SunriseAmmunition
name: guide-entry-ammunition
Comment: The fork identifier is clearly separate from the vanilla namespace.
Example 8: `ent-*` entity keys and lowercase name
ent-BasePart = body part
.desc = { ent-BaseItem.desc }
Comment: entity name is short and lowercase; the description is specified separately via .desc.
Example 9: regular keys in kebab-case
armable-examine-armed = {CAPITALIZE(THE($name))} is [color=red]armed[/color].
armable-examine-not-armed = {CAPITALIZE(THE($name))} needs to be armed.
Comment: Non-entity keys go to kebab-case.
Checklist before PR
- All new C# types and fields are named according to the rules above.
- In YAML there is no
...Componentafter- type:. - Prototype ID in
CamelCase, fork content has the correct prefix. - FTL keys are divided into
ent-*andkebab-caseaccording to their purpose. name/descriptionfallback in YAML - in English and consistent with the English locale.- There is no OOC text without a
OOC:marker.
Extension rule
- Add a new pattern only if it is confirmed by fresh code and does not conflict with the current MUST standard.
- First register any exception as an anti-pattern/legacy in
references/rejected-snippets.md. - If a separate large topic appears (for example, only naming UI/XAML), move it to a separate skill and leave only a cross-link here.
Keep naming predictable and uniform: this way reviews are faster and there are fewer regressions 🚀