Skip to content
joscha999 edited this page Oct 17, 2019 · 11 revisions

Getting started

We won't get too deep into the how to program a script mod but to get started you need a couple of things:

  • Some IDE like Visual Studio, a normal text editor does the job too but it's way harder.
  • Unity (check your log file for the current version, it's one of the first lines).
  • The SimAirport.Modding library (we currently have no binary, either download or clone this repository).

To get started up you'll need to create a Class library in .Net Framework, once loaded up add a reference to the SimAirport.Modding library and to the UnityEngine library (usually found under <unity install dir>\Editor\Data\Managed).

Your first class must derive from the BaseMod class we provide, only this class will be used as entry points for your mod. Set the necessary properties like mod name and author name.

For the InternalName property it is recommended to use something along the lines of <authorName>.<modName>, it is used to identify the mod, conflicting names may lead to issues!

Settings

You can use the SimAirport.Modding.Settings classes to provide in game configurations for your mod. The settings will appear in the mod settings menu under settings.

Any setting is automatically saved by the game and loaded again when loading mods, you do not need to save them by yourself.

Proxies

Proxies are classes that provide direct access to game variables, we won't list all methods here since each method is documented in code, see that documentation or ask us if you need guidance.

All proxy classes are Singletons and will be created by the game to ensure the internal methods are correctly applied.

If you think there's a proxy missing or a proxy needs an additional method for your mod please create an issue with a proposal for the Prox / Method(s), what value they should work on and why you'll need them.

List of proxies

  • EventSystem: Events that happen in-game or change the game state.
  • Game: General information about the current played game.
  • GameTime: Information about the current time.
  • Graphics: Access to the internal SpriteManager for internal and custom Sprites.
  • Map: Information about the map. *
  • I18n: Access to the I18n system for translation. *

*Will be in the next edge deploy

Upcoming / Planned proxies