-
-
Notifications
You must be signed in to change notification settings - Fork 0
On Actions
- 1. Wiki Section
- 2. From Stellaris Game Files
- 3. From Discord (Stellaris Modding Den)
- 4. From by Github Contributors to the Project
This Wiki page was last updated for v4.4.*
See https://stellaris.paradoxwikis.com/On_actions
On Actions are lists of events that get triggered automatically whenever a certain action occurs.
For example, we have On Actions for when you survey a planet (on_survey), when a starship gets destroyed (on_starbase_destroyed), or you win a space battle (on_space_battle_won). We also have "pulse" On Actions which occur at regular periods of time (on_colony_X_year_pulse, on_monthly_pulse_country, etc).
Every time an On Action gets fired, it will:
- Go through every single event in its events = {}, exclude the ones that trigger false, and fire all the other events
- Go through every single event in its random_events = { # Based on weights and in-event 'weight_multiplier = {}'' code blocks, only runs 1 event.} block, exclude the ones that trigger false, roll weights and fire one random valid event
For planet, system, starbase, leader and pop events, it's recommended to use pre_triggers (fast triggers that are checked before normal ones) to improve performance. See events/000_added_pre_triggers_to_planet_events.txt for information and examples.
Unlike random_list = {}, random_events = {} don't support weight modifiers, don't support weight modifiers, but you can add a weight_multiplier = {} block to the event itself:
weight_multiplier = {
factor = 1 # Default multiplier value
modifier = {
factor = X # Multiply by X if the triggers below are true
trigger_name = value
}
}Custom on actions can be defined in script and triggered by the fire_on_action = { on_action = your_on_action_here } effect.
on_action_name = {
events = {
# Events within this block may fire every time the on_action occurs
}
random_events = { # Based on weights and in-event 'weight_multiplier = {}'' code blocks, only runs 1 event.
# One valid event is chosen every time the on_action occurs
200 = 0 # Chance of no events firing
10 = event_name.01
10 = event_name.02
}
}See Discord > Stellaris Modding Den
Source: This Post
Source: This Post
Source: This Post
TODO
Note
This is a Markdown file and is formatted for viewing in
You can read the Markdown Wiki to learn how to use and modify these types of files.
This Documentation is for