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

RandomBlue

Recruit
53 Badges
Oct 29, 2011
8
1
  • Sword of the Stars II
  • Stellaris - Path to Destruction bundle
  • Pillars of Eternity
  • Warlock 2: The Exiled
  • Ancient Space
  • Sword of the Stars
  • Majesty 2
  • Magicka
  • Knights of Pen and Paper +1 Edition
  • Crusader Kings II
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Divine Wind
  • Europa Universalis IV
  • Heir to the Throne
  • Lead and Gold
  • Stellaris: Distant Stars
  • Stellaris: Nemesis
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Shadowrun: Hong Kong
  • BATTLETECH: Flashpoint
  • Stellaris: Megacorp
  • Prison Architect
  • Surviving Mars: First Colony Edition
  • Stellaris: Ancient Relics
  • BATTLETECH: Season pass
  • Age of Wonders: Planetfall
  • Stellaris: Lithoids
  • BATTLETECH: Heavy Metal
  • Age of Wonders: Planetfall - Revelations
  • Stellaris: Federations
  • Crusader Kings III
  • Stellaris: Leviathans Story Pack
  • Warlock: Master of the Arcane
  • War of the Roses
  • Mount & Blade: Warband
  • Stellaris
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Tyranny: Archon Edition
  • Stellaris: Digital Anniversary Edition
  • Surviving Mars: Digital Deluxe Edition
  • BATTLETECH
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
Is there a good way to determine if a fleet is idle in an event? Nothing I've tried seems to work. I've tried the following triggers and they either always run or never run, regardless of the fleet order status:

has_fleet_order = no

Not = { has_fleet_order = yes }

I've also tried variations of has_fleet_order usage and none seem to be working in 1.2. Is there something I'm missing or a better way to handle this?
 
Is there a good way to determine if a fleet is idle in an event? Nothing I've tried seems to work. I've tried the following triggers and they either always run or never run, regardless of the fleet order status:

has_fleet_order = no

Not = { has_fleet_order = yes }

I've also tried variations of has_fleet_order usage and none seem to be working in 1.2. Is there something I'm missing or a better way to handle this?

Difficult to say like that, seeing the code could help. Would be useful to know for me as well.
 
The following event (which I trigger manually via the console) always triggers the action for not = { has_fleet_order = yes } for example, no matter what the fleet is doing:

Code:
fleet_event {
    id = autoscout.3
    hide_window = yes
    is_triggered_only = yes
   
    immediate = {
        if = {
            limit = {
                has_fleet_order = yes
            }
            set_name  = "has_fleet_order = yes"
            break = yes
        }
        if = {
            limit = {
                has_fleet_order = no
            }
            set_name  = "has_fleet_order = no"
            break = yes
        }
        if = {
            limit = {
                not = {
                    has_fleet_order = yes
                }
            }
            set_name  = "not has_fleet_order = yes"
            break = yes
        }
        if = {
            limit = {
                not = {
                    has_fleet_order = no
                }
            }
            set_name  = "not has_fleet_order = no"
            break = yes
        }
    }
}
 
Well according to the docs it.. LOL j/k.

I don't know, I saw it used with some other chained if statements so I was hoping it either broke out of the chained ifs or broke out of the immediate section, either one would be fine. I haven't tested for sure to know if either thing is happening though.
 
  • 1
Reactions:
If the "has_fleet_order" don't work, you can use fleet flags instead. When you give a fleet orders, you create the flag, and once their queue of orders are done you remove that flag. Imperfect but can do the job in many cases.
 
If the "has_fleet_order" don't work, you can use fleet flags instead. When you give a fleet orders, you create the flag, and once their queue of orders are done you remove that flag. Imperfect but can do the job in many cases.

So how would you go about queuing multiple orders in such a way that a fleet moves to a system or planet and then perform another action once it's arrived at the final destination? (which might be after passing through several systems)

I've used queue_actions but don't know much about how it really works other than adding an action (to a fleet in this case), but I'm not sure how it interacts/works with actions that take time (such as moving to another system).
 
So how would you go about queuing multiple orders in such a way that a fleet moves to a system or planet and then perform another action once it's arrived at the final destination? (which might be after passing through several systems)

I've used queue_actions but don't know much about how it really works other than adding an action (to a fleet in this case), but I'm not sure how it interacts/works with actions that take time (such as moving to another system).

I happen to have used fleet flags in my revamped pirate event. Here an example :

Code:
                        while = {
                            limit = { exists = root } # trick to make it loop so long as it exist
                            set_fleet_flag = fleet_got_orders # set it before the queued actions start
                            queue_actions = {
                                find_random_system = {
                                    trigger = {
                                        id = "pirate.2.trigger.1"
                                        NOT = {
                                            has_star_flag = hostile_system
                                            is_same_value = event_target:capital_system
                                        }
                                        any_planet = {
                                            OR = {                                          
                                                has_mining_station = yes
                                                has_research_station = yes
                                                #has_orbital_station = yes
                                            }
                                            # Attacking a spaceport is suicidal
                                            NOT = { 
                                                is_homeworld = yes
                                                has_spaceport = yes
                                                #is_colony = yes
                                            }
                                            exists = controller
                                            controller = { is_same_value = event_target:pirate_target }
                                        }
                                        distance = {
                                            source = PREV
                                            max_distance = 200
                                            min_distance = 5
                                        }
                                    }
                           
                                    found_system = {
                                        effect = { 
                                            id = "pirate.2.effect.1"
                                            event_target:pirate_looting = {
                                                set_fleet_stance = aggressive                                  
                                                set_aggro_range = 100 
                                            }
                                        }                      
                                        move_to = THIS
                                    }
                                }
                           
                                # We find a juicy target to kill
                                find_random_planet = {
                                    trigger = {
                                        id = "pirate.2.trigger.2"
                                        OR = {
                                            has_research_station = yes
                                            has_mining_station = yes
                                            #has_orbital_station = yes
                                        }
                                        NOT = { is_colony = yes }
                                    }
                                   
                                    found_planet = {
                                        effect = { 
                                            id = "pirate.2.effect.2"
                                            event_target:pirate_looting = {
                                                set_fleet_stance = aggressive                                  
                                                set_aggro_range = 75 
                                            }
                                        }                              
                                        orbit_planet = THIS
                                        wait = {
                                            duration = 20
                                        }
                                    }
                                }
                                # We go back to base
                                find_closest_system = {
                                    trigger = {
                                        id = "pirate.2.trigger.3"
                                        any_planet = {
                                            exists = event_target:pirate_home
                                            is_planet = event_target:pirate_home
                                        }
                                        NOT = { has_star_flag = hostile_system }
                                    }
                   
                                    found_system = {
                                        effect = { 
                                            id = "pirate.2.effect.3"
                                            event_target:pirate_looting = { set_fleet_stance = passive }
                                        }              
                                        move_to = THIS
                                    }
                                }
                                # We go to base for some rest
                                find_closest_planet = {
                                    trigger = {
                                        id = "pirate.2.trigger.4"
                                        is_planet = event_target:pirate_home
                                    }
                                    found_planet = {
                                        orbit_planet = THIS
                                        wait = {
                                            duration = 100
                                            random = 50
                                        }  
                                    }
                                }
                            } 
                            remove_fleet_flag =    fleet_got_orders # the fleet has finished it's round and should be back home
                        }