• 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.

Ookoo

Private
26 Badges
Jun 24, 2014
24
1
  • Europa Universalis IV
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Crusader Kings II
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Stellaris: Megacorp
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Common Sense
  • Mount & Blade: Warband
  • Europa Universalis IV: El Dorado
  • Victoria 2
Hey guys, I'm trying to make some events for my Collective Intelligence Traits mod that spawn aggressive and secessionist consciousnesses. I've tried using several test events and some crises' as the framework for the event, but I can't get them to even spawn, never mind getting all the other features I want to work.

Here's the current event:

Code:
#The Collective Splinters
country_event = {
    id = country.9999
    title = "country.9999.name"
    desc = "country.9999.desc"
    picture = GFX_evt_satellite_in_orbit
    show_sound = event_space_battle
 
    is_triggered_only = yes

    option = {
     
        name = "How could this have happened?"
     
        create_country= {
            name = "Renegade Consciousness"
            type = faction
            government = despotic_hegemony
            species = random
            ethos = random
            flag = random
        }
     
        any_owned_planet = {
            limit = { not is_capital }
            set_controller = last_created_country
        }
    }
}

On a side note, I've noticed that you can't put both an Immediate and an Option in an event, even if the option is just text, as there'll be no way to exit the pop-up. Is this intentional?

Anyways, I appreciate very much any help you all can give me with this!
 
What are you using to trigger the event? Does it pop up, but just does not create the new faction?

From all the examples and my own events, I'm sure your line should be:

any_owned_planet = {
limit = {
NOT = {
is_capital } } }
 
On a side note, I've noticed that you can't put both an Immediate and an Option in an event, even if the option is just text, as there'll be no way to exit the pop-up. Is this intentional?

Why wouldn't that be possible? You exit the popup by pressing the one option-button. I make events that do stuff in immediate all the time and my option is just an "ok"-button.
 
What are you using to trigger the event? Does it pop up, but just does not create the new faction?

From all the examples and my own events, I'm sure your line should be:

any_owned_planet = {
limit = {
NOT = {
is_capital } } }

I've just been firing the event via the console with no problem, it works perfectly aside from actually creating the new country. Also I did try fixing that line and it still wasn't working.

Why wouldn't that be possible? You exit the popup by pressing the one option-button. I make events that do stuff in immediate all the time and my option is just an "ok"-button.

That's what I'm saying. When I have an Immediate followed by an Option of any length (including zero letters!), the button is simply not there. I also just tried having NO option, only putting the commands in the immediate, and there still isn't a button.

I'm sure I'm being really, really dumb somehow but I have no idea how.
 
That's what I'm saying. When I have an Immediate followed by an Option of any length (including zero letters!), the button is simply not there. I also just tried having NO option, only putting the commands in the immediate, and there still isn't a button.

I'm sure I'm being really, really dumb somehow but I have no idea how.

Look at the pirate event for a working example.
 
Sounds like a bracket is not closing, or too early.

Oh and any_owned_planet can not be used here. You are in a command/execution/effect code block. Try with every_owned_planet. (or random_planet_within_border if you just want one)

Well I fixed the option; it wasn't brackets, I think; as far as I can tell there's certain syntax/strings (ex. the NOT clause somebody posted above) that breaks it.

As to the rest, after several excruciating hours I've gotten most of it working; it now properly hands over the planets and creates the new country. However, I still have three problems:

A) I still can't get it to spawn in my territory, as the only command that works appears to be random_planet, while random_system or something similar will just break it. I did try random_planet_within_border but I'm pretty sure that's not a real scope. I also tried using the random_owned_planet scope and is_within_borders condition in the limit but they also just break the event.

B) I can't get it to spawn on a pre-existing colony, mine or otherwise. Has_owner and Is_colony are non-functional, so it can only spawn on an empty world as a new colony.

C) Although it spawns the country properly, there's a weird glitch where the 'colonizable' UI thing will remain and cover up their flag, even after reloading:

600B08FBB621A4B4EAA6C6D22432756D5E4D532D


Here's the current build if you all can/are willing to help more:

