I am just starting to get into modding Stellaris and I thought an interesting exercise would be to create a mod that allowed one to add a deposit of his/her choice to a planet's orbital tile. I focused on uninhabitable planets that can't be colonized for simplicity. My aim was that a planet can be selected and then the appropriate event can be run through the console. This was just an educational exercise for me to learn how to mod Stellaris.
As you will see in the code below, I created a planet_event that gives several options for deposits to add. However, there are a few things I do not understand in the code (I heavily used vanilla files for material) and it is not working as intended.
I do not understand the function of the <location = ROOT> line. Also, the code posted above successfully creates an orbital deposit on the planet but does not present the owner any options to choose from. A deposit is picked randomly. So my question is: how would I go about displaying the possible options to the user? Would a country event that displayed options that triggered events that scoped to the planet work? How would I do that? If not, what other way can I go about doing this? Thanks in advance for all of your help!
As you will see in the code below, I created a planet_event that gives several options for deposits to add. However, there are a few things I do not understand in the code (I heavily used vanilla files for material) and it is not working as intended.
Code:
namespace = deposits
# Event that adds deposits to selected planet
planet_event = {
id = deposits.1
title = "deposits.1.name"
desc = "deposits.1.desc"
picture = GFX_evt_ship_in_orbit
show_sound = event_ship_bridge
location = ROOT
is_triggered_only = yes
immediate = {
orbital_deposit_tile = { clear_deposits = yes }
}
option = {
name = deposits.1.a
orbital_deposit_tile = {
add_deposit = d_vast_mineral_deposit
}
}
option = {
name = deposits.1.b
orbital_deposit_tile = {
add_deposit = d_vast_energy_deposit
}
}
option = {
name = deposits.1.c
orbital_deposit_tile = {
add_deposit = d_vast_physics_deposit
}
}
option = {
name = deposits.1.d
orbital_deposit_tile = {
add_deposit = d_vast_society_deposit
}
}
option = {
name = deposits.1.e
orbital_deposit_tile = {
add_deposit = d_vast_engineering_deposit
}
}
}