Skip to content

Commit 9ab95de

Browse files
committed
more stuff
1 parent d568896 commit 9ab95de

File tree

8 files changed

+367
-204
lines changed

8 files changed

+367
-204
lines changed

common/buildings/mem_planetary_shields.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ building_mem_planetary_shield_generator_orila = {
331331
on_queued = {
332332
owner = {
333333
subtract_variable = {
334-
which = mem_orila_shield_generator_country
334+
which = "mem_orila_shield_generator_country"
335335
value = 1
336336
}
337337
}

common/on_actions/mem_planetary_shields_on_actions.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,14 @@ on_survey_planet = {
9393
events = {
9494
mem_planetary_shields.13
9595
}
96+
}
97+
98+
# Fired whenever a new owner is set for a planet, following a war or through trade
99+
# This = Planet scope
100+
# From = Country scope (new owner)
101+
# FromFrom = Country scope (previous owner, if any)
102+
on_planet_transfer = {
103+
events = {
104+
mem_planetary_shields.14
105+
}
96106
}

common/scripted_effects/mem_primitives_scripted_effects.txt

Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,213 @@ mem_create_destroyed_orila_system_objects = {
539539
}
540540
}
541541

542+
# is fired after the vazuran setup, so that systems destroyed by them can be used as well
543+
mem_gamestart_orila_primitive_setup = {
544+
every_system = {
545+
limit = {
546+
has_star_flag = mem_orila_primitive_system
547+
}
548+
event_target:global_event_country = {
549+
change_variable = {
550+
which = mem_global_orila_primitive_systems
551+
value = 1
552+
}
553+
}
554+
}
555+
while = {
556+
limit = {
557+
event_target:global_event_country = {
558+
check_variable = {
559+
which = mem_global_orila_primitive_systems
560+
value < 5
561+
}
562+
}
563+
any_system = {
564+
has_star_flag = primitive_system
565+
is_fe_cluster = no
566+
NOT = {
567+
has_star_flag = mem_orila_primitive_system
568+
}
569+
}
570+
}
571+
random_system = {
572+
limit = {
573+
has_star_flag = primitive_system
574+
is_fe_cluster = no
575+
NOT = {
576+
has_star_flag = mem_orila_primitive_system
577+
}
578+
}
579+
every_system_planet = {
580+
limit = {
581+
exists = owner
582+
owner = {
583+
is_primitive = yes
584+
}
585+
}
586+
add_building = building_mem_planetary_shield_generator_orila
587+
set_planet_flag = mem_orila_primitive_world
588+
}
589+
set_star_flag = mem_orila_primitive_system
590+
#set the shield effect
591+
random_system_planet = {
592+
planet_event = { id = mem_planetary_shields.5 days = 1 }
593+
}
594+
595+
#################################################################
596+
#TODO Reenable Ancient Protector Spawn by removing the star flag
597+
set_star_flag = mem_orila_primitive_system_destroyed
598+
#################################################################
599+
600+
mem_setup_orila_primitive_system = yes
601+
#variable to count how many of these systems actually have been spawned
602+
event_target:global_event_country = {
603+
change_variable = {
604+
which = mem_global_orila_primitive_systems
605+
value = 1
606+
}
607+
}
608+
}
609+
}
610+
event_target:global_event_country = {
611+
set_variable = {
612+
which = mem_global_orila_primitive_systems_destroyed
613+
value = 0
614+
}
615+
}
616+
while = {
617+
limit = {
618+
any_system = {
619+
is_fe_cluster = no
620+
has_planet_class = pc_nuked
621+
has_planet_class = pc_shattered
622+
has_planet_class = pc_broken
623+
NOR = {
624+
has_star_flag = old_foes_system
625+
has_star_flag = ratling_system
626+
#has_star_flag = empire_cluster
627+
has_star_flag = mem_orila_primitive_system
628+
}
629+
}
630+
event_target:global_event_country = {
631+
check_variable = {
632+
which = mem_global_orila_primitive_systems_destroyed
633+
value < 5
634+
}
635+
}
636+
}
637+
random_system = {
638+
limit = {
639+
is_fe_cluster = no
640+
has_planet_class = pc_nuked
641+
has_planet_class = pc_shattered
642+
has_planet_class = pc_broken
643+
NOR = {
644+
has_star_flag = ratling_system
645+
#has_star_flag = empire_cluster
646+
has_star_flag = mem_orila_primitive_system
647+
}
648+
}
649+
set_star_flag = mem_orila_primitive_system_destroyed
650+
random_system_planet = {
651+
limit = {
652+
is_primary_star = yes
653+
}
654+
random_list = {
655+
40 = {
656+
create_ambient_object = {
657+
type = mem_orila_spaceport_wreckage_object
658+
location = this
659+
}
660+
last_created_ambient_object = {
661+
set_location = {
662+
target = prev
663+
distance = 20
664+
angle = 120
665+
}
666+
create_ambient_object = {
667+
type = small_debris_object
668+
entity_offset_height = { min = 5 max = -5 }
669+
location = this
670+
}
671+
}
672+
}
673+
60 = {
674+
create_ambient_object = {
675+
type = small_debris_object
676+
entity_offset_height = { min = 5 max = -5 }
677+
location = this
678+
}
679+
last_created_ambient_object = {
680+
set_location = {
681+
target = prev
682+
distance = 20
683+
angle = 120
684+
}
685+
}
686+
}
687+
}
688+
}
689+
every_system_planet = {
690+
limit = {
691+
OR = {
692+
is_planet_class = pc_nuked
693+
is_planet_class = pc_shattered
694+
is_planet_class = pc_broken
695+
}
696+
}
697+
if = {
698+
limit = {
699+
is_planet_class = pc_nuked
700+
}
701+
#flag can later be used to spawn digsites or anomalies
702+
set_planet_flag = mem_orila_primitive_world_destroyed
703+
}
704+
random_list = {
705+
40 = {
706+
create_ambient_object = {
707+
type = mem_orila_small_station_wreckage_object
708+
location = this
709+
}
710+
last_created_ambient_object = {
711+
set_location = {
712+
target = prev
713+
distance = 5
714+
angle = random
715+
}
716+
create_ambient_object = {
717+
type = small_debris_object
718+
entity_offset_height = { min = 5 max = -5 }
719+
location = this
720+
}
721+
}
722+
}
723+
60 = {
724+
create_ambient_object = {
725+
type = small_debris_object
726+
entity_offset_height = { min = 5 max = -5 }
727+
location = this
728+
}
729+
last_created_ambient_object = {
730+
set_location = {
731+
target = prev
732+
distance = 5
733+
angle = random
734+
}
735+
}
736+
}
737+
}
738+
}
739+
event_target:global_event_country = {
740+
change_variable = {
741+
which = mem_global_orila_primitive_systems_destroyed
742+
value = 1
743+
}
744+
}
745+
}
746+
}
747+
}
748+
542749
mem_setup_orila_primitive_system = {
543750
if = {
544751
limit = {

common/solar_system_initializers/mem_orila_primitive_systems.txt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ mem_orila_primitives_es_system = {
66

77
usage = misc_system_init
88
usage_odds = {
9-
base = 500000
9+
#base = 500000
10+
base = 0 # TODO
1011
modifier = {
1112
factor = 0
1213
NOT = { host_has_dlc = "Utopia" }
@@ -524,7 +525,8 @@ mem_orila_primitive_system_ikor = {
524525

525526
usage = misc_system_init
526527
usage_odds = {
527-
base = 500000
528+
#base = 500000
529+
base = 0 # TODO
528530
modifier = {
529531
factor = 0.01
530532
has_star_flag = empire_cluster
@@ -791,7 +793,8 @@ mem_orila_primitive_system_qastliani = {
791793

792794
usage = misc_system_init
793795
usage_odds = {
794-
base = 500000
796+
#base = 500000
797+
base = 0 # TODO
795798
modifier = {
796799
factor = 0.01
797800
has_star_flag = empire_cluster
@@ -1041,7 +1044,8 @@ mem_orila_primitive_system_reshtar = {
10411044

10421045
usage = misc_system_init
10431046
usage_odds = {
1044-
base = 500000
1047+
#base = 500000
1048+
base = 0 # TODO
10451049
modifier = {
10461050
factor = 0
10471051
NOT = { host_has_dlc = "Aquatics Species Pack" }

0 commit comments

Comments
 (0)