Code:
#The Collective Splinters
country_event = {
    id = country.9999
    title = "country.9999.name"
    desc = "country.9999.desc"
    picture = GFX_evt_satellite_in_orbit
    show_sound = event_space_battle

    is_triggered_only = yes
 
    immediate = {
        create_country = {
            name = "Renegade Consciousness"
            type = default
            government = random
            species = owner_species
            ethos = random
            flag = random
        }
        random_planet = {
            limit = {
                is_capital = no
                is_colonizable = yes
            }
            set_controller = last_created_country
            create_colony = {
                    owner = last_created_country
                    species = owner_main_species
                }
            create_pop = {
                    species = owner_main_species
                    ethos = owner
                }
            set_capital = last_created_country
        }
    }
    option = {
        name = ok
    }
)

On a side note, I love that syntax file you have in your signature, helped me a ton!
 
Are you in observe mode when you see the red colonize icon over the country flag? That seems to happen to me all the time too, but it appears normal when I am playing as a country and look at it.

Try:
any_controlled_planet = {
limit = {
is_homeworld = no
}}

or with NOT:

NOT = { is_homeworld }

maybe use AND and have a condition that it is a certain kind of planet, like the pirates event does with asteroids.

Also, you probably cannot create a colony if there is a colony. Consider: Create your new country, then use set_owner to change ownership of the colony to last_created_country.
 
Last edited:
Are you in observe mode when you see the red colonize icon over the country flag? That seems to happen to me all the time too, but it appears normal when I am playing as a country and look at it.

Try:
any_controlled_planet = {
limit = {
is_homeworld = no
}}

or with NOT:

NOT = { is_homeworld }

maybe use AND and have a condition that it is a certain kind of planet, like the pirates event does with asteroids.

Also, you probably cannot create a colony if there is a colony. Consider: Create your new country, then use set_owner to change ownership of the colony to last_created_country.

I was in observe so that probably was the issue. And ill try messing around with those commands in the morning.

To the colony thing, I'm aware it can't make a new one if there already is. As I noted in the last post I can't get any of the ownership change commands to work, so the colony is there for now to make sure the country spawns correctly at least.

EDIT: After thinking about it, using the planet type scope/condition wouldn't help anything. The whole point is it can't assign the planet properly, not that it's the wrong type <_<
 
Last edited:
Alright, after several excruciating hours of messing with scopes and conditions I've finally gotten the majority of it to work. The event will now properly spawn a new country within a given border and assign all planets within the chosen system to them:

Code:
#The Collective Splinters
country_event = {
    id = country.9999
    title = "country.9999.name"
    desc = "country.9999.desc"
    picture = GFX_evt_satellite_in_orbit
    show_sound = event_space_battle

    is_triggered_only = yes

    immediate = {
        create_country = {
            name = "Renegade Consciousness"
            type = default
            government = random
            species = owner_species
            ethos = random
            flag = random
        }
        random_owned_planet = {
            limit = {
                is_homeworld = no
                is_colony = yes
            }
            set_owner = last_created_country
            set_capital = last_created_country
            solar_system = {
                every_system_planet = (
                    limit = {
                        is_colony = yes
                    }
                    set_owner = last_created_country
                )
            }
        }
    }
    option = {
        name = "How could this have happened?"
    }
)

However, with this current build the option won't appear. I've concluded with 100% certainty that the problem I was and am having is that certain conditions (in this case the is_colony, but also others such as has_owner), if put in a limit in the Immediate, break the option box. Only solution I have for now is to put all the event data into the option; does anyone know a better way?
 
  • 1
Reactions:
Take a look at the tutorial selection in events/advisor_events.txt -> it clearly uses immediate and option in the same event. Maybe in the event before the immediate include something like:
desc = { text = " Oh No, Rebellion! " }
then after the immediate have the option, which you just click on to make the text box disappear.


Edit:
the limit is so that it keeps checking planets until it finds one that is a colony but not the homeworld, right? The advisor tutorial level selection also has a limit inside the immediate and the option box works fine, so that must not be the problem.
 
Take a look at the tutorial selection in events/advisor_events.txt -> it clearly uses immediate and option in the same event. Maybe in the event before the immediate include something like:
desc = { text = " Oh No, Rebellion! " }
then after the immediate have the option, which you just click on to make the text box disappear.


Edit:
the limit is so that it keeps checking planets until it finds one that is a colony but not the homeworld, right? The advisor tutorial level selection also has a limit inside the immediate and the option box works fine, so that must not be the problem.

Ok well if that's not the problem then what is? The code I've posted is everything that's there at the moment.
 
Why note just use the event to proc a 'warning' event for the owner and close it there? Most of the vanilla events work this way.