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

Coffeecool

Corporal
28 Badges
Jun 5, 2016
27
1
  • Cities in Motion 2
  • King Arthur II
  • Cities in Motion
  • Cities: Skylines - Campus
  • Surviving Mars: First Colony Edition
  • Shadowrun Returns
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Cities: Skylines - Green Cities
  • Age of Wonders III
  • Surviving Mars
  • BATTLETECH
  • Cities: Skylines - Mass Transit
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Tyranny: Archon Edition
  • Hearts of Iron IV: Cadet
  • Cities: Skylines - Snowfall
  • Cities: Skylines - After Dark
  • Cities: Skylines
  • Warlock: Master of the Arcane
  • Victoria 2
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Stellaris
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
Im currently experimenting with the events, but im not able to get them to work.

Here is what i did so far.

In the .../stellaris/common/on_actions folder i have this:

Code:
on_entering_battle = {
    events = {
        ds_cruiser_battle
    }  
}

and in the .../stellaris/events folder i have this :

Code:
ship_event = {
        id = ds_cruiser_battle
        is_triggered_only = yes
        hide_window = yes
  
        trigger = {
            is_ship_size = ds_cruiser  
        }
  
        add_energy = 2000
    }

What i want it to do is, give me 2000 Energy when a ds_cruiser enters battle.
What did i wrong?
 
I'm pretty sure you need a number at the end.
Such as "ds_cruiser_battle.1"

Also make sure you have a namespace defined.
 
Try this:

Code:
immediate = {owner = { add_energy = 2000 } }
 
Maybe you've already solved it but if anyone else reads this, the main problem would be that on_entering_battle is for fleet events.
So it would have to be like
Code:
namespace = ds_cruiser_battle
fleet_event = {
    id = ds_cruiser_battle.1
    is_triggered_only = yes
    hide_window = yes

    trigger = {
        any_ship = {
                is_ship_size = ds_cruiser
        }
     }
    immediate = {
        owner = { add_energy = 2000 }
    }
}
 
Last edited:
Maybe you've already solved it but if anyone else reads this, the main problem would be that on_entering_battle is for fleet events.
So it would have to be like
Code:
fleet_event = {
    id = ds_cruiser_battle
    is_triggered_only = yes
    hide_window = yes

    trigger = {
        any_ship = {
                is_ship_size = ds_cruiser
        }
     }
    immediate = {
        owner = { add_energy = 2000 }
    }
}

No i didnt solved it yet, events are giving me hard times.
I tried your code 1:1 and got this.

Code:
[11:50:46][eventmanager.cpp:557]: Broken id definition 'ds_cruiser_battle' defined in event files
[11:50:46][eventmanager.cpp:226]: Corrupt Event Table Entry - } in events/ds_cruiser_battle_event.txtline: 25
[11:50:46][eventmanager.cpp:557]: Broken id definition 'ds_cruiser_battle' defined in event files
[11:50:46][onaction.cpp:103]: OnAction "on_entering_battle" is referencing an invalid ID: "ds_cruiser_battle"
 
Ok no errors, at game start.

But after loading and entering a battle... oh boy. This mod drives me crazy o_O

Code:
[12:05:54][pdx_entity.cpp:324]: Failed to find entity "arthropoid_01_cruiser_bow_L1_entity" for attachment in
[12:05:54][pdx_entity.cpp:324]: Failed to find entity "arthropoid_01_cruiser_mid_M3_entity" for attachment in
[12:05:54][pdx_entity.cpp:324]: Failed to find entity "arthropoid_01_cruiser_stern_S2_entity" for attachment in
[12:05:54][pdx_entity.cpp:324]: Failed to find entity "arthropoid_01_cruiser_bow_M1S2_entity" for attachment in
[12:05:54][pdx_entity.cpp:324]: Failed to find entity "arthropoid_01_cruiser_mid_L1M1_entity" for attachment in
[12:05:54][pdx_entity.cpp:324]: Failed to find entity "arthropoid_01_cruiser_stern_M1_entity" for attachment in
[12:05:54][pdx_entity.cpp:324]: Failed to find entity "arthropoid_01_cruiser_bow_M2_entity" for attachment in
[12:05:54][pdx_entity.cpp:324]: Failed to find entity "arthropoid_01_cruiser_mid_S2HB_entity" for attachment in
[12:05:54][pdx_entity.cpp:324]: Failed to find entity "arthropoid_01_cruiser_stern_M1_entity" for attachment in
[12:05:54][pdx_entity.cpp:324]: Failed to find entity "arthropoid_01_cruiser_bow_M1S2_entity" for attachment in
[12:05:54][pdx_entity.cpp:324]: Failed to find entity "arthropoid_01_cruiser_mid_M2S2_entity" for attachment in
[12:05:54][pdx_entity.cpp:324]: Failed to find entity "arthropoid_01_cruiser_stern_S2_entity" for attachment in
[12:06:25][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:26][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:26][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:27][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:27][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:27][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:27][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:27][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:28][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:28][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:28][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:28][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:28][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:29][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:29][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:29][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:29][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:29][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:29][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:30][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:30][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:30][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:30][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:30][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:30][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:31][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:31][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:31][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:31][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:31][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:32][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:32][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:32][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:32][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:32][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:32][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:33][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:33][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:33][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:33][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:33][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:34][fleet.cpp:1585]: Fleet in system state but missing origin, went MIA
[12:06:34][eventmanager.cpp:406]: Firing fleet event ds_cruiser_battle.1 in the wrong scope!
[12:06:34][eventmanager.cpp:406]: Firing fleet event ds_cruiser_battle.1 in the wrong scope!
[12:06:34][eventmanager.cpp:406]: Firing fleet event ds_cruiser_battle.1 in the wrong scope!
[12:06:34][eventmanager.cpp:406]: Firing fleet event ds_cruiser_battle.1 in the wrong scope!
[12:06:34][bitmapfont.cpp:2583]: Could not find coloring for character ' '
[12:06:34][bitmapfont.cpp:2583]: Could not find coloring for character ' '
[12:06:34][bitmapfont.cpp:2583]: Could not find coloring for character ' '
[12:06:34][bitmapfont.cpp:2583]: Could not find coloring for character ' '
[12:06:34][bitmapfont.cpp:2583]: Could not find coloring for character ' '
[12:06:34][bitmapfont.cpp:2583]: Could not find coloring for character ' '
[12:06:34][bitmapfont.cpp:2583]: Could not find coloring for character ' '
[12:06:34][bitmapfont.cpp:2583]: Could not find coloring for character ' '

Oh and i got no energy from entering battle.
Maybe its because it is no fleet, its actually a civil science ship with weapons ;)
 
Ah, i'm not sure how it works with civilian ships, i've only worked with military ones. Since civilian ships can't group up together i'm not sure if they have a fleet owner.

What you could do is. Make a ship event and a fleet event and put them in the entering battle. Make sure both of them are set so they show their windows, don't forget an option to click them away. When the event window is showing you can use the console command 'eventscopes' which will show what's in ROOT, FROM, etc. Maybe that will help you figure out what scope they are in when entering battle.