The events code is really obtuse.
I'm trying to debug one of the increase-planet-size mods from the Workshop, for personal use and also so I can poke the author and tell him "Yo, this is what's wrong with your mod."
It looks very simple, but it's not working. It looks very much as if he's copy-pasted the successful increase capitol size edict mod and made some changes.
The devil seems to be in the scope. For reference, here's the increase capitol size mod's event:
And here's the generic "increase any planet's size" event.
Firstly, I can see that there's an extra curly bracket at the end, but fixing that doesn't actually do anything.
The problem is, I think, the lack of an event scope; the event doesn't seem to have any way of telling the game which planet it wants to increase the size of. I can't tell if it's eating your 150 influence to increase the size of a random planet, or just throwing it down a black hole.
Can anyone more wise to the ways of events give me a hand here?
I'm trying to debug one of the increase-planet-size mods from the Workshop, for personal use and also so I can poke the author and tell him "Yo, this is what's wrong with your mod."
It looks very simple, but it's not working. It looks very much as if he's copy-pasted the successful increase capitol size edict mod and made some changes.
The devil seems to be in the scope. For reference, here's the increase capitol size mod's event:
Code:
namespace = planetincrease_size
event = { #Initial event triggered for players
id = planetincrease_size.1
hide_window = yes
is_triggered_only = yes
immediate = {
every_country = {
limit = { is_ai = no }
capital_scope = {
change_planet_size = 1
}
}
}
}
And here's the generic "increase any planet's size" event.
Code:
namespace = planetworldevent_size
planet_event = { #Initial event triggered for players
id = planetworldevent_size.1
hide_window = yes
is_triggered_only = yes
immediate = {
change_planet_size = 1
}
}
}
Firstly, I can see that there's an extra curly bracket at the end, but fixing that doesn't actually do anything.
The problem is, I think, the lack of an event scope; the event doesn't seem to have any way of telling the game which planet it wants to increase the size of. I can't tell if it's eating your 150 influence to increase the size of a random planet, or just throwing it down a black hole.
Can anyone more wise to the ways of events give me a hand here?