[*Back to Index*](index.md.html)
Mission Sponsor
===============
This mod item allows you to define a mission sponsor. It can be selected in the new game menu and has a significant effect over gameplay. [Here](LuaFunctionDoc_Gameplay.md.html) can be found some useful functions for creating effects.
Gameplay effects for the Mission Sponsor 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 Mission Sponsor.
Misson Sponsors 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 Mission Sponsor mod item.
Properties
----------
Id (self.id)
: This is the internal unique id of mission sponsor. It is not visible by users.
Display Name (self.display_name)
: This is the user-visible name of the mission sponsor, visible when choose it in game combo.
Challenge Mod (%) (self.challenge_mod)
: Challenge difficulty bonus (in percent) apply to calculate map difficulty bonus.
Starting Funding (M) (self.funding)
: Starting game funding value.
Tech Funding (M) (self.funding_per_tech)
: Funding earned when tech is researched.
Breakthrough Funding (M) (self.funding_per_breakthrough)
: Funding earned when breakthrough tech is researched.
Breakthrough applicants (self.applicants_per_breakthrough)
: The number of new applicants that are added to waiting ones for each researched breakthrough tech.
Cargo Capacity (self.cargo)
: The maximum payload (in kg) of a resupply Rocket.
Starting Rockets (self.initial_rockets)
: Number of available rockets at game start.
Rocket price (M) (self.rocket_price)
: Rocket price, set to 0 for free rockets.
Pod price (M) (self.pod_price)
: Pod price, set to 0 for free pods.
Applicants price (M) (self.applicants_price)
: Applicants price when not enough and buy new ones for resupply.Set to 0 for getting them free.
Starting Techs to research (self.initial_techs_unlocked)
: The number of initially available Techs to research.
Trait given to colonists (self.trait)
: The trait that each colonist will get.
**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.
Export Price Precious Metals (self.precious_metals_export_price)
: Price at which a unit of Precious Metals will be exported.
Research Points per Sol (self.research_points)
: Points points granted each Sol.
Applicants Pool Starting Size (self.initial_applicants)
: The starting size for the pool of applicants.
Sponsor Funding per Interval (self.funding_per_interval)
: Funding received on a reguler interval. The interval is determined by `g_Consts.SponsorFundingInterval`.
Research points granted on exploring a sector (self.research_points_per_explored_sector)
: Research points granted on exploring a sector.
Funding granted on colonist arrival on Mars (self.colonist_funding_on_arrival)
: Funding granted on colonist arrival on Mars.
Effect (self.effect)
: Text description for users of this sponsor effects. Add implementation in 'Game Apply' function.
Flavor text (self.flavor)
: Artistic text or quote that describes the mission sponsor. It is visible by users.
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.
Filter (self.filter)
: Lua expression that will be evaluated to check whether to show this mission sponsor in game combo.
Game Apply (function self:game_apply(city))
: Code that is executed at game start. Use functions to implement conditional mission sponsor effects which cannot be defined via [Effects](ModItemEffect.md.html).
Here is an example of a very generous sponsor
~~~~~~~~~ Lua
if IsGameRuleActive("ColonyPrefab") then
GrantTech("SoilAdaptation")
city:AddPrefabs("StirlingGenerator", 2)
city:AddPrefabs("MoistureVaporator", 2)
city:AddPrefabs("Farm", 2)
end
~~~~~~~~~
Colony Color Scheme (self.colony_color_scheme)
: The Building Colors associated with this sponsor.
Banner Entities Postfix (self.banners_name) *Space Race only*
: When determining the entity name of a sponsor banner, this text will be appended to the base name for the flag class.
: For the Small Banner, when playing with Internation Mars Mission, the entity name will be "Flag_01_" .. "IMM".
: Here's a list of all built-in banner names: "BlueSun", "Brazil", "China", "Europe", "IMM", "India", "Japan", "NewArk", "Russia", "SpaceY", "USA".
: The three banner name prefixes are "Flag_01_", "Flag_02_" and "Flag_03_", which is useful when creating custom sponsor banners.
: When this property has it's default value, the sponsor ID is used instead.
(insert footer.md.html here)