I have an event where I would like to give different result options for the player, depending on their current researched technologies and government ethos. To keep it simple, let's say I'm only interested in whether the player is a materialist or fanatic materialist, and whether they have discovered tech_thrusters_2.
Taking the problem at face value, it seems to me like I would need to make a series of separate options that each trigger on every different possible combination of those values. So, for example:
and so on for each possibility where the player doesn't have tech_thrusters_2 as well. That seems like it will take up a truly massive amount of space with a lot of room for snarled code, and if I want to add more conditions then the number of code lines will inflate rapidly. Does anyone with more experience have any syntax tips and tricks for condensing a large number of conditions to trigger separate effects?
Taking the problem at face value, it seems to me like I would need to make a series of separate options that each trigger on every different possible combination of those values. So, for example:
Code:
option = {
name = anomaly.1.a
trigger = {
owner = {
has_ethic = ethic_materialist
has_technology = tech_thrusters_2
}
}
}
option = {
name = anomaly.1.b
trigger = {
owner = {
has_ethic = ethic_fanatic_materialist
has_technology = tech_thrusters_2
}
}
}
option = {
name = anomaly.1.b
trigger = {
owner = {
not = {
has_ethic = ethic_fanatic_materialist
}
has_technology = tech_thrusters_2
}
}
}
and so on for each possibility where the player doesn't have tech_thrusters_2 as well. That seems like it will take up a truly massive amount of space with a lot of room for snarled code, and if I want to add more conditions then the number of code lines will inflate rapidly. Does anyone with more experience have any syntax tips and tricks for condensing a large number of conditions to trigger separate effects?