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

Lillgrinn

Private
16 Badges
May 10, 2016
15
2
  • Leviathan: Warships
  • Pillars of Eternity
  • Stellaris
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Stellaris: Necroids
I create event from 00_on_actions.txt (../common/on_actions/). This section:
Code:
#A building construction has been completed.
# This = Planet
# From = Tile
on_building_complete = {
    events = {
        # lillgrinn.1 - is my new event
        lillgrinn.1
        tutorial.14
        tutorial.140
    }
}

This is my event:
Code:
############################
#
# Lillgrinn Events
#
############################

namespace = lillgrinn

planet_event = {
    id = lillgrinn.1
    title = lillgrinn.1.name
    desc = lillgrinn.1.desc
    picture = GFX_evt_throne_room

    is_triggered_only = yes
   
    trigger = {
        has_owner = yes
        owner = { is_ai = no }
        any_tile = { has_building = "building_lillgrinn_command_center" }
    }
   
    immediate = {
        every_tile = {
            limit = { has_building = "building_lillgrinn_command_center" }
            remove_building = yes
            set_blocker = "tb_failing_infrastructure"
        }
    }

    # Show Hello Message
    option = {
        name = lillgrinn.1.z
    }

    # Exit Option
    option = {
        name = lillgrinn.1.z
        ai_chance = { factor = 1 }
    }
}

Quiestion:
If i build "building_lillgrinn_command_center" on the empty tile - all is OK.
if i demolish other buildig and after build on this tile "building_lillgrinn_command_center" - it's event don't working. I thinking trigger returned False. Tile info was not cleared? Why?
 
1. I create building "Land Center" ("building_lillgrinn_command_center") on empty tile.
After complete construction event starting, remove the building, place on this tile "Industrial Wasteland" blocker and show me the event window with some options. (Ok, this is what i want).

2. I cleared "Industrial Wasteland" blocker -> I get the empty tile again.

3. I try creating building "Land Center" ("building_lillgrinn_command_center") on this empty tile again.
Building created, but event is not starting - the building is not removed and event window is not showed me.

4. If after point 3 i do console command "event lillgrinn.1" i see this:
Code:
Executed #1300001
(*)Is Colonized
(*)Player Owner:
   Is Player controlled
(*) Any Tile:
    Has Building: Land Center

Executed #1300001
 
Have you tried adding an event to 'on_building_replaced' ?
It's possible that a flag or something does not get cleared and the tile thinks there is a building when in reality no building exists, and then when you build your building it only fires the replace action. It would at least explain why it works the first but not the second time. Maybe try the on_building_upgraded too just for good measure.