Scripting in Soil enables you to add extra functionality to your maps
or entire gamemodes in your dataset. To add script to your map, simply create
file called "<mapname>.script" inside map folder. You can also create
general purpose script for scenario or multiplayer that will be used if map
doesn't have its own script. To do this, create "scenario.script" or "multiplayer.script"
in "scripts" folder in your dataset. You can start by copying "template.script"
from "common" dataset's "scripts" folder.
Below is documentation of interfaces exposed to scripts. As a final quick note
on scripting language, keep in mind that all arrays and indices start from zero!
Therefore a correct way to check for boundary condition is index < numberOfElements
You can check your script's syntax using "script_validator.exe". Simply drag and drop
your script file on the "script_validator.exe" to open it. This will also create
logs next to your script. Those can be deleted.
Following classes are exposed to the script. vec3 is a simple
3D vector available in script as "value" type. All others are "reference" types
and new instances cannot be created inside script. All except EngineInterface
can be stored as global variables. Following are class hierarchies shown as class
inheritance Base class > Derived class.
There is implicit casting from derived classes to base classes. That means that
if you have reference to class, you can access properties and methods of its
base classes. Remember that inheritance is transitive, so you can access methods
of Targetable through reference to Debris
If you have reference to base class and want to access methods of derived class
you must perform explicit cast. To determine what class object is, you
use Targetable's method getObjectType(). Example:
You have Targetable@ thing; and calling thing.getObjectType() returns
TYPE_SHIP. Now you can cast to Ship like this:
Ship@ thing_as_ship = cast<Ship>(thing);.
In this case, you could also cast to Object@. It is completely vital that
you always check if you can perform cast before doing so. If possible, avoid at all.
Method | Description |
bool isDefeated() |
Returns true if this player is defeated |
void setDefeated() |
Sets player as defeated, if not already victorious |
bool isVictorious() |
Returns true if this player is victorious |
void setVictorious() |
Sets player as victorious, if not already defeated |
vec3 getColor() |
Returns player's primary color. This is the color that shows up on sensors. Colors are in range [0.0,1.0] |
void setColor(vec3 color) |
Sets player's primary color. This is the color that shows up on sensors. Colors are in range [0.0,1.0] |
vec3 getColorBase() |
Returns player's base/secondary color. This is the color that usually represents base paint of ships. Colors are in range [0.0,1.0] |
void setColorBase(vec3 color) |
Sets player's base/secondary color. This is the color that usually represents base paint of ships. Colors are in range [0.0,1.0] |
string getName() |
Returns name of this player |
int getPlayerIndex() |
Returns index of player (can be used with EngineInterface.getPlayer(index)). This does not change during the mission |
bool isAlly(Player@ other) |
Returns true if this player and other are allies. This means that both players don't shoot at each other |
bool isEnemy(Player@ other) |
Returns true if this player is hostile towards other player. This may not be mutual. Neutral objects are never "enemy" |
bool isNeutral() |
Returns true if this player is "neutral". This is special player and only this one is neutral. No player can be hostile towards neutral |
bool isFriendly(Player@ other) |
Returns true if other player is either this player, or this player is not hostile towards other. other still may be hostile towards this player |
void setAlliance(Player@ other) |
Sets this player and other as allies |
void cancelAlliance(Player@ other) |
Cancels this player and other's alliance |
void disallowVision(Player@ other) |
Turns off vision sharing for this and other. These players won't share vision even if they are allies |
void allowVision(Player@ other) |
Turns on vision sharing between this and other player. These players must be allies to share vision |
bool isPlayerLocal() |
Returns true if this player is currently controlled by human at this computer. Do not use for anything game altering, as this will break replays and multiplayer |
bool isPlayerNetwork() |
Returns true if player is human playing over a network. Do not use for anything game altering, as this will break replays and multiplayer |
float getStatsDamageDealt() |
Returns how much damage this player has done |
float getStatsDamageTaken() |
Returns how much damage this player has taken |
float getStatsDamageRepaired() |
Returns how much damage this player has repaired |
float getStatsResourcesHarvested() |
Returns how much resources this player harvested |
void disallowResearch(string name) |
Prevents research with name from being researchable by this player (name is name of the file in data/stats/research/, without the extension) |
void allowResearch(string name) |
Allows research with name to be researchable by this player (name is name of the file in data/stats/research/, without the extension) |
bool isResearchDisallowed(string name) |
Returns true if research with name is not allowed by this player (name is name of the file in data/stats/research/, without the extension) |
uint getResearchQueueLength() |
Returns number of researchs that are currently queued by player (including currently researching) |
float getResearchEffectXPGainMultiplier() const |
|
float getResearchEffectXPMultiplierOffensive() const |
|
float getResearchEffectXPMultiplierDefensive() const |
|
float getResearchEffectXPOffensiveAsDefensive() const |
|
float getResearchEffectXPDefensiveAsOffensive() const |
|
float getResearchEffectBuildXPOffensive() const |
|
float getResearchEffectBuildXPDefensive() const |
|
float getResearchEffectBuildSpeedMultiplier() const |
|
float getResearchEffectFighterServiceSpeedMultiplier() const |
|
float getResearchEffectBuildCostShipMultiplier() const |
|
float getResearchEffectBuildCostFighterMultiplier() const |
|
| |
Method | Description |
ShipType getShipType() const |
|
const ShipStat@ getStat() const |
|
string getFullDisplayName() const |
Same as function on ShipStat |
OrderType getOrder() const |
Returns current order assigned to this ship. If it has no orders, returns SHIP_ORDER_NONE |
AbilityType getOrderAbility() const |
Returns ability ordered if ship order is SHIP_ORDER_ABILITY_CAST. For non-cast abilities, see Ship.hasActiveAbility |
Object@ getTarget() const |
Returns target related to current order. If ship has no order and it turns itself towards nearby enemy or resource, this method still returns null because it is not target of player's order |
vec3 getDestination() const |
Returns position related to player's order. Has meaningful value only if order is not SHIP_ORDER_NONE |
float getFiringDistance() const |
Same method as on ShipStat |
void setDisarmedStatus(bool disarmed) |
If disarmed is set to true, turrets from this ship are removed |
bool getDisarmedStatus() const |
|
bool canPerformOrder(OrderType order, const Object@ target) |
Returns true if this ship can do order of type order. If target is not null, it is additionally check if given order can be performed on this target (e.g. ship that can perform SHIP_ORDER_ATTACK will still return false if target is friendly) |
bool isInoperable() |
Returns true if ship can operate (not scaffolded or exploding) |
bool isScaffolded() |
Returns true if any object has scaffold on it (being repaired or scrapped) |
bool isUnderConstruction() |
Returns true if ship is currently being built by shipyard |
bool isBeingScrapped() |
Returns true if ship is currently being scrapped by shipyard |
float getRepairCostTotal() |
Returns amount of resources it will take to repair this ship |
float getScrapValue() |
Returns amount of resources that will be refunded by scrapping this ship by shipyard |
uint getConstructionQueueLength() |
Returns number of ships that are in build queue of this ship. It does not include ships already being built |
bool canBuildShip(const ShipStat@ stat, array<string>@ blockedByResearch = null) |
|
ShipStatus getShipStatus() |
|
float getShieldHitpoints() |
|
float getShieldMaxHitpoints() |
|
void setShieldHitpoints(float) |
|
float getCargoCapacity() const |
|
float getCargoResources() const |
|
float getCargoCrystals() const |
|
float getEnergy() const |
|
float getEnergyCapacity() const |
|
int getMaxPassengers() const |
Returns max number of "crew" in this ships crew quarters. Crew is used to build new ships |
int getPassengers() const |
|
uint getNumSubsystems() |
Returns number of subystems this ship has |
Subsystem@ getSubsystem(uint index) |
Returns subsystem at index, or null if index is out of range |
bool canCastAbilityOn(AbilityType type, Object@ target) |
Returns true if this ship can cast ability of type, this also includes if ship has activation energy cost. If target is not null it also tests if ability can be cast on that target. If ability is not cast (applied on self), don't provide target |
bool hasActiveAbility(AbilityType type) |
Returns true if ship has active ability of type. For abilities cast on other ships, use Ship.getOrder and Ship.getOrderAbility |
float getShipAutoTargetScore(const Object@ target) |
Returns targeting "score" of target for this ship. Higher score means that ship would prefer to attack this target over objects with lower score. This is only based on this ship's ship type and targets type/ship type |
float getExperienceOffensive() |
Returns offensive experience of this ship. See EC in editor to see what this affects |
float getExperienceDefensive() |
|
void setExperienceOffensive(float experience) |
|
void setExperienceDefensive(float experience) |
|
void setHero(bool heroStatus) |
Sets heroStatus of this ship. Hero ships can use abilities without them being researched. They can also have abilities that their base ship class doesn't have (hero only) |
void isHero() |
|
bool loadCargo(float resources, float crystals) |
Magically loads amount of resources and crystals to this ship. If there is not enough space for this cargo, false is returned and as much cargo as fits is loaded, with crystals being loaded first |
bool unloadCargo(float resources, float crystals) |
Magically unloads amount resources and crystals from this ship. If there is not enough of either cargo on this ship, false is returned and no cargo is removed |
bool loadPassengers(int count) |
Magically loads count of crew into this ship. If there is not enough space, false is returned and as much passengers fit are loaded |
bool unloadPassengers(int count) |
Magically removes count of crew from this ship. If there is not enough crew on this ship, false is returned and no crew is removed |
void cheatRestoreShield() |
|
void cheatRestoreEnergy() |
|
void cheatFillCrewquarters() |
|
void cheatFillCargoholds() |
|
void cheatReloadMissiles() |
|
void cheatServiceFighters() |
|
| |
Method | Description |
uint stepNumber |
Step number of simulation, every mission starts at 0. Script can set how many frames are simulated before first image is show to player (e.g. to wait for some explosions, ships to open fire, etc.). Game simulates STEPS_PER_SECOND steps per second (unless there were some big changes, this should be 20) |
uint orderDelay |
When player gives orders, it takes this many frames until they are applied. Don't use this for anything other then to display it? I have no idea why it is even here |
int screenWidth |
Screen width in pixels. Obviously use this only for UI (0 is left, screenWidth is right) |
int screenHeight |
Screen height in pixels. Obviously use this only for UI (0 is bottom, screenHeight is top) |
float uiScaling |
It should be applied to button sizes, offsets and font sizes. Obviously use this only for UI (default is 1.0f) |
float warpTime |
Time in seconds it takes from when ship starts warping in/out until it is finished. Unless I fixed it, ships cannot receive orders while warping, delay any orders for them from their creation for at least this time. This is constant, it never changes |
float warpWarmup |
Minimum time in seconds it takes from when ship is ordered to warp out until it starts warping. Ship needs to face correct direction, so it might take longer (or never happen). This does not apply for microwarp ability, that is individual for ability. This is constant, it never changes |
bool lastManStanding |
Is true if current multiplayer match victory rule is last man standing (as opposed to based on damage done) |
bool debugDraw |
Is true if user wants script to draw debug information (what that means is up to script). This can be turned on in script debugger (while in game, press SHIFT + F5) |
uint getNumAll() |
Returns number of all objects of all types in map, except for fighters. Fighters are kept in separate list |
Object@ getAll(uint idx) |
Returns object of any type at index idx, or null if out of range |
uint getNumObjects() |
Returns number of generic objects in map (these are objects that are not Ship, Fighter, Debris, or ResourceContainer) |
Object@ getObject(uint idx) |
Returns generic object at index idx, or null if out of range |
uint getNumResourceContainers() |
Returns number of resource containers (generic objects that can have resource to be mined, but can also be empty) in map |
ResourceContainer@ getResourceContainer(uint idx) |
Returns resource container at index idx, or null if out of range |
uint getNumDebris() |
Returns number of debris in map (remnants of destroyed objects that can be mined for resources by salvages, if debris is from ship) |
Debris@ getDebris(uint idx) |
Returns debris at index idx, or null if out of range |
uint getNumShips() |
Returns number of ships in map (this includes stations, everything with subsystem counts as ship) |
Ship@ getShip(uint idx) |
Returns ship at index idx, or null if out of range |
uint getNumFighters() |
Returns number of fighers in map |
Fighter@ getFighter(uint idx) |
Returns fighter at index idx, or null if out of range |
Ship@ getAttacker(Targetable@ object, uint attackerIndex) |
Returns attacker of object with index attackerIndex. You can get number of attackers of object with Targetable.getNumAttackers(). Returns null if index is out of range, attacker is not of type Ship, or attacker no longer exists |
Player@ getPlayerNeutral() |
Returns neutral player. This is a special player not included in in getNumPlayers |
uint getNumPlayers() |
Returns number of players in this map, this does not include neutral player. Players are not added, removed, or reordered during the game |
Player@ getPlayer(uint) |
Returns player by index. If index is out of range, returns neutral player. Players are not added, removed, or reordered during the game |
Player@ getPlayer(string name) |
Returns player by name. This is what is set in editor or what you see on result screen. If there is no player with name, null is returned |
vec3 getPointOfInterest(string name) |
Returns a position with name marked as point of interest in map editor. If there is no position with name, result is invalid position, you can query validity with vec3.isInvalid() |
void issueOrder(Ship@ ship, OrderType order, Object@ target, vec3 position, bool queue, string additionalInfo) |
Issues order of type order to ship. Orders will use target or position depending on type of order (e.g. escort needs target, move needs position). If queue is true, order is placed at the end of order queue, as if player held shift key. If queue is false, current order is cancelled, queue emptied, and this order becomes current order. additionalInfo is used dependent on order type. If it is not empty string, for SHIP_ORDER_WARP_OUT it denotes to what object pool will ship be added when warped out, for MISC_ORDER_OBJECT_DESIGNATION_SET name of this ship, for SHIP_ORDER_ADD_FIGHTERGROUP what type of fighter group to add, for SHIP_ORDER_REMOVE_FIGHTERGROUP index at which remove, for SHIP_ORDER_SCAFFOLD_CONSTRUCT what type of ship to build, and what tags to assign (e.g. "vr_cruiser" for no tags, or "vr_cruiser|tag_defense|tag_ai_made" for multiple tags) |
void issueOrderArray(Ship@ ship, OrderType order, array<Object@>@ target, bool queue) |
issueOrder version with multiple targets. This version creates order group, ship will automatically choose/switch between targets in one group as it sees fit instead of executing them one by one |
void issueOrderMisc(Player@ player, OrderType miscOrderType, string additionalInfo) |
Apply misc orders. (currently only documented one is MISC_ORDER_GIVE_UNITS, which changes desired game speed for player, with possible values of additionalInfo {"1","2","3","4"}) |
void activateAbility(Ship@ ship, AbilityType ability) |
Orders ship to activate ability. Technically could be done with issue order, but target, position, queue, additionalInfo is irrelevant, and you can use enum for type |
void deactivateAbility(Ship@ ship, AbilityType ability) |
Orders ship to deactivate ability. Technically could be done with issue order, but target, position, queue, additionalInfo is irrelevant, and you can use enum for type |
void castAbility(Ship@ ship, AbilityType ability, Object@ target, bool shift) |
Orders ship to cast ability on target. Most abilities can target only ships. Cast abilities work as regular orders when it comes to shift. |
void spawnShip(string statName, uint number, Player@ owner, vec3 position, vec3 lookAtPoint, bool asWarp, string tag) |
Creates number of ships of of type statName, assigned to player owner, at position facing towards lookAtPoint. If asWarp is true, spawned ships will warp in at position arriving from direction so they would face lookAtPoint, if false, they magically appear at position. If tag is not empty string, it will be added as tag. To add multiple tags, separate them by '|', e.g. "tag1|tag2|tag3" |
void spawnFighterGroup(string statName, uint numberOfFighters, Player@ owner, vec3 position, Ship@ parentShip) |
Creates fighter group of statName type of fighters with numberOfFighters at position. Fighter group is given to player owner. If parentShip is specified, it is attached to that ship if it still has empty slot in fighter bay, and owner must be same as parentShip's owner. parentShip as null is useful when you want to spawn escape pods that will return to owner's station. |
uint getNumObjectsInPool(string poolName) |
Returns number of objects in pool called poolName |
void respawnFromPoolFirst(string poolName, Player@ owner, vec3 position, vec3 lookAtPoint, string addTag, ShipSpawnMethod spawnMethod) |
Respawns first object in pool poolName at position facing towards lookAtPoint. Object is given to player owner and tag addTag is added to it. If object is Ship, spawnMethod dictates how it should spawn, if DEFAULT is selected, ship spawns in the fashion it despawned (disappear, warp out) |
void respawnFromPoolLast(string poolName, Player@ owner, vec3 position, vec3 lookAtPoint, string addTag, ShipSpawnMethod spawnMethod) |
Respawns last object in pool poolName at position facing towards lookAtPoint. Object is given to player owner and tag addTag is added to it. If object is Ship, spawnMethod dictates how it should spawn, if DEFAULT is selected, ship spawns in the fashion it despawned (disappear, warp out) |
void respawnFromPoolAll(string poolName, Player@ owner, vec3 position, vec3 lookAtPoint, string addTag, ShipSpawnMethod spawnMethod) |
Respawns all objects in pool poolName at position facing towards lookAtPoint. Objects are given to player owner and tag addTag is added to them. If object is Ship, spawnMethod dictates how it should spawn, if DEFAULT is selected, ship spawns in the fashion it despawned (disappear, warp out). Only for this method, formation spawn types make any sense |
void storeObjectToPool(Object@ object, string poolName, bool saveSelectionGroup) |
Removes object from map and stores it to pool with name poolName. If saveSelectionGroup is true, number of selection group is remembered so it is in that group when you respawn it, e.g. in next mission. Other way how object can get into pool is by warping out, with pool name as order's additionalInfo NOTE: this function only works when called inside of onMissionEnd() |
void endMission() |
Ends mission, exiting current map after current step is finished (script will still run after this call). When the mission is ended this way, onMissionEnd() will be called, in which you can call EngineInterface.storeObjectToPool(), and indicate next mission if any |
void addUIGroup(string groupID, string config) |
TODO: move stuff here from add button |
void setUIGroupCorners(string groupID, int left, int bottom, int right, int top) |
TODO: move stuff here from add button |
vec3 getUIElementCenter(string groupID, string id) |
TODO: |
vec3 getUIElementSize(string groupID, string id) |
TODO: |
void addButton(string groupID, string id, string text, int x, int y, int width, int height, bool enabled) |
TODO: update this Adds button to user interface, placed in a group with groupID, identified by id, centered at x,y. It is recommended that width and height be even numbers. enabled indicates whether or not button is clickable (it also renders differently, usually darker). config is .buttongroup styling config found in data/textures/gui that should be applied to this button. useScissor tells whether text, lines and polygons associated with this button should be clipped by its bounding box. config is only applied when button is first created, other values are updated if button exists. Button exists for single step only, and must be renewed every step as long as you wish to display this button. |
void addLabel(string groupID, string id, string text, int x, int y, int width, int height, float alphaOverride = -1.0f) |
TODO: |
void addTextArea(string groupID, string id, string text, int x, int y, int width, int height, bool enabled) |
TODO: |
void createMessagebox(string title, string message) |
Creates a message box. Intended to be used for error messages or some such |
void setFontStyleDefault() |
Sets font style to default, without outline |
void setFontStyleDefaultOutline() |
Sets font style to default, with outline |
void setFontStyle(bool outlineEnabled, vec3 outlineColor, float outlineOpacity, float outlineInner, float outlineOuter, vec3 outlineOffset) |
Sets style for font outline. outlineInner is distance from text where outline has full opacity, outlineOuter is distance from text where outline reaches zero opacity. outlineOffset is how much is outline offset from base text, this creates sort of drop-shadow (z is ignored). outlineColor is in range [0.0, 1.0] |
void drawText(string text, int x, int y, vec3 color, float alpha, string font, int height) |
Draws text on screen at coordinates x, y (0,0 is at left bottom). color and alpha is in range [0.0, 1.0]. font is one of file names in data/fonts, without extension. height is approximate in pixels |
uint getTextWidth(string text, string font, int height) |
Returns expected width in pixels of text when rendered in font with height. This does not include outline |
string createColorTag(vec3 color, float alpha) |
Returns string that you can insert into text that you want to render to change color mid-text. color and alpha are in range [0.0, 1.0] |
string createFontTag(string face, uint size) |
Returns string that you can insert into text that you want to render to change font mid-text. |
void insertTextMessage(string message, float displayTime) |
Adds text message that will be display above bottom panel, such as dialog, objective related messages, or to display mission rewards |
void playSound(string soundName, float gain, bool isVoice) |
Plays a sound. soundName is name of file to play in data/sounds/ (without extension). gain is volume multiplier at which sound will play, it is clamped to [0.0, 1.0] interval. If isVoice is true, it is added to queue of voice sounds, these play one at the time. If isVoice is false, sound plays immediately |
void playUISound(string soundName, bool isPriority) |
Plays an UI sound. soundName is name of file to play in data/sounds/ (without extension). If isPriority is true, it is added to queue of voice sounds, these play one at the time. If isVoice is false, sound plays immediately |
void drawSensorIcon(SensorIconType icon, vec3 position, vec3 color, float opacity) |
Draws sensor icon of type icon, placed at position in color. color is in range [0.0, 1.0]. This can be used to e.g. indicate mission objective. |
void drawLine(vec3 position0, vec3 position1, vec3 color0, float alpha0, vec3 color1, float alpha1, bool is3D) |
Draws a line from between two positions. If is3D is true, line will be drawn in world space, if false then in screen space (in pixels). colors and alphas are in range [0.0, 1.0]. |
void drawLineUI(string groupID, vec3 position0, vec3 position1, vec3 color0, float alpha0, vec3 color1, float alpha1) |
Same as above, but line is drawn together with UI created with e.g. addButton. This will draw it to same UI layer as the group with groupID, allowing it to be drawn over other UI. This is always in 2D |
void polygonPointUI(string groupID, vec3 position) |
Adds another point to current polygon. |
void polygonFinishUI(string groupID, vec3 color, float opacity) |
Creates a new polygon from previous points. Only convex polygons will draw correctly. If you want to draw concave polygons, you need to break them into convex parts yourself |
vec3 getProjectedPosition(vec3 worldPosition) |
Returns projected worldPosition to screen space (in pixels) |
void setCameraCenter(vec3 position) |
Sets camera center to position. Center is position around which camera rotates |
void setCameraView(vec3 position, vec3 center, vec3 centerVelocity, bool instantSkip) |
Sets camera to position, looking at center |
void giveResearch(string name, Player@ player) |
Gives research with name to player. name is file name found in data/stats/research/ without the extension (as always) |
void giveAllResearch(Player@ player) |
Gives all research to player |
void giveAllFreeResearch(Player@ player) |
Gives all research that doesn't cost research crystals to player. This is preferred method when wanting the player to build anything, as it won't give research that would boost production speed, reduce costs, or increase experience of built ships |
void removeResearch(string name, Player@ player) |
If player has already researched name, it will remove it from them. This can be useful to remove obsolete ships from being able to be built, or to temporarily allow building some ships by giving hidden research, then removing it. |
void removeAllResearch(Player@ player) |
Removes all research from player |
void allowResearch(string name, Player@ player) |
Allows player to research name. This can be used by disallowing all research, then allowing more as campaign or mission progresses |
void allowAllResearch(Player@ player) |
Allows all research for player |
void disallowResearch(string name, Player@ player) |
Disallows research name for player |
void disallowAllResearch(Player@ player) |
Disallows all research for player |
bool hasResearch(Player@ player, string name) |
Returns true if player has researched name |
bool hasResearchForShip(Player@ player, string ship) |
Returns true if player has all required research to build ship |
bool hasResearchForFighter(Player@ player, string fighter) |
Returns true if player has all required research to build fighter |
array<string> @getQueuebleResearch(Player@ player) |
Returns all research player can currently enqueue. This is all research that is clickable in UI (not hidden, not disallowed, with prerequisities researched or queued) |
void queueResearch(string name, Player@ player) |
Adds research name to queue for player |
void queueResearchForShip(Player@ player, string ship) |
Adds research for player required to build ship |
void queueResearchForFighter(Player@ player, string fighter) |
Adds research for player required to build fighter |
const ShipStat@ getShipStat(string name) |
Returns ship stat by name. Returns null if no such ship stat exists. If you already have Ship instance, you can use Ship.getStat() to get its stat. This should be used when you don't have instance of ship. |
void setPersistentData(string key, string value) |
Saves value under key to persistent data. This data is carried over to next missions. If you want to save ships that carry over, use object pools |
string getPersistentData(string key) |
Returns persistent data stored under key, or empty string if there is nothing stored under that key |
void logPersistentData() |
Dumps all persistent data to script log. This is for easier debugging of what is stored there. |
void logObjectPools() |
Dumps info about object pools to script log. This prints all saved pool names along with number of objects in them |
string getMissionParameter(string parameter) |
Returns value of parameter for this mission. These are displayed and user can select values when starting mission. Described in .config in the map's folder |
bool isObjectiveHighlighted(int index) |
Returns value of parameter for this mission. These are displayed and user can select values when starting mission. Described in .config in the map's folder |
void awardAchievement(string achievement) |
Awards achievement. These are found in data/stats/achievement/. Awarded achievement will be displayed even if it wasn't shown be showAchievement |
void showAchievement(string) |
Achievements are hidden by default, only displayed as ???. With this you can show it without awarding it, e.g. when mission is finished in which this is awarded |
| |