• 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
61 Badges
Jun 11, 2012
395
431
  • Crusader Kings II
  • A Game of Dwarves
  • Stellaris: Synthetic Dawn
  • Stellaris: Lithoids
  • Age of Wonders III
  • Steel Division: Normand 44 - Second Wave
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Surviving Mars: Digital Deluxe Edition
  • Steel Division: Normandy 44 -  Back to Hell
  • BATTLETECH - Digital Deluxe Edition
  • BATTLETECH - Beta Backer
  • BATTLETECH - Backer
  • Stellaris: Distant Stars
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Shadowrun: Hong Kong
  • Surviving Mars: First Colony Edition
  • BATTLETECH: Flashpoint
  • Stellaris: Megacorp
  • Imperator: Rome
  • Hearts of Iron IV: Expansion Pass
  • Surviving Mars: First Colony Edition
  • Stellaris: Ancient Relics
  • BATTLETECH: Season pass
  • Knights of Pen and Paper 2
  • Battle for Bosporus
  • Stellaris: Federations
  • Hearts of Iron 4: Arms Against Tyranny
  • Stellaris: Nemesis
  • Crusader Kings III
  • Hearts of Iron IV: La Resistance
  • Knights of Pen and Paper +1 Edition
  • Hearts of Iron IV: By Blood Alone
  • 500k Club
  • Magicka: Wizard Wars Founder Wizard
  • Stellaris: Necroids
  • BATTLETECH: Heavy Metal
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Stellaris - Path to Destruction bundle
  • Steel Division: Normandy 44
  • BATTLETECH
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?
 
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
   }
}
 
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.
 
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      
     }
}
 
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.