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

milka

Private
2 Badges
Aug 2, 2009
12
4
  • Crusader Kings II
  • Stellaris
Code:
namespace = orbital_bombardment

planet_event = {
    id = orbital_bombardment.1
    hide_window = yes
    is_triggered_only = yes
  
    immediate = {

         FROM = {
            any_owned_ship = {
                limit = { orbit = THIS }
                random_list = {
                    5 = {
                    reduce_hp_percent = 50
                            }
                    5 = {
                    reduce_hp_percent = 25
                            }
                    10 = {
                    reduce_hp_percent = 15
                            }
                    10 = {
                    reduce_hp_percent = 10
                            }
                    10 = {
                    reduce_hp_percent = 5
                            }
                    30 = {
                    reduce_hp_percent = 2
                            }
                    30 = {
                    reduce_hp_percent = 1
                            }
                        }
               }
        }


        # Kill a pop

Code:
 this is on_actions.txt
# A planet is being bombarded
# This = planet under bombardment
# From = bombarding empire
on_monthly_orbital_bombardment = {
    events = {
        orbital_bombardment.1
    }
}

it is code for fleet attrition while plannet bombardment

i was tried change code all day but it didnt work

anyone can help this?
 
If that's your whole code you're missing 2 brackets at the end.

I'd also try making sure that you test with hide_window = no so you can see if the problem is in it triggering or in proper application of the effects.

i copied orbital_bombardment.txt in /stellaris/events/

so i didnt miss 2 brackets
 
No, you did, because you only copied the conditional part, not the effect. Additionally right now your event will entirely replace the vanilla orbital_bombardment.1 event

Also, a 5% chance of losing 50% ship health? That's cray-cray, bro.
 
Code:
        FROM = {
            any_owned_ship = {
                limit = { orbit = THIS }
                random_list = {
                    5 = {
                    reduce_hp_percent = 50
                            }
                    5 = {
                    reduce_hp_percent = 25
                            }
                    10 = {
                    reduce_hp_percent = 15
                            }
                    10 = {
                    reduce_hp_percent = 10
                            }
                    10 = {
                    reduce_hp_percent = 5
                            }
                    30 = {
                    reduce_hp_percent = 2
                            }
                    30 = {
                    reduce_hp_percent = 1
                            }
                        }
               }
        }

if i understand right

immediate = { }

is effect part not conditional part isnt it?

i added this code only and not changed other original code

im confused now

anyone teach me what code is wrong?


ps. it is test code ship damage percentage can change :)
 
Last edited:
First, get Notepad++, it does various helpful things for you.

Second, count how many { brackets you have, and how many } you have, you'll see you have two less } ones.

And while the immediate is the effect, in the original code you can see that there is a limt = { } part, this is an additional conditional. It is this part you have copied. The part under #Kill pop is the actual effect where the code kills the pop. Both parts are part of the event.
 
  • 2
Reactions: