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

Merkury90

First Lieutenant
20 Badges
Aug 3, 2016
222
2
  • Stellaris: Galaxy Edition
  • Stellaris: Synthetic Dawn
  • Stellaris: Apocalypse
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Prison Architect
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Stellaris: Humanoids Species Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris
  • Stellaris: Distant Stars Pre-Order
  • Crusader Kings II
Hello everyone.

After long break I decided to come back and check the new species pack.
However, apparently with new patch a bunch of my testing mods were broken and after spending a lot of time I still cannot fix them...

Long time ago I salvaged some code from a mod that enabled user to create and remove hyperlanes between systems. My version was working just fine in all previous versions of the game, but now I cannot force it to work again.

The idea was that I can select a planet in a system, then in console put event hyperlanes.1 - game would save current system as a event target and a special window would pop up where I could select what exactly I want to do.
With new version the pop up window is not showing no matter what I do.

Below is the events code if someone would like to take a look and point me toward solution.

Code:
namespace = hyperlanes

# Hyperlane Editor
planet_event = {
    id = hyperlanes.1
        hide_window = yes
    is_triggered_only = yes

    immediate = {
        solar_system = {
            save_global_event_target_as = target
        }

        owner = { country_event = { id = hyperlanes.11 } }
    }
}

country_event = {
    id = hyperlanes.11
    title = hyperlanes.1.name
    desc = hyperlanes.11.desc
    picture = GFX_evt_archaeological_dig
    is_triggered_only = yes
        
    option = {
        name = hyperlanes.11.a
        
        trigger = { NOT = { exists = event_target:hyperlane_start } }
        
        hidden_effect = {
            event_target:target.solar_system = { save_global_event_target_as = hyperlane_start }
            country_event = { id = hyperlanes.11 }
        }
    }
    
    option = {
        name = hyperlanes.11.b
        
        trigger = { exists = event_target:hyperlane_start }
        
        allow = { NOT = { exists = event_target:hyperlane_start } }
        
        hidden_effect = {
        }
    }
    
    option = {
        name = hyperlanes.11.c
        
        trigger = { exists = event_target:hyperlane_start }
        
        allow = { NOT = { exists = event_target:hyperlane_start } }
        
        hidden_effect = {
        }
    }
    
    option = {
        name = hyperlanes.11.d
        
        trigger = {
            exists = event_target:hyperlane_start
            OR = {
                event_target:hyperlane_start = { is_same_value = event_target:target.solar_system }
                event_target:hyperlane_start = { NOT = { has_hyperlane_to = event_target:target.solar_system } }
            }
        }
        
        allow = {
            event_target:hyperlane_start = {
                NOT = {
                    is_same_value = event_target:target.solar_system
                }
                event_target:hyperlane_start = { NOT = { has_hyperlane_to = event_target:target.solar_system } }
            }
        }
        
        add_hyperlane = { from = event_target:hyperlane_start to = event_target:target.solar_system }
        
        hidden_effect = {
            clear_global_event_target = hyperlane_start
            country_event = { id = hyperlanes.11 }
        }
    }
    
    option = {
        name = hyperlanes.11.e
        
        trigger = {
            exists = event_target:hyperlane_start
            event_target:hyperlane_start = { NOT = { is_same_value = event_target:target.solar_system } }
            event_target:hyperlane_start = { has_hyperlane_to = event_target:target.solar_system }
        }
        
        remove_hyperlane = { from = event_target:hyperlane_start to = event_target:target.solar_system }
        
        hidden_effect = {
            clear_global_event_target = hyperlane_start
            country_event = { id = hyperlanes.11 }
        }
    }
    
    option = {
        name = hyperlanes.11.f
        
        trigger = {
            exists = event_target:hyperlane_start
        }
        
        hidden_effect = {
            clear_global_event_target = hyperlane_start
            country_event = { id = hyperlanes.11 }
        }
    }
    
    option = {
        name = hyperlanes.exit
    }
}

Much obliged for any and all help.
 
Error.log should give you a hint. I suspect owner does not exist.
Yes, that was the problem. Apparently after update 3.0 I can no longer use the scopes that were working before - like FROM.

Is there any way to make it work like described in first post?
I managed to get it somewhat working by using "space_owner" scope however that only works on planets inside my territory... I tried to find scope that would point to player but no luck so far.
 
Yes, that was the problem. Apparently after update 3.0 I can no longer use the scopes that were working before - like FROM.

Is there any way to make it work like described in first post?
I managed to get it somewhat working by using "space_owner" scope however that only works on planets inside my territory... I tried to find scope that would point to player but no luck so far.
A quick dirty fix would be is_ai = no trigger.
 
A quick dirty fix would be is_ai = no trigger.
Not really sure how that would fix my problem?

Event is triggered only from console (created for testing purposes).
Before update 3.0 I could select any two star systems and connect/disconnect them with hyperlane. However now my "mod" stopped workng because for some reasons scopes have been changed.

For now I am able to work only within my empire's borders and I'm looking for a way to fix it that wil allow me to select systems outside my borders as well.
 
Replace...

Code:
owner = { country_event = { id = hyperlanes.11 } }

...with...

Code:
random_country = {
    limit = {
        is_ai = no
    }
    country_event = { id = hyperlanes.11 }
}

Untested, but should work.
 
  • 1Like
Reactions: