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

Garnrag

First Lieutenant
125 Badges
Jan 27, 2007
267
74
  • Cities: Skylines Deluxe Edition
  • Europa Universalis: Rome
  • Sengoku
  • Sword of the Stars
  • Sword of the Stars II
  • Teleglitch: Die More Edition
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • 500k Club
  • Cities: Skylines
  • Europa Universalis IV: Res Publica
  • Crusader Kings II: Holy Knight (pre-order)
  • Europa Universalis III: Collection
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Europa Universalis: Rome Collectors Edition
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Victoria 3 Sign Up
  • Europa Universalis III: Chronicles
  • Cities in Motion 2
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Deus Vult
  • Diplomacy
  • Europa Universalis III
  • Cities in Motion
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Heir to the Throne
  • Europa Universalis III Complete
  • Magicka
Help me, Modding Community, you're my only hope!

I'm trying to create an event that will fire on game start. I've created an on_actions file for it, placed it in the install directory's common\on_actions folder. My event file is in the mod directory's events folder, and it's being picked up by the game because I'm getting errors about it in the error log.

I have several planets I want to set specific modifiers or deposits to, but here's an example of the first one. I assumed my problem is in how I'm trying to scope to the planet, but I'm seeing hundreds of 'corrupt event table entry' errors in the error log, and it seems to be complaining about just about everything!

Code:
namespace = bespoke_start

event = {
    id = bespoke_start.1
    hide_window = yes
    is_triggered_only = yes

    immediate = {
        limit = {
            any_galaxy_planet = { has_planet_flag = bespoke_capital } #relic world
            }
            immediate = {
                set_planet_size = 25
                add_modifier = { modifier = atmospheric_hallucinogen_good days = -1 }
                add_modifier = { modifier = asteroid_belt days = -1 }
                remove_deposit = d_failing_infrastructure
                remove_deposit = d_failing_infrastructure
                remove_deposit = d_decrepit_dwellings
                add_deposit = d_collapsed_spire
                add_deposit = d_crumbling_mining_tunnels
                add_deposit = d_flooded_reactor_pits
                add_deposit = d_massive_crevice
                add_deposit = d_shattered_solar_array
            }
    }
}
 
Most of the planets I want to customize are outside the capital system; maybe I could define their modifiers and deposits in the initializer and scope to capital system with the planet flags to make this one fire properly??
 
You need the limit in an if block. But that also wouldn't solve anything.

If you want to scope to planets that have that flag, you would do

every_galaxy_planet = { limit = { has_planet_flag = bespoke_capital #relic world } #Effects here }

Doing the any_galaxy_planet check you have just checks if any planet has it, and then does the stuff to whatever you are scoped to. If you used an 'if', that would be every planet in the galaxy, I believe.