Level Editing

### Level Editing via .bfs Files

beyond.frontiers' universe can freely be modified via the .bfs files located within the `/Assets/Universe` Folder. Each file is named after their x- and y-coordinates on a 16 by 16 grid. We recommend Notepad++ for editing the sector files.

#### Essentials - System Basics

Primarily, there are a few arguments that are essential for a Sector File.

```
SystemSeed=118896308
SystemName=Expanse of Void
SystemRegion=Frontier Regions
SystemSecurity=2
SystemOwner=None
BackgroundIndex=4

```
These six lines are the first of two mandatory Building Blocks of creating sectors. Most of it is pretty self explanatory but let us get into detail with each of them. Be aware that these are CASE SENSITIVE.

##### System Seed

This value simply determines the seed the system is built with, for asteroid placement, Initial NPC behaviour and other generation.

##### System Name and System Region

These determine the visible Name of the System and its appendance to the region they're in.

##### System Security

Determine the Security and thus, the frequency of attacks and raids on a scale of 1 to 10, where 1 is extremely Dangerous and 10 is perfectly safe. Any other value will be dismissed and reset to 10.

##### System Owner

This determines the kind of possible patrol ships. Available Selections are:

* Terra
* Orion
* Sirius
* Neutral
* None
* Crimson
* Pirate

##### Background Index

This determines the Background color of the Sector. In Assets/3D/Skybox these are sorted ascending. The following Indexes are available

1. Black
2. Blue Type 1
3. Blue Type 2
4. Green Type 1
5. Green Type 2
6. Green Type 3
7. Orange Type 1
8. Violet Type 1
9. Violet Type 2
10. Violet Type 3
11. Violet Type 4

##### Essentials - Primary Star

Every System needs to have a star prior to loading. Any Worldbuilding Comment has an introductory statement, in this case "SunSetup". A full star is laid out like this:

```
SunSetup
SunTiltX=172
SunTiltY=146
SunScale=28300
SunColorR=252
SunColorG=218
SunColorB=242

```
Every Statement needs a new Line. The Arguments on the next line do as follows:

* SunTiltX determines the X-Rotation of the sun (Imagine Sundawn or dusk, up and down)
* SunTiltY determines the rotation around the player
* SunScale puts a scale to the sun. A value around 25000 to 80000 is usually very good
* SunColorR, SunColorG, SunColorB are Values from 200 to 255 determining the coloration of the star and the visible light as well as the refractive background light.

#### Optionals

Every Sector can have more than just a pretty background, a name, region and a sun. This part deals with other things along the Essentials.

##### Stargates

To traverse the Frontier Regions, players do need Stargates to move between instances of systems. They do need a bit of manual math for placement if you want to make them a bit more non-standard than the usual core systems. These are the Basic instructions:

```
GateSetup
SystemX=14
SystemY=2
GatePosX=0
GatePosY=0
GatePosZ=-80000
GateRotation=0
GateAimX=0
GateAimY=0
GateAimZ=80000

```

As usual, Instructions for the World Editor start with the Primary Argument, priming the Worldbuilder with "GateSetup". Please remember, this is Case Sensitive, like all commands.

* SystemX and SystemY determine the target system on the map in the grid coordinates.
* GatePosX, GatePosY and GatePosZ determine the Position of the Gate and thus, the level loading trigger in the current system.
* GateRotation Turns the gate along its Y-Axis.
* GateAimX, GateAimY and GateAimZ create the point of entrance in the other system if the level trigger is hit by the player.

Make sure that you mostly adhere to a 2d plane, along the X and Z axis. This can ease players usage of the system.

##### Stations

Stations have slightly more arguments to make them work in the expected way. From Services to Import Markets, from Shipyard to equipment services, stations are one of the most complicated things in terms of data to add.