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

ViolentBeetle

Colonel
40 Badges
Mar 2, 2017
989
0
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Reapers Due
  • Stellaris - Path to Destruction bundle
  • Victoria 2: A House Divided
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Tyranny: Archon Edition
  • Stellaris: Federations
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Jade Dragon
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Cadet
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Victoria 2
  • Europa Universalis IV
  • Stellaris: Synthetic Dawn
  • Victoria 2: Heart of Darkness
  • Europa Universalis IV: Art of War
Here's a particular piece of code

Code:
#Fleet order event
fleet_event = {
    id = mem_blacksite.710
    hide_window = yes
    is_triggered_only = yes

    trigger = {
       
    }

    immediate = {
        clear_fleet_actions = this
        queue_actions = {
            find_random_planet = {
                trigger = {
                    id = mem_blacksite.destroy_planet.1
                    is_star = no
                    is_asteroid = no
                    is_ringworld = no
                    NOR = {
                        is_planet_class = pc_gas_giant
                        is_planet_class = pc_shattered
                        is_planet_class = pc_broken
                        is_planet_class = pc_shielded
                    }
                }
                found_planet = {
                    orbit_planet = this
                    wait = {
                        duration = 30
                        random = 120
                    }
                    effect = {
                        id = mem_blacksite.destroy_planet.2
                        planet_event = { id = mem_blacksite.711 days = 1 }
                    }
                }
            }
        }
    }
}

#Deposit-setting event (Seem to releat roll inside fleet order)
planet_event = {
    id = mem_blacksite.711
    hide_window = yes
    is_triggered_only = yes

    immediate = {
        change_pc = pc_shattered
        add_modifier = {
            modifier = mem_blacksite_strange
            days = -1
        }
        orbital_deposit_tile = {
            clear_deposits = yes
            random_list = {
                50 = {}
                10 = {
                    add_deposit = d_rich_mineral_deposit
                }
                10 = {
                    add_deposit = d_rich_energy_deposit
                }
                5 = {
                    add_deposit = d_rich_mineral_deposit
                    add_deposit = d_rich_energy_deposit
                }
                10 = {
                    add_deposit = d_rich_physics_deposit
                }
                10 = {
                    add_deposit = d_rich_engineering_deposit
                }
                5 = {
                    add_deposit = d_rich_physics_deposit
                    add_deposit = d_rich_engineering_deposit
                }
            }
        }
        event_target:blacksite_fleet = {
            fleet_event = { id = mem_blacksite.710 }
        }
    }
}

This makes fleet fly around and blow up the planets, until there's no more planets in system, as advertised, however for some reason I'm always getting rich energy deposit. The outcomes are randomized when I trigger those events from console, but not when I let fleet roam.

Can anyone help me?