Coding tips

From Cosmoteer Wiki
< ModdingModding/Coding tips
Jump to navigation Jump to search


Various tips and tricks to help with coding mods.

Basic tips

The .rules files are written in a custom language.

Halfing is the in-house game engine, written in C#. You should be familiar with it after a few crashes.

The game's C# code is accessible for reading with tools such as ILspy and dotPeek. This helps you understand what can and cannot be done with mods.

Syntax Highlighting

Syntax Highlighters make life much easier by highlighting parts of code differently, making it far more legible. For example, it makes .rules paths yellow.

Syntax Highlighters
Name Description IDE Version Publisher Details Notes
Cosmoteer-Rules Language support for the Cosmoteer .rules file. Visual Studio Code 0.0.2 Ataxica Id: Ataxica.cosmoteer-rules Example

Visual studio code

Tips specific to VSCode.

  • Reopen files from the last time you closed VSCode : set window.restoreWindows to preserve in the settings.
  • Multiple header rows : set workbench.editor.wrapTabs to true in the settings.