• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
Showing developer posts only. Show all posts in this thread.
I'd like to see more of this too.

I'm working on a flavour/content mod centered on the theme of robotics and artificial intelligence. I'm still getting to grips with the script but I've so far written several events, a policy (Laws of Robotics), a building (AI Mainframe that can take over the government), a couple of new techs and more. I'm planning on writing some anomalies too. These things take time and need to be tested properly, so I'm not really surprised that we haven't seen stuff like this yet.
 
A friend of mine and me have been thinking about doing just this. If we could find a way to get a bunch of events for each ethos and/or government type and trigger those if the player is bordering other empires of that type, we could add some real flavour to the galaxy and make it feel more alive. We have ideas, now we just need to learn how to pull them off...

Here, I've written and annotated parts of an event that might help you get started:

Code:
trigger = {
   has_ethos = "ethos_fanatic_pacifist"
   any_neighbor_country = {
     has_ethos = "ethos_fanatic_pacifist"
   }
   NOT = {
     any_country = {
       has_country_flag = fanatic_pacifist_event_flag # prevents weirdness, can be worked around by creating multiple flags for same event
     }
   }
}

immediate = {
   random_neighbor_country = {
     limit = {
       has_ethic = "ethic_fanatic_pacifist"
     }
     set_country_flag = fanatic_pacifist_event_flag # makes it easy to scope to this country in future.
   }
}

option = {
   random_neighbor_country = {
     limit = {
       has_country_flag = fanatic_pacifist_event_flag # makes sure we're scoping to the correct country
     }
     country_event = { # an event happens for the other country
       id = swag.2
       days = 3
     }
   }
}
 
  • 2
  • 1
Reactions:
I've taken a look at this after reading through the Stellaris and EUIV wikis, and just to be sure I understand your example correctly: A fanatic pacifist country will trigger this event as soon as it borders another fanatic pacifist country.

It doesn't have a MTTH, nor is it triggered by anything directly. As such I'm not actually sure when or even if this fragment of an event on its own would trigger. I meant this an an example of some script rather than as a template for an entire event.

It will set a flag for its new neighbour (preventing the same event from triggering twice between two same countries) and also send it a new event 3 days later.

Yes.

And then the flavourful event I want the player to have, will be the swag.2 in your example? However, this means that a fanatical pacifist player in this case would also get the option at the bottom to send event swag.2 to his AI neighbour?

Yes.

Could I do it the other way around? So that, instead of having the AI send me this event, I trigger it for myself directly?

There's nothing in this script which restricts the event to the player. It could fire for either country, since they both meet the requirement of being fanatic pacifist.

So a country, regardless of its own ethos, would get a certain event when bordering a country of the fanatic pacifist ethos, and the fanatic pacifist country would get an event based on my own ethos, irrespective of their fanatic pacifist ethos?

Sure, you could do that. Just change the trigger of the initial event so that it fires for countries with the intended characteristics. If you want this to be something that happens every time a country with any ethos encounters a fanatic pacifist country, make sure you manage your flags properly. One way of doing this might be to have two sets of flags: one very temporary set of flags for fanatic pacifist countries (which would be removed when the event chain is over, and exist only for the sake of easy scopes), and another more permanent set for countries that encounter the fanatic pacifist (which would stick around to prevent the same country from triggering the event chain multiple times).