[*Back to Index*](index.md.html)
Commander Profile
=================
This mod item allows you to define a commander profile. It can be selected in the new game menu and has a significant effect over gameplay. Each commander profile has some specific properties and game effects. [Here](LuaFunctionDoc_Gameplay.md.html) can be found some useful functions for creating effects.
Gameplay effects for the Commander Profile can be defined using [Effects](ModItemEffect.md.html). They can influence global consts in different ways, unlock various gameplay items at game start and impact player structures at different stages of creation. Game effects are the most conveninent way to implement functionality for your Commander Profile.
Commander Profiles can be tested easily in the **Mod Editor** if it is the ["currently edited"](index.md.html#welcometomoddingsurvivingmars!/modeditor) mod.
To do this, you need to:
- Enable your mod in the **Mod Manager**.
- Have an unpacked version of your mod in your *`%AppData%/Surviving Mars/Mods`* folder.
- Have it be the most recently saved mod.
- Have only one Commander Profile mod item.
Properties
----------
Id (self.id)
: This is the internal unique id of commander profile. It is not visible by users.
Display Name (self.display_name)
: This is the user-visible name of the commander profile, visible when choose commander in game combo.
Challenge Mod (%) (self.challenge_mod)
: Challenge difficulty bonus (in percent) apply to calculate map difficulty bonus.
Description (self.description)
: Short, user-visible description of that commander profile and its effects.
Filter (self.filter)
: Lua expression that will be evaluated to check whether to show this command profile in game combo.
**Bonus Breakthrough Anomalies (self.anomaly_bonus_breakthrough)**
**Bonus event Anomalies (self.anomaly_bonus_event)**
**Bonus free Tech Anomalies (self.anomaly_bonus_free_tech)**
: When generating a new map anomalies are placed depending on some chance range. These properties increase the probabilities.
Bonus Rockets (self.bonus_rockets)
: Starting rockets bonus.
Parameters (self.param1, self.param2, self.param3, self.param4, self.param5)
: Properties that contain number values - use them in additional code in the Filter and Game Apply properties, if necessary.
Game Apply (function self:game_apply(city))
: Code that is executed at game start. Use functions to implement conditional command profile effects which cannot be defined via [Effects](ModItemEffect.md.html).
(insert footer.md.html here)