---
# System prepended metadata

title: Rain's Guide On How To Code

---

---
title: "Rain's Guide On How To Code"
description: "HOW DO I CODE/???/./???>..????"
---

# Rain's Guide On How To Code

:::warning
Space Station 14 is heavily in development, and some systems you may want to touch are extreme oldcode, if you are a new contributor I HIGHLY do not recommend refactoring or touching C# systems, besides, if you just want to add new plushies; you can do that without C#! Refer to [YML and You](#YML-and-You)
:::

Welcome to the world of Space Station 14 coding, this is an amateurish guide that you *really* shouldn't refer to but should be good enough to explain the basics.

Relative to commit [b73d188e67f7591a6b5985c836dad2370fd252e9](https://github.com/space-wizards/space-station-14/tree/b73d188e67f7591a6b5985c836dad2370fd252e9). Notify `eclips_e#0001` on Discord if outdated.

[toc]

## Guide to-do list

|thing|what|status|
---|---|---|
|Overview|A simple overview explaining how SS14 code works|Todo|
|Prototypes|A simple explanation on how prototypes work and how to define them|Todo|
|Fluent & Localization|HOW DO LOCALIZE|Todo|
|Sprites|RSI, sprites and how to sprite|Todo|
|Coder Sprites|What they are and how to not make them|Todo|
|ECS In Depth|More indepth explanation for ECS|Todo|
|Client, Shared, Server|What are the differences, why are they seperate? Why is my leg cut off?|Todo|
|Networking|WOOOOOO NETWORKING!\!\!\!\!\!|Todo|

## Overview
So essentially, SS14 is not written in DM but instead in C# and YAML.

## Prototypes
Prototypes are what make up most of SS14's codebase (not really) and can be found in the `Resources/Prototypes` directory.

Prototypes are defined as `.yml` files and there are multiple types of Prototypes, with `entity` being the most basic.

### YML and You
:::warning
Skip ahead if you already know the basics of YML.
:::
YAML is as simple as peanut jelly and butter. This is some sample YAML syntax.
```yaml=
key: value
list:
  - value
  - value2
  - another_list:
    - "a string"
    - 10
    - 10.23
    - type: awesome
      contains: old code
      note: "don't open"
```

Think of YAML as JSON but less yucky and more human friendly to write in (YAML have comments, JSON doesn't, and generally looks nicer)

### Entities

## Localization

Localization is done in a neat little language called Fluent.

## Networking

:::danger
This isn't finished and is to be written
:::

REAL footage of the client and server interacting:
```sequence
Client->Server: I'd like to join!
Note right of Client: 300ms client->server
Note right of Server: Received message
Note right of Server: Doing authentication checks
Note right of Server: All valid authentication
Server->Client: Sure thing, buddy!
```
