Ingame Script Editor - Robosturm/Commander_Wars GitHub Wiki

What is this?

The ingame script editor allows everyone to easily create basic ingame-scripts without a lot of programming skills. You can further modify the scripts that are created. Just don't insert code inside the created code. If you do so you can't import the script inside the game again without loosing some data.

Conditions

Conditions can be added to the script. When a condition evaluates to true for example Day 1 of Player 1 is true the moment the game starts, all Events added to the condition will be executed. More conditions can be requested via the Issue Tracker

  • Start of Turn will be executed at the start of the given player
  • Each Day will be executed at the first given day of player and each further given day
  • Victory the script will be executed once the given team has won the map.

Events

An event is something that will be executed once a condition it's attached is true. Currently the following events are added. More events can be requested via the Issue Tracker

  • Dialog some talking between CO's
  • Spawn Unit allows you to spawn units for a player at certain positions.
  • Defeat Player kills a player and removes him from game

Script-Editor Concept

Each condition or event has a unique comment which is added at the end of each js-line, when reading a script those lines will be interpreted accordingly and added to the back-end data. Lines not fitting the requested data will be discarded. Lines outside the created conditions will be read as custom code, which is not shown in the ingame script editor. However the custom code will be rewritten to the script when the script is saved. So you can add custom code to generated code as long as you don't insert it into generated conditions and events.