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

sillyrobot

General
Jul 18, 2015
1.980
3.870
G'day Folks,

I'm adding a new "build megastructure" action that dismantles any existing hyper-relay in the system on completion. I can't get the remove_megastructure effect to remove the megastructure. I've waited until after the next month end just in case there is a display delay.

Notes:
Random_megastructure is entered and has the hyper relay as its scope. The resources are gained, but the megastructure is NOT destroyed. No messages in the error log. The game log is just the scopes to confirm what is active when the on_build_complete hits and what is active when the target megastructure is chosen.

Even though remove_megastructure claims any scope is valid, I've tried both the megastructure itself and the galactic object scope (prev when inside random_megastructure confirmed by printed scopes). Looking at samples in the live code, I see it used at megastructure scope as I'm using it here (events\nemesis_crisis_endgame.txt and set_ruined_megastructure in 00_scripted_effects.txt ).


The on_build_complete looks like this:
Code:
    on_build_complete = {
        print_scope_effect = yes
        random_megastructure = {
            limit = {
                   OR = {
                    is_megastructure_type = hyper_relay
                    is_megastructure_type = hyper_relay_ruined
                    is_megastructure_type = hyper_relay_restored
                }
            }
           
            log = "hyper relay found"
            print_scope_effect = yes
           
            remove_megastructure = this #hyper relay, verified with scopes in game.log
           
            from = {
                add_resource = {
                    alloys = 250
                    rare_crystals = 50
                }
            }
        }
       
        remove_megastructure = fromfrom #virtual destroy_hyper_relay
    }




The game log I get looks like this:

[08:56:34][game_application.cpp:454]: Game Version: Cepheus v3.4.3
[08:56:34][defines.cpp:128]: 1670 defines loaded
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: scripted effect print_scope_effect at file: common/megastructures/destroyHyper_relay.txt line: 62 line: 1. ------------------------------
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: scripted effect print_scope_effect at file: common/megastructures/destroyHyper_relay.txt line: 62 line: 1. - Printing the current scopes (trigger) -
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: scripted effect print_scope_effect at file: common/megastructures/destroyHyper_relay.txt line: 62 line: 1. - This: Boldoon
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: scripted effect print_scope_effect at file: common/megastructures/destroyHyper_relay.txt line: 62 line: 1. - Root: Boldoon
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: scripted effect print_scope_effect at file: common/megastructures/destroyHyper_relay.txt line: 62 line: 1. - Prev: Boldoon
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: scripted effect print_scope_effect at file: common/megastructures/destroyHyper_relay.txt line: 62 line: 1. - PrevPrev: Boldoon
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: scripted effect print_scope_effect at file: common/megastructures/destroyHyper_relay.txt line: 62 line: 1. - PrevPrevPrev: Boldoon
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: scripted effect print_scope_effect at file: common/megastructures/destroyHyper_relay.txt line: 62 line: 1. - PrevPrevPrevPrev: Boldoon
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: scripted effect print_scope_effect at file: common/megastructures/destroyHyper_relay.txt line: 62 line: 1. - From: Shadows Rise
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: scripted effect print_scope_effect at file: common/megastructures/destroyHyper_relay.txt line: 62 line: 1. - FromFrom: destroy_hyper_relay
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: scripted effect print_scope_effect at file: common/megastructures/destroyHyper_relay.txt line: 62 line: 1. - FromFromFrom: destroy_hyper_relay
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: scripted effect print_scope_effect at file: common/megastructures/destroyHyper_relay.txt line: 62 line: 1. - FromFromFromFrom: destroy_hyper_relay
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: scripted effect print_scope_effect at file: common/megastructures/destroyHyper_relay.txt line: 62 line: 1. - This's Solar System:
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: scripted effect print_scope_effect at file: common/megastructures/destroyHyper_relay.txt line: 62 line: 1. - This's Planet: Boldoon
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: scripted effect print_scope_effect at file: common/megastructures/destroyHyper_relay.txt line: 62 line: 1. - This's Sector:
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: scripted effect print_scope_effect at file: common/megastructures/destroyHyper_relay.txt line: 62 line: 1. - Root's Solar System:
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: scripted effect print_scope_effect at file: common/megastructures/destroyHyper_relay.txt line: 62 line: 1. - Root's Owner's Name: Shadows Rise
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: scripted effect print_scope_effect at file: common/megastructures/destroyHyper_relay.txt line: 62 line: 1. - Root's Owner's Capital's Name: Homeworld
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: scripted effect print_scope_effect at file: common/megastructures/destroyHyper_relay.txt line: 62 line: 1. - Owner: Shadows Rise
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: common/megastructures/destroyHyper_relay.txt line: 72. hyper relay found
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: scripted effect print_scope_effect at file: common/megastructures/destroyHyper_relay.txt line: 73 line: 1. ------------------------------
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: scripted effect print_scope_effect at file: common/megastructures/destroyHyper_relay.txt line: 73 line: 1. - Printing the current scopes (trigger) -
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: scripted effect print_scope_effect at file: common/megastructures/destroyHyper_relay.txt line: 73 line: 1. - This: Hyper Relay
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: scripted effect print_scope_effect at file: common/megastructures/destroyHyper_relay.txt line: 73 line: 1. - Root: Boldoon
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: scripted effect print_scope_effect at file: common/megastructures/destroyHyper_relay.txt line: 73 line: 1. - Prev: Boldoon
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: scripted effect print_scope_effect at file: common/megastructures/destroyHyper_relay.txt line: 73 line: 1. - PrevPrev: Boldoon
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: scripted effect print_scope_effect at file: common/megastructures/destroyHyper_relay.txt line: 73 line: 1. - PrevPrevPrev: Boldoon
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: scripted effect print_scope_effect at file: common/megastructures/destroyHyper_relay.txt line: 73 line: 1. - PrevPrevPrevPrev: Boldoon
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: scripted effect print_scope_effect at file: common/megastructures/destroyHyper_relay.txt line: 73 line: 1. - From: Shadows Rise
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: scripted effect print_scope_effect at file: common/megastructures/destroyHyper_relay.txt line: 73 line: 1. - FromFrom: destroy_hyper_relay
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: scripted effect print_scope_effect at file: common/megastructures/destroyHyper_relay.txt line: 73 line: 1. - FromFromFrom: destroy_hyper_relay
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: scripted effect print_scope_effect at file: common/megastructures/destroyHyper_relay.txt line: 73 line: 1. - FromFromFromFrom: destroy_hyper_relay
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: scripted effect print_scope_effect at file: common/megastructures/destroyHyper_relay.txt line: 73 line: 1. - This's Solar System:
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: scripted effect print_scope_effect at file: common/megastructures/destroyHyper_relay.txt line: 73 line: 1. - This's Planet:
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: scripted effect print_scope_effect at file: common/megastructures/destroyHyper_relay.txt line: 73 line: 1. - This's Sector: Hyper Relay
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: scripted effect print_scope_effect at file: common/megastructures/destroyHyper_relay.txt line: 73 line: 1. - Root's Solar System:
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: scripted effect print_scope_effect at file: common/megastructures/destroyHyper_relay.txt line: 73 line: 1. - Root's Owner's Name: Shadows Rise
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: scripted effect print_scope_effect at file: common/megastructures/destroyHyper_relay.txt line: 73 line: 1. - Root's Owner's Capital's Name: Homeworld
[08:59:13][effect_impl.cpp:20137]: [99.6.9] Log command triggered from effect in file: scripted effect print_scope_effect at file: common/megastructures/destroyHyper_relay.txt line: 73 line: 1. - Owner: Shadows Rise