Hello, I'm new to the game and I went straight into modding, because developing gaemes is my career of choice when I grow up.
As a first attempt, I'm hoking an event to on_building_complete handler, and this is my script:
This is what I get as error (it says I can't modify my species trait within the species scope, which is where I expected it to be modifiable):
Is there a way to do this at all?
As a first attempt, I'm hoking an event to on_building_complete handler, and this is my script:
Code:
planet_event = {
id = psion.1
hide_window = yes
is_triggered_only = yes
trigger = {
AND = {
OWNER = {
NOT = { has_country_flag = flag_built }
}
THIS = { has_building = "building_power_plant_1" }
}
}
immediate = {
OWNER = {
set_country_flag = flag_built
owner_species = {
add_trait = "trait_rapid_breeders"
}
}
}
}
This is what I get as error (it says I can't modify my species trait within the species scope, which is where I expected it to be modifiable):
Code:
[13:30:58][effect.cpp:313]: Invalid Scope type for effect add_trait in events/events.txt line : 21
[13:31:00][effect_impl.cpp:13027]: Failed to find trait "trait_rapid_breeders" for _add_trait_ trigger.
[13:34:58][effect.cpp:380]: Script Error, attempted to execute an effect on an unsupported scope!
Event: psion.1
Type: add_trait
Scope:type=species
id=13
random={ 1019375613 1019375613 }
root={
type=planet
id=197
random={ 1019375613 1019375613 }
from={
type=tile
id=1125912791744709
random={ 1375598546 1375598546 }
}
}
from={
type=tile
id=1125912791744709
random={ 1375598546 1375598546 }
}
prev={
type=country
id=13
random={ 1019375613 1019375613 }
root={
type=planet
id=197
random={ 1019375613 1019375613 }
from={
type=tile
id=1125912791744709
random={ 1375598546 1375598546 }
}
}
from={
type=tile
id=1125912791744709
random={ 1375598546 1375598546 }
}
prev={
type=planet
id=197
random={ 1019375613 1019375613 }
from={
type=tile
id=1125912791744709
random={ 1375598546 1375598546 }
}
}
}
file: events/events.txt line: 21