This article has been verified for the current PC
version (3.1) of the game.
The special project game data can be found in these files/folders: common/special_projects
Special Projects file structure[]
The file consists of a series of special_project = {}
entries.
special_project properties
Name |
Description |
Values |
Required |
Example
|
key |
The ID of the project, it is used in events and also in the localisation file (description is expected as e.g. "MYMOD_EXAMPLE_1_PROJECT_DESC" ). |
String |
Yes |
key = "MYMOD_EXAMPLE_1_PROJECT"
|
event_chain |
An associated event chain. |
ID of an existing Event chain |
No |
event_chain = "mymod_example_event_chain"
|
picture |
A picture for the project. |
String |
No |
picture = GFX_evt_alien_nature
|
sound |
Does this project have a specific sound? |
yes/no |
No |
sound = no
|
icon |
An icon to show on the left in the event log tree. |
String |
No |
icon = "gfx/interface/icons/situation_log/situation_log_quest.dds"
|
cost |
Science point cost of the project (must be '0' if using days_to_research). |
Integer |
No |
cost = 560
|
days_to_research |
How many days it will take to complete this project. Either cost or days_to_research must be defined. |
Integer |
No |
days = 180
|
tech_department |
Which department will handle this. |
physics_technology, society_technology, engineering_technology |
Yes |
tech_department = physics_technology
|
same_option_group_as |
If it is a sub-project of another |
special_project ID |
No |
same_option_group_as = { KETLING_PROJECT_1 }
|
AI_wait_days |
AI will wait for the amount of days specified. Works like normal AI weight fields, with factor/add/weight. Country scope, FROM is creation scope |
weight integer, modifier_rule fields |
No |
AI_wait_days = {
weight = 80
modifier = {
factor = 0.5
has_ethic = ethic_fanatic_militarist
}
}
|
timelimit |
In how many days will this project fail, triggering the on_fail statement. |
Integer, -1 for unlimited |
No |
timelimit = 100
|
location |
Does this project have a specific location? |
yes/no |
No |
location = no
|
event_scope |
The scope in which the statements run. |
ship_event, planet_event |
Yes |
event_scope = planet_event
|
requirements |
Conditions needed to start the project.[more] |
Conditions |
No |
requirements = {
shipclass_science_ship = 1
leader = scientist
skill > 1
}
|
abort_trigger |
Ongoing project will be canceled if this trigger returns true
- this = country (project owner)
- from = event scope (planet or ship, MIGHT NOT EXIST)
- fromfrom = project creation scope (usually equals location)
|
Conditions |
No
|
abort_trigger = {
NOT = { exists = fromfrom }
}
|
on_start
|
Statements to run when the project starts.
- this = event scope (ship or planet)
- from = project creation scope (usually equals location)
|
Statements |
No
|
on_start = {
owner = {
set_country_flag = started_x_project
}
}
|
on_success / on_progress_25/50/75
|
Statements to run when the project is complete.
- this = event scope (ship or planet)
- from = project creation scope (usually equals location)
|
Statements |
Yes
|
on_success = {
owner = {
country_event = { id = mymod.event.1 }
}
}
on_success = {
ship_event = { id = mymod.anomaly.1 }
}
|
on_cancel |
Statement fires if the abort trigger returns true
- this = country (project owner)
- from = event scope (planet or ship, MIGHT NOT EXIST)
- fromfrom = project creation scope (usually equals location)
|
Statements |
No |
on_cancel = {}
|
on_fail |
Statements to run when the project fails.
- this = country (project owner)
- from = project creation scope (usually equals location)
|
Statements |
No |
on_fail = { #times out
owner = {
country_event = { id = federations3.2129 }
}
}
|
requirements[]
Requirements use condition-like syntax, but they have their own set of commands. They do not support AND and OR commands.
Name |
Description |
Values |
Required |
Example
|
leader |
The type of leader needed at location. |
scientist, admiral, general, ruler, governor |
No |
leader = scientist
|
skill |
The skill level of the leader. |
Integer |
No |
skill > 2
|
has_trait |
The leader must have this trait |
Leader trait ID |
No |
has_trait = leader_trait_expertise_voidcraft
|
shipclass_military |
The number of military ships required. |
Integer |
No |
shipclass_military = 1
|
shipclass_constructor |
The number of constructor ships required |
Integer |
No |
shipclass_constructor = 1
|
shipclass_science_ship |
The number of science ships required |
Integer |
No |
shipclass_science_ship = 1
|
shipclass_colonizer |
The number of colonizers required |
Integer |
No |
shipclass_colonizer = 1
|
shipclass_transport |
The number of transport ships required |
Integer |
No |
shipclass_transport = 1
|
assault_armies |
The number of assault armies required |
Integer |
No |
assault_armies = 1
|
defense_armies |
The number of defense armies required |
Integer |
No |
defense_armies = 2
|
research_station |
Is a research station required at location? |
yes |
No |
research_station = yes
|
mining_station |
Is a mining station required at location? |
yes |
No |
mining_station= yes
|
observation_station |
Is an observation station required at location? |
yes |
No |
observation_station = yes
|
fleet_power |
If shipclass_military the power of the fleet required |
Integer |
No |
fleet_power > 999999
|
is_founder_species |
Does owner has to be a founder species? |
yes |
No |
is_founder_species = yes
|
Example[]
requirements = {
shipclass_science_ship = 1
leader = scientist
skill > 2
}
Usage[]
Once you have a special project defined, you can start it in an event by using the enable_special_project
command. The command has three parameters:
Name |
Description |
Example
|
name |
The key of the special project. |
name = "MYMOD_EXAMPLE_1_PROJECT"
|
location |
The location where the event takes place, for events with no location, it’s usually set to the capital. |
capital_scope = {
enable_special_project = {
name = "MYMOD_EXAMPLE_1_PROJECT"
location = this
owner = root
}
}
|
owner |
The country which will have this project enabled. |
owner = root
|
Example[]
enable_special_project = {
name = "MYMOD_EXAMPLE_1_PROJECT"
location = this
owner = root
}
There is also the abort_special_project
command to end a special project, it is used like:
abort_special_project = {
type = MYMOD_EXAMPLE_1_PROJECT
location = capital_scope
}
The country is inferred from the location parameter.
A trigger example: has_special_project = CAPTURE_QUEEN
Localisation[]
The localisation entries depend on the key property. The key is used for title and key_DESC is used for description.
Example[]
MYMOD_EXAMPLE_1_PROJECT:0 "Example title"
MYMOD_EXAMPLE_1_PROJECT_DESC:0 "Example description"