This has been a WiP. Probably a tad overboard for a first mod attempt(in any Paradox game, let alone Stellaris) and only a passing acquaintance with Python and SQL.
The goals:
- Custom Starting System(done)
- Primitive Neighbour on Twin Planet(done)
- Custom Neighbouring Systems(done)
- One of which must be a black hole system.(done)
- Create Precursor event chain that is completable, in its' entirety, within the 5 systems above(Home system and 4 neighbours)
The roadblocks:
- Was unable to add planetary modifiers within my system(such as "planet_bleak" to home planet) without breaking the system.(semi-fixed, unable to modify occupied worlds of R'kal or K'lesi without breaking system and/or somehow preventing the creation of buildings on the world(s) in question)
- Unable to force spawn of neighbour systems. Possible trigger issue?(fixed)
- Seemingly unable to add anomalies to specific planetary bodies within systems.
- Would like to be able to do this in random lists. E.g. I have several scripted planets, plus 1-3 random planets. is there a way to add an anomaly so that it always spawns on one of the randomly created planets?
The questions:
- How can I add planetary modifiers to occupied worlds without breaking my system and/or planet(s)? They seem not to work in my home system. One attempt to add "ultra_rich" to my first planet removed everything else from the system and turned that one into my home planet(It should be noted that my home planet then was, in fact, ultra-rich in minerals....)
- How can I add anomaly events to specific planetary bodies? I originally assumed that something like this would work when tagged on an asteroid in my system:
This does not work, and broke my entire system when I tried adding it to one of the asteroids in my home system. Any advice on getting this working?
If anybody could take a peek. Code bloc for the entire initializer as follows.
The goals:
- Custom Starting System(done)
- Primitive Neighbour on Twin Planet(done)
- Custom Neighbouring Systems(done)
- One of which must be a black hole system.(done)
- Create Precursor event chain that is completable, in its' entirety, within the 5 systems above(Home system and 4 neighbours)
The roadblocks:
- Was unable to add planetary modifiers within my system(such as "planet_bleak" to home planet) without breaking the system.(semi-fixed, unable to modify occupied worlds of R'kal or K'lesi without breaking system and/or somehow preventing the creation of buildings on the world(s) in question)
- Unable to force spawn of neighbour systems. Possible trigger issue?(fixed)
- Seemingly unable to add anomalies to specific planetary bodies within systems.
- Would like to be able to do this in random lists. E.g. I have several scripted planets, plus 1-3 random planets. is there a way to add an anomaly so that it always spawns on one of the randomly created planets?
The questions:
- How can I add planetary modifiers to occupied worlds without breaking my system and/or planet(s)? They seem not to work in my home system. One attempt to add "ultra_rich" to my first planet removed everything else from the system and turned that one into my home planet(It should be noted that my home planet then was, in fact, ultra-rich in minerals....)
- How can I add anomaly events to specific planetary bodies? I originally assumed that something like this would work when tagged on an asteroid in my system:
Code:
init_effect = {
add_anomaly = {
event = "precursor.2005"
days = -1
}
}
If anybody could take a peek. Code bloc for the entire initializer as follows.
Code:
@distance = 50
@base_moon_distance = 10
### R'kal System
rkal_system = {
name = "R'kal"
class = "sc_k"
asteroids_distance = 90
flags = { primitive_system }
usage = custom_empire
planet = {
name = "R'kal"
class = "pc_k_star"
orbit_distance = 0
orbit_angle = 1
size = 60
has_ring = no
}
planet = {
name = "Ch'mal"
class = "pc_molten"
orbit_distance = 60
orbit_angle = 45
size = 10
has_ring = no
}
planet = {
name = ""
class = "pc_asteroid"
orbit_distance = 30
orbit_angle = 340
size = 5
has_ring = no
}
planet = {
name = ""
class = "pc_asteroid"
orbit_distance = 0
orbit_angle = 160
size = 5
has_ring = no
}
planet = {
name = ""
class = "pc_asteroid"
orbit_distance = 0
orbit_angle = 270
size = 5
has_ring = no
}
planet = {
name = ""
class = "pc_barren_cold"
orbit_distance = 20
orbit_angle = 325
size = 10
has_ring = no
}
planet = {
name = "G'kel"
class = "pc_gas_giant"
orbit_distance = 20
orbit_angle = 110
size = 30
has_ring = yes
entity = "gas_giant_05_entity"
moon = {
name = "G'kel'a"
class = "pc_gaia"
size = { min = 8 max = 12 }
orbit_distance = 14
orbit_angle = 14
has_ring = no
init_effect = {
add_modifier = {
modifier = "atmospheric_aphrodisiac"
days = -1
}
}
}
}
planet = {
name = ""
class = "pc_barren"
orbit_distance = 20
orbit_angle = 35
size = 15
has_ring = no
}
planet = {
name = ""
class = "pc_toxic"
orbit_distance = 20
orbit_angle = 150
size = 20
has_ring = no
}
planet = {
name = "R'kalis"
class = "pc_nuked"
orbit_distance = 20
orbit_angle = 120
size = 16
starting_planet = yes
has_ring = yes
tile_blockers = none
modifiers = none
init_effect = {
prevent_anomaly = yes
}
init_effect = {
random_tile = {
limit = { has_blocker = no has_building = no num_adjacent_tiles > 3 }
set_building = "building_capital_1"
add_resource = {
resource = food
amount = 1
replace = yes
}
add_resource = {
resource = minerals
amount = 1
}
random_neighboring_tile = {
limit = { has_blocker = no has_building = no }
set_building = "building_hydroponics_farm_1"
add_resource = {
resource = food
amount = 1
replace = yes
}
}
random_neighboring_tile = {
limit = { has_blocker = no has_building = no }
set_building = "building_power_plant_1"
add_resource = {
resource = energy
amount = 1
replace = yes
}
}
random_neighboring_tile = {
limit = { has_blocker = no has_building = no }
set_building = "building_power_plant_1"
add_resource = {
resource = energy
amount = 1
replace = yes
}
}
random_neighboring_tile = {
limit = { has_blocker = no has_building = no }
set_building = "building_mining_network_1"
add_resource = {
resource = minerals
amount = 1
replace = yes
}
}
}
random_tile = {
limit = { has_blocker = no has_building = no }
set_blocker = "tb_failing_infrastructure"
add_resource = {
resource = engineering_research
amount = 1
replace = yes
}
}
random_tile = {
limit = { has_blocker = no has_building = no }
set_blocker = "tb_failing_infrastructure"
add_resource = {
resource = society_research
amount = 1
replace = yes
}
}
random_tile = {
limit = { has_blocker = no has_building = no }
set_blocker = "tb_failing_infrastructure"
add_resource = {
resource = physics_research
amount = 1
replace = yes
}
}
random_tile = {
limit = { has_blocker = no has_building = no }
set_blocker = "tb_decrepit_dwellings"
add_resource = {
resource = energy
amount = 2
replace = yes
}
}
random_tile = {
limit = { has_blocker = no has_building = no }
set_blocker = "tb_decrepit_dwellings"
add_resource = {
resource = food
amount = 1
replace = yes
}
}
random_tile = {
limit = { has_blocker = no has_building = no }
set_blocker = "tb_decrepit_dwellings"
add_resource = {
resource = energy
amount = 1
replace = yes
}
}
random_tile = {
limit = { has_blocker = no has_building = no }
add_resource = {
resource = food
amount = 1
replace = yes
}
}
}
moon = {
name = "K'les"
class = "pc_gaia"
orbit_distance = 20
orbit_angle = 120
size = 16
has_ring = no
#tile_blockers = none
modifiers = none
init_effect = {
random_list = {
# Early Space Age
25 = {
create_species = {
name = K'lesi
plural = K'lesi
class = "MAM"
portrait = random
homeworld = THIS
traits = {
trait = "trait_very_strong"
trait = "trait_resilient"
}
}
create_country = {
name = random
government = fragmented_nations
species = last_created
ethos = {
ethic = "ethic_collectivist"
ethic = "ethic_fanatic_militarist"
}
flag = {
icon = {
category = "human"
file = "flag_human_9.dds"
}
background= {
category = "backgrounds"
file = "circle.dds"
}
colors={
"dark_blue"
"green"
"null"
"null"
}
}
type = primitive
}
last_created_country = {
set_graphical_culture = industrial_01
set_country_flag = early_space_age
set_primitive_age = early_space_age
}
create_colony = {
owner = last_created_country
species = last_created
ethos = {
ethic = "ethic_collectivist"
ethic = "ethic_fanatic_militarist"
}
}
create_army = {
name = "Post-Atomic Levies"
owner = last_created
species = last_created
type = "postatomic_army"
}
create_army = {
name = "Post-Atomic Levies"
owner = last_created
species = last_created
type = "postatomic_army"
}
create_army = {
name = "Post-Atomic Levies"
owner = last_created
species = last_created
type = "postatomic_army"
}
create_army = {
name = "Post-Atomic Levies"
owner = last_created
species = last_created
type = "postatomic_army"
}
create_army = {
name = "Post-Atomic Levies"
owner = last_created
species = last_created
type = "postatomic_army"
}
random_tile = {
limit = {
has_blocker = no
has_grown_pop = no
has_growing_pop = no
}
create_pop = {
species = last_created
ethos = owner
}
}
random_tile = {
limit = {
has_blocker = no
has_grown_pop = no
has_growing_pop = no
}
create_pop = {
species = last_created
ethos = owner
}
}
random_tile = {
limit = {
has_blocker = no
has_grown_pop = no
has_growing_pop = no
}
create_pop = {
species = last_created
ethos = owner
}
}
random_tile = {
limit = {
has_blocker = no
has_grown_pop = no
has_growing_pop = no
}
create_pop = {
species = last_created
ethos = owner
}
}
random_tile = {
limit = {
has_blocker = no
has_grown_pop = no
has_growing_pop = no
}
create_pop = {
species = last_created
ethos = owner
}
}
random_tile = {
limit = {
has_blocker = no
has_building = no
has_grown_pop = yes
}
set_building = "building_primitive_factory"
add_resource = {
resource = minerals
amount = 1
replace = yes
}
}
random_tile = {
limit = {
has_blocker = no
has_building = no
has_grown_pop = yes
}
set_building = "building_primitive_factory"
add_resource = {
resource = minerals
amount = 1
replace = yes
}
}
random_tile = {
limit = {
has_blocker = no
has_building = no
has_grown_pop = yes
}
set_building = "building_primitive_factory"
add_resource = {
resource = minerals
amount = 1
replace = yes
}
}
random_tile = {
limit = {
has_blocker = no
has_building = no
has_grown_pop = yes
}
set_building = "building_primitive_farm"
add_resource = {
resource = food
amount = 1
replace = yes
}
}
random_tile = {
limit = {
has_blocker = no
has_building = no
has_grown_pop = yes
}
set_building = "building_primitive_farm"
add_resource = {
resource = food
amount = 1
replace = yes
}
}
random_tile = {
limit = {
has_blocker = no
has_building = no
has_grown_pop = yes
}
set_building = "building_primitive_farm"
add_resource = {
resource = food
amount = 1
replace = yes
}
}
random_tile = {
limit = {
has_blocker = no
has_building = no
has_grown_pop = yes
}
set_building = "building_primitive_farm"
add_resource = {
resource = food
amount = 1
replace = yes
}
}
random_tile = {
limit = { has_building = "building_colony_shelter" }
remove_building = yes
}
last_created_country = {
capital_scope = { set_name = "K'les" }
}
}
# Industrial
25 = {
create_species = {
name = K'lesi
plural = K'lesi
class = "MAM"
portrait = random
traits = {
trait = "trait_very_strong"
trait = "trait_resilient"
#ideal_planet_class = "pc_gaia"
}
homeworld = this
}
create_country = {
name = random
government = fragmented_nations
species = last_created
ethos = {
ethic = "ethic_collectivist"
ethic = "ethic_fanatic_militarist"
}
flag = {
icon = {
category = "human"
file = "flag_human_7.dds"
}
background= {
category = "backgrounds"
file = "circle.dds"
}
colors={
"dark_blue"
"red"
"null"
"null"
}
}
day_zero_contact = no
type = primitive
}
last_created_country = {
set_graphical_culture = industrial_01
set_country_flag = machine_age
set_primitive_age = machine_age
}
create_colony = {
owner = last_created_country
species = last_created
ethos = {
ethic = "ethic_collectivist"
ethic = "ethic_fanatic_militarist"
}
}
create_army = {
name = "Industrial Levies"
owner = last_created
species = last_created
type = "industrial_army"
}
create_army = {
name = "Industrial Levies"
owner = last_created
species = last_created
type = "industrial_army"
}
create_army = {
name = "Industrial Levies"
owner = last_created
species = last_created
type = "industrial_army"
}
create_army = {
name = "Industrial Levies"
owner = last_created
species = last_created
type = "industrial_army"
}
create_army = {
name = "Industrial Levies"
owner = last_created
species = last_created
type = "industrial_army"
}
random_tile = {
limit = {
has_blocker = no
has_grown_pop = no
has_growing_pop = no
}
create_pop = {
species = last_created
ethos = owner
}
}
random_tile = {
limit = {
has_blocker = no
has_grown_pop = no
has_growing_pop = no
}
create_pop = {
species = last_created
ethos = owner
}
}
random_tile = {
limit = {
has_blocker = no
has_grown_pop = no
has_growing_pop = no
}
create_pop = {
species = last_created
ethos = owner
}
}
random_tile = {
limit = {
has_blocker = no
has_grown_pop = no
has_growing_pop = no
}
create_pop = {
species = last_created
ethos = owner
}
}
random_tile = {
limit = {
has_blocker = no
has_grown_pop = no
has_growing_pop = no
}
create_pop = {
species = last_created
ethos = owner
}
}
random_tile = {
limit = {
has_blocker = no
has_grown_pop = no
has_growing_pop = no
}
create_pop = {
species = last_created
ethos = owner
}
}
random_tile = {
limit = {
has_blocker = no
has_building = no
has_grown_pop = yes
}
set_building = "building_primitive_factory"
add_resource = {
resource = minerals
amount = 1
replace = yes
}
}
random_tile = {
limit = {
has_blocker = no
has_building = no
has_grown_pop = yes
}
set_building = "building_primitive_factory"
add_resource = {
resource = minerals
amount = 1
replace = yes
}
}
random_tile = {
limit = {
has_blocker = no
has_building = no
has_grown_pop = yes
}
set_building = "building_primitive_factory"
add_resource = {
resource = minerals
amount = 1
replace = yes
}
}
random_tile = {
limit = {
has_blocker = no
has_building = no
has_grown_pop = yes
}
set_building = "building_primitive_factory"
add_resource = {
resource = minerals
amount = 1
replace = yes
}
}
random_tile = {
limit = {
has_blocker = no
has_building = no
has_grown_pop = yes
}
set_building = "building_primitive_farm"
add_resource = {
resource = food
amount = 1
replace = yes
}
}
random_tile = {
limit = {
has_blocker = no
has_building = no
has_grown_pop = yes
}
set_building = "building_primitive_farm"
add_resource = {
resource = food
amount = 1
replace = yes
}
}
random_tile = {
limit = {
has_blocker = no
has_building = no
has_grown_pop = yes
}
set_building = "building_primitive_farm"
add_resource = {
resource = food
amount = 1
replace = yes
}
}
random_tile = {
limit = {
has_blocker = no
has_building = no
has_grown_pop = yes
}
set_building = "building_primitive_farm"
add_resource = {
resource = food
amount = 1
replace = yes
}
}
random_tile = {
limit = { has_building = "building_colony_shelter" }
remove_building = yes
}
last_created_country = {
capital_scope = { set_name = "K'les" }
}
}
# Medieval
25 = {
create_species = {
name = K'lesi
plural = K'lesi
class = "MAM"
portrait = random
homeworld = THIS
traits = {
trait = "trait_very_strong"
trait = "trait_resilient"
}
}
create_country = {
name = random
government = primitive_feudalism
species = last_created
ethos = {
ethic = "ethic_fanatic_militarist"
ethic = "ethic_collectivist"
}
flag = {
icon = {
category = "ornate"
file = "flag_ornate_11.dds"
}
background = {
category = "backgrounds"
file = "00_solid.dds"
}
colors = {
"dark_blue"
"dark_blue"
"null"
"null"
}
}
day_zero_contact = no
type = primitive
}
last_created_country = {
set_graphical_culture = preindustrial_01
set_country_flag = late_medieval_age
set_primitive_age = late_medieval_age
}
create_colony = {
owner = last_created_country
species = last_created
ethos = {
ethic = "ethic_fanatic_militarist"
ethic = "ethic_collectivist"
}
}
create_army = {
name = "Feudal Levies"
owner = last_created
species = last_created
type = "primitive_army"
}
create_army = {
name = "Feudal Levies"
owner = last_created
species = last_created
type = "primitive_army"
}
create_army = {
name = "Feudal Levies"
owner = last_created
species = last_created
type = "primitive_army"
}
random_tile = {
limit = {
has_blocker = no
has_grown_pop = no
has_growing_pop = no
}
create_pop = {
species = last_created
ethos = owner
}
}
random_tile = {
limit = {
has_blocker = no
has_grown_pop = no
has_growing_pop = no
}
create_pop = {
species = last_created
ethos = owner
}
}
random_tile = {
limit = {
has_blocker = no
has_grown_pop = no
has_growing_pop = no
}
create_pop = {
species = last_created
ethos = owner
}
}
random_tile = {
limit = {
has_blocker = no
has_building = no
has_grown_pop = yes
}
set_building = "building_primitive_farm"
add_resource = {
resource = food
amount = 1
replace = yes
}
}
random_tile = {
limit = {
has_blocker = no
has_building = no
has_grown_pop = yes
}
set_building = "building_primitive_farm"
add_resource = {
resource = food
amount = 1
replace = yes
}
}
random_tile = {
limit = {
has_blocker = no
has_building = no
has_grown_pop = yes
}
set_building = "building_primitive_farm"
add_resource = {
resource = food
amount = 1
replace = yes
}
}
random_tile = {
limit = {
has_blocker = no
has_building = no
has_grown_pop = yes
}
set_building = "building_primitive_farm"
add_resource = {
resource = food
amount = 1
replace = yes
}
}
random_tile = {
limit = { has_building = "building_colony_shelter" }
remove_building = yes
}
last_created_country = {
capital_scope = { set_name = "K'les" }
}
}
}
}
}
}
neighbor_system = {
distance = { min = 10 max = @distance }
initializer = "rkal_neighbor_t1"
}
neighbor_system = {
distance = { min = 10 max = @distance }
initializer = "rkal_neighbor_t1_first_colony"
}
neighbor_system = {
distance = { min = 10 max = @distance }
initializer = "rkal_neighbor_t2"
}
neighbor_system = {
distance = { min = 10 max = @distance }
initializer = "rkal_neighbor_t2_second_colony"
}
}
# R'kal Neighbor Tier 1
rkal_neighbor_t1 = {
name = "Maw of Entropy"
class = sc_black_hole
planet = {
class = pc_black_hole
orbit_distance = 0
}
change_orbit = 60
planet = {
count = 1
class = "pc_nuked"
size = { min = 12 max = 16 }
}
change_orbit = 30
planet = {
count = 1
class = "pc_barren_cold"
size = { min = 10 max = 20 }
}
planet = {
count = { min = 2 max = 5 }
orbit_distance = 20
}
}
# R'kal Tier 1 First Colony
rkal_neighbor_t1_first_colony = {
name = "R'les"
class = "rl_standard_stars"
planet = {
name = "R'les"
count = 1
class = star
orbit_distance = 0
orbit_angle = 1
size = { min = 20 max = 30 }
has_ring = no
}
change_orbit = 45
planet = {
count = { min = 2 max = 5 }
orbit_distance = 20
change_orbit = @base_moon_distance
moon = {
count = { min = 3 max = 12 }
orbit_distance = 5
}
}
planet = {
count = 1
class = ideal_planet_class
orbit_distance = 15
orbit_angle = 115
size = { min = 12 max = 20}
has_ring = yes
init_effect = {
add_modifier = {
modifier = "atmospheric_hallucinogen"
days = -1
}
}
}
planet = {
count = { min = 2 max = 5 }
orbit_distance = 25
change_orbit = @base_moon_distance
moon = {
count = { min = 2 max = 9 }
orbit_distance = 5
}
}
}
# R'kal Neighbor Tier 2
rkal_neighbor_t2 = {
name = "K'ral"
class = "rl_standard_stars"
asteroids_distance = 70
planet = {
name = "K'ral"
count = 1
class = star
orbit_distance = 0
orbit_angle = 1
size = { min = 20 max = 30 }
has_ring = no
}
planet = {
count = 1
orbit_distance = 45
}
change_orbit = 25
planet = {
count = { min = 1 max = 3 }
class = random_asteroid
orbit_distance = 0
orbit_angle = { min = 0 max = 360 }
}
planet = {
count = { min = 2 max = 5 }
orbit_distance = 25
change_orbit = @base_moon_distance
moon = {
count = { min = 0 max = 1 }
orbit_distance = 5
}
}
}
# R'kal Neighbor Tier 2 Second Colony
rkal_neighbor_t2_second_colony = {
name = "Ch'ral"
class = "rl_standard_stars"
planet = {
name = "Ch'ral"
count = 1
class = star
orbit_distance = 0
orbit_angle = 1
size = { min = 20 max = 30 }
has_ring = no
}
change_orbit = 45
planet = {
count = { min = 2 max = 5 }
orbit_distance = 20
change_orbit = @base_moon_distance
moon = {
count = { min = 3 max = 9 }
orbit_distance = 5
}
}
planet = {
count = 1
class = ideal_planet_class
orbit_distance = 15
orbit_angle = 115
size = { min = 12 max = 20}
has_ring = yes
init_effect = {
add_modifier = {
modifier = "natural_beauty"
days = -1
}
}
}
planet = {
count = { min = 1 max = 3 }
class = random_asteroid
orbit_distance = 0
orbit_angle = { min = 0 max = 360 }
}
}
Last edited: