[Event Help] Trying to debug a planet-size-increase mod.

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

ShadowDragon868

Captain
34 Badges
Jun 11, 2012
395
431
  • Crusader Kings II
  • A Game of Dwarves
  • Stellaris - Path to Destruction bundle
  • BATTLETECH: Heavy Metal
  • Steel Division: Normandy 44
  • BATTLETECH
  • Surviving Mars
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Surviving Mars: Digital Deluxe Edition
  • BATTLETECH - Digital Deluxe Edition
  • BATTLETECH - Beta Backer
  • BATTLETECH - Backer
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Shadowrun: Hong Kong
  • BATTLETECH: Flashpoint
  • BATTLETECH: Season pass
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Knights of Pen and Paper 2
  • Magicka: Wizard Wars Founder Wizard
  • 500k Club
  • Knights of Pen and Paper +1 Edition
  • Magicka 2
  • Pillars of Eternity
  • Magicka
  • Heir to the Throne
  • Divine Wind
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
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:

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?
 

ShadowDragon868

Captain
34 Badges
Jun 11, 2012
395
431
  • Crusader Kings II
  • A Game of Dwarves
  • Stellaris - Path to Destruction bundle
  • BATTLETECH: Heavy Metal
  • Steel Division: Normandy 44
  • BATTLETECH
  • Surviving Mars
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Surviving Mars: Digital Deluxe Edition
  • BATTLETECH - Digital Deluxe Edition
  • BATTLETECH - Beta Backer
  • BATTLETECH - Backer
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Shadowrun: Hong Kong
  • BATTLETECH: Flashpoint
  • BATTLETECH: Season pass
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Knights of Pen and Paper 2
  • Magicka: Wizard Wars Founder Wizard
  • 500k Club
  • Knights of Pen and Paper +1 Edition
  • Magicka 2
  • Pillars of Eternity
  • Magicka
  • Heir to the Throne
  • Divine Wind
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
Through an edict. I was just having a poke in population improved to see how they do their fiddly stuff.

Here's the edit:

Code:
planet_edict = {
   name = "planetworld_size"
   influence_cost = 250
   length = 0
   potential = {
      NOT = {
      planet_size = 25
      }
   }
   allow = {
   }

   effect = {
     custom_tooltip = edict_planetworld_size.tooltip         
     planet_event = { id = planetworldevent_size.1 }
     }
     
   ai_weight = {
     weight = 0
   }
}
 

ShadowDragon868

Captain
34 Badges
Jun 11, 2012
395
431
  • Crusader Kings II
  • A Game of Dwarves
  • Stellaris - Path to Destruction bundle
  • BATTLETECH: Heavy Metal
  • Steel Division: Normandy 44
  • BATTLETECH
  • Surviving Mars
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Surviving Mars: Digital Deluxe Edition
  • BATTLETECH - Digital Deluxe Edition
  • BATTLETECH - Beta Backer
  • BATTLETECH - Backer
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Shadowrun: Hong Kong
  • BATTLETECH: Flashpoint
  • BATTLETECH: Season pass
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Knights of Pen and Paper 2
  • Magicka: Wizard Wars Founder Wizard
  • 500k Club
  • Knights of Pen and Paper +1 Edition
  • Magicka 2
  • Pillars of Eternity
  • Magicka
  • Heir to the Throne
  • Divine Wind
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
I've come to the conclusion that the mod the mod I'm trying to debug from was made very, very badly.

As I'm reading this, the increase homeworld size mod, when triggered, selects ALL COUNTRIES, then limits it only to player countries, then only to the homeworld, and increases the size. Meaning if you were using it in a MP game, you and all human players would gain planet size.
 

Naselus

PDM's Benevolent Dictator for Life
56 Badges
Feb 26, 2009
14.260
1.598
  • Cities in Motion 2
  • Stellaris: Galaxy Edition
  • Pillars of Eternity
  • Victoria 2 A House Divided Beta
  • Pride of Nations
  • Warlock: Master of the Arcane
  • Rome: Vae Victis
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Supreme Ruler: Cold War
  • Sengoku
  • Europa Universalis: Rome
  • Victoria: Revolutions
  • March of the Eagles
  • Majesty 2 Collection
  • Magicka
  • Crusader Kings II: Rajas of India
  • A Game of Dwarves
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV
  • Divine Wind
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Darkest Hour
  • Heir to the Throne
  • Stellaris: Apocalypse
  • Stellaris: Synthetic Dawn
  • Surviving Mars
  • BATTLETECH
  • Knights of Honor
  • Stellaris: Nemesis
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Cadet
  • Cities: Skylines - Parklife
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: Holy Knight (pre-order)
  • Cities: Skylines
  • 500k Club
  • Victoria 2
Need to add 'location = root' to the event.

Code:
namespace = planetworldevent_size

planet_event = { #Initial event triggered for players
    id = planetworldevent_size.1
    is_triggered_only = yes
    hide_window = yes
    location = ROOT
   
    immediate = {
         change_planet_size = 1      
     }
}
 

ShadowDragon868

Captain
34 Badges
Jun 11, 2012
395
431
  • Crusader Kings II
  • A Game of Dwarves
  • Stellaris - Path to Destruction bundle
  • BATTLETECH: Heavy Metal
  • Steel Division: Normandy 44
  • BATTLETECH
  • Surviving Mars
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Surviving Mars: Digital Deluxe Edition
  • BATTLETECH - Digital Deluxe Edition
  • BATTLETECH - Beta Backer
  • BATTLETECH - Backer
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Shadowrun: Hong Kong
  • BATTLETECH: Flashpoint
  • BATTLETECH: Season pass
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Knights of Pen and Paper 2
  • Magicka: Wizard Wars Founder Wizard
  • 500k Club
  • Knights of Pen and Paper +1 Edition
  • Magicka 2
  • Pillars of Eternity
  • Magicka
  • Heir to the Throne
  • Divine Wind
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
It isn't an issue, Onimuru, but I like to polish my stuff properly. Thanks, though, you helped me get this thing working, and I'll make note of that in the description. Also Naselus, though for some reason he seems to have deleted his posts in this thread.