Advertisement
Guest User

Untitled

a guest
Jul 21st, 2019
1,112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 331.29 KB | None | 0 0
  1. #################################
  2. ### Leviathan & Enclave Events###
  3. ### by Maximilian Olbers ###
  4. ### & Niclas Karlsson ###
  5. ### & Rufus Tronde ###
  6. ### & Henrik Thyrwall ###
  7. #################################
  8.  
  9. namespace = leviathans
  10.  
  11. country_event = {
  12. id = leviathans.9
  13. hide_window = yes
  14. is_triggered_only = yes
  15. trigger = {
  16. from = {
  17. is_guardian_country = yes
  18. }
  19. OR = {
  20. is_country_type = default
  21. is_country_type = fallen_empire
  22. is_country_type = awakened_fallen_empire
  23. }
  24. }
  25.  
  26. immediate = {
  27. from = {
  28. establish_communications_no_message = root
  29. save_event_target_as = leviathan_story_country
  30. }
  31. country_event = { id = story.8 days = 15 }
  32. }
  33. }
  34.  
  35. # guardian kill check
  36. country_event = {
  37. id = leviathans.4
  38. hide_window = yes
  39. is_triggered_only = yes
  40.  
  41. trigger = {
  42. from = {
  43. is_guardian_country = yes
  44. }
  45. }
  46.  
  47. immediate = {
  48. fromfromfrom.solar_system = {
  49. save_event_target_as = leviathan_destroyed_system
  50. }
  51. root = {
  52. save_event_target_as = leviathan_destroyer_country
  53. }
  54. from = {
  55. save_event_target_as = leviathan_destroyed_country
  56. }
  57. country_event = { id = leviathans.6 days = 2 }
  58. }
  59. }
  60.  
  61. # Delay necessary due to fleets not being instantly deleted, therefore num_fleets trigger won't pass otherwise
  62. country_event = {
  63. id = leviathans.6
  64. hide_window = yes
  65. is_triggered_only = yes
  66.  
  67. trigger = {
  68. exists = event_target:leviathan_destroyed_system
  69. exists = event_target:leviathan_destroyer_country
  70. exists = event_target:leviathan_destroyed_country
  71. event_target:leviathan_destroyed_country = {
  72. num_fleets < 1
  73. }
  74. }
  75.  
  76. immediate = {
  77. observer_event = { id = observer.1 }
  78. every_country = {
  79. limit = {
  80. has_communications = root
  81. NOT = { is_same_value = root }
  82. }
  83. country_event = { id = leviathans.5 }
  84. }
  85. }
  86. }
  87.  
  88. # notification
  89. country_event = {
  90. id = leviathans.5
  91. title = leviathans.5.name
  92. desc = leviathans.5.desc
  93. picture = GFX_evt_throne_room
  94. location = event_target:leviathan_destroyed_system
  95. show_sound = event_mystic_reveal
  96.  
  97. is_triggered_only = yes
  98.  
  99. option = {
  100. name = OK
  101. }
  102. }
  103.  
  104. # Enclave Yearly Border Opinion
  105. event = {
  106. id = leviathans.10
  107. hide_window = yes
  108. is_triggered_only = yes
  109.  
  110. immediate = {
  111. every_country = {
  112. limit = { is_country_type = enclave }
  113. country_event = { id = leviathans.11 }
  114. }
  115. }
  116. }
  117.  
  118. country_event = {
  119. id = leviathans.11
  120. hide_window = yes
  121. is_triggered_only = yes
  122.  
  123. immediate = {
  124. every_owned_fleet = {
  125. limit = {
  126. exists = solar_system
  127. solar_system = {
  128. exists = space_owner
  129. space_owner = {
  130. is_country_type = default
  131. }
  132. }
  133. }
  134. solar_system = {
  135. space_owner = {
  136. root = {
  137. add_trust = {
  138. who = prev
  139. amount = 1
  140. }
  141. }
  142. }
  143. }
  144. }
  145. }
  146. }
  147.  
  148. fleet_event = {
  149. id = leviathans.96
  150. title = "action.10.name"
  151. desc = "action.15.desc"
  152. picture = GFX_evt_star_chart
  153. location = FROM
  154. trackable = yes
  155.  
  156. is_triggered_only = yes
  157.  
  158. trigger = {
  159. owner = {
  160. is_country_type = default
  161. exists = capital_scope
  162. }
  163. from = {
  164. has_star_flag = enclave
  165. any_ship_in_system = {
  166. exists = owner
  167. owner = {
  168. is_country_type = enclave
  169. NOR = {
  170. has_communications = root.owner
  171. reverse_has_relation_flag = {
  172. flag = ongoing_enclave_investigation
  173. who = root.owner
  174. }
  175. }
  176. }
  177. }
  178. }
  179. }
  180.  
  181. immediate = {
  182. owner = {
  183. capital_scope = { save_event_target_as = pc_home }
  184. from = {
  185. random_fleet_in_system = {
  186. limit = {
  187. exists = owner
  188. owner = { is_country_type = enclave }
  189. }
  190. owner = {
  191. save_event_target_as = target_enclave
  192. country_event = { id = leviathans.97 days = 300 random = 50 }
  193. enable_special_project = {
  194. name = "INVESTIGATE_ENCLAVE"
  195. location = event_target:pc_home
  196. owner = root.owner
  197. }
  198. country_event = { id = leviathans.960 }
  199. }
  200. }
  201. }
  202. set_relation_flag = {
  203. flag = ongoing_enclave_investigation
  204. who = event_target:target_enclave
  205. }
  206. }
  207. }
  208.  
  209. option = {
  210. name = "action.10.a"
  211. owner = {
  212. tooltip = {
  213. enable_special_project = {
  214. name = "INVESTIGATE_ENCLAVE"
  215. location = event_target:pc_home
  216. owner = ROOT
  217. }
  218. }
  219. }
  220. }
  221. }
  222.  
  223. country_event = { # passthrough for story.7
  224. id = leviathans.960
  225. hide_window = yes
  226. is_triggered_only = yes
  227.  
  228. immediate = {
  229. from.owner = {
  230. country_event = { id = story.7 days = 2 }
  231. }
  232. }
  233. }
  234.  
  235. # Enclaves make contact after 300 days
  236. country_event = {
  237. id = leviathans.97
  238. hide_window = yes
  239.  
  240. is_triggered_only = yes
  241.  
  242. trigger = {
  243. exists = event_target:pc_home
  244. event_target:pc_home = {
  245. exists = owner
  246. owner = {
  247. NOT = { has_communications = root }
  248. has_relation_flag = {
  249. flag = ongoing_enclave_investigation
  250. who = root
  251. }
  252. }
  253. }
  254. }
  255.  
  256. immediate = {
  257. event_target:pc_home = {
  258. if = {
  259. limit = {
  260. exists = owner
  261. owner = {
  262. NOT = {
  263. has_communications = root
  264. }
  265. has_relation_flag = {
  266. flag = ongoing_enclave_investigation
  267. who = root
  268. }
  269. }
  270. }
  271. owner = {
  272. root = { establish_communications_no_message = prev }
  273. country_event = { id = leviathans.98 }
  274. }
  275. }
  276. }
  277. }
  278. }
  279.  
  280. # Enclave Establishes Communications
  281. country_event = {
  282. id = leviathans.98
  283. title = leviathans.98.name
  284. desc = leviathans.98.desc
  285. picture = GFX_evt_throne_room
  286. show_sound = event_radio_chatter
  287.  
  288. is_triggered_only = yes
  289.  
  290. after = {
  291. if = {
  292. limit = {
  293. OR = {
  294. has_ethic = ethic_xenophile
  295. has_ethic = ethic_fanatic_xenophile
  296. }
  297. }
  298. add_monthly_resource_mult = {
  299. resource = influence
  300. value = @tier1influencecontactxenophile
  301. min = @tier1influencecontactmin
  302. max = @tier1influencecontactmax
  303. }
  304. }
  305. else = {
  306. add_monthly_resource_mult = {
  307. resource = influence
  308. value = @tier1influencecontact
  309. min = @tier1influencecontactmin
  310. max = @tier1influencecontactmax
  311. }
  312. }
  313. hidden_effect = {
  314. if = {
  315. limit = {
  316. from = { has_country_flag = trader_enclave_country }
  317. }
  318. from = { country_event = { id = leviathans.101 } }
  319. break = yes
  320. }
  321. if = {
  322. limit = { from = { has_country_flag = artist_enclave_country } }
  323. from = { country_event = { id = leviathans.301 } }
  324. break = yes
  325. }
  326. if = {
  327. limit = { from = { has_country_flag = curator_enclave_country } }
  328. from = { country_event = { id = leviathans.501 } }
  329. break = yes
  330. }
  331. }
  332. }
  333.  
  334. option = {
  335. name = SCUM
  336. trigger = {
  337. has_valid_civic = civic_fanatic_purifiers
  338. }
  339. }
  340.  
  341. option = {
  342. name = TASTY
  343. trigger = {
  344. has_valid_civic = civic_hive_devouring_swarm
  345. }
  346. }
  347.  
  348. option = {
  349. name = EXTERMINATE
  350. trigger = {
  351. has_valid_civic = civic_machine_terminator
  352. }
  353. }
  354.  
  355. option = {
  356. name = leviathans.98.a
  357. trigger = {
  358. NOR = {
  359. has_valid_civic = civic_fanatic_purifiers
  360. has_valid_civic = civic_hive_devouring_swarm
  361. has_valid_civic = civic_machine_terminator
  362. }
  363. }
  364. }
  365. }
  366.  
  367. # Communication Established
  368. country_event = {
  369. id = leviathans.99
  370. title = "leviathans.99.name"
  371. desc = leviathans.99.desc
  372. picture = GFX_evt_throne_room
  373. show_sound = event_radio_chatter
  374.  
  375. is_triggered_only = yes
  376.  
  377. immediate = { establish_communications_no_message = FROMFROM }
  378.  
  379. after = {
  380. if = {
  381. limit = {
  382. OR = {
  383. has_ethic = ethic_xenophile
  384. has_ethic = ethic_fanatic_xenophile
  385. }
  386. }
  387. add_monthly_resource_mult = {
  388. resource = influence
  389. value = @tier2influencecontactxenophile
  390. min = @tier2influencecontactmin
  391. max = @tier2influencecontactmax
  392. }
  393. }
  394. else = {
  395. add_monthly_resource_mult = {
  396. resource = influence
  397. value = @tier2influencecontact
  398. min = @tier2influencecontactmin
  399. max = @tier2influencecontactmax
  400. }
  401. }
  402. hidden_effect = {
  403. if = {
  404. limit = {
  405. fromfrom = {
  406. has_country_flag = trader_enclave_country
  407. }
  408. }
  409. fromfrom = { country_event = { id = leviathans.101 } }
  410. break = yes
  411. }
  412. if = {
  413. limit = {
  414. fromfrom = {
  415. has_country_flag = artist_enclave_country
  416. }
  417. }
  418. fromfrom = {
  419. country_event = { id = leviathans.301 }
  420. }
  421. set_country_flag = enclave_artist_encountered
  422. break = yes
  423. }
  424. if = {
  425. limit = {
  426. fromfrom = {
  427. has_country_flag = curator_enclave_country
  428. }
  429. }
  430. fromfrom = { country_event = { id = leviathans.501 } }
  431. break = yes
  432. }
  433. }
  434. }
  435.  
  436. option = {
  437. name = SCUM
  438. trigger = {
  439. has_valid_civic = civic_fanatic_purifiers
  440. }
  441. }
  442.  
  443. option = {
  444. name = TASTY
  445. trigger = {
  446. has_valid_civic = civic_hive_devouring_swarm
  447. }
  448. }
  449.  
  450. option = {
  451. name = EXTERMINATE
  452. trigger = {
  453. has_valid_civic = civic_machine_terminator
  454. }
  455. }
  456.  
  457. option = {
  458. name = "leviathans.98.a"
  459. trigger = {
  460. NOR = {
  461. has_valid_civic = civic_fanatic_purifiers
  462. has_valid_civic = civic_hive_devouring_swarm
  463. has_valid_civic = civic_machine_terminator
  464. }
  465. }
  466. }
  467. }
  468.  
  469. # Traders Main Menu #1 (Initial)
  470. country_event = {
  471. id = leviathans.100
  472. title = leviathans.100.name
  473. desc = leviathans.100a.desc
  474. desc = leviathans.100b.desc
  475. desc = leviathans.100c.desc
  476. desc = leviathans.100d.desc
  477. desc = leviathans.100e.desc
  478. desc = leviathans.100f.desc
  479.  
  480. is_triggered_only = yes
  481. diplomatic = yes
  482. custom_gui = "enclave_trader_window"
  483. force_open = yes
  484.  
  485. picture_event_data = {
  486. portrait = event_target:traders
  487. room = enclave_trader_room
  488. }
  489.  
  490. trigger = {
  491. from = {
  492. is_country_type = enclave
  493. has_country_flag = trader_enclave_country_1
  494. }
  495. NOT = { has_country_flag = attacked_xuracorp }
  496. NOT = { has_country_flag = trader_enclave_diplomacy_engaged }
  497. }
  498.  
  499. immediate = {
  500. set_country_flag = trader_enclave_diplomacy_engaged
  501. FROM = { save_event_target_as = traders }
  502. }
  503.  
  504. after = {
  505. hidden_effect = {
  506. remove_country_flag = trader_enclave_diplomacy_engaged
  507. }
  508. }
  509.  
  510. option = {
  511. name = SCUM
  512. custom_gui = "enclave_trader_option"
  513. trigger = {
  514. has_valid_civic = civic_fanatic_purifiers
  515. }
  516. hidden_effect = {
  517. remove_country_flag = trader_enclave_diplomacy_engaged
  518. }
  519. }
  520.  
  521. option = {
  522. name = TASTY
  523. custom_gui = "enclave_trader_option"
  524. trigger = {
  525. has_valid_civic = civic_hive_devouring_swarm
  526. }
  527. hidden_effect = {
  528. remove_country_flag = trader_enclave_diplomacy_engaged
  529. }
  530. }
  531.  
  532. option = {
  533. name = EXTERMINATE
  534. custom_gui = "enclave_trader_option"
  535. trigger = {
  536. has_valid_civic = civic_machine_terminator
  537. }
  538. hidden_effect = {
  539. remove_country_flag = trader_enclave_diplomacy_engaged
  540. }
  541. }
  542.  
  543. option = { # Strategic Resource
  544. name = leviathans.105.c
  545. custom_gui = "enclave_trader_option"
  546. trigger = {
  547. NOR = {
  548. has_valid_civic = civic_fanatic_purifiers
  549. has_valid_civic = civic_hive_devouring_swarm
  550. has_valid_civic = civic_machine_terminator
  551. }
  552. }
  553. allow = {
  554. custom_tooltip = {
  555. fail_text = leviathans.105.c.sr2
  556. has_active_xuracorp_trade = no
  557. }
  558. }
  559. hidden_effect = {
  560. country_event = { id = leviathans.131 }
  561. }
  562. }
  563.  
  564. option = { # Hire Governor
  565. name = leviathans.105.z
  566. custom_gui = "enclave_trader_option"
  567. allow = {
  568. custom_tooltip = {
  569. text = leviathans.105.c.trust
  570. event_target:traders = {
  571. trust = {
  572. who = root
  573. value >= 50
  574. }
  575. }
  576. }
  577. custom_tooltip = {
  578. fail_text = already_hired_trader_governor
  579. NOR = {
  580. AND = {
  581. event_target:traders = { has_country_flag = trader_enclave_country_1 }
  582. has_country_flag = hired_trader_governor_xur
  583. }
  584. AND = {
  585. event_target:traders = { has_country_flag = trader_enclave_country_2 }
  586. has_country_flag = hired_trader_governor_rig
  587. }
  588. AND = {
  589. event_target:traders = { has_country_flag = trader_enclave_country_3 }
  590. has_country_flag = hired_trader_governor_mut
  591. }
  592. }
  593. }
  594. }
  595. hidden_effect = {
  596. country_event = { id = leviathans.125 }
  597. }
  598. }
  599.  
  600. option = { # End Resource Deal
  601. name = leviathans.105.e
  602. custom_gui = "enclave_trader_option"
  603. trigger = {
  604. has_active_xuracorp_trade = yes
  605. }
  606. custom_tooltip = end_trade_1
  607. custom_tooltip = opinion-5
  608. hidden_effect = {
  609. remove_xuracorp_trades = yes
  610. event_target:traders = {
  611. add_trust = {
  612. who = root
  613. amount = -5
  614. }
  615. }
  616. }
  617. is_dialog_only = yes
  618. response_text = leviathans.105.e.response
  619. }
  620.  
  621. option = {
  622. name = leviathans.105.d
  623. custom_gui = "enclave_trader_option"
  624. trigger = {
  625. NOR = {
  626. has_valid_civic = civic_fanatic_purifiers
  627. has_valid_civic = civic_hive_devouring_swarm
  628. has_valid_civic = civic_machine_terminator
  629. }
  630. }
  631. default_hide_option = yes
  632. hidden_effect = {
  633. remove_country_flag = trader_enclave_diplomacy_engaged
  634. }
  635. }
  636. }
  637.  
  638. # Traders Main Menu #2 (Initial)
  639. country_event = {
  640. id = leviathans.103
  641. title = leviathans.103.name
  642. desc = leviathans.103a.desc
  643. desc = leviathans.103b.desc
  644. desc = leviathans.103c.desc
  645. desc = leviathans.103d.desc
  646. desc = leviathans.103e.desc
  647. desc = leviathans.103f.desc
  648.  
  649. is_triggered_only = yes
  650. diplomatic = yes
  651. custom_gui = "enclave_trader_window"
  652. force_open = yes
  653.  
  654. picture_event_data = {
  655. portrait = event_target:traders
  656. room = enclave_trader_room
  657. }
  658.  
  659. trigger = {
  660. from = {
  661. is_country_type = enclave
  662. has_country_flag = trader_enclave_country_2
  663. }
  664. NOT = { has_country_flag = trader_enclave_diplomacy_engaged }
  665. NOT = { has_country_flag = attacked_riggans }
  666. }
  667.  
  668. immediate = {
  669. set_country_flag = trader_enclave_diplomacy_engaged
  670. FROM = { save_event_target_as = traders }
  671. }
  672.  
  673. after = {
  674. hidden_effect = {
  675. remove_country_flag = trader_enclave_diplomacy_engaged
  676. }
  677. }
  678.  
  679. option = {
  680. name = SCUM
  681. custom_gui = "enclave_trader_option"
  682. trigger = {
  683. has_valid_civic = civic_fanatic_purifiers
  684. }
  685. }
  686.  
  687. option = {
  688. name = TASTY
  689. custom_gui = "enclave_trader_option"
  690. trigger = {
  691. has_valid_civic = civic_hive_devouring_swarm
  692. }
  693. }
  694.  
  695. option = {
  696. name = EXTERMINATE
  697. custom_gui = "enclave_trader_option"
  698. trigger = {
  699. has_valid_civic = civic_machine_terminator
  700. }
  701. }
  702.  
  703. option = { # Strategic Resource
  704. name = leviathans.105.c
  705. custom_gui = "enclave_trader_option"
  706. trigger = {
  707. NOR = {
  708. has_valid_civic = civic_fanatic_purifiers
  709. has_valid_civic = civic_hive_devouring_swarm
  710. has_valid_civic = civic_machine_terminator
  711. }
  712. }
  713. allow = {
  714. custom_tooltip = {
  715. fail_text = leviathans.105.c.sr1
  716. has_active_riggan_trade = no
  717. }
  718. }
  719. hidden_effect = {
  720. country_event = { id = leviathans.130 }
  721. }
  722. }
  723.  
  724. option = { # Hire Governor
  725. name = leviathans.105.z
  726. custom_gui = "enclave_trader_option"
  727. allow = {
  728. custom_tooltip = {
  729. text = leviathans.105.c.trust
  730. event_target:traders = {
  731. trust = {
  732. who = root
  733. value >= 50
  734. }
  735. }
  736. }
  737. custom_tooltip = {
  738. fail_text = already_hired_trader_governor
  739. NOR = {
  740. AND = {
  741. event_target:traders = { has_country_flag = trader_enclave_country_1 }
  742. has_country_flag = hired_trader_governor_xur
  743. }
  744. AND = {
  745. event_target:traders = { has_country_flag = trader_enclave_country_2 }
  746. has_country_flag = hired_trader_governor_rig
  747. }
  748. AND = {
  749. event_target:traders = { has_country_flag = trader_enclave_country_3 }
  750. has_country_flag = hired_trader_governor_mut
  751. }
  752. }
  753. }
  754. }
  755. hidden_effect = {
  756. country_event = { id = leviathans.125 }
  757. }
  758. }
  759.  
  760. option = { # End Resource Deal
  761. name = leviathans.105.e
  762. custom_gui = "enclave_trader_option"
  763. trigger = {
  764. has_active_riggan_trade = yes
  765. }
  766. custom_tooltip = end_trade_2
  767. custom_tooltip = opinion-5
  768. hidden_effect = {
  769. remove_riggan_trades = yes
  770. event_target:traders = {
  771. add_trust = {
  772. who = root
  773. amount = -5
  774. }
  775. }
  776. }
  777. is_dialog_only = yes
  778. response_text = leviathans.105.e.response
  779. }
  780.  
  781. option = {
  782. name = leviathans.105.d
  783. custom_gui = "enclave_trader_option"
  784. trigger = {
  785. NOR = {
  786. has_valid_civic = civic_fanatic_purifiers
  787. has_valid_civic = civic_hive_devouring_swarm
  788. has_valid_civic = civic_machine_terminator
  789. }
  790. }
  791. default_hide_option = yes
  792. }
  793. }
  794.  
  795. # Traders Main Menu #3 (Initial)
  796. country_event = {
  797. id = leviathans.104
  798. title = leviathans.104.name
  799. desc = leviathans.104a.desc
  800. desc = leviathans.104b.desc
  801. desc = leviathans.104c.desc
  802. desc = leviathans.104d.desc
  803. desc = leviathans.104e.desc
  804. desc = leviathans.104f.desc
  805.  
  806. is_triggered_only = yes
  807. diplomatic = yes
  808. custom_gui = "enclave_trader_window"
  809. force_open = yes
  810.  
  811. picture_event_data = {
  812. portrait = event_target:traders
  813. room = enclave_trader_room
  814. }
  815.  
  816. trigger = {
  817. from = {
  818. is_country_type = enclave
  819. has_country_flag = trader_enclave_country_3
  820. }
  821. NOT = { has_country_flag = trader_enclave_diplomacy_engaged }
  822. NOT = { has_country_flag = attacked_muutagans }
  823. }
  824.  
  825. immediate = {
  826. set_country_flag = trader_enclave_diplomacy_engaged
  827. FROM = { save_event_target_as = traders }
  828. }
  829.  
  830. after = {
  831. hidden_effect = {
  832. remove_country_flag = trader_enclave_diplomacy_engaged
  833. }
  834. }
  835.  
  836. option = {
  837. name = SCUM
  838. custom_gui = "enclave_trader_option"
  839. trigger = {
  840. has_valid_civic = civic_fanatic_purifiers
  841. }
  842. }
  843.  
  844. option = {
  845. name = TASTY
  846. custom_gui = "enclave_trader_option"
  847. trigger = {
  848. has_valid_civic = civic_hive_devouring_swarm
  849. }
  850. }
  851.  
  852. option = {
  853. name = EXTERMINATE
  854. custom_gui = "enclave_trader_option"
  855. trigger = {
  856. has_valid_civic = civic_machine_terminator
  857. }
  858. }
  859.  
  860. option = { # Strategic Resource
  861. name = leviathans.105.c
  862. custom_gui = "enclave_trader_option"
  863. trigger = {
  864. NOR = {
  865. has_valid_civic = civic_fanatic_purifiers
  866. has_valid_civic = civic_hive_devouring_swarm
  867. has_valid_civic = civic_machine_terminator
  868. }
  869. }
  870. allow = {
  871. custom_tooltip = {
  872. fail_text = leviathans.105.c.sr3
  873. has_active_muutagan_trade = no
  874. }
  875. }
  876. hidden_effect = {
  877. country_event = { id = leviathans.132 }
  878. }
  879. }
  880.  
  881. option = { # End Resource Deal
  882. name = leviathans.105.e
  883. custom_gui = "enclave_trader_option"
  884. trigger = {
  885. has_active_muutagan_trade = yes
  886. }
  887. custom_tooltip = end_trade_3
  888. custom_tooltip = opinion-5
  889. hidden_effect = {
  890. remove_muutagan_trades = yes
  891. event_target:traders = {
  892. add_trust = {
  893. who = root
  894. amount = -5
  895. }
  896. }
  897. }
  898. is_dialog_only = yes
  899. response_text = leviathans.105.e.response
  900. }
  901.  
  902. option = { # Hire Governor
  903. name = leviathans.105.z
  904. custom_gui = "enclave_trader_option"
  905. allow = {
  906. custom_tooltip = {
  907. text = leviathans.105.c.trust
  908. event_target:traders = {
  909. trust = {
  910. who = root
  911. value >= 50
  912. }
  913. }
  914. }
  915. custom_tooltip = {
  916. fail_text = already_hired_trader_governor
  917. NOR = {
  918. AND = {
  919. event_target:traders = { has_country_flag = trader_enclave_country_1 }
  920. has_country_flag = hired_trader_governor_xur
  921. }
  922. AND = {
  923. event_target:traders = { has_country_flag = trader_enclave_country_2 }
  924. has_country_flag = hired_trader_governor_rig
  925. }
  926. AND = {
  927. event_target:traders = { has_country_flag = trader_enclave_country_3 }
  928. has_country_flag = hired_trader_governor_mut
  929. }
  930. }
  931. }
  932. }
  933. hidden_effect = {
  934. country_event = { id = leviathans.125 }
  935. }
  936. }
  937.  
  938. option = {
  939. name = leviathans.105.d
  940. custom_gui = "enclave_trader_option"
  941. trigger = {
  942. NOR = {
  943. has_valid_civic = civic_fanatic_purifiers
  944. has_valid_civic = civic_hive_devouring_swarm
  945. has_valid_civic = civic_machine_terminator
  946. }
  947. }
  948. default_hide_option = yes
  949. }
  950. }
  951.  
  952. # Traders Main Menu #1
  953. country_event = {
  954. id = leviathans.105
  955. title = leviathans.100.name
  956. desc = leviathans.100a.desc
  957. desc = leviathans.100b.desc
  958. desc = leviathans.100c.desc
  959. desc = leviathans.100d.desc
  960. desc = leviathans.100e.desc
  961. desc = leviathans.100f.desc
  962.  
  963. is_triggered_only = yes
  964. diplomatic = yes
  965. custom_gui = "enclave_trader_window"
  966.  
  967. picture_event_data = {
  968. portrait = event_target:traders
  969. room = enclave_trader_room
  970. }
  971.  
  972. immediate = {
  973. set_country_flag = trader_enclave_diplomacy_engaged
  974. }
  975.  
  976. after = {
  977. hidden_effect = {
  978. remove_country_flag = trader_enclave_diplomacy_engaged
  979. }
  980. }
  981.  
  982. option = { # Strategic Resource
  983. name = leviathans.105.c
  984. custom_gui = "enclave_trader_option"
  985. allow = {
  986. custom_tooltip = {
  987. fail_text = leviathans.105.c.sr2
  988. has_active_xuracorp_trade = no
  989. }
  990. }
  991. hidden_effect = {
  992. country_event = { id = leviathans.131 }
  993. }
  994. }
  995.  
  996. option = { # Hire Governor
  997. name = leviathans.105.z
  998. custom_gui = "enclave_trader_option"
  999. allow = {
  1000. custom_tooltip = {
  1001. text = leviathans.105.c.trust
  1002. event_target:traders = {
  1003. trust = {
  1004. who = root
  1005. value >= 50
  1006. }
  1007. }
  1008. }
  1009. custom_tooltip = {
  1010. fail_text = already_hired_trader_governor
  1011. NOR = {
  1012. AND = {
  1013. event_target:traders = { has_country_flag = trader_enclave_country_1 }
  1014. has_country_flag = hired_trader_governor_xur
  1015. }
  1016. AND = {
  1017. event_target:traders = { has_country_flag = trader_enclave_country_2 }
  1018. has_country_flag = hired_trader_governor_rig
  1019. }
  1020. AND = {
  1021. event_target:traders = { has_country_flag = trader_enclave_country_3 }
  1022. has_country_flag = hired_trader_governor_mut
  1023. }
  1024. }
  1025. }
  1026. }
  1027. hidden_effect = {
  1028. country_event = { id = leviathans.125 }
  1029. }
  1030. }
  1031.  
  1032. option = { # End Resource Deal
  1033. name = leviathans.105.e
  1034. custom_gui = "enclave_trader_option"
  1035. trigger = {
  1036. has_active_xuracorp_trade = yes
  1037. }
  1038. custom_tooltip = end_trade_1
  1039. custom_tooltip = opinion-5
  1040. hidden_effect = {
  1041. remove_xuracorp_trades = yes
  1042. event_target:traders = {
  1043. add_trust = {
  1044. who = root
  1045. amount = -5
  1046. }
  1047. }
  1048. }
  1049. is_dialog_only = yes
  1050. response_text = leviathans.105.e.response
  1051. }
  1052.  
  1053. option = {
  1054. name = leviathans.105.d
  1055. default_hide_option = yes
  1056. custom_gui = "enclave_trader_option"
  1057. hidden_effect = {
  1058. remove_country_flag = trader_enclave_diplomacy_engaged
  1059. }
  1060. }
  1061. }
  1062.  
  1063. # Traders Main Menu #2
  1064. country_event = {
  1065. id = leviathans.106
  1066. title = leviathans.103.name
  1067. desc = leviathans.103a.desc
  1068. desc = leviathans.103b.desc
  1069. desc = leviathans.103c.desc
  1070. desc = leviathans.103d.desc
  1071. desc = leviathans.103e.desc
  1072. desc = leviathans.103f.desc
  1073.  
  1074. is_triggered_only = yes
  1075. diplomatic = yes
  1076. custom_gui = "enclave_trader_window"
  1077.  
  1078. picture_event_data = {
  1079. portrait = event_target:traders
  1080. room = enclave_trader_room
  1081. }
  1082.  
  1083. immediate = {
  1084. set_country_flag = trader_enclave_diplomacy_engaged
  1085. }
  1086.  
  1087. after = {
  1088. hidden_effect = {
  1089. remove_country_flag = trader_enclave_diplomacy_engaged
  1090. }
  1091. }
  1092.  
  1093. option = { # Strategic Resource
  1094. name = leviathans.105.c
  1095. custom_gui = "enclave_trader_option"
  1096. allow = {
  1097. custom_tooltip = {
  1098. fail_text = leviathans.105.c.sr1
  1099. has_active_riggan_trade = no
  1100. }
  1101. }
  1102. hidden_effect = {
  1103. country_event = { id = leviathans.130 }
  1104. }
  1105. }
  1106.  
  1107. option = { # Hire Governor
  1108. name = leviathans.105.z
  1109. custom_gui = "enclave_trader_option"
  1110. allow = {
  1111. custom_tooltip = {
  1112. text = leviathans.105.c.trust
  1113. event_target:traders = {
  1114. trust = {
  1115. who = root
  1116. value >= 50
  1117. }
  1118. }
  1119. }
  1120. custom_tooltip = {
  1121. fail_text = already_hired_trader_governor
  1122. NOR = {
  1123. AND = {
  1124. event_target:traders = { has_country_flag = trader_enclave_country_1 }
  1125. has_country_flag = hired_trader_governor_xur
  1126. }
  1127. AND = {
  1128. event_target:traders = { has_country_flag = trader_enclave_country_2 }
  1129. has_country_flag = hired_trader_governor_rig
  1130. }
  1131. AND = {
  1132. event_target:traders = { has_country_flag = trader_enclave_country_3 }
  1133. has_country_flag = hired_trader_governor_mut
  1134. }
  1135. }
  1136. }
  1137. }
  1138. hidden_effect = {
  1139. country_event = { id = leviathans.125 }
  1140. }
  1141. }
  1142.  
  1143. option = { # End Resource Deal
  1144. name = leviathans.105.e
  1145. custom_gui = "enclave_trader_option"
  1146. trigger = {
  1147. has_active_riggan_trade = yes
  1148. }
  1149. custom_tooltip = end_trade_2
  1150. custom_tooltip = opinion-5
  1151. hidden_effect = {
  1152. remove_riggan_trades = yes
  1153. event_target:traders = {
  1154. add_trust = {
  1155. who = root
  1156. amount = -5
  1157. }
  1158. }
  1159. }
  1160. is_dialog_only = yes
  1161. response_text = leviathans.105.e.response
  1162. }
  1163.  
  1164. option = {
  1165. name = leviathans.105.d
  1166. default_hide_option = yes
  1167. custom_gui = "enclave_trader_option"
  1168. hidden_effect = {
  1169. remove_country_flag = trader_enclave_diplomacy_engaged
  1170. }
  1171. }
  1172. }
  1173.  
  1174. # Traders Main Menu #3
  1175. country_event = {
  1176. id = leviathans.107
  1177. title = leviathans.104.name
  1178. desc = leviathans.104a.desc
  1179. desc = leviathans.104b.desc
  1180. desc = leviathans.104c.desc
  1181. desc = leviathans.104d.desc
  1182. desc = leviathans.104e.desc
  1183. desc = leviathans.104f.desc
  1184.  
  1185. is_triggered_only = yes
  1186. diplomatic = yes
  1187. custom_gui = "enclave_trader_window"
  1188.  
  1189. picture_event_data = {
  1190. portrait = event_target:traders
  1191. room = enclave_trader_room
  1192. }
  1193.  
  1194. immediate = {
  1195. set_country_flag = trader_enclave_diplomacy_engaged
  1196. }
  1197.  
  1198. after = {
  1199. hidden_effect = {
  1200. remove_country_flag = trader_enclave_diplomacy_engaged
  1201. }
  1202. }
  1203.  
  1204. option = { # Strategic Resource
  1205. name = leviathans.105.c
  1206. custom_gui = "enclave_trader_option"
  1207. allow = {
  1208. custom_tooltip = {
  1209. fail_text = leviathans.105.c.sr3
  1210. has_active_muutagan_trade = no
  1211. }
  1212. }
  1213. hidden_effect = {
  1214. country_event = { id = leviathans.132 }
  1215. }
  1216. }
  1217.  
  1218. option = { # Hire Governor
  1219. name = leviathans.105.z
  1220. custom_gui = "enclave_trader_option"
  1221. allow = {
  1222. custom_tooltip = {
  1223. text = leviathans.105.c.trust
  1224. event_target:traders = {
  1225. trust = {
  1226. who = root
  1227. value >= 50
  1228. }
  1229. }
  1230. }
  1231. custom_tooltip = {
  1232. fail_text = already_hired_trader_governor
  1233. NOR = {
  1234. AND = {
  1235. event_target:traders = { has_country_flag = trader_enclave_country_1 }
  1236. has_country_flag = hired_trader_governor_xur
  1237. }
  1238. AND = {
  1239. event_target:traders = { has_country_flag = trader_enclave_country_2 }
  1240. has_country_flag = hired_trader_governor_rig
  1241. }
  1242. AND = {
  1243. event_target:traders = { has_country_flag = trader_enclave_country_3 }
  1244. has_country_flag = hired_trader_governor_mut
  1245. }
  1246. }
  1247. }
  1248. }
  1249. hidden_effect = {
  1250. country_event = { id = leviathans.125 }
  1251. }
  1252. }
  1253.  
  1254. option = { # End Resource Deal
  1255. name = leviathans.105.e
  1256. custom_gui = "enclave_trader_option"
  1257. trigger = {
  1258. has_active_muutagan_trade = yes
  1259. }
  1260. custom_tooltip = end_trade_3
  1261. custom_tooltip = opinion-5
  1262. hidden_effect = {
  1263. remove_muutagan_trades = yes
  1264. event_target:traders = {
  1265. add_trust = {
  1266. who = root
  1267. amount = -5
  1268. }
  1269. }
  1270. }
  1271. is_dialog_only = yes
  1272. response_text = leviathans.105.e.response
  1273. }
  1274.  
  1275. option = {
  1276. name = leviathans.105.d
  1277. default_hide_option = yes
  1278. custom_gui = "enclave_trader_option"
  1279. hidden_effect = {
  1280. remove_country_flag = trader_enclave_diplomacy_engaged
  1281. }
  1282. }
  1283. }
  1284.  
  1285. # Trader Opinion from Resource Deals
  1286. country_event = {
  1287. id = leviathans.122
  1288. hide_window = yes
  1289.  
  1290. is_triggered_only = yes
  1291.  
  1292. trigger = {
  1293. exists = event_target:traders
  1294. OR = {
  1295. AND = {
  1296. event_target:traders = { has_country_flag = trader_enclave_country_1 }
  1297. has_active_xuracorp_trade = yes
  1298. }
  1299. AND = {
  1300. event_target:traders = { has_country_flag = trader_enclave_country_2 }
  1301. has_active_riggan_trade = yes
  1302. }
  1303. AND = {
  1304. event_target:traders = { has_country_flag = trader_enclave_country_3 }
  1305. has_active_muutagan_trade = yes
  1306. }
  1307. }
  1308. }
  1309.  
  1310. immediate = {
  1311. if = {
  1312. limit = {
  1313. OR = {
  1314. AND = {
  1315. event_target:traders = { has_country_flag = trader_enclave_country_1 }
  1316. OR = {
  1317. has_modifier = enclave_trade_1_xur
  1318. has_modifier = enclave_trade_2_xur
  1319. }
  1320. }
  1321. AND = {
  1322. event_target:traders = { has_country_flag = trader_enclave_country_2 }
  1323. OR = {
  1324. has_modifier = enclave_trade_1_rig
  1325. has_modifier = enclave_trade_2_rig
  1326. }
  1327. }
  1328. AND = {
  1329. event_target:traders = { has_country_flag = trader_enclave_country_3 }
  1330. OR = {
  1331. has_modifier = enclave_trade_1_mut
  1332. has_modifier = enclave_trade_2_mut
  1333. }
  1334. }
  1335. }
  1336. }
  1337. event_target:traders = {
  1338. add_trust = {
  1339. who = root
  1340. amount = 1
  1341. }
  1342. }
  1343. country_event = { id = leviathans.122 days = 30 }
  1344. }
  1345. else_if = {
  1346. limit = {
  1347. OR = {
  1348. AND = {
  1349. event_target:traders = { has_country_flag = trader_enclave_country_1 }
  1350. OR = {
  1351. has_modifier = enclave_trade_3_xur
  1352. has_modifier = enclave_trade_4_xur
  1353. }
  1354. }
  1355. AND = {
  1356. event_target:traders = { has_country_flag = trader_enclave_country_2 }
  1357. OR = {
  1358. has_modifier = enclave_trade_3_rig
  1359. has_modifier = enclave_trade_4_rig
  1360. }
  1361. }
  1362. AND = {
  1363. event_target:traders = { has_country_flag = trader_enclave_country_3 }
  1364. OR = {
  1365. has_modifier = enclave_trade_3_mut
  1366. has_modifier = enclave_trade_4_mut
  1367. }
  1368. }
  1369. }
  1370. }
  1371. event_target:traders = {
  1372. add_trust = {
  1373. who = root
  1374. amount = 2
  1375. }
  1376. }
  1377. country_event = { id = leviathans.122 days = 30 }
  1378. }
  1379. else_if = {
  1380. limit = {
  1381. OR = {
  1382. AND = {
  1383. event_target:traders = { has_country_flag = trader_enclave_country_1 }
  1384. has_modifier = enclave_trade_5_xur
  1385. }
  1386. AND = {
  1387. event_target:traders = { has_country_flag = trader_enclave_country_2 }
  1388. has_modifier = enclave_trade_5_rig
  1389. }
  1390. AND = {
  1391. event_target:traders = { has_country_flag = trader_enclave_country_3 }
  1392. has_modifier = enclave_trade_5_mut
  1393. }
  1394. }
  1395. }
  1396. event_target:traders = {
  1397. add_trust = {
  1398. who = root
  1399. amount = 3
  1400. }
  1401. }
  1402. country_event = { id = leviathans.122 days = 30 }
  1403. }
  1404. }
  1405. }
  1406.  
  1407. # Hire Governor
  1408. country_event = {
  1409. id = leviathans.125
  1410. title = leviathans.125.name.z1
  1411. desc = leviathans.125.desc.z1
  1412.  
  1413. is_triggered_only = yes
  1414. diplomatic = yes
  1415. custom_gui = "enclave_trader_window"
  1416.  
  1417. picture_event_data = {
  1418. portrait = event_target:traders
  1419. room = enclave_trader_room
  1420. }
  1421.  
  1422. immediate = {
  1423. set_country_flag = trader_enclave_diplomacy_engaged
  1424. }
  1425.  
  1426. option = {
  1427. name = leviathans.125.z1
  1428. custom_gui = "enclave_trader_option"
  1429. allow = {
  1430. resource_stockpile_compare = { resource = energy value >= 500 }
  1431. custom_tooltip = {
  1432. fail_text = already_hired_trader_governor
  1433. NOR = {
  1434. AND = {
  1435. event_target:traders = { has_country_flag = trader_enclave_country_1 }
  1436. has_country_flag = hired_trader_governor_xur
  1437. }
  1438. AND = {
  1439. event_target:traders = { has_country_flag = trader_enclave_country_2 }
  1440. has_country_flag = hired_trader_governor_rig
  1441. }
  1442. AND = {
  1443. event_target:traders = { has_country_flag = trader_enclave_country_3 }
  1444. has_country_flag = hired_trader_governor_mut
  1445. }
  1446. }
  1447. }
  1448. }
  1449. add_resource = { energy = -500 }
  1450. hidden_effect = {
  1451. create_leader = {
  1452. event_leader = yes
  1453. class = governor
  1454. species = event_target:traders.leader.species
  1455. name = random
  1456. skill = 5
  1457. traits = {
  1458. trait = leader_trait_enclave_trader
  1459. }
  1460. gender = indeterminable
  1461. set_age = 100
  1462. immortal = yes
  1463. effect = {
  1464. set_leader_flag = trader_leader
  1465. root = { set_country_flag = recruited_trader_leader }
  1466. }
  1467. }
  1468. if = {
  1469. limit = { event_target:traders = { has_country_flag = trader_enclave_country_1 } }
  1470. set_country_flag = hired_trader_governor_xur
  1471. }
  1472. else_if = {
  1473. limit = { event_target:traders = { has_country_flag = trader_enclave_country_2 } }
  1474. set_country_flag = hired_trader_governor_rig
  1475. }
  1476. else_if = {
  1477. limit = { event_target:traders = { has_country_flag = trader_enclave_country_3 } }
  1478. set_country_flag = hired_trader_governor_mut
  1479. }
  1480. remove_country_flag = trader_enclave_diplomacy_engaged
  1481. country_event = { id = leviathans.126 }
  1482. }
  1483. custom_tooltip = recruit_trader_leader
  1484. }
  1485. option = {
  1486. name = leviathans.110.d
  1487. custom_gui = "enclave_trader_option"
  1488. hidden_effect = {
  1489. remove_country_flag = trader_enclave_diplomacy_engaged
  1490. if = {
  1491. limit = { event_target:traders = { has_country_flag = trader_enclave_country_1 } }
  1492. country_event = { id = leviathans.105 }
  1493. }
  1494. if = {
  1495. limit = { event_target:traders = { has_country_flag = trader_enclave_country_2 } }
  1496. country_event = { id = leviathans.106 }
  1497. }
  1498. if = {
  1499. limit = { event_target:traders = { has_country_flag = trader_enclave_country_3 } }
  1500. country_event = { id = leviathans.107 }
  1501. }
  1502. }
  1503. }
  1504. option = {
  1505. name = leviathans.105.d
  1506. default_hide_option = yes
  1507. custom_gui = "enclave_trader_option"
  1508. hidden_effect = {
  1509. remove_country_flag = trader_enclave_diplomacy_engaged
  1510. }
  1511. }
  1512. }
  1513.  
  1514. # Hire Governor Reply Event
  1515. country_event = {
  1516. id = leviathans.126
  1517. title = leviathans.126.name
  1518. desc = leviathans.126.desc
  1519.  
  1520. is_triggered_only = yes
  1521. diplomatic = yes
  1522. custom_gui = "enclave_trader_window"
  1523.  
  1524. picture_event_data = {
  1525. portrait = event_target:traders
  1526. room = enclave_trader_room
  1527. }
  1528.  
  1529. immediate = {
  1530. set_country_flag = trader_enclave_diplomacy_engaged
  1531. }
  1532.  
  1533. option = {
  1534. name = leviathans.110.d
  1535. custom_gui = "enclave_trader_option"
  1536. hidden_effect = {
  1537. remove_country_flag = trader_enclave_diplomacy_engaged
  1538. if = {
  1539. limit = { event_target:traders = { has_country_flag = trader_enclave_country_1 } }
  1540. country_event = { id = leviathans.105 }
  1541. }
  1542. if = {
  1543. limit = { event_target:traders = { has_country_flag = trader_enclave_country_2 } }
  1544. country_event = { id = leviathans.106 }
  1545. }
  1546. if = {
  1547. limit = { event_target:traders = { has_country_flag = trader_enclave_country_3 } }
  1548. country_event = { id = leviathans.107 }
  1549. }
  1550. }
  1551. }
  1552. option = {
  1553. name = GOODBYE
  1554. custom_gui = "enclave_trader_option"
  1555. default_hide_option = yes
  1556. hidden_effect = {
  1557. remove_country_flag = trader_enclave_diplomacy_engaged
  1558. }
  1559. }
  1560. }
  1561.  
  1562. # Strategic Resource 1
  1563. country_event = {
  1564. id = leviathans.130
  1565. title = leviathans.103.name
  1566. desc = leviathans.130.desc
  1567.  
  1568. is_triggered_only = yes
  1569. diplomatic = yes
  1570. custom_gui = "enclave_trader_window"
  1571. force_open = yes
  1572.  
  1573. picture_event_data = {
  1574. portrait = event_target:traders
  1575. room = enclave_trader_room
  1576. }
  1577.  
  1578. immediate = {
  1579. set_country_flag = trader_enclave_diplomacy_engaged
  1580. }
  1581.  
  1582. after = {
  1583. hidden_effect = {
  1584. remove_country_flag = trader_enclave_diplomacy_engaged
  1585. }
  1586. }
  1587.  
  1588. option = {
  1589. name = leviathans.130.a
  1590. custom_gui = "enclave_trader_option"
  1591. allow = {
  1592. resource_stockpile_compare = { resource = energy value >= 500 }
  1593. hidden_trigger = {
  1594. NOT = { has_country_flag = attacked_riggans }
  1595. }
  1596. }
  1597. #response_text = leviathans.130.a.reply
  1598. add_resource = { energy = -500 }
  1599. custom_tooltip = opinion5
  1600. add_modifier = {
  1601. modifier = enclave_trade_1_rig
  1602. days = 3600
  1603. }
  1604. hidden_effect = {
  1605. event_target:traders = {
  1606. add_trust = {
  1607. who = root
  1608. amount = 5
  1609. }
  1610. }
  1611. set_relation_flag = {
  1612. who = event_target:traders
  1613. flag = riggan_trade
  1614. }
  1615. country_event = { id = leviathans.135 days = 3600 }
  1616. country_event = { id = leviathans.133 }
  1617. }
  1618. }
  1619. option = {
  1620. name = leviathans.130.b
  1621. custom_gui = "enclave_trader_option"
  1622. allow = {
  1623. resource_stockpile_compare = { resource = energy value >= 1000 }
  1624. hidden_trigger = {
  1625. NOT = { has_country_flag = attacked_riggans }
  1626. }
  1627. }
  1628. #response_text = leviathans.130.a.reply
  1629. add_resource = { energy = -1000 }
  1630. custom_tooltip = opinion10
  1631. add_modifier = {
  1632. modifier = enclave_trade_2_rig
  1633. days = 3600
  1634. }
  1635. hidden_effect = {
  1636. event_target:traders = {
  1637. add_trust = {
  1638. who = root
  1639. amount = 10
  1640. }
  1641. }
  1642. set_relation_flag = {
  1643. who = event_target:traders
  1644. flag = riggan_trade
  1645. }
  1646. country_event = { id = leviathans.135 days = 3600 }
  1647. country_event = { id = leviathans.133 }
  1648. }
  1649. }
  1650. option = {
  1651. name = leviathans.130.c
  1652. custom_gui = "enclave_trader_option"
  1653. allow = {
  1654. resource_stockpile_compare = { resource = energy value >= 1500 }
  1655. hidden_trigger = {
  1656. NOT = { has_country_flag = attacked_riggans }
  1657. }
  1658. }
  1659. #response_text = leviathans.130.a.reply
  1660. add_resource = { energy = -1500 }
  1661. custom_tooltip = opinion15
  1662. add_modifier = {
  1663. modifier = enclave_trade_3_rig
  1664. days = 3600
  1665. }
  1666. hidden_effect = {
  1667. event_target:traders = {
  1668. add_trust = {
  1669. who = root
  1670. amount = 15
  1671. }
  1672. }
  1673. set_relation_flag = {
  1674. who = event_target:traders
  1675. flag = riggan_trade
  1676. }
  1677. country_event = { id = leviathans.135 days = 3600 }
  1678. country_event = { id = leviathans.133 }
  1679. }
  1680. }
  1681. option = {
  1682. name = leviathans.130.d
  1683. custom_gui = "enclave_trader_option"
  1684. trigger = {
  1685. NOT = { has_country_flag = attacked_riggans }
  1686. }
  1687. allow = {
  1688. resource_stockpile_compare = { resource = energy value >= 2000 }
  1689. custom_tooltip = {
  1690. fail_text = riggan_deal_in_place
  1691. NOR = {
  1692. has_modifier = enclave_trade_1_rig
  1693. has_modifier = enclave_trade_2_rig
  1694. has_modifier = enclave_trade_3_rig
  1695. has_modifier = enclave_trade_4_rig
  1696. has_modifier = enclave_trade_5_rig
  1697. }
  1698. }
  1699. }
  1700. #response_text = leviathans.130.a.reply
  1701. add_resource = { energy = -2000 }
  1702. custom_tooltip = opinion20
  1703. add_modifier = {
  1704. modifier = enclave_trade_4_rig
  1705. days = 3600
  1706. }
  1707. hidden_effect = {
  1708. event_target:traders = {
  1709. add_trust = {
  1710. who = root
  1711. amount = 20
  1712. }
  1713. }
  1714. set_relation_flag = {
  1715. who = event_target:traders
  1716. flag = riggan_trade
  1717. }
  1718. country_event = { id = leviathans.135 days = 3600 }
  1719. country_event = { id = leviathans.133 }
  1720. }
  1721. }
  1722. option = {
  1723. name = leviathans.130.e
  1724. custom_gui = "enclave_trader_option"
  1725. trigger = {
  1726. NOT = { has_country_flag = attacked_riggans }
  1727. }
  1728. allow = {
  1729. resource_stockpile_compare = { resource = energy value >= 2500 }
  1730. custom_tooltip = {
  1731. fail_text = riggan_deal_in_place
  1732. NOR = {
  1733. has_modifier = enclave_trade_1_rig
  1734. has_modifier = enclave_trade_2_rig
  1735. has_modifier = enclave_trade_3_rig
  1736. has_modifier = enclave_trade_4_rig
  1737. has_modifier = enclave_trade_5_rig
  1738. }
  1739. }
  1740. }
  1741. #response_text = leviathans.130.a.reply
  1742. add_resource = { energy = -2500 }
  1743. custom_tooltip = opinion25
  1744. add_modifier = {
  1745. modifier = enclave_trade_5_rig
  1746. days = 3600
  1747. }
  1748. hidden_effect = {
  1749. event_target:traders = {
  1750. add_trust = {
  1751. who = root
  1752. amount = 25
  1753. }
  1754. }
  1755. set_relation_flag = {
  1756. who = event_target:traders
  1757. flag = riggan_trade
  1758. }
  1759. country_event = { id = leviathans.135 days = 3600 }
  1760. country_event = { id = leviathans.133 }
  1761. }
  1762. }
  1763. option = {
  1764. name = leviathans.110.d
  1765. custom_gui = "enclave_trader_option"
  1766. hidden_effect = {
  1767. if = {
  1768. limit = { event_target:traders = { has_country_flag = trader_enclave_country_1 } }
  1769. country_event = { id = leviathans.105 }
  1770. }
  1771. if = {
  1772. limit = { event_target:traders = { has_country_flag = trader_enclave_country_2 } }
  1773. country_event = { id = leviathans.106 }
  1774. }
  1775. if = {
  1776. limit = { event_target:traders = { has_country_flag = trader_enclave_country_3 } }
  1777. country_event = { id = leviathans.107 }
  1778. }
  1779. }
  1780. }
  1781. option = {
  1782. name = leviathans.110.e
  1783. custom_gui = "enclave_trader_option"
  1784. default_hide_option = yes
  1785. hidden_effect = {
  1786. remove_country_flag = trader_enclave_diplomacy_engaged
  1787. }
  1788. }
  1789. }
  1790.  
  1791. # Strategic Resource 2
  1792. country_event = {
  1793. id = leviathans.131
  1794. title = leviathans.100.name
  1795. desc = leviathans.131.desc
  1796.  
  1797. is_triggered_only = yes
  1798. diplomatic = yes
  1799. custom_gui = "enclave_trader_window"
  1800. force_open = yes
  1801.  
  1802. picture_event_data = {
  1803. portrait = event_target:traders
  1804. room = enclave_trader_room
  1805. }
  1806.  
  1807. immediate = {
  1808. set_country_flag = trader_enclave_diplomacy_engaged
  1809. }
  1810.  
  1811. after = {
  1812. hidden_effect = {
  1813. remove_country_flag = trader_enclave_diplomacy_engaged
  1814. }
  1815. }
  1816.  
  1817. option = {
  1818. name = leviathans.131.a
  1819. custom_gui = "enclave_trader_option"
  1820. allow = {
  1821. resource_stockpile_compare = { resource = energy value >= 500 }
  1822. hidden_trigger = {
  1823. NOT = { has_country_flag = attacked_xuracorp }
  1824. }
  1825. }
  1826. #response_text = leviathans.131.a.reply
  1827. add_resource = { energy = -500 }
  1828. custom_tooltip = opinion5
  1829. add_modifier = {
  1830. modifier = enclave_trade_1_xur
  1831. days = 3600
  1832. }
  1833. hidden_effect = {
  1834. event_target:traders = {
  1835. add_trust = {
  1836. who = root
  1837. amount = 5
  1838. }
  1839. }
  1840. set_relation_flag = {
  1841. who = event_target:traders
  1842. flag = xuracorp_trade
  1843. }
  1844. country_event = { id = leviathans.136 days = 3600 }
  1845. country_event = { id = leviathans.133 }
  1846. }
  1847. }
  1848. option = {
  1849. name = leviathans.131.b
  1850. custom_gui = "enclave_trader_option"
  1851. allow = {
  1852. resource_stockpile_compare = { resource = energy value >= 1000 }
  1853. hidden_trigger = {
  1854. NOT = { has_country_flag = attacked_xuracorp }
  1855. }
  1856. }
  1857. #response_text = leviathans.131.a.reply
  1858. add_resource = { energy = -1000 }
  1859. custom_tooltip = opinion10
  1860. add_modifier = {
  1861. modifier = enclave_trade_2_xur
  1862. days = 3600
  1863. }
  1864. hidden_effect = {
  1865. event_target:traders = {
  1866. add_trust = {
  1867. who = root
  1868. amount = 10
  1869. }
  1870. }
  1871. set_relation_flag = {
  1872. who = event_target:traders
  1873. flag = xuracorp_trade
  1874. }
  1875. country_event = { id = leviathans.136 days = 3600 }
  1876. country_event = { id = leviathans.133 }
  1877. }
  1878. }
  1879. option = {
  1880. name = leviathans.131.c
  1881. custom_gui = "enclave_trader_option"
  1882. allow = {
  1883. resource_stockpile_compare = { resource = energy value >= 1500 }
  1884. hidden_trigger = {
  1885. NOT = { has_country_flag = attacked_xuracorp }
  1886. }
  1887. }
  1888. #response_text = leviathans.131.a.reply
  1889. add_resource = { energy = -1500 }
  1890. custom_tooltip = opinion15
  1891. add_modifier = {
  1892. modifier = enclave_trade_3_xur
  1893. days = 3600
  1894. }
  1895. hidden_effect = {
  1896. event_target:traders = {
  1897. add_trust = {
  1898. who = root
  1899. amount = 15
  1900. }
  1901. }
  1902. set_relation_flag = {
  1903. who = event_target:traders
  1904. flag = xuracorp_trade
  1905. }
  1906. country_event = { id = leviathans.136 days = 3600 }
  1907. country_event = { id = leviathans.133 }
  1908. }
  1909. }
  1910. option = {
  1911. name = leviathans.131.d
  1912. custom_gui = "enclave_trader_option"
  1913. trigger = {
  1914. NOT = { has_country_flag = attacked_xuracorp }
  1915. }
  1916. allow = {
  1917. resource_stockpile_compare = { resource = energy value >= 2000 }
  1918. custom_tooltip = {
  1919. fail_text = xuracorp_deal_in_place
  1920. NOR = {
  1921. has_modifier = enclave_trade_1_xur
  1922. has_modifier = enclave_trade_2_xur
  1923. has_modifier = enclave_trade_3_xur
  1924. has_modifier = enclave_trade_4_xur
  1925. has_modifier = enclave_trade_5_xur
  1926. }
  1927. }
  1928. }
  1929. #response_text = leviathans.131.a.reply
  1930. add_resource = { energy = -2000 }
  1931. custom_tooltip = opinion20
  1932. add_modifier = {
  1933. modifier = enclave_trade_4_xur
  1934. days = 3600
  1935. }
  1936. hidden_effect = {
  1937. event_target:traders = {
  1938. add_trust = {
  1939. who = root
  1940. amount = 20
  1941. }
  1942. }
  1943. set_relation_flag = {
  1944. who = event_target:traders
  1945. flag = xuracorp_trade
  1946. }
  1947. country_event = { id = leviathans.136 days = 3600 }
  1948. country_event = { id = leviathans.133 }
  1949. }
  1950. }
  1951. option = {
  1952. name = leviathans.131.e
  1953. custom_gui = "enclave_trader_option"
  1954. trigger = {
  1955. NOT = { has_country_flag = attacked_xuracorp }
  1956. }
  1957. allow = {
  1958. resource_stockpile_compare = { resource = energy value >= 2500 }
  1959. custom_tooltip = {
  1960. fail_text = xuracorp_deal_in_place
  1961. NOR = {
  1962. has_modifier = enclave_trade_1_xur
  1963. has_modifier = enclave_trade_2_xur
  1964. has_modifier = enclave_trade_3_xur
  1965. has_modifier = enclave_trade_4_xur
  1966. has_modifier = enclave_trade_5_xur
  1967. }
  1968. }
  1969. }
  1970. #response_text = leviathans.131.a.reply
  1971. add_resource = { energy = -2500 }
  1972. custom_tooltip = opinion25
  1973. add_modifier = {
  1974. modifier = enclave_trade_5_xur
  1975. days = 3600
  1976. }
  1977. hidden_effect = {
  1978. event_target:traders = {
  1979. add_trust = {
  1980. who = root
  1981. amount = 25
  1982. }
  1983. }
  1984. set_relation_flag = {
  1985. who = event_target:traders
  1986. flag = xuracorp_trade
  1987. }
  1988. country_event = { id = leviathans.136 days = 3600 }
  1989. country_event = { id = leviathans.133 }
  1990. }
  1991. }
  1992. option = {
  1993. name = leviathans.110.d
  1994. custom_gui = "enclave_trader_option"
  1995. hidden_effect = {
  1996. if = {
  1997. limit = { event_target:traders = { has_country_flag = trader_enclave_country_1 } }
  1998. country_event = { id = leviathans.105 }
  1999. }
  2000. if = {
  2001. limit = { event_target:traders = { has_country_flag = trader_enclave_country_2 } }
  2002. country_event = { id = leviathans.106 }
  2003. }
  2004. if = {
  2005. limit = { event_target:traders = { has_country_flag = trader_enclave_country_3 } }
  2006. country_event = { id = leviathans.107 }
  2007. }
  2008. }
  2009. }
  2010. option = {
  2011. name = leviathans.110.e
  2012. custom_gui = "enclave_trader_option"
  2013. default_hide_option = yes
  2014. hidden_effect = {
  2015. remove_country_flag = trader_enclave_diplomacy_engaged
  2016. }
  2017. }
  2018. }
  2019.  
  2020. # Strategic Resource 3
  2021. country_event = {
  2022. id = leviathans.132
  2023. title = leviathans.104.name
  2024. desc = leviathans.132.desc
  2025.  
  2026. is_triggered_only = yes
  2027. diplomatic = yes
  2028. custom_gui = "enclave_trader_window"
  2029. force_open = yes
  2030.  
  2031. picture_event_data = {
  2032. portrait = event_target:traders
  2033. room = enclave_trader_room
  2034. }
  2035.  
  2036. immediate = {
  2037. set_country_flag = trader_enclave_diplomacy_engaged
  2038. }
  2039.  
  2040. after = {
  2041. hidden_effect = {
  2042. remove_country_flag = trader_enclave_diplomacy_engaged
  2043. }
  2044. }
  2045.  
  2046. option = {
  2047. name = leviathans.132.a
  2048. custom_gui = "enclave_trader_option"
  2049. allow = {
  2050. resource_stockpile_compare = { resource = energy value >= 500 }
  2051. hidden_trigger = {
  2052. NOT = { has_country_flag = attacked_muutagans }
  2053. }
  2054. }
  2055. #response_text = leviathans.132.a.reply
  2056. add_resource = { energy = -500 }
  2057. custom_tooltip = opinion5
  2058. add_modifier = {
  2059. modifier = enclave_trade_1_mut
  2060. days = 3600
  2061. }
  2062. hidden_effect = {
  2063. event_target:traders = {
  2064. add_trust = {
  2065. who = root
  2066. amount = 5
  2067. }
  2068. }
  2069. set_relation_flag = {
  2070. who = event_target:traders
  2071. flag = muutagan_trade
  2072. }
  2073. country_event = { id = leviathans.137 days = 3600 }
  2074. country_event = { id = leviathans.133 }
  2075. }
  2076. }
  2077. option = {
  2078. name = leviathans.132.b
  2079. custom_gui = "enclave_trader_option"
  2080. allow = {
  2081. resource_stockpile_compare = { resource = energy value >= 1000 }
  2082. hidden_trigger = {
  2083. NOT = { has_country_flag = attacked_muutagans }
  2084. }
  2085. }
  2086. #response_text = leviathans.132.a.reply
  2087. add_resource = { energy = -1000 }
  2088. custom_tooltip = opinion10
  2089. add_modifier = {
  2090. modifier = enclave_trade_2_mut
  2091. days = 3600
  2092. }
  2093. hidden_effect = {
  2094. event_target:traders = {
  2095. add_trust = {
  2096. who = root
  2097. amount = 10
  2098. }
  2099. }
  2100. set_relation_flag = {
  2101. who = event_target:traders
  2102. flag = muutagan_trade
  2103. }
  2104. country_event = { id = leviathans.137 days = 3600 }
  2105. country_event = { id = leviathans.133 }
  2106. }
  2107. }
  2108. option = {
  2109. name = leviathans.132.c
  2110. custom_gui = "enclave_trader_option"
  2111. allow = {
  2112. resource_stockpile_compare = { resource = energy value >= 1500 }
  2113. hidden_trigger = {
  2114. NOT = { has_country_flag = attacked_muutagans }
  2115. }
  2116. }
  2117. #response_text = leviathans.132.a.reply
  2118. add_resource = { energy = -1500 }
  2119. custom_tooltip = opinion15
  2120. add_modifier = {
  2121. modifier = enclave_trade_3_mut
  2122. days = 3600
  2123. }
  2124. hidden_effect = {
  2125. event_target:traders = {
  2126. add_trust = {
  2127. who = root
  2128. amount = 15
  2129. }
  2130. }
  2131. set_relation_flag = {
  2132. who = event_target:traders
  2133. flag = muutagan_trade
  2134. }
  2135. country_event = { id = leviathans.137 days = 3600 }
  2136. country_event = { id = leviathans.133 }
  2137. }
  2138. }
  2139. option = {
  2140. name = leviathans.132.d
  2141. custom_gui = "enclave_trader_option"
  2142. trigger = {
  2143. NOT = { has_country_flag = attacked_muutagans }
  2144. }
  2145. allow = {
  2146. resource_stockpile_compare = { resource = energy value >= 2000 }
  2147. custom_tooltip = {
  2148. fail_text = muutagan_deal_in_place
  2149. NOR = {
  2150. has_modifier = enclave_trade_1_mut
  2151. has_modifier = enclave_trade_2_mut
  2152. has_modifier = enclave_trade_3_mut
  2153. has_modifier = enclave_trade_4_mut
  2154. has_modifier = enclave_trade_5_mut
  2155. }
  2156. }
  2157. }
  2158. #response_text = leviathans.132.a.reply
  2159. add_resource = { energy = -2000 }
  2160. custom_tooltip = opinion20
  2161. add_modifier = {
  2162. modifier = enclave_trade_4_mut
  2163. days = 3600
  2164. }
  2165. hidden_effect = {
  2166. event_target:traders = {
  2167. add_trust = {
  2168. who = root
  2169. amount = 20
  2170. }
  2171. }
  2172. set_relation_flag = {
  2173. who = event_target:traders
  2174. flag = muutagan_trade
  2175. }
  2176. country_event = { id = leviathans.137 days = 3600 }
  2177. country_event = { id = leviathans.133 }
  2178. }
  2179. }
  2180. option = {
  2181. name = leviathans.132.e
  2182. custom_gui = "enclave_trader_option"
  2183. trigger = {
  2184. NOT = { has_country_flag = attacked_muutagans }
  2185. }
  2186. allow = {
  2187. resource_stockpile_compare = { resource = energy value >= 2500 }
  2188. custom_tooltip = {
  2189. fail_text = muutagan_deal_in_place
  2190. NOR = {
  2191. has_modifier = enclave_trade_1_mut
  2192. has_modifier = enclave_trade_2_mut
  2193. has_modifier = enclave_trade_3_mut
  2194. has_modifier = enclave_trade_4_mut
  2195. has_modifier = enclave_trade_5_mut
  2196. }
  2197. }
  2198. }
  2199. #response_text = leviathans.132.a.reply
  2200. add_resource = { energy = -2500 }
  2201. custom_tooltip = opinion25
  2202. add_modifier = {
  2203. modifier = enclave_trade_5_mut
  2204. days = 3600
  2205. }
  2206. hidden_effect = {
  2207. event_target:traders = {
  2208. add_trust = {
  2209. who = root
  2210. amount = 25
  2211. }
  2212. }
  2213. set_relation_flag = {
  2214. who = event_target:traders
  2215. flag = muutagan_trade
  2216. }
  2217. country_event = { id = leviathans.137 days = 3600 }
  2218. country_event = { id = leviathans.133 }
  2219. }
  2220. }
  2221. option = {
  2222. name = leviathans.110.d
  2223. custom_gui = "enclave_trader_option"
  2224. hidden_effect = {
  2225. if = {
  2226. limit = { event_target:traders = { has_country_flag = trader_enclave_country_1 } }
  2227. country_event = { id = leviathans.105 }
  2228. }
  2229. if = {
  2230. limit = { event_target:traders = { has_country_flag = trader_enclave_country_2 } }
  2231. country_event = { id = leviathans.106 }
  2232. }
  2233. if = {
  2234. limit = { event_target:traders = { has_country_flag = trader_enclave_country_3 } }
  2235. country_event = { id = leviathans.107 }
  2236. }
  2237. }
  2238. }
  2239. option = {
  2240. name = leviathans.110.e
  2241. custom_gui = "enclave_trader_option"
  2242. default_hide_option = yes
  2243. hidden_effect = {
  2244. remove_country_flag = trader_enclave_diplomacy_engaged
  2245. }
  2246. }
  2247. }
  2248.  
  2249. # Strategic Resource Reply Event
  2250. country_event = {
  2251. id = leviathans.133
  2252. title = leviathans.133.name
  2253. desc = {
  2254. text = leviathans.131.a.reply
  2255. trigger = {
  2256. event_target:traders = {
  2257. has_country_flag = trader_enclave_country_1
  2258. }
  2259. }
  2260. }
  2261. desc = {
  2262. text = leviathans.130.a.reply
  2263. trigger = {
  2264. event_target:traders = {
  2265. has_country_flag = trader_enclave_country_2
  2266. }
  2267. }
  2268. }
  2269. desc = {
  2270. text = leviathans.132.a.reply
  2271. trigger = {
  2272. event_target:traders = {
  2273. has_country_flag = trader_enclave_country_3
  2274. }
  2275. }
  2276. }
  2277.  
  2278. is_triggered_only = yes
  2279. diplomatic = yes
  2280. custom_gui = "enclave_trader_window"
  2281. force_open = yes
  2282.  
  2283. picture_event_data = {
  2284. portrait = event_target:traders
  2285. room = enclave_trader_room
  2286. }
  2287.  
  2288. immediate = {
  2289. set_country_flag = trader_enclave_diplomacy_engaged
  2290. }
  2291.  
  2292. option = {
  2293. name = leviathans.110.d
  2294. custom_gui = "enclave_trader_option"
  2295. hidden_effect = {
  2296. remove_country_flag = trader_enclave_diplomacy_engaged
  2297. if = {
  2298. limit = { event_target:traders = { has_country_flag = trader_enclave_country_1 } }
  2299. country_event = { id = leviathans.105 }
  2300. }
  2301. if = {
  2302. limit = { event_target:traders = { has_country_flag = trader_enclave_country_2 } }
  2303. country_event = { id = leviathans.106 }
  2304. }
  2305. if = {
  2306. limit = { event_target:traders = { has_country_flag = trader_enclave_country_3 } }
  2307. country_event = { id = leviathans.107 }
  2308. }
  2309. }
  2310. }
  2311. option = {
  2312. name = GOODBYE
  2313. custom_gui = "enclave_trader_option"
  2314. default_hide_option = yes
  2315. hidden_effect = {
  2316. remove_country_flag = trader_enclave_diplomacy_engaged
  2317. }
  2318. }
  2319. }
  2320.  
  2321. # Remove Riggan Trade Relation Flag (HIDDEN)
  2322. country_event = {
  2323. id = leviathans.135
  2324. hide_window = yes
  2325.  
  2326. is_triggered_only = yes
  2327.  
  2328. immediate = {
  2329. remove_relation_flag = {
  2330. who = event_target:traders
  2331. flag = riggan_trade
  2332. }
  2333. country_event = { id = leviathans.151 }
  2334. }
  2335. }
  2336.  
  2337. ## Remove XuraCorp Trade Relation Flag (HIDDEN)
  2338. country_event = {
  2339. id = leviathans.136
  2340. hide_window = yes
  2341.  
  2342. is_triggered_only = yes
  2343.  
  2344. immediate = {
  2345. remove_relation_flag = {
  2346. who = event_target:traders
  2347. flag = xuracorp_trade
  2348. }
  2349. country_event = { id = leviathans.150 }
  2350. }
  2351. }
  2352.  
  2353. ## Remove Muutagan Trade Relation Flag (HIDDEN)
  2354. country_event = {
  2355. id = leviathans.137
  2356. hide_window = yes
  2357.  
  2358. is_triggered_only = yes
  2359.  
  2360. immediate = {
  2361. remove_relation_flag = {
  2362. who = event_target:traders
  2363. flag = muutagan_trade
  2364. }
  2365. country_event = { id = leviathans.152 }
  2366. }
  2367. }
  2368.  
  2369. # Port
  2370. country_event = {
  2371. id = leviathans.101
  2372. hide_window = yes
  2373. is_triggered_only = yes
  2374. immediate = {
  2375. random_owned_ship = {
  2376. solar_system = { save_event_target_as = trader_system }
  2377. }
  2378. from = {
  2379. country_event = { id = leviathans.102 }
  2380. }
  2381. }
  2382. }
  2383.  
  2384. # Trader Introduction
  2385. country_event = {
  2386. id = leviathans.102
  2387. title = leviathans.102.name
  2388.  
  2389. desc = {
  2390. text = leviathans.102a.desc
  2391. trigger = {
  2392. FROM = { has_country_flag = trader_enclave_country_1 }
  2393. }
  2394. }
  2395. desc = {
  2396. text = leviathans.102b.desc
  2397. trigger = {
  2398. FROM = { has_country_flag = trader_enclave_country_2 }
  2399. }
  2400. }
  2401. desc = {
  2402. text = leviathans.102c.desc
  2403. trigger = {
  2404. FROM = { has_country_flag = trader_enclave_country_3 }
  2405. }
  2406. }
  2407.  
  2408. is_triggered_only = yes
  2409. diplomatic = yes
  2410. custom_gui = "enclave_trader_window"
  2411.  
  2412. picture_event_data = {
  2413. portrait = from
  2414. room = enclave_trader_room
  2415. }
  2416.  
  2417. option = {
  2418. name = SCUM
  2419. trigger = {
  2420. has_valid_civic = civic_fanatic_purifiers
  2421. }
  2422. custom_gui = "enclave_trader_option"
  2423. }
  2424.  
  2425. option = {
  2426. name = TASTY
  2427. trigger = {
  2428. has_valid_civic = civic_hive_devouring_swarm
  2429. }
  2430. custom_gui = "enclave_trader_option"
  2431. }
  2432.  
  2433. option = {
  2434. name = EXTERMINATE
  2435. trigger = {
  2436. has_valid_civic = civic_machine_terminator
  2437. }
  2438. custom_gui = "enclave_trader_option"
  2439. }
  2440.  
  2441. option = {
  2442. name = leviathans.502.a
  2443. trigger = {
  2444. NOR = {
  2445. has_valid_civic = civic_fanatic_purifiers
  2446. has_valid_civic = civic_hive_devouring_swarm
  2447. has_valid_civic = civic_machine_terminator
  2448. }
  2449. }
  2450. custom_gui = "enclave_trader_option"
  2451. }
  2452. }
  2453.  
  2454. # Trader Destroyed (HIDDEN)
  2455. country_event = {
  2456. id = leviathans.140
  2457. hide_window = yes
  2458.  
  2459. is_triggered_only = yes
  2460.  
  2461. trigger = {
  2462. is_country_type = enclave
  2463. has_country_flag = trader_enclave_country
  2464. FROMFROM = {
  2465. is_ship_size = enclave_station
  2466. }
  2467. }
  2468.  
  2469. immediate = {
  2470. FROMFROM = {
  2471. solar_system = { save_event_target_as = trader_system }
  2472. }
  2473. FROM = {
  2474. country_event = { id = leviathans.141 }
  2475. save_event_target_as = trader_destroyer
  2476. }
  2477. every_country = {
  2478. limit = {
  2479. is_country_type = default
  2480. has_communications = ROOT
  2481. NOT = { is_country = event_target:trader_destroyer }
  2482. }
  2483. if = {
  2484. limit = {
  2485. ROOT = { has_country_flag = trader_enclave_country_1 }
  2486. }
  2487. country_event = { id = leviathans.142 }
  2488. }
  2489. if = {
  2490. limit = {
  2491. ROOT = { has_country_flag = trader_enclave_country_2 }
  2492. }
  2493. country_event = { id = leviathans.143 }
  2494. }
  2495. if = {
  2496. limit = {
  2497. ROOT = { has_country_flag = trader_enclave_country_3 }
  2498. }
  2499. country_event = { id = leviathans.144 }
  2500. }
  2501. }
  2502. random_playable_country = {
  2503. if = {
  2504. limit = {
  2505. ROOT = { has_country_flag = trader_enclave_country_1 }
  2506. }
  2507. observer_event = { id = observer.8 }
  2508. }
  2509. if = {
  2510. limit = {
  2511. ROOT = { has_country_flag = trader_enclave_country_2 }
  2512. }
  2513. observer_event = { id = observer.9 }
  2514. }
  2515. if = {
  2516. limit = {
  2517. ROOT = { has_country_flag = trader_enclave_country_3 }
  2518. }
  2519. observer_event = { id = observer.10 }
  2520. }
  2521. }
  2522. }
  2523. }
  2524.  
  2525. # Any Trader Destroyed (Destroyer)
  2526. country_event = {
  2527. id = leviathans.141
  2528. title = "leviathans.141"
  2529. desc = "leviathans.141.desc"
  2530. picture = GFX_evt_space_debris
  2531. location = event_target:trader_system
  2532. show_sound = event_ship_bridge
  2533.  
  2534. is_triggered_only = yes
  2535.  
  2536. immediate = {
  2537. set_country_flag = destroyed_trader
  2538. every_country = {
  2539. limit = {
  2540. is_country_type = default
  2541. NOR = {
  2542. is_same_value = root
  2543. has_valid_civic = civic_fanatic_purifiers
  2544. has_valid_civic = civic_hive_devouring_swarm
  2545. has_valid_civic = civic_machine_terminator
  2546. }
  2547. }
  2548. add_opinion_modifier = {
  2549. who = root
  2550. modifier = opinion_destroyed_trader
  2551. }
  2552. }
  2553. if = {
  2554. limit = { FROM = { has_country_flag = trader_enclave_country_1 } }
  2555. remove_xuracorp_trades = yes
  2556. remove_relation_flag = {
  2557. who = FROM
  2558. flag = xuracorp_trade
  2559. }
  2560. }
  2561. else_if = {
  2562. limit = { FROM = { has_country_flag = trader_enclave_country_2 } }
  2563. remove_riggan_trades = yes
  2564. remove_relation_flag = {
  2565. who = FROM
  2566. flag = riggan_trade
  2567. }
  2568. }
  2569. else_if = {
  2570. limit = { FROM = { has_country_flag = trader_enclave_country_3 } }
  2571. remove_muutagan_trades = yes
  2572. remove_relation_flag = {
  2573. who = FROM
  2574. flag = muutagan_trade
  2575. }
  2576. }
  2577. }
  2578.  
  2579. option = {
  2580. name = EXCELLENT
  2581. add_resource = {
  2582. minerals = 2000
  2583. energy = 2000
  2584. }
  2585. }
  2586. }
  2587.  
  2588. # XuraCorp Destroyed
  2589. country_event = {
  2590. id = leviathans.142
  2591. title = "leviathans.141"
  2592. desc = {
  2593. text = leviathans.142.a.desc
  2594. trigger = {
  2595. NOT = {
  2596. has_relation_flag = {
  2597. who = FROM
  2598. flag = xuracorp_trade
  2599. }
  2600. }
  2601. has_communications = event_target:trader_destroyer
  2602. }
  2603. }
  2604. desc = {
  2605. text = leviathans.142.b.desc
  2606. trigger = {
  2607. NOT = {
  2608. has_relation_flag = {
  2609. who = FROM
  2610. flag = xuracorp_trade
  2611. }
  2612. }
  2613. NOT = { has_communications = event_target:trader_destroyer }
  2614. }
  2615. }
  2616. desc = {
  2617. text = leviathans.142.c.desc
  2618. trigger = {
  2619. has_relation_flag = {
  2620. who = FROM
  2621. flag = xuracorp_trade
  2622. }
  2623. has_communications = event_target:trader_destroyer
  2624. }
  2625. }
  2626. desc = {
  2627. text = leviathans.142.d.desc
  2628. trigger = {
  2629. has_relation_flag = {
  2630. who = FROM
  2631. flag = xuracorp_trade
  2632. }
  2633. NOT = { has_communications = event_target:trader_destroyer }
  2634. }
  2635. }
  2636. picture = GFX_evt_exploding_ship
  2637. location = event_target:trader_system
  2638. show_sound = event_ship_explosion
  2639.  
  2640. is_triggered_only = yes
  2641.  
  2642. immediate = {
  2643. set_global_flag = xuracorp_destroyed
  2644. remove_xuracorp_trades = yes
  2645. remove_relation_flag = {
  2646. who = FROM
  2647. flag = xuracorp_trade
  2648. }
  2649. }
  2650.  
  2651. option = {
  2652. name = "leviathans.142.a"
  2653. }
  2654. }
  2655.  
  2656. # Riggans Destroyed
  2657. country_event = {
  2658. id = leviathans.143
  2659. title = "leviathans.141"
  2660. desc = {
  2661. text = leviathans.143.a.desc
  2662. trigger = {
  2663. NOT = {
  2664. has_relation_flag = {
  2665. who = FROM
  2666. flag = riggan_trade
  2667. }
  2668. }
  2669. has_communications = event_target:trader_destroyer
  2670. }
  2671. }
  2672. desc = {
  2673. text = leviathans.143.b.desc
  2674. trigger = {
  2675. NOT = {
  2676. has_relation_flag = {
  2677. who = FROM
  2678. flag = riggan_trade
  2679. }
  2680. }
  2681. NOT = { has_communications = event_target:trader_destroyer }
  2682. }
  2683. }
  2684. desc = {
  2685. text = leviathans.143.c.desc
  2686. trigger = {
  2687. has_relation_flag = {
  2688. who = FROM
  2689. flag = riggan_trade
  2690. }
  2691. has_communications = event_target:trader_destroyer
  2692. }
  2693. }
  2694. desc = {
  2695. text = leviathans.143.d.desc
  2696. trigger = {
  2697. has_relation_flag = {
  2698. who = FROM
  2699. flag = riggan_trade
  2700. }
  2701. NOT = { has_communications = event_target:trader_destroyer }
  2702. }
  2703. }
  2704. picture = GFX_evt_exploding_ship
  2705. location = event_target:trader_system
  2706. show_sound = event_ship_explosion
  2707.  
  2708. is_triggered_only = yes
  2709.  
  2710. immediate = {
  2711. set_global_flag = riggans_destroyed
  2712. remove_riggan_trades = yes
  2713. remove_relation_flag = {
  2714. who = FROM
  2715. flag = riggan_trade
  2716. }
  2717. }
  2718.  
  2719. option = {
  2720. name = "leviathans.143.a"
  2721. }
  2722. }
  2723.  
  2724. # Muutagans Destroyed
  2725. country_event = {
  2726. id = leviathans.144
  2727. title = "leviathans.141"
  2728. desc = {
  2729. text = leviathans.144.a.desc
  2730. trigger = {
  2731. NOT = {
  2732. has_relation_flag = {
  2733. who = FROM
  2734. flag = muutagan_trade
  2735. }
  2736. }
  2737. has_communications = event_target:trader_destroyer
  2738. }
  2739. }
  2740. desc = {
  2741. text = leviathans.144.b.desc
  2742. trigger = {
  2743. NOT = {
  2744. has_relation_flag = {
  2745. who = FROM
  2746. flag = muutagan_trade
  2747. }
  2748. }
  2749. NOT = { has_communications = event_target:trader_destroyer }
  2750. }
  2751. }
  2752. desc = {
  2753. text = leviathans.144.c.desc
  2754. trigger = {
  2755. has_relation_flag = {
  2756. who = FROM
  2757. flag = muutagan_trade
  2758. }
  2759. has_communications = event_target:trader_destroyer
  2760. }
  2761. }
  2762. desc = {
  2763. text = leviathans.144.d.desc
  2764. trigger = {
  2765. has_relation_flag = {
  2766. who = FROM
  2767. flag = muutagan_trade
  2768. }
  2769. NOT = { has_communications = event_target:trader_destroyer }
  2770. }
  2771. }
  2772. picture = GFX_evt_exploding_ship
  2773. location = event_target:trader_system
  2774. show_sound = event_ship_explosion
  2775.  
  2776. is_triggered_only = yes
  2777.  
  2778. immediate = {
  2779. set_global_flag = muutagans_destroyed
  2780. remove_muutagan_trades = yes
  2781. remove_relation_flag = {
  2782. who = FROM
  2783. flag = muutagan_trade
  2784. }
  2785. }
  2786.  
  2787. option = {
  2788. name = "leviathans.144.a"
  2789. }
  2790. }
  2791.  
  2792. # Continue Trade? (XuraCorp)
  2793. country_event = {
  2794. id = leviathans.150
  2795. title = leviathans.100.name
  2796. desc = leviathans.150.desc
  2797.  
  2798. is_triggered_only = yes
  2799. diplomatic = yes
  2800. custom_gui = "enclave_trader_window"
  2801.  
  2802. picture_event_data = {
  2803. portrait = event_target:traders
  2804. room = enclave_trader_room
  2805. }
  2806.  
  2807. trigger = {
  2808. NOR = {
  2809. has_global_flag = xuracorp_destroyed
  2810. has_country_flag = attacked_xuracorp
  2811. }
  2812. }
  2813.  
  2814.  
  2815. option = {
  2816. name = leviathans.150.a
  2817. custom_gui = "enclave_trader_option"
  2818. hidden_effect = {
  2819. country_event = { id = leviathans.131 }
  2820. }
  2821. }
  2822. option = {
  2823. name = leviathans.150.b
  2824. custom_gui = "enclave_trader_option"
  2825. }
  2826. }
  2827.  
  2828. # Continue Trade? (Riggans)
  2829. country_event = {
  2830. id = leviathans.151
  2831. title = leviathans.103.name
  2832. desc = leviathans.151.desc
  2833.  
  2834. is_triggered_only = yes
  2835. diplomatic = yes
  2836. custom_gui = "enclave_trader_window"
  2837.  
  2838. picture_event_data = {
  2839. portrait = event_target:traders
  2840. room = enclave_trader_room
  2841. }
  2842.  
  2843. trigger = {
  2844. NOR = {
  2845. has_global_flag = riggans_destroyed
  2846. has_country_flag = attacked_riggans
  2847. }
  2848. }
  2849.  
  2850. option = {
  2851. name = leviathans.151.a
  2852. custom_gui = "enclave_trader_option"
  2853. hidden_effect = {
  2854. country_event = { id = leviathans.130 }
  2855. }
  2856. }
  2857. option = {
  2858. name = leviathans.151.b
  2859. custom_gui = "enclave_trader_option"
  2860. }
  2861. }
  2862.  
  2863. # Continue Trade? (Muutagans)
  2864. country_event = {
  2865. id = leviathans.152
  2866. title = leviathans.104.name
  2867. desc = leviathans.152.desc
  2868.  
  2869. is_triggered_only = yes
  2870. diplomatic = yes
  2871. custom_gui = "enclave_trader_window"
  2872.  
  2873. picture_event_data = {
  2874. portrait = event_target:traders
  2875. room = enclave_trader_room
  2876. }
  2877.  
  2878. trigger = {
  2879. NOR = {
  2880. has_global_flag = muutagans_destroyed
  2881. has_country_flag = attacked_muutagans
  2882. }
  2883. }
  2884.  
  2885.  
  2886. option = {
  2887. name = leviathans.152.a
  2888. custom_gui = "enclave_trader_option"
  2889. hidden_effect = {
  2890. country_event = { id = leviathans.132 }
  2891. }
  2892. }
  2893. option = {
  2894. name = leviathans.152.b
  2895. custom_gui = "enclave_trader_option"
  2896. }
  2897. }
  2898.  
  2899. # Attacked XuraCorp (HIDDEN)
  2900. country_event = {
  2901. id = leviathans.155
  2902. hide_window = yes
  2903. is_triggered_only = yes
  2904.  
  2905. trigger = {
  2906. is_country_type = default
  2907. FROM = { has_country_flag = trader_enclave_country_1 }
  2908. }
  2909.  
  2910. immediate = {
  2911. FROM = {
  2912. save_event_target_as = traders
  2913. add_trust = {
  2914. who = ROOT
  2915. amount = -100
  2916. }
  2917. }
  2918. set_country_flag = attacked_xuracorp
  2919. if = {
  2920. limit = {
  2921. has_active_xuracorp_trade = yes
  2922. }
  2923. remove_xuracorp_trades = yes
  2924. remove_relation_flag = {
  2925. who = FROM
  2926. flag = xuracorp_trade
  2927. }
  2928. country_event = { id = leviathans.156 }
  2929. }
  2930. }
  2931. }
  2932.  
  2933. # Attacked XuraCorp - Trade Agreement Terminated
  2934. country_event = {
  2935. id = leviathans.156
  2936. title = leviathans.100.name
  2937. desc = leviathans.156.desc
  2938.  
  2939. is_triggered_only = yes
  2940. diplomatic = yes
  2941. custom_gui = "enclave_trader_window"
  2942.  
  2943. picture_event_data = {
  2944. portrait = event_target:traders
  2945. room = enclave_trader_room
  2946. }
  2947.  
  2948. option = {
  2949. name = leviathans.156.a
  2950. custom_gui = "enclave_trader_option"
  2951. }
  2952. }
  2953.  
  2954. # Attacked XuraCorp - Refuses Communications
  2955. country_event = {
  2956. id = leviathans.157
  2957. title = leviathans.100.name
  2958. desc = leviathans.157a.desc
  2959. desc = leviathans.157b.desc
  2960. desc = leviathans.157c.desc
  2961.  
  2962. is_triggered_only = yes
  2963. diplomatic = yes
  2964. custom_gui = "enclave_trader_window"
  2965. force_open = yes
  2966.  
  2967. picture_event_data = {
  2968. portrait = event_target:traders
  2969. room = enclave_trader_room
  2970. }
  2971.  
  2972. trigger = {
  2973. FROM = {
  2974. is_country_type = enclave
  2975. has_country_flag = trader_enclave_country_1
  2976. }
  2977. has_country_flag = attacked_xuracorp
  2978. NOT = { has_country_flag = trader_enclave_diplomacy_engaged }
  2979. }
  2980.  
  2981. immediate = {
  2982. set_country_flag = trader_enclave_diplomacy_engaged
  2983. FROM = { save_event_target_as = traders }
  2984. }
  2985.  
  2986. after = {
  2987. hidden_effect = {
  2988. remove_country_flag = trader_enclave_diplomacy_engaged
  2989. }
  2990. }
  2991.  
  2992. option = {
  2993. name = SCUM
  2994. trigger = {
  2995. has_valid_civic = civic_fanatic_purifiers
  2996. }
  2997. custom_gui = "enclave_trader_option"
  2998. }
  2999.  
  3000. option = {
  3001. name = TASTY
  3002. trigger = {
  3003. has_valid_civic = civic_hive_devouring_swarm
  3004. }
  3005. custom_gui = "enclave_trader_option"
  3006. }
  3007.  
  3008. option = {
  3009. name = EXTERMINATE
  3010. trigger = {
  3011. has_valid_civic = civic_machine_terminator
  3012. }
  3013. custom_gui = "enclave_trader_option"
  3014. }
  3015.  
  3016. option = {
  3017. name = leviathans.156.a
  3018. custom_gui = "enclave_trader_option"
  3019. trigger = {
  3020. NOR = {
  3021. has_valid_civic = civic_fanatic_purifiers
  3022. has_valid_civic = civic_hive_devouring_swarm
  3023. has_valid_civic = civic_machine_terminator
  3024. }
  3025. }
  3026. default_hide_option = yes
  3027. }
  3028. }
  3029.  
  3030. # Attacked Riggans (HIDDEN)
  3031. country_event = {
  3032. id = leviathans.158
  3033. hide_window = yes
  3034. is_triggered_only = yes
  3035.  
  3036. trigger = {
  3037. is_country_type = default
  3038. FROM = { has_country_flag = trader_enclave_country_2 }
  3039. }
  3040.  
  3041. immediate = {
  3042. FROM = {
  3043. save_event_target_as = traders
  3044. add_trust = {
  3045. who = ROOT
  3046. amount = -100
  3047. }
  3048. }
  3049. set_country_flag = attacked_riggans
  3050. if = {
  3051. limit = {
  3052. has_active_riggan_trade = yes
  3053. }
  3054. remove_riggan_trades = yes
  3055. remove_relation_flag = {
  3056. who = FROM
  3057. flag = riggan_trade
  3058. }
  3059. country_event = { id = leviathans.159}
  3060. }
  3061. }
  3062. }
  3063.  
  3064. # Attacked Riggans - Trade Agreement Terminated
  3065. country_event = {
  3066. id = leviathans.159
  3067. title = leviathans.103.name
  3068. desc = leviathans.159.desc
  3069.  
  3070. is_triggered_only = yes
  3071. diplomatic = yes
  3072. custom_gui = "enclave_trader_window"
  3073.  
  3074. picture_event_data = {
  3075. portrait = event_target:traders
  3076. room = enclave_trader_room
  3077. }
  3078.  
  3079. option = {
  3080. name = leviathans.156.a
  3081. custom_gui = "enclave_trader_option"
  3082. }
  3083. }
  3084.  
  3085. # Attacked Riggans - Refuses Communications
  3086. country_event = {
  3087. id = leviathans.160
  3088. title = leviathans.103.name
  3089. desc = leviathans.160a.desc
  3090. desc = leviathans.160b.desc
  3091. desc = leviathans.160c.desc
  3092.  
  3093. is_triggered_only = yes
  3094. diplomatic = yes
  3095. custom_gui = "enclave_trader_window"
  3096. force_open = yes
  3097.  
  3098. picture_event_data = {
  3099. portrait = event_target:traders
  3100. room = enclave_trader_room
  3101. }
  3102.  
  3103. trigger = {
  3104. FROM = {
  3105. is_country_type = enclave
  3106. has_country_flag = trader_enclave_country_2
  3107. }
  3108. has_country_flag = attacked_riggans
  3109. NOT = { has_country_flag = trader_enclave_diplomacy_engaged }
  3110. }
  3111.  
  3112. immediate = {
  3113. set_country_flag = trader_enclave_diplomacy_engaged
  3114. FROM = { save_event_target_as = traders }
  3115. }
  3116.  
  3117. after = {
  3118. hidden_effect = {
  3119. remove_country_flag = trader_enclave_diplomacy_engaged
  3120. }
  3121. }
  3122.  
  3123. option = {
  3124. name = SCUM
  3125. trigger = {
  3126. has_valid_civic = civic_fanatic_purifiers
  3127. }
  3128. custom_gui = "enclave_trader_option"
  3129. }
  3130.  
  3131. option = {
  3132. name = TASTY
  3133. trigger = {
  3134. has_valid_civic = civic_hive_devouring_swarm
  3135. }
  3136. custom_gui = "enclave_trader_option"
  3137. }
  3138.  
  3139. option = {
  3140. name = EXTERMINATE
  3141. trigger = {
  3142. has_valid_civic = civic_machine_terminator
  3143. }
  3144. custom_gui = "enclave_trader_option"
  3145. }
  3146.  
  3147. option = {
  3148. name = leviathans.156.a
  3149. custom_gui = "enclave_trader_option"
  3150. trigger = {
  3151. NOR = {
  3152. has_valid_civic = civic_fanatic_purifiers
  3153. has_valid_civic = civic_hive_devouring_swarm
  3154. has_valid_civic = civic_machine_terminator
  3155. }
  3156. }
  3157. default_hide_option = yes
  3158. }
  3159. }
  3160.  
  3161. # Attacked Muutagans (HIDDEN)
  3162. country_event = {
  3163. id = leviathans.161
  3164. hide_window = yes
  3165. is_triggered_only = yes
  3166.  
  3167. trigger = {
  3168. is_country_type = default
  3169. FROM = { has_country_flag = trader_enclave_country_3 }
  3170. }
  3171.  
  3172. immediate = {
  3173. FROM = {
  3174. save_event_target_as = traders
  3175. add_trust = {
  3176. who = ROOT
  3177. amount = -100
  3178. }
  3179. }
  3180. set_country_flag = attacked_muutagans
  3181. if = {
  3182. limit = {
  3183. has_active_muutagan_trade = yes
  3184. }
  3185. remove_muutagan_trades = yes
  3186. remove_relation_flag = {
  3187. who = FROM
  3188. flag = muutagan_trade
  3189. }
  3190. country_event = { id = leviathans.162 }
  3191. }
  3192. }
  3193. }
  3194.  
  3195. # Attacked Muutagans - Trade Agreement Terminated
  3196. country_event = {
  3197. id = leviathans.162
  3198. title = leviathans.104.name
  3199. desc = leviathans.162.desc
  3200.  
  3201. is_triggered_only = yes
  3202. diplomatic = yes
  3203. custom_gui = "enclave_trader_window"
  3204.  
  3205. picture_event_data = {
  3206. portrait = event_target:traders
  3207. room = enclave_trader_room
  3208. }
  3209.  
  3210. option = {
  3211. name = leviathans.156.a
  3212. custom_gui = "enclave_trader_option"
  3213. }
  3214. }
  3215.  
  3216. # Attacked Muutagans - Refuses Communications
  3217. country_event = {
  3218. id = leviathans.163
  3219. title = leviathans.104.name
  3220. desc = leviathans.163a.desc
  3221. desc = leviathans.163b.desc
  3222. desc = leviathans.163c.desc
  3223.  
  3224. is_triggered_only = yes
  3225. diplomatic = yes
  3226. custom_gui = "enclave_trader_window"
  3227. force_open = yes
  3228.  
  3229. picture_event_data = {
  3230. portrait = event_target:traders
  3231. room = enclave_trader_room
  3232. }
  3233.  
  3234. trigger = {
  3235. FROM = {
  3236. is_country_type = enclave
  3237. has_country_flag = trader_enclave_country_3
  3238. }
  3239. has_country_flag = attacked_muutagans
  3240. NOT = { has_country_flag = trader_enclave_diplomacy_engaged }
  3241. }
  3242.  
  3243. immediate = {
  3244. set_country_flag = trader_enclave_diplomacy_engaged
  3245. FROM = { save_event_target_as = traders }
  3246. }
  3247.  
  3248. after = {
  3249. hidden_effect = {
  3250. remove_country_flag = trader_enclave_diplomacy_engaged
  3251. }
  3252. }
  3253.  
  3254. option = {
  3255. name = SCUM
  3256. trigger = {
  3257. has_valid_civic = civic_fanatic_purifiers
  3258. }
  3259. custom_gui = "enclave_trader_option"
  3260. }
  3261.  
  3262. option = {
  3263. name = TASTY
  3264. trigger = {
  3265. has_valid_civic = civic_hive_devouring_swarm
  3266. }
  3267. custom_gui = "enclave_trader_option"
  3268. }
  3269.  
  3270. option = {
  3271. name = EXTERMINATE
  3272. trigger = {
  3273. has_valid_civic = civic_machine_terminator
  3274. }
  3275. custom_gui = "enclave_trader_option"
  3276. }
  3277.  
  3278. option = {
  3279. name = leviathans.156.a
  3280. custom_gui = "enclave_trader_option"
  3281. trigger = { NOR = { has_valid_civic = civic_fanatic_purifiers has_valid_civic = civic_hive_devouring_swarm has_valid_civic = civic_machine_terminator } }
  3282. default_hide_option = yes
  3283. }
  3284. }
  3285.  
  3286. # No More Energy - Trades Canceled
  3287. event = {
  3288. id = leviathans.170
  3289. hide_window = yes
  3290.  
  3291. is_triggered_only = yes
  3292.  
  3293. trigger = {
  3294. any_country = {
  3295. is_country_type = default
  3296. resource_stockpile_compare = { resource = energy value <= 0 }
  3297. OR = {
  3298. has_active_xuracorp_trade = yes
  3299. has_active_riggan_trade = yes
  3300. has_active_muutagan_trade = yes
  3301. }
  3302. }
  3303. }
  3304.  
  3305. immediate = {
  3306. every_country = {
  3307. limit = {
  3308. is_country_type = default
  3309. resource_stockpile_compare = { resource = energy value <= 0 }
  3310. OR = {
  3311. has_active_xuracorp_trade = yes
  3312. has_active_riggan_trade = yes
  3313. has_active_muutagan_trade = yes
  3314. }
  3315. }
  3316. country_event = { id = leviathans.171 }
  3317. }
  3318. }
  3319. }
  3320.  
  3321. # No More Energy - Trades Canceled Notification
  3322. country_event = {
  3323. id = leviathans.171
  3324. title = "leviathans.171.name"
  3325. desc = "leviathans.171.desc"
  3326. picture = GFX_evt_mining_operations
  3327. show_sound = event_radio_chatter
  3328.  
  3329. is_triggered_only = yes
  3330.  
  3331. immediate = {
  3332. if = {
  3333. limit = {
  3334. OR = {
  3335. has_modifier = enclave_trade_1_xur
  3336. has_modifier = enclave_trade_2_xur
  3337. has_modifier = enclave_trade_3_xur
  3338. has_modifier = enclave_trade_4_xur
  3339. has_modifier = enclave_trade_5_xur
  3340. }
  3341. }
  3342. switch = {
  3343. trigger = has_modifier
  3344. enclave_trade_1_xur = { remove_modifier = enclave_trade_1_xur }
  3345. enclave_trade_2_xur = { remove_modifier = enclave_trade_2_xur }
  3346. enclave_trade_3_xur = { remove_modifier = enclave_trade_3_xur }
  3347. enclave_trade_4_xur = { remove_modifier = enclave_trade_4_xur }
  3348. enclave_trade_5_xur = { remove_modifier = enclave_trade_5_xur }
  3349. }
  3350. random_country = {
  3351. limit = { has_country_flag = trader_enclave_country_1 }
  3352. add_trust = {
  3353. who = root
  3354. amount = -20
  3355. }
  3356. }
  3357. }
  3358. if = {
  3359. limit = {
  3360. OR = {
  3361. has_modifier = enclave_trade_1_rig
  3362. has_modifier = enclave_trade_2_rig
  3363. has_modifier = enclave_trade_3_rig
  3364. has_modifier = enclave_trade_4_rig
  3365. has_modifier = enclave_trade_5_rig
  3366. }
  3367. }
  3368. switch = {
  3369. trigger = has_modifier
  3370. enclave_trade_1_rig = { remove_modifier = enclave_trade_1_rig }
  3371. enclave_trade_2_rig = { remove_modifier = enclave_trade_2_rig }
  3372. enclave_trade_3_rig = { remove_modifier = enclave_trade_3_rig }
  3373. enclave_trade_4_rig = { remove_modifier = enclave_trade_4_rig }
  3374. enclave_trade_5_rig = { remove_modifier = enclave_trade_5_rig }
  3375. }
  3376. random_country = {
  3377. limit = { has_country_flag = trader_enclave_country_2 }
  3378. add_trust = {
  3379. who = root
  3380. amount = -20
  3381. }
  3382. }
  3383. }
  3384. if = {
  3385. limit = {
  3386. OR = {
  3387. has_modifier = enclave_trade_1_mut
  3388. has_modifier = enclave_trade_2_mut
  3389. has_modifier = enclave_trade_3_mut
  3390. has_modifier = enclave_trade_4_mut
  3391. has_modifier = enclave_trade_5_mut
  3392. }
  3393. }
  3394. switch = {
  3395. trigger = has_modifier
  3396. enclave_trade_1_mut = { remove_modifier = enclave_trade_1_mut }
  3397. enclave_trade_2_mut = { remove_modifier = enclave_trade_2_mut }
  3398. enclave_trade_3_mut = { remove_modifier = enclave_trade_3_mut }
  3399. enclave_trade_4_mut = { remove_modifier = enclave_trade_4_mut }
  3400. enclave_trade_5_mut = { remove_modifier = enclave_trade_5_mut }
  3401. }
  3402. random_country = {
  3403. limit = { has_country_flag = trader_enclave_country_3 }
  3404. add_trust = {
  3405. who = root
  3406. amount = -20
  3407. }
  3408. }
  3409. }
  3410. }
  3411.  
  3412. option = {
  3413. name = leviathans.171.a
  3414. custom_tooltip = enclave_energy_trade_ended
  3415. custom_tooltip = opinion-20
  3416. }
  3417. }
  3418.  
  3419. # Artists Gatekeeper so the from scope doesn't break or refuse to pass trigger when we keep calling leviathans.300 from both on_custom_diplomacy and leviathans.30x events
  3420. country_event = {
  3421. id = leviathans.299
  3422. hide_window = yes
  3423. is_triggered_only = yes
  3424.  
  3425. trigger = {
  3426. from = {
  3427. is_country_type = enclave
  3428. has_country_flag = artist_enclave_country
  3429. }
  3430. }
  3431.  
  3432. immediate = {
  3433. if = {
  3434. limit = {
  3435. NOT = { exists = event_target:artist_enclave_country }
  3436. }
  3437. from = {
  3438. save_global_event_target_as = artist_enclave_country
  3439. }
  3440. }
  3441. country_event = { id = leviathans.300 }
  3442. }
  3443. }
  3444.  
  3445. # Artists
  3446. country_event = {
  3447. id = leviathans.300
  3448. title = leviathans.300.name
  3449. desc = {
  3450. trigger = {
  3451. switch = {
  3452. trigger = has_country_flag
  3453. artist_enclave_diplomacy_continued = { text = leviathans.300.desc.continued }
  3454. recently_purchased_art = { text = leviathans.302.a.reply }
  3455. recently_purchased_ministry = { text = leviathans.316.a.reply }
  3456. recently_purchased_patron = { text = leviathans.304.a.reply }
  3457. recently_purchased_festival = { text = leviathans.303.a.reply }
  3458. default = { text = leviathans.300.desc }
  3459. }
  3460. }
  3461. }
  3462. is_triggered_only = yes
  3463. diplomatic = yes
  3464. custom_gui = "enclave_artist_window"
  3465. custom_gui_option = "enclave_artist_option"
  3466.  
  3467. picture_event_data = {
  3468. portrait = event_target:artist_enclave_country
  3469. room = enclave_artist_room
  3470. }
  3471.  
  3472. trigger = {
  3473. OR = {
  3474. OR = {
  3475. has_country_flag = artist_enclave_diplomacy_continued
  3476. NOT = { has_country_flag = artist_enclave_diplomacy_engaged }
  3477. }
  3478. has_country_flag = recently_purchased_art
  3479. has_country_flag = recently_purchased_ministry
  3480. has_country_flag = recently_purchased_patron
  3481. has_country_flag = recently_purchased_festival
  3482. }
  3483. NOT = { has_country_flag = enclave_artist_ignores }
  3484. }
  3485.  
  3486. immediate = {
  3487. save_event_target_as = my_country
  3488. set_country_flag = artist_enclave_diplomacy_engaged
  3489. }
  3490.  
  3491. option = {
  3492. name = leviathans.300.a
  3493. trigger = {
  3494. check_variable = {
  3495. which = artist_monument_purchased
  3496. value < 5
  3497. }
  3498. NOR = { has_valid_civic = civic_fanatic_purifiers has_valid_civic = civic_hive_devouring_swarm has_valid_civic = civic_machine_terminator }
  3499. }
  3500. hidden_effect = {
  3501. remove_country_flag = artist_enclave_diplomacy_continued
  3502. remove_country_flag = recently_purchased_art
  3503. remove_country_flag = recently_purchased_ministry
  3504. remove_country_flag = recently_purchased_patron
  3505. remove_country_flag = recently_purchased_festival
  3506. country_event = { id = leviathans.302 }
  3507. }
  3508. }
  3509.  
  3510. option = {
  3511. name = leviathans.300.a
  3512. response_text = leviathans.300.a.reply
  3513. is_dialog_only = yes
  3514. trigger = {
  3515. check_variable = {
  3516. which = artist_monument_purchased
  3517. value = 5
  3518. }
  3519. NOR = { has_valid_civic = civic_fanatic_purifiers has_valid_civic = civic_hive_devouring_swarm has_valid_civic = civic_machine_terminator }
  3520. }
  3521. }
  3522. option = {
  3523. name = leviathans.300.b
  3524. trigger = {
  3525. NOT = { has_modifier = enclave_artist_patron }
  3526. NOR = { has_valid_civic = civic_fanatic_purifiers has_valid_civic = civic_hive_devouring_swarm has_valid_civic = civic_machine_terminator }
  3527. }
  3528. hidden_effect = {
  3529. country_event = { id = leviathans.304 }
  3530. }
  3531. }
  3532. #option = {
  3533. # name = leviathans.300.b.stop
  3534. # response_text = leviathans.300.b.reply
  3535. # trigger = {
  3536. # has_modifier = enclave_artist_patron
  3537. # NOR = { has_valid_civic = civic_fanatic_purifiers has_valid_civic = #civic_hive_devouring_swarm has_valid_civic = civic_machine_terminator }#
  3538. # }#
  3539. # c#ustom_tooltip = opinion-5#
  3540. # c#ustom_tooltip = leviathans.300.b.stop.tooltip#
  3541. # r#emove_modifier = enclave_artist_patron#
  3542. # h#idden_effect = {#
  3543. # # remove_countr#y_flag = artist_enclave_diplomacy_engaged#
  3544. # # remove_countr#y_flag = artist_patron#
  3545. # # set_country_f#lag = enclave_stopped_#patronage#
  3546. # # event_target:#artist_enclave_country# = {#
  3547. # # add_trust# = {#
  3548. # # who =# roo#t#
  3549. # # amoun#t = #-5#
  3550. # # }#
  3551. # }#
  3552. # }
  3553. #}
  3554. option = {
  3555. name = leviathans.300.c
  3556. trigger = {
  3557. NOR = {
  3558. has_valid_civic = civic_fanatic_purifiers
  3559. has_valid_civic = civic_hive_devouring_swarm
  3560. has_valid_civic = civic_machine_terminator
  3561. has_country_flag = artist_festival_purchased
  3562. has_ethic = ethic_gestalt_consciousness
  3563. }
  3564. }
  3565. allow = {
  3566. custom_tooltip = {
  3567. text = leviathans.300.c.allow
  3568. NOT = {
  3569. has_country_flag = artist_festival_purchased
  3570. }
  3571. event_target:artist_enclave_country = {
  3572. trust = {
  3573. who = root
  3574. value >= 50
  3575. }
  3576. }
  3577. }
  3578. }
  3579. hidden_effect = {
  3580. remove_country_flag = artist_enclave_diplomacy_engaged
  3581. remove_country_flag = artist_enclave_diplomacy_continued
  3582. remove_country_flag = recently_purchased_art
  3583. remove_country_flag = recently_purchased_ministry
  3584. remove_country_flag = recently_purchased_patron
  3585. remove_country_flag = recently_purchased_festival
  3586. country_event = { id = leviathans.303 }
  3587. }
  3588. }
  3589. option = {
  3590. name = leviathans.300.c
  3591. trigger = {
  3592. has_country_flag = artist_festival_purchased
  3593. NOR = {
  3594. has_valid_civic = civic_fanatic_purifiers
  3595. has_authority = auth_hive_mind
  3596. }
  3597. }
  3598. allow = {
  3599. custom_tooltip = {
  3600. text = leviathans.300.c.outofstock
  3601. NOT = {
  3602. has_country_flag = artist_festival_purchased
  3603. }
  3604. }
  3605. }
  3606. hidden_effect = {
  3607. remove_country_flag = artist_enclave_diplomacy_engaged
  3608. remove_country_flag = artist_enclave_diplomacy_continued
  3609. remove_country_flag = recently_purchased_art
  3610. remove_country_flag = recently_purchased_ministry
  3611. remove_country_flag = recently_purchased_patron
  3612. remove_country_flag = recently_purchased_festival
  3613. country_event = { id = leviathans.303 }
  3614. }
  3615. }
  3616. option = {
  3617. name = leviathans.300.d
  3618. trigger = { NOR = { has_valid_civic = civic_fanatic_purifiers has_valid_civic = civic_hive_devouring_swarm has_valid_civic = civic_machine_terminator } }
  3619. is_dialog_only = yes
  3620. response_text = leviathans.300.d.reply
  3621. }
  3622. # For those who have declined offer to build ministry of culture
  3623. option = {
  3624. name = leviathans.300.f
  3625. trigger = {
  3626. has_country_flag = enclave_artist_patron_event_1
  3627. NOR = {
  3628. has_valid_civic = civic_fanatic_purifiers
  3629. has_valid_civic = civic_hive_devouring_swarm
  3630. has_valid_civic = civic_machine_terminator
  3631. has_country_flag = artist_building_patron
  3632. }
  3633. # former .316 trigger
  3634. exists = event_target:artist_enclave_country
  3635. has_modifier = enclave_artist_patron
  3636. has_country_flag = artist_patron
  3637. NOR = {
  3638. has_country_flag = enclave_stopped_patronage
  3639. has_country_flag = enclave_artist_ignores
  3640. #has_country_flag = artist_building_patron
  3641. }
  3642. }
  3643. hidden_effect = {
  3644. country_event = { id = leviathans.316 }
  3645. }
  3646. }
  3647. option = { # Art College
  3648. name = leviathans.300.g
  3649. trigger = {
  3650. NOR = { has_valid_civic = civic_fanatic_purifiers has_valid_civic = civic_hive_devouring_swarm has_valid_civic = civic_machine_terminator }
  3651. NOT = {
  3652. event_target:artist_enclave_country = {
  3653. has_country_flag = art_college@root
  3654. }
  3655. }
  3656. any_system_within_border = {
  3657. has_star_flag = enclave
  3658. any_ship_in_system = {
  3659. exists = owner
  3660. owner = {
  3661. is_same_value = event_target:artist_enclave_country
  3662. }
  3663. }
  3664. }
  3665. }
  3666. allow = {
  3667. custom_tooltip = {
  3668. fail_text = leviathans.300.g.opinion
  3669. event_target:artist_enclave_country = {
  3670. trust = {
  3671. who = root
  3672. value >= 50
  3673. }
  3674. }
  3675. }
  3676. }
  3677. hidden_effect = {
  3678. country_event = { id = leviathans.340 }
  3679. }
  3680. }
  3681. option = {
  3682. name = GOODBYE
  3683. trigger = { NOR = { has_valid_civic = civic_fanatic_purifiers has_valid_civic = civic_hive_devouring_swarm has_valid_civic = civic_machine_terminator } }
  3684. default_hide_option = yes
  3685. hidden_effect = {
  3686. remove_country_flag = artist_enclave_diplomacy_engaged
  3687. remove_country_flag = artist_enclave_diplomacy_continued
  3688. remove_country_flag = recently_purchased_art
  3689. remove_country_flag = recently_purchased_ministry
  3690. remove_country_flag = recently_purchased_patron
  3691. remove_country_flag = recently_purchased_festival
  3692. }
  3693. }
  3694.  
  3695. option = {
  3696. name = SCUM
  3697. trigger = { has_valid_civic = civic_fanatic_purifiers }
  3698. hidden_effect = {
  3699. remove_country_flag = artist_enclave_diplomacy_engaged
  3700. remove_country_flag = artist_enclave_diplomacy_continued
  3701. remove_country_flag = recently_purchased_art
  3702. remove_country_flag = recently_purchased_ministry
  3703. remove_country_flag = recently_purchased_patron
  3704. remove_country_flag = recently_purchased_festival
  3705. }
  3706. }
  3707.  
  3708. option = {
  3709. name = TASTY
  3710. trigger = { has_valid_civic = civic_hive_devouring_swarm }
  3711. hidden_effect = {
  3712. remove_country_flag = artist_enclave_diplomacy_engaged
  3713. remove_country_flag = artist_enclave_diplomacy_continued
  3714. remove_country_flag = recently_purchased_art
  3715. remove_country_flag = recently_purchased_ministry
  3716. remove_country_flag = recently_purchased_patron
  3717. remove_country_flag = recently_purchased_festival
  3718. }
  3719. }
  3720.  
  3721. option = {
  3722. name = EXTERMINATE
  3723. trigger = {
  3724. has_valid_civic = civic_machine_terminator
  3725. }
  3726. hidden_effect = {
  3727. remove_country_flag = artist_enclave_diplomacy_engaged
  3728. remove_country_flag = artist_enclave_diplomacy_continued
  3729. remove_country_flag = recently_purchased_art
  3730. remove_country_flag = recently_purchased_ministry
  3731. remove_country_flag = recently_purchased_patron
  3732. remove_country_flag = recently_purchased_festival
  3733. }
  3734. }
  3735.  
  3736. #after = {
  3737. # hidden_effect = {
  3738. # remove_country_flag = artist_enclave_diplomacy_engaged
  3739. # remove_country_flag = artist_enclave_diplomacy_continued
  3740. # remove_country_flag = recently_purchased_art
  3741. # remove_country_flag = recently_purchased_ministry
  3742. # remove_country_flag = recently_purchased_patron
  3743. # remove_country_flag = recently_purchased_festival
  3744. # }
  3745. #}
  3746. }
  3747.  
  3748. # Port
  3749. country_event = {
  3750. id = leviathans.301
  3751. hide_window = yes
  3752. is_triggered_only = yes
  3753. immediate = {
  3754. from = {
  3755. if = {
  3756. limit = {
  3757. NOT = { has_country_flag = enclave_artist_ignores }
  3758. }
  3759. country_event = { id = leviathans.315 }
  3760. }
  3761. else = {
  3762. country_event = { id = leviathans.313 }
  3763. }
  3764. }
  3765. }
  3766. }
  3767.  
  3768. # Artist Introduction
  3769. country_event = {
  3770. id = leviathans.315
  3771. title = leviathans.300.name
  3772. desc = leviathans.315.desc
  3773.  
  3774. is_triggered_only = yes
  3775. diplomatic = yes
  3776. custom_gui = "enclave_artist_window"
  3777.  
  3778. picture_event_data = {
  3779. portrait = from
  3780. room = enclave_artist_room
  3781. }
  3782.  
  3783. option = {
  3784. name = INTERESTING
  3785. custom_gui = "enclave_artist_option"
  3786. trigger = {
  3787. NOR = { has_valid_civic = civic_fanatic_purifiers has_valid_civic = civic_hive_devouring_swarm has_valid_civic = civic_machine_terminator }
  3788. }
  3789. }
  3790.  
  3791. option = {
  3792. name = SCUM
  3793. custom_gui = "enclave_artist_option"
  3794. trigger = {
  3795. has_valid_civic = civic_fanatic_purifiers
  3796. }
  3797. }
  3798.  
  3799. option = {
  3800. name = TASTY
  3801. custom_gui = "enclave_artist_option"
  3802. trigger = {
  3803. has_valid_civic = civic_hive_devouring_swarm
  3804. }
  3805. }
  3806.  
  3807. option = {
  3808. name = EXTERMINATE
  3809. custom_gui = "enclave_artist_option"
  3810. trigger = {
  3811. has_valid_civic = civic_machine_terminator
  3812. }
  3813. }
  3814. }
  3815.  
  3816. #Trying to buy an Art Piece
  3817. country_event = {
  3818. id = leviathans.302
  3819. title = leviathans.300.name
  3820. desc = leviathans.302.desc
  3821. is_triggered_only = yes
  3822. diplomatic = yes
  3823. custom_gui = "enclave_artist_window"
  3824. custom_gui_option = "enclave_artist_option"
  3825.  
  3826. picture_event_data = {
  3827. portrait = event_target:artist_enclave_country
  3828. room = enclave_artist_room
  3829. }
  3830.  
  3831. trigger = {
  3832. has_country_flag = artist_enclave_diplomacy_engaged
  3833. }
  3834.  
  3835. option = {
  3836. name = DEAL
  3837. add_resource = { energy = -600 }
  3838. custom_tooltip = opinion10
  3839. custom_tooltip = leviathans.302.a.tooltip
  3840. allow = {
  3841. resource_stockpile_compare = { resource = energy value >= 600 }
  3842. }
  3843. hidden_effect = {
  3844. event_target:artist_enclave_country = {
  3845. add_trust = {
  3846. who = root
  3847. amount = 10
  3848. }
  3849. }
  3850. set_country_flag = recently_purchased_art
  3851. if = {
  3852. limit = {
  3853. NOT = { has_country_flag = artist_monument_collector }
  3854. }
  3855. set_country_flag = artist_monument_collector
  3856. set_variable = {
  3857. which = artist_monument_purchased
  3858. value = 1
  3859. }
  3860. }
  3861. else_if = {
  3862. limit = {
  3863. has_country_flag = artist_monument_collector
  3864. }
  3865. change_variable = {
  3866. which = artist_monument_purchased
  3867. value = 1
  3868. }
  3869. }
  3870. }
  3871. }
  3872. option = {
  3873. name = TOOPOOR
  3874. trigger = {
  3875. resource_stockpile_compare = { resource = energy value < 600 }
  3876. }
  3877. hidden_effect = {
  3878. set_country_flag = artist_enclave_diplomacy_continued
  3879. }
  3880. }
  3881. option = {
  3882. name = NODEAL
  3883. default_hide_option = yes
  3884. trigger = {
  3885. NOT = { resource_stockpile_compare = { resource = energy value < 600 } }
  3886. }
  3887. hidden_effect = {
  3888. set_country_flag = artist_enclave_diplomacy_continued
  3889. }
  3890. }
  3891. after = {
  3892. hidden_effect = {
  3893. remove_country_flag = artist_enclave_diplomacy_engaged
  3894. country_event = { id = leviathans.300 }
  3895. }
  3896. }
  3897. }
  3898.  
  3899. # Option to buy ministry of culture
  3900. country_event = {
  3901. id = leviathans.316
  3902. title = leviathans.316.name
  3903. desc = leviathans.316.desc
  3904. diplomatic = yes
  3905. custom_gui = "enclave_artist_window"
  3906. custom_gui_option = "enclave_artist_option"
  3907.  
  3908. picture_event_data = {
  3909. portrait = event_target:artist_enclave_country
  3910. room = enclave_artist_room
  3911. }
  3912.  
  3913. is_triggered_only = yes
  3914.  
  3915. # only fired by event option, see leviathans.300.f
  3916. #trigger = {
  3917. # exists = event_target:artist_enclave_country
  3918. # has_modifier = enclave_artist_patron
  3919. # has_country_flag = artist_patron
  3920. # NOT = {
  3921. # has_country_flag = enclave_stopped_patronage
  3922. # has_country_flag = enclave_artist_ignores
  3923. # has_country_flag = artist_building_patron
  3924. # }
  3925. #}
  3926.  
  3927. option = {
  3928. name = DEAL
  3929. IF = {
  3930. limit = { NOT = { has_ethic = ethic_gestalt_consciousness } }
  3931. custom_tooltip = leviathans.322.a.tooltip
  3932. }
  3933. ELSE = { custom_tooltip = leviathans.322.a.tooltip.gesta }
  3934. #response_text = leviathans.316.a.reply
  3935. allow = {
  3936. resource_stockpile_compare = { resource = energy value >= 2000 }
  3937. }
  3938. add_resource = { energy = -2000 }
  3939. hidden_effect = {
  3940. set_country_flag = artist_building_patron
  3941. set_country_flag = recently_purchased_ministry
  3942. }
  3943. }
  3944. option = {
  3945. name = TOOPOOR
  3946. trigger = {
  3947. resource_stockpile_compare = { resource = energy value < 2000 }
  3948. }
  3949. hidden_effect = {
  3950. set_country_flag = artist_enclave_diplomacy_continued
  3951. }
  3952. }
  3953. option = {
  3954. name = NODEAL
  3955. trigger = {
  3956. NOT = { resource_stockpile_compare = { resource = energy value < 2000 } }
  3957. }
  3958. hidden_effect = {
  3959. set_country_flag = artist_enclave_diplomacy_continued
  3960. }
  3961. }
  3962.  
  3963. after = {
  3964. hidden_effect = {
  3965. remove_country_flag = artist_enclave_diplomacy_engaged
  3966. country_event = { id = leviathans.300 }
  3967. }
  3968. }
  3969. }
  3970.  
  3971. #Trying to hire Artist for a festival
  3972. country_event = {
  3973. id = leviathans.303
  3974. title = leviathans.300.name
  3975. desc = leviathans.303.desc
  3976. is_triggered_only = yes
  3977. diplomatic = yes
  3978. custom_gui = "enclave_artist_window"
  3979. custom_gui_option = "enclave_artist_option"
  3980.  
  3981. picture_event_data = {
  3982. portrait = event_target:artist_enclave_country
  3983. room = enclave_artist_room
  3984. }
  3985.  
  3986. trigger = {
  3987. event_target:artist_enclave_country = {
  3988. trust = {
  3989. who = root
  3990. value >= 50
  3991. }
  3992. }
  3993. }
  3994.  
  3995. option = {
  3996. name = DEAL
  3997. allow = {
  3998. resource_stockpile_compare = { resource = energy value >= 1000 }
  3999. }
  4000. add_resource = { energy = -1000 }
  4001. custom_tooltip = opinion15
  4002. add_modifier = {
  4003. modifier = enclave_artist_festival
  4004. days = 1800
  4005. }
  4006. hidden_effect = {
  4007. event_target:artist_enclave_country = {
  4008. add_trust = {
  4009. who = root
  4010. amount = 15
  4011. }
  4012. }
  4013. set_timed_country_flag = { flag = artist_festival_purchased days = 7200 }
  4014. country_event = { id = leviathans.314 days = 1800 }
  4015. set_country_flag = recently_purchased_festival
  4016. country_event = { id = leviathans.309 }
  4017. }
  4018. }
  4019. option = {
  4020. name = TOOPOOR
  4021. trigger = {
  4022. resource_stockpile_compare = { resource = energy value < 1000 }
  4023. }
  4024. hidden_effect = {
  4025. set_country_flag = artist_enclave_diplomacy_continued
  4026. }
  4027. }
  4028. option = {
  4029. name = NODEAL
  4030. default_hide_option = yes
  4031. hidden_effect = {
  4032. set_country_flag = artist_enclave_diplomacy_continued
  4033. }
  4034. }
  4035. after = {
  4036. hidden_effect = {
  4037. remove_country_flag = artist_enclave_diplomacy_engaged
  4038. country_event = { id = leviathans.300 }
  4039. }
  4040. }
  4041. }
  4042. #Trying to become a patron
  4043. country_event = {
  4044. id = leviathans.304
  4045. title = leviathans.300.name
  4046. desc = leviathans.304.desc
  4047. is_triggered_only = yes
  4048. diplomatic = yes
  4049. custom_gui = "enclave_artist_window"
  4050. custom_gui_option = "enclave_artist_option"
  4051.  
  4052. picture_event_data = {
  4053. portrait = event_target:artist_enclave_country
  4054. room = enclave_artist_room
  4055. }
  4056.  
  4057. trigger = {
  4058. has_country_flag = artist_enclave_diplomacy_engaged
  4059. }
  4060.  
  4061. #option = {
  4062. # name = DEAL
  4063. # custom_tooltip = leviathans.304.a.tooltip
  4064. # add_modifier = {
  4065. # modifier = enclave_artist_patron
  4066. # days = 3600
  4067. # }
  4068. # allow = {
  4069. # custom_tooltip = {
  4070. # text = guardian.deal.tooltip
  4071. # OR = {
  4072. # has_monthly_income = { resource = energy value >= 25 }
  4073. # resource_stockpile_compare = { resource = energy value >= 25 }
  4074. # }
  4075. # OR = {
  4076. # has_monthly_income = { resource = minerals value >= 25 }
  4077. # resource_stockpile_compare = { resource = minerals value >= 25 }
  4078. # }
  4079. # OR = {
  4080. # has_monthly_income = { resource = influence value >= 1 }
  4081. # resource_stockpile_compare = { resource = influence value >= 1 }
  4082. # }
  4083. # }
  4084. # }
  4085. # hidden_effect = {
  4086. # if = {
  4087. # limit = {
  4088. # has_country_flag = enclave_stopped_patronage
  4089. # }
  4090. # remove_country_flag = enclave_stopped_patronage
  4091. # }
  4092. # set_country_flag = artist_patron
  4093. # set_country_flag = recently_purchased_patron
  4094. # country_event = { id = leviathans.306 days = 30 } #check if still patron in a month
  4095. # country_event = { id = leviathans.320 } #trigger patron followup events
  4096. # country_event = { id = leviathans.308 days = 359 }
  4097. # }
  4098. #}
  4099.  
  4100. option = {
  4101. name = DEAL
  4102. #custom_tooltip = leviathans.304.a.tooltip
  4103. trigger = {
  4104. num_pops < 61
  4105. }
  4106. allow = {
  4107. resource_stockpile_compare = { resource = energy value >= 1000 }
  4108. NOT = { has_modifier = enclave_artist_patron }
  4109. }
  4110. add_resource = { energy = -1000 }
  4111. add_modifier = {
  4112. modifier = enclave_artist_patron
  4113. days = 3600
  4114. }
  4115. custom_tooltip = opinion20
  4116. hidden_effect = {
  4117. event_target:artist_enclave_country = {
  4118. add_trust = {
  4119. who = root
  4120. amount = 20
  4121. }
  4122. }
  4123. if = {
  4124. limit = {
  4125. has_country_flag = enclave_stopped_patronage
  4126. }
  4127. remove_country_flag = enclave_stopped_patronage
  4128. }
  4129. set_country_flag = artist_patron
  4130. set_country_flag = recently_purchased_patron
  4131. #country_event = { id = leviathans.306 days = 30 } #check if still patron in a month
  4132. country_event = { id = leviathans.320 } #trigger patron followup events
  4133. country_event = { id = leviathans.308 days = 360 }
  4134. country_event = { id = leviathans.319 days = 3600 } #patronage renewal
  4135. }
  4136. }
  4137.  
  4138. option = {
  4139. name = DEAL
  4140. #custom_tooltip = leviathans.304.a.tooltip
  4141. trigger = {
  4142. num_pops > 60
  4143. num_pops < 121
  4144. }
  4145. allow = {
  4146. resource_stockpile_compare = { resource = energy value >= 2000 }
  4147. NOT = { has_modifier = enclave_artist_patron }
  4148. }
  4149. add_resource = { energy = -2000 }
  4150. add_modifier = {
  4151. modifier = enclave_artist_patron
  4152. days = 3600
  4153. }
  4154. custom_tooltip = opinion20
  4155. hidden_effect = {
  4156. event_target:artist_enclave_country = {
  4157. add_trust = {
  4158. who = root
  4159. amount = 20
  4160. }
  4161. }
  4162. if = {
  4163. limit = {
  4164. has_country_flag = enclave_stopped_patronage
  4165. }
  4166. remove_country_flag = enclave_stopped_patronage
  4167. }
  4168. set_country_flag = artist_patron
  4169. set_country_flag = recently_purchased_patron
  4170. #country_event = { id = leviathans.306 days = 30 } #check if still patron in a month
  4171. country_event = { id = leviathans.320 } #trigger patron followup events
  4172. country_event = { id = leviathans.308 days = 360 }
  4173. country_event = { id = leviathans.319 days = 3600 } #patronage renewal
  4174. }
  4175. }
  4176.  
  4177. option = {
  4178. name = DEAL
  4179. #custom_tooltip = leviathans.304.a.tooltip
  4180. trigger = {
  4181. num_pops > 120
  4182. num_pops < 181
  4183. }
  4184. allow = {
  4185. resource_stockpile_compare = { resource = energy value >= 3000 }
  4186. NOT = { has_modifier = enclave_artist_patron }
  4187. }
  4188. add_resource = { energy = -3000 }
  4189. add_modifier = {
  4190. modifier = enclave_artist_patron
  4191. days = 3600
  4192. }
  4193. custom_tooltip = opinion20
  4194. hidden_effect = {
  4195. event_target:artist_enclave_country = {
  4196. add_trust = {
  4197. who = root
  4198. amount = 20
  4199. }
  4200. }
  4201. if = {
  4202. limit = {
  4203. has_country_flag = enclave_stopped_patronage
  4204. }
  4205. remove_country_flag = enclave_stopped_patronage
  4206. }
  4207. set_country_flag = artist_patron
  4208. set_country_flag = recently_purchased_patron
  4209. #country_event = { id = leviathans.306 days = 30 } #check if still patron in a month
  4210. country_event = { id = leviathans.320 } #trigger patron followup events
  4211. country_event = { id = leviathans.308 days = 360 }
  4212. country_event = { id = leviathans.319 days = 3600 } #patronage renewal
  4213. }
  4214. }
  4215.  
  4216. option = {
  4217. name = DEAL
  4218. #custom_tooltip = leviathans.304.a.tooltip
  4219. trigger = {
  4220. num_pops > 180
  4221. num_pops < 241
  4222. }
  4223. allow = {
  4224. resource_stockpile_compare = { resource = energy value >= 4000 }
  4225. NOT = { has_modifier = enclave_artist_patron }
  4226. }
  4227. add_resource = { energy = -4000 }
  4228. add_modifier = {
  4229. modifier = enclave_artist_patron
  4230. days = 3600
  4231. }
  4232. custom_tooltip = opinion20
  4233. hidden_effect = {
  4234. event_target:artist_enclave_country = {
  4235. add_trust = {
  4236. who = root
  4237. amount = 20
  4238. }
  4239. }
  4240. if = {
  4241. limit = {
  4242. has_country_flag = enclave_stopped_patronage
  4243. }
  4244. remove_country_flag = enclave_stopped_patronage
  4245. }
  4246. set_country_flag = artist_patron
  4247. set_country_flag = recently_purchased_patron
  4248. #country_event = { id = leviathans.306 days = 30 } #check if still patron in a month
  4249. country_event = { id = leviathans.320 } #trigger patron followup events
  4250. country_event = { id = leviathans.308 days = 360 }
  4251. country_event = { id = leviathans.319 days = 3600 } #patronage renewal
  4252. }
  4253. }
  4254.  
  4255. option = {
  4256. name = DEAL
  4257. #custom_tooltip = leviathans.304.a.tooltip
  4258. trigger = { num_pops > 240 }
  4259. allow = {
  4260. resource_stockpile_compare = { resource = energy value >= 5000 }
  4261. NOT = { has_modifier = enclave_artist_patron }
  4262. }
  4263. add_resource = { energy = -5000 }
  4264. add_modifier = {
  4265. modifier = enclave_artist_patron
  4266. days = 3600
  4267. }
  4268. custom_tooltip = opinion20
  4269. hidden_effect = {
  4270. event_target:artist_enclave_country = {
  4271. add_trust = {
  4272. who = root
  4273. amount = 20
  4274. }
  4275. }
  4276. if = {
  4277. limit = {
  4278. has_country_flag = enclave_stopped_patronage
  4279. }
  4280. remove_country_flag = enclave_stopped_patronage
  4281. }
  4282. set_country_flag = artist_patron
  4283. set_country_flag = recently_purchased_patron
  4284. #country_event = { id = leviathans.306 days = 30 } #check if still patron in a month
  4285. country_event = { id = leviathans.320 } #trigger patron followup events
  4286. country_event = { id = leviathans.308 days = 360 }
  4287. country_event = { id = leviathans.319 days = 3600 } #patronage renewal
  4288. }
  4289. }
  4290.  
  4291. option = {
  4292. name = NODEAL
  4293. default_hide_option = yes
  4294. hidden_effect = {
  4295. set_country_flag = artist_enclave_diplomacy_continued
  4296. }
  4297. }
  4298.  
  4299. after = {
  4300. hidden_effect = {
  4301. remove_country_flag = artist_enclave_diplomacy_engaged
  4302. country_event = { id = leviathans.300 }
  4303. }
  4304. }
  4305. }
  4306. #building stuff
  4307. planet_event = {
  4308. id = leviathans.305
  4309. hide_window = yes
  4310. is_triggered_only = yes
  4311.  
  4312. trigger = {
  4313. last_building_changed = building_artist_patron
  4314. always = no
  4315. }
  4316.  
  4317. immediate = {
  4318. owner = {
  4319. change_variable = {
  4320. which = artist_monuments_built
  4321. value = -1
  4322. }
  4323. }
  4324. }
  4325. }
  4326.  
  4327. ##Patron modifier checks
  4328. #country_event = {
  4329. # id = leviathans.306
  4330. # hide_window = yes
  4331. # is_triggered_only = yes
  4332. #
  4333. # trigger = {
  4334. # has_modifier = enclave_artist_patron
  4335. # has_country_flag = artist_patron
  4336. # NOT = { has_country_flag = enclave_stopped_patronage }
  4337. # }
  4338. #
  4339. # immediate = {
  4340. # if = {
  4341. # limit = {
  4342. # OR = {
  4343. # has_monthly_income = { resource = energy value >= 25 }
  4344. # resource_stockpile_compare = { resource = energy value >= 25 }
  4345. # }
  4346. # OR = {
  4347. # has_monthly_income = { resource = minerals value >= 25 }
  4348. # resource_stockpile_compare = { resource = minerals value >= 25 }
  4349. # }
  4350. # OR = {
  4351. # has_monthly_income = { resource = influence value >= 1 }
  4352. # resource_stockpile_compare = { resource = influence value >= 1 }
  4353. # }
  4354. # }
  4355. # event_target:artist_enclave_country = {
  4356. # add_trust = {
  4357. # who = root
  4358. # amount = 1
  4359. # }
  4360. # }
  4361. # country_event = { id = leviathans.306 days = 30 }
  4362. # # else = {
  4363. # # event_target:artist_enclave_country = {
  4364. # # add_trust = {
  4365. # # who = root
  4366. # # amount = -5
  4367. # # }
  4368. # # }
  4369. # # remove_modifier = enclave_artist_patron
  4370. # # remove_country_flag = artist_patron
  4371. # # country_event = { id = leviathans.307 }
  4372. # # }
  4373. # #}
  4374. # }
  4375. #}
  4376. #Patronage ended because not enough resources
  4377. #country_event = {
  4378. # id = leviathans.307
  4379. # title = leviathans.300.name
  4380. # desc = leviathans.307.desc
  4381. # picture = GFX_evt_space_station
  4382. # show_sound = event_planetary_riot
  4383. # location = event_target:this_planet
  4384. #
  4385. # is_triggered_only = yes
  4386. #
  4387. # immediate = {
  4388. # random_planet = {
  4389. # limit = {
  4390. # has_planet_flag = guardians_artists_planet
  4391. # }
  4392. # save_event_target_as = this_planet
  4393. # }
  4394. # }
  4395. # option = {
  4396. # name = UNFORTUNATE
  4397. # custom_tooltip = leviathans.307.a.tooltip
  4398. # }
  4399. #}
  4400.  
  4401. # Patronage year counter for achievement
  4402. country_event = {
  4403. id = leviathans.308
  4404. hide_window = yes
  4405. is_triggered_only = yes
  4406.  
  4407. immediate = {
  4408. if = {
  4409. limit = {
  4410. has_modifier = enclave_artist_patron
  4411. check_variable = {
  4412. which = patronage_duration
  4413. value = 9
  4414. }
  4415. }
  4416. set_country_flag = 10yr_patronage
  4417. }
  4418. else_if = {
  4419. limit = {
  4420. NOT = { has_modifier = enclave_artist_patron }
  4421. }
  4422. set_variable = {
  4423. which = patronage_duration
  4424. value = 0
  4425. }
  4426. }
  4427. else_if = {
  4428. limit = { has_modifier = enclave_artist_patron }
  4429. if = {
  4430. limit = { check_variable = { which = patronage_duration value < 1 } }
  4431. set_variable = {
  4432. which = patronage_duration
  4433. value = 1
  4434. }
  4435. }
  4436. else = {
  4437. change_variable = {
  4438. which = patronage_duration
  4439. value = 1
  4440. }
  4441. }
  4442. country_event = { id = leviathans.308 days = 360 }
  4443. }
  4444. }
  4445. }
  4446.  
  4447. #Festival Event Trigger
  4448. country_event = {
  4449. id = leviathans.309
  4450. hide_window = yes
  4451. is_triggered_only = yes
  4452.  
  4453. immediate = {
  4454. random_list = {
  4455. 10 = {
  4456. modifier = {
  4457. factor = 1.5
  4458. OR = {
  4459. has_ethic = ethic_fanatic_materialist
  4460. has_ethic = ethic_materialist
  4461. }
  4462. }
  4463. country_event = { id = leviathans.310 days = 250 random = 25 }
  4464. }
  4465. 10 = {
  4466. modifier = {
  4467. factor = 1.5
  4468. OR = {
  4469. has_ethic = ethic_fanatic_xenophile
  4470. has_ethic = ethic_xenophile
  4471. has_ethic = ethic_fanatic_pacifist
  4472. has_ethic = ethic_pacifist
  4473. }
  4474. }
  4475. country_event = { id = leviathans.311 days = 150 random = 25 }
  4476. }
  4477. 5 = {
  4478. modifier = {
  4479. factor = 1.5
  4480. OR = {
  4481. has_ethic = ethic_fanatic_xenophobe
  4482. has_ethic = ethic_xenophobe
  4483. has_ethic = ethic_fanatic_materialist
  4484. has_ethic = ethic_materialist
  4485. }
  4486. }
  4487. country_event = { id = leviathans.312 days = 300 random = 50 }
  4488. }
  4489. 75 = { }
  4490. }
  4491. }
  4492. }
  4493.  
  4494. #Artist Festival events
  4495. #People get trampled
  4496. country_event = {
  4497. id = leviathans.310
  4498. title = leviathans.310.name
  4499. desc = leviathans.310.desc
  4500. picture = GFX_evt_alien_ruins
  4501. show_sound = event_planetary_riot
  4502. location = event_target:this_planet
  4503.  
  4504. is_triggered_only = yes
  4505.  
  4506. trigger = {
  4507. has_modifier = enclave_artist_festival
  4508. }
  4509.  
  4510. immediate = {
  4511. random_owned_planet = {
  4512. save_event_target_as = this_planet
  4513. }
  4514. }
  4515. option = {
  4516. name = UNFORTUNATE
  4517. add_modifier = {
  4518. modifier = enclave_artist_festival_outrage
  4519. days = 720
  4520. }
  4521. }
  4522. option = {
  4523. name = leviathans.310.b
  4524. add_resource = { influence = -100 }
  4525. }
  4526.  
  4527. after = {
  4528. event_target:this_planet = {
  4529. random_pop = {
  4530. kill_pop = yes
  4531. }
  4532. }
  4533. }
  4534. }
  4535. #Artists want to move in
  4536. country_event = {
  4537. id = leviathans.311
  4538. title = leviathans.311.name
  4539. desc = leviathans.311.desc
  4540. picture = GFX_evt_metropolis
  4541. show_sound = event_celebration
  4542. location = event_target:this_planet
  4543.  
  4544. is_triggered_only = yes
  4545.  
  4546. trigger = {
  4547. has_modifier = enclave_artist_festival
  4548. NOR = {
  4549. has_country_flag = enclave_artist_ignores
  4550. has_authority = auth_hive_mind
  4551. }
  4552. }
  4553.  
  4554. immediate = {
  4555. random_owned_planet = {
  4556. weights = {
  4557. base = 1
  4558. modifier = {
  4559. add = 5
  4560. free_housing > 0
  4561. }
  4562. modifier = {
  4563. add = 10
  4564. free_housing > 1
  4565. }
  4566. }
  4567. save_event_target_as = this_planet
  4568. }
  4569. random_country = {
  4570. limit = {
  4571. has_country_flag = artist_enclave_country
  4572. }
  4573. species = {
  4574. save_event_target_as = artist_species
  4575. }
  4576. }
  4577. }
  4578. option = {
  4579. name = leviathans.311.a
  4580. event_target:this_planet = {
  4581. create_pop = {
  4582. species = event_target:artist_species
  4583. ethos = {
  4584. ethic = "ethic_xenophile"
  4585. }
  4586. }
  4587. create_pop = {
  4588. species = event_target:artist_species
  4589. ethos = {
  4590. ethic = "ethic_xenophile"
  4591. }
  4592. }
  4593. every_owned_pop = {
  4594. limit = { is_same_species = event_target:artist_species }
  4595. modify_species = {
  4596. ideal_planet_class = event_target:this_planet
  4597. }
  4598. }
  4599. }
  4600. }
  4601. option = {
  4602. name = leviathans.311.b
  4603. }
  4604. }
  4605. #The artists flee and steal your stuff
  4606. country_event = {
  4607. id = leviathans.312
  4608. title = leviathans.312.name
  4609. desc = leviathans.312.desc
  4610. picture = GFX_evt_metropolis
  4611. show_sound = event_planetary_riot
  4612. location = event_target:location
  4613.  
  4614. is_triggered_only = yes
  4615.  
  4616. trigger = {
  4617. has_modifier = enclave_artist_festival
  4618. }
  4619.  
  4620. immediate = {
  4621. set_timed_country_flag = { flag = enclave_artist_ignores days = 3600 }
  4622. random_planet = {
  4623. limit = {
  4624. has_planet_flag = guardians_artists_planet
  4625. }
  4626. save_event_target_as = location
  4627. }
  4628. }
  4629.  
  4630. option = {
  4631. name = leviathans.312.a
  4632. remove_modifier = enclave_artist_festival
  4633. add_resource = { energy = -1000 }
  4634. hidden_effect = {
  4635. remove_country_flag = artist_festival_purchased
  4636. }
  4637. }
  4638. }
  4639. #Artists don't answer your calls after stealing your stuff or being attacked
  4640. country_event = {
  4641. id = leviathans.313
  4642. title = leviathans.300.name
  4643. desc = leviathans.313.desc
  4644. desc = {
  4645. trigger = {
  4646. switch = {
  4647. trigger = has_country_flag
  4648. enclave_artist_encountered = { text = leviathans.313.desc }
  4649. default = { text = leviathans.313.desc.unknown }
  4650. }
  4651. }
  4652. }
  4653. picture = GFX_evt_space_station
  4654. show_sound = event_radio_chatter
  4655. location = event_target:location
  4656.  
  4657. is_triggered_only = yes
  4658.  
  4659. trigger = {
  4660. from = {
  4661. AND = {
  4662. is_country_type = enclave
  4663. has_country_flag = artist_enclave_country
  4664. }
  4665. }
  4666. has_country_flag = enclave_artist_ignores
  4667. NOT = {
  4668. has_country_flag = artist_enclave_diplomacy_engaged
  4669. }
  4670. }
  4671.  
  4672. immediate = {
  4673. random_planet = {
  4674. limit = {
  4675. has_planet_flag = guardians_artists_planet
  4676. }
  4677. save_event_target_as = location
  4678. }
  4679. set_country_flag = artist_enclave_diplomacy_engaged
  4680. }
  4681.  
  4682. option = {
  4683. name = SCUM
  4684. custom_gui = "enclave_artist_option"
  4685. trigger = {
  4686. has_valid_civic = civic_fanatic_purifiers
  4687. }
  4688. }
  4689.  
  4690. option = {
  4691. name = TASTY
  4692. custom_gui = "enclave_artist_option"
  4693. trigger = {
  4694. has_valid_civic = civic_hive_devouring_swarm
  4695. }
  4696. }
  4697.  
  4698. option = {
  4699. name = EXTERMINATE
  4700. custom_gui = "enclave_artist_option"
  4701. trigger = {
  4702. has_valid_civic = civic_machine_terminator
  4703. }
  4704. }
  4705.  
  4706. option = {
  4707. name = leviathans.313.a
  4708. default_hide_option = yes
  4709. trigger = {
  4710. has_country_flag = enclave_artist_encountered
  4711. NOR = { has_valid_civic = civic_fanatic_purifiers has_valid_civic = civic_hive_devouring_swarm has_valid_civic = civic_machine_terminator }
  4712. }
  4713. hidden_effect = {
  4714. remove_country_flag = artist_enclave_diplomacy_engaged
  4715. }
  4716. }
  4717. option = {
  4718. name = PECULIAR
  4719. trigger = {
  4720. NOT = { has_country_flag = enclave_artist_encountered }
  4721. NOR = { has_valid_civic = civic_fanatic_purifiers has_valid_civic = civic_hive_devouring_swarm has_valid_civic = civic_machine_terminator }
  4722. }
  4723. hidden_effect = {
  4724. remove_country_flag = artist_enclave_diplomacy_engaged
  4725. }
  4726. }
  4727. }
  4728. #Festival ends stuff
  4729. country_event = {
  4730. id = leviathans.314
  4731. hide_window = yes
  4732.  
  4733. is_triggered_only = yes
  4734.  
  4735. trigger = {
  4736. has_country_flag = artist_festival_purchased
  4737. }
  4738.  
  4739. immediate = {
  4740. remove_country_flag = artist_festival_purchased
  4741. }
  4742. }
  4743.  
  4744. #Patronage renewal
  4745. country_event = {
  4746. id = leviathans.319
  4747. title = leviathans.300.name
  4748. desc = leviathans.319.desc
  4749. is_triggered_only = yes
  4750. diplomatic = yes
  4751. custom_gui = "enclave_artist_window"
  4752. custom_gui_option = "enclave_artist_option"
  4753.  
  4754. picture_event_data = {
  4755. portrait = event_target:artist_enclave_country
  4756. room = enclave_artist_room
  4757. }
  4758.  
  4759. option = {
  4760. name = DEAL
  4761. trigger = {
  4762. num_pops < 61
  4763. }
  4764. #custom_tooltip = leviathans.304.a.tooltip
  4765. allow = {
  4766. resource_stockpile_compare = { resource = energy value >= 1000 }
  4767. NOT = { has_modifier = enclave_artist_patron }
  4768. }
  4769. add_resource = { energy = -1000 }
  4770. add_modifier = {
  4771. modifier = enclave_artist_patron
  4772. days = 3600
  4773. }
  4774. custom_tooltip = opinion20
  4775. event_target:artist_enclave_country = {
  4776. add_trust = {
  4777. who = root
  4778. amount = 20
  4779. }
  4780. }
  4781. hidden_effect = {
  4782. event_target:artist_enclave_country = {
  4783. add_trust = {
  4784. who = root
  4785. amount = 20
  4786. }
  4787. }
  4788. hidden_effect = {
  4789. if = {
  4790. limit = {
  4791. has_country_flag = enclave_stopped_patronage
  4792. }
  4793. remove_country_flag = enclave_stopped_patronage
  4794. }
  4795. set_country_flag = artist_patron
  4796. set_country_flag = recently_purchased_patron
  4797. #country_event = { id = leviathans.306 days = 30 } #check if still patron in a month
  4798. country_event = { id = leviathans.320 } #trigger patron followup events
  4799. country_event = { id = leviathans.308 days = 359 }
  4800. country_event = { id = leviathans.319 days = 3600 } #patronage renewal
  4801. }
  4802. }
  4803. }
  4804.  
  4805. option = {
  4806. name = DEAL
  4807. trigger = {
  4808. num_pops > 60
  4809. num_pops < 121
  4810. }
  4811. #custom_tooltip = leviathans.304.a.tooltip
  4812. allow = {
  4813. resource_stockpile_compare = { resource = energy value >= 2000 }
  4814. NOT = { has_modifier = enclave_artist_patron }
  4815. }
  4816. add_resource = { energy = -2000 }
  4817. add_modifier = {
  4818. modifier = enclave_artist_patron
  4819. days = 3600
  4820. }
  4821. custom_tooltip = opinion20
  4822. event_target:artist_enclave_country = {
  4823. add_trust = {
  4824. who = root
  4825. amount = 20
  4826. }
  4827. }
  4828. hidden_effect = {
  4829. event_target:artist_enclave_country = {
  4830. add_trust = {
  4831. who = root
  4832. amount = 20
  4833. }
  4834. }
  4835. hidden_effect = {
  4836. if = {
  4837. limit = {
  4838. has_country_flag = enclave_stopped_patronage
  4839. }
  4840. remove_country_flag = enclave_stopped_patronage
  4841. }
  4842. set_country_flag = artist_patron
  4843. set_country_flag = recently_purchased_patron
  4844. #country_event = { id = leviathans.306 days = 30 } #check if still patron in a month
  4845. country_event = { id = leviathans.320 } #trigger patron followup events
  4846. country_event = { id = leviathans.308 days = 359 }
  4847. country_event = { id = leviathans.319 days = 3600 } #patronage renewal
  4848. }
  4849. }
  4850. }
  4851.  
  4852. option = {
  4853. name = DEAL
  4854. trigger = {
  4855. num_pops > 120
  4856. num_pops < 181
  4857. }
  4858. #custom_tooltip = leviathans.304.a.tooltip
  4859. allow = {
  4860. resource_stockpile_compare = { resource = energy value >= 3000 }
  4861. NOT = { has_modifier = enclave_artist_patron }
  4862. }
  4863. add_resource = { energy = -3000 }
  4864. add_modifier = {
  4865. modifier = enclave_artist_patron
  4866. days = 3600
  4867. }
  4868. custom_tooltip = opinion20
  4869. event_target:artist_enclave_country = {
  4870. add_trust = {
  4871. who = root
  4872. amount = 20
  4873. }
  4874. }
  4875. hidden_effect = {
  4876. event_target:artist_enclave_country = {
  4877. add_trust = {
  4878. who = root
  4879. amount = 20
  4880. }
  4881. }
  4882. hidden_effect = {
  4883. if = {
  4884. limit = {
  4885. has_country_flag = enclave_stopped_patronage
  4886. }
  4887. remove_country_flag = enclave_stopped_patronage
  4888. }
  4889. set_country_flag = artist_patron
  4890. set_country_flag = recently_purchased_patron
  4891. #country_event = { id = leviathans.306 days = 30 } #check if still patron in a month
  4892. country_event = { id = leviathans.320 } #trigger patron followup events
  4893. country_event = { id = leviathans.308 days = 359 }
  4894. country_event = { id = leviathans.319 days = 3600 } #patronage renewal
  4895. }
  4896. }
  4897. }
  4898.  
  4899. option = {
  4900. name = DEAL
  4901. trigger = {
  4902. num_pops > 180
  4903. num_pops < 241
  4904. }
  4905. #custom_tooltip = leviathans.304.a.tooltip
  4906. allow = {
  4907. resource_stockpile_compare = { resource = energy value >= 4000 }
  4908. NOT = { has_modifier = enclave_artist_patron }
  4909. }
  4910. add_resource = { energy = -4000 }
  4911. add_modifier = {
  4912. modifier = enclave_artist_patron
  4913. days = 3600
  4914. }
  4915. custom_tooltip = opinion20
  4916. event_target:artist_enclave_country = {
  4917. add_trust = {
  4918. who = root
  4919. amount = 20
  4920. }
  4921. }
  4922. hidden_effect = {
  4923. event_target:artist_enclave_country = {
  4924. add_trust = {
  4925. who = root
  4926. amount = 20
  4927. }
  4928. }
  4929. hidden_effect = {
  4930. if = {
  4931. limit = {
  4932. has_country_flag = enclave_stopped_patronage
  4933. }
  4934. remove_country_flag = enclave_stopped_patronage
  4935. }
  4936. set_country_flag = artist_patron
  4937. set_country_flag = recently_purchased_patron
  4938. #country_event = { id = leviathans.306 days = 30 } #check if still patron in a month
  4939. country_event = { id = leviathans.320 } #trigger patron followup events
  4940. country_event = { id = leviathans.308 days = 359 }
  4941. country_event = { id = leviathans.319 days = 3600 } #patronage renewal
  4942. }
  4943. }
  4944. }
  4945.  
  4946. option = {
  4947. name = DEAL
  4948. trigger = {
  4949. num_pops > 240
  4950. }
  4951. #custom_tooltip = leviathans.304.a.tooltip
  4952. allow = {
  4953. resource_stockpile_compare = { resource = energy value >= 5000 }
  4954. NOT = { has_modifier = enclave_artist_patron }
  4955. }
  4956. add_resource = { energy = -5000 }
  4957. add_modifier = {
  4958. modifier = enclave_artist_patron
  4959. days = 3600
  4960. }
  4961. custom_tooltip = opinion20
  4962. event_target:artist_enclave_country = {
  4963. add_trust = {
  4964. who = root
  4965. amount = 20
  4966. }
  4967. }
  4968. hidden_effect = {
  4969. event_target:artist_enclave_country = {
  4970. add_trust = {
  4971. who = root
  4972. amount = 20
  4973. }
  4974. }
  4975. hidden_effect = {
  4976. if = {
  4977. limit = {
  4978. has_country_flag = enclave_stopped_patronage
  4979. }
  4980. remove_country_flag = enclave_stopped_patronage
  4981. }
  4982. set_country_flag = artist_patron
  4983. set_country_flag = recently_purchased_patron
  4984. #country_event = { id = leviathans.306 days = 30 } #check if still patron in a month
  4985. country_event = { id = leviathans.320 } #trigger patron followup events
  4986. country_event = { id = leviathans.308 days = 359 }
  4987. country_event = { id = leviathans.319 days = 3600 } #patronage renewal
  4988. }
  4989. }
  4990. }
  4991.  
  4992.  
  4993. option = {
  4994. name = NODEAL
  4995. default_hide_option = yes
  4996. }
  4997. }
  4998.  
  4999. #Patron Event Trigger
  5000. country_event = {
  5001. id = leviathans.320
  5002. hide_window = yes
  5003. is_triggered_only = yes
  5004.  
  5005. trigger = {
  5006. exists = event_target:artist_enclave_country
  5007. has_modifier = enclave_artist_patron
  5008. has_country_flag = artist_patron
  5009. NOR = {
  5010. has_country_flag = enclave_stopped_patronage
  5011. has_country_flag = enclave_artist_ignores
  5012. }
  5013. }
  5014.  
  5015. immediate = {
  5016. random_list = {
  5017. 20 = {
  5018. modifier = {
  5019. factor = 2
  5020. NOT = { has_country_flag = enclave_artist_patron_events }
  5021. }
  5022. modifier = {
  5023. factor = 2
  5024. check_variable = {
  5025. which = artist_newsletter
  5026. value < 5
  5027. }
  5028. }
  5029. modifier = {
  5030. factor = 0
  5031. OR = {
  5032. NOT = { has_country_flag = artist_patron }
  5033. check_variable = {
  5034. which = artist_newsletter
  5035. value > 4
  5036. }
  5037. }
  5038. }
  5039. country_event = { id = leviathans.321 days = 500 random = 1000 }
  5040. }
  5041. 20 = {
  5042. modifier = {
  5043. factor = 0
  5044. OR = {
  5045. has_country_flag = enclave_artist_patron_event_1
  5046. NOT = { has_country_flag = artist_patron }
  5047. }
  5048. }
  5049. country_event = { id = leviathans.322 days = 500 random = 1000 }
  5050. }
  5051. 20 = {
  5052. modifier = {
  5053. factor = 0
  5054. OR = {
  5055. has_country_flag = enclave_artist_patron_event_2
  5056. NOT = { has_country_flag = artist_patron }
  5057. }
  5058. }
  5059. country_event = { id = leviathans.323 days = 500 random = 1000 }
  5060. }
  5061. 20 = {
  5062. modifier = {
  5063. factor = 0
  5064. OR = {
  5065. has_country_flag = enclave_artist_patron_event_3
  5066. NOT = { has_country_flag = artist_patron }
  5067. }
  5068. }
  5069. country_event = { id = leviathans.324 days = 500 random = 1000 }
  5070. }
  5071. 20 = {
  5072. modifier = {
  5073. factor = 0.20
  5074. NOT = { has_country_flag = enclave_artist_patron_events }
  5075. }
  5076. modifier = {
  5077. factor = 1.10
  5078. has_country_flag = enclave_artist_patron_event_1
  5079. }
  5080. modifier = {
  5081. factor = 1.10
  5082. has_country_flag = enclave_artist_patron_event_2
  5083. }
  5084. modifier = {
  5085. factor = 1.10
  5086. has_country_flag = enclave_artist_patron_event_3
  5087. }
  5088. #DO NOTHING
  5089. }
  5090. }
  5091. }
  5092. }
  5093. #Patron Newsletter
  5094. country_event = {
  5095. id = leviathans.321
  5096. title = leviathans.321.name
  5097. desc = {
  5098. trigger = {
  5099. text = "leviathans.321.desc"
  5100. text = "newline"
  5101. success_text = {
  5102. text = "leviathans.321.desc.a"
  5103. check_variable = {
  5104. which = artist_newsletter
  5105. value = 1
  5106. }
  5107. }
  5108. success_text = {
  5109. text = "leviathans.321.desc.b"
  5110. check_variable = {
  5111. which = artist_newsletter
  5112. value = 2
  5113. }
  5114. }
  5115. success_text = {
  5116. text = "leviathans.321.desc.c"
  5117. check_variable = {
  5118. which = artist_newsletter
  5119. value = 3
  5120. }
  5121. }
  5122. success_text = {
  5123. text = "leviathans.321.desc.d"
  5124. check_variable = {
  5125. which = artist_newsletter
  5126. value = 4
  5127. }
  5128. }
  5129. }
  5130. }
  5131. diplomatic = yes
  5132. custom_gui = "enclave_artist_window"
  5133. custom_gui_option = "enclave_artist_option"
  5134.  
  5135. picture_event_data = {
  5136. portrait = event_target:artist_enclave_country
  5137. room = enclave_artist_room
  5138. }
  5139.  
  5140. is_triggered_only = yes
  5141.  
  5142. trigger = {
  5143. exists = event_target:artist_enclave_country
  5144. has_modifier = enclave_artist_patron
  5145. has_country_flag = artist_patron
  5146. NOR = {
  5147. has_country_flag = enclave_stopped_patronage
  5148. has_country_flag = enclave_artist_ignores
  5149. }
  5150. check_variable = {
  5151. which = artist_newsletter
  5152. value < 4
  5153. }
  5154. }
  5155.  
  5156. immediate = {
  5157. set_country_flag = enclave_artist_patron_events
  5158. if = {
  5159. limit = {
  5160. check_variable = {
  5161. which = artist_newsletter
  5162. value < 1
  5163. }
  5164. }
  5165. set_variable = {
  5166. which = artist_newsletter
  5167. value = 1
  5168. }
  5169. }
  5170. else = {
  5171. change_variable = {
  5172. which = artist_newsletter
  5173. value = 1
  5174. }
  5175. }
  5176. random_system = {
  5177. limit = {
  5178. any_system_planet = {
  5179. has_planet_flag = guardians_artists_planet
  5180. }
  5181. root = {
  5182. intel_level = {
  5183. level > none
  5184. system = prev
  5185. }
  5186. }
  5187. }
  5188. save_event_target_as = this_planet
  5189. }
  5190. }
  5191.  
  5192. option = {
  5193. name = leviathans.321.a
  5194. #response_text = leviathans.321.a.reply
  5195. add_resource = {
  5196. energy = -500
  5197. influence = 50
  5198. }
  5199. allow = {
  5200. resource_stockpile_compare = { resource = energy value >= 500 }
  5201. }
  5202. }
  5203. option = {
  5204. name = leviathans.321.c
  5205. #response_text = leviathans.321.c.reply
  5206. }
  5207. option = {
  5208. name = leviathans.321.b
  5209. #response_text = leviathans.321.b.reply
  5210. hidden_effect = {
  5211. set_variable = {
  5212. which = artist_newsletter
  5213. value = 5
  5214. }
  5215. }
  5216. }
  5217.  
  5218. after = {
  5219. hidden_effect = {
  5220. country_event = { id = leviathans.320 days = 60 random = 30 }
  5221. }
  5222. }
  5223. }
  5224. #Patron commission
  5225. country_event = {
  5226. id = leviathans.322
  5227. title = leviathans.322.name
  5228. desc = leviathans.322.desc
  5229. diplomatic = yes
  5230. custom_gui = "enclave_artist_window"
  5231. custom_gui_option = "enclave_artist_option"
  5232.  
  5233. picture_event_data = {
  5234. portrait = event_target:artist_enclave_country
  5235. room = enclave_artist_room
  5236. }
  5237.  
  5238. is_triggered_only = yes
  5239.  
  5240. trigger = {
  5241. exists = event_target:artist_enclave_country
  5242. has_modifier = enclave_artist_patron
  5243. has_country_flag = artist_patron
  5244. NOR = {
  5245. has_country_flag = enclave_stopped_patronage
  5246. has_country_flag = enclave_artist_ignores
  5247. has_country_flag = artist_building_patron
  5248. }
  5249. }
  5250.  
  5251. immediate = {
  5252. set_country_flag = enclave_artist_patron_events
  5253. set_country_flag = enclave_artist_patron_event_1
  5254. random_system = {
  5255. limit = {
  5256. any_system_planet = {
  5257. has_planet_flag = guardians_artists_planet
  5258. }
  5259. root = {
  5260. intel_level = {
  5261. level > none
  5262. system = prev
  5263. }
  5264. }
  5265. }
  5266. save_event_target_as = this_planet
  5267. }
  5268. }
  5269. option = {
  5270. name = DEAL
  5271. IF = {
  5272. limit = { NOT = { has_ethic = ethic_gestalt_consciousness } }
  5273. custom_tooltip = leviathans.322.a.tooltip
  5274. }
  5275. ELSE = { custom_tooltip = leviathans.322.a.tooltip.gesta }
  5276. #response_text = leviathans.316.a.reply
  5277. allow = {
  5278. NOT = { resource_stockpile_compare = { resource = energy value < 2000 } }
  5279. }
  5280. hidden_effect = {
  5281. add_resource = { energy = -2000 }
  5282. set_country_flag = artist_building_patron
  5283. }
  5284. }
  5285. option = {
  5286. name = TOOPOOR
  5287. trigger = {
  5288. resource_stockpile_compare = { resource = energy value < 2000 }
  5289. }
  5290. }
  5291. option = {
  5292. name = NODEAL
  5293. trigger = {
  5294. NOT = { resource_stockpile_compare = { resource = energy value < 2000 } }
  5295. }
  5296. }
  5297.  
  5298. after = {
  5299. hidden_effect = {
  5300. country_event = { id = leviathans.320 days = 100 random = 25 }
  5301. }
  5302. }
  5303. }
  5304. #I became a patron and all I got was this t-shirt
  5305. country_event = {
  5306. id = leviathans.323
  5307. title = leviathans.323.name
  5308. desc = leviathans.323.desc
  5309. diplomatic = yes
  5310. custom_gui = "enclave_artist_window"
  5311. custom_gui_option = "enclave_artist_option"
  5312.  
  5313. picture_event_data = {
  5314. portrait = event_target:artist_enclave_country
  5315. room = enclave_artist_room
  5316. }
  5317.  
  5318. is_triggered_only = yes
  5319.  
  5320. trigger = {
  5321. exists = event_target:artist_enclave_country
  5322. has_modifier = enclave_artist_patron
  5323. has_country_flag = artist_patron
  5324. NOR = {
  5325. has_country_flag = enclave_stopped_patronage
  5326. has_country_flag = enclave_artist_ignores
  5327. }
  5328. }
  5329.  
  5330. immediate = {
  5331. set_country_flag = enclave_artist_patron_events
  5332. set_country_flag = enclave_artist_patron_event_2
  5333. random_system = {
  5334. limit = {
  5335. any_system_planet = {
  5336. has_planet_flag = guardians_artists_planet
  5337. }
  5338. root = {
  5339. intel_level = {
  5340. level > none
  5341. system = prev
  5342. }
  5343. }
  5344. }
  5345. save_event_target_as = this_planet
  5346. }
  5347. }
  5348. option = {
  5349. name = leviathans.323.a
  5350. custom_tooltip = opinion10
  5351. #response_text = leviathans.323.a.reply
  5352. hidden_effect = {
  5353. event_target:artist_enclave_country = {
  5354. add_trust = {
  5355. who = root
  5356. amount = 10
  5357. }
  5358. }
  5359. country_event = { id = leviathans.320 days = 100 random = 25 }
  5360. }
  5361. }
  5362. option = {
  5363. name = leviathans.323.b
  5364. add_resource = { energy = 1000 }
  5365. custom_tooltip = opinion-3
  5366. remove_modifier = enclave_artist_patron
  5367. hidden_effect = {
  5368. event_target:artist_enclave_country = {
  5369. add_trust = {
  5370. who = root
  5371. amount = -3
  5372. }
  5373. }
  5374. }
  5375. #response_text = leviathans.323.b.reply
  5376. }
  5377. }
  5378. #Artist asks if you want some resources
  5379. country_event = {
  5380. id = leviathans.324
  5381. title = leviathans.324.name
  5382. desc = leviathans.324.desc
  5383. diplomatic = yes
  5384. custom_gui = "enclave_artist_window"
  5385. custom_gui_option = "enclave_artist_option"
  5386.  
  5387. picture_event_data = {
  5388. portrait = event_target:artist_enclave_country
  5389. room = enclave_artist_room
  5390. }
  5391.  
  5392. is_triggered_only = yes
  5393.  
  5394. trigger = {
  5395. exists = event_target:artist_enclave_country
  5396. has_modifier = enclave_artist_patron
  5397. has_country_flag = artist_patron
  5398. NOR = {
  5399. has_country_flag = enclave_stopped_patronage
  5400. has_country_flag = enclave_artist_ignores
  5401. }
  5402. }
  5403.  
  5404. immediate = {
  5405. set_country_flag = enclave_artist_patron_events
  5406. set_country_flag = enclave_artist_patron_event_3
  5407. random_system = {
  5408. limit = {
  5409. any_system_planet = {
  5410. has_planet_flag = guardians_artists_planet
  5411. }
  5412. root = {
  5413. intel_level = {
  5414. level > none
  5415. system = prev
  5416. }
  5417. }
  5418. }
  5419. save_event_target_as = this_planet
  5420. }
  5421. }
  5422. option = {
  5423. name = leviathans.324.a
  5424. add_resource = { minerals = 500 }
  5425. #response_text = leviathans.324.a.reply
  5426. }
  5427. option = {
  5428. name = leviathans.324.b
  5429. add_resource = { influence = 50 }
  5430. #response_text = leviathans.324.b.reply
  5431. }
  5432.  
  5433. after = {
  5434. hidden_effect = {
  5435. country_event = { id = leviathans.320 days = 100 random = 25 }
  5436. }
  5437. }
  5438. }
  5439. country_event = {
  5440. id = leviathans.330
  5441. hide_window = yes
  5442. is_triggered_only = yes
  5443.  
  5444. trigger = {
  5445. from = {
  5446. has_country_flag = artist_enclave_country
  5447. }
  5448. }
  5449.  
  5450. immediate = {
  5451. if = {
  5452. limit = {
  5453. OR = {
  5454. has_modifier = enclave_artist_patron
  5455. has_country_flag = artist_patron
  5456. }
  5457. }
  5458. remove_modifier = enclave_artist_patron
  5459. remove_country_flag = artist_patron
  5460. }
  5461. if = {
  5462. limit = {
  5463. NOT = { has_country_flag = enclave_artist_ignores }
  5464. }
  5465. set_country_flag = enclave_artist_ignores
  5466. }
  5467. }
  5468. }
  5469. country_event = {
  5470. id = leviathans.331
  5471. hide_window = yes
  5472. is_triggered_only = yes
  5473.  
  5474. trigger = {
  5475. has_country_flag = artist_enclave_country
  5476. }
  5477.  
  5478. immediate = {
  5479. fromfrom = {
  5480. remove_fleet_flag = artist_enclave_station
  5481. solar_system = {
  5482. remove_star_flag = guardians_artists_system
  5483. save_event_target_as = destroyed_station_location
  5484. }
  5485. if = { #Change capital
  5486. limit = { is_custom_capital_location = yes }
  5487. owner = {
  5488. random_owned_fleet = {
  5489. limit = { has_fleet_flag = artist_enclave_station }
  5490. save_event_target_as = newCustomCapital
  5491. }
  5492. set_custom_capital_location = event_target:newCustomCapital
  5493. }
  5494. }
  5495. }
  5496. every_playable_country = {
  5497. limit = {
  5498. has_communications = root
  5499. NOT = { is_same_value = from }
  5500. }
  5501. if = {
  5502. limit = {
  5503. fromfrom = {
  5504. owner = {
  5505. any_owned_fleet = {
  5506. has_fleet_flag = artist_enclave_station
  5507. }
  5508. }
  5509. }
  5510. }
  5511. country_event = { id = leviathans.332 }
  5512. }
  5513. else = {
  5514. country_event = { id = leviathans.333 }
  5515. }
  5516. }
  5517. random_playable_country = {
  5518. if = {
  5519. limit = {
  5520. fromfrom = {
  5521. owner = {
  5522. any_owned_fleet = {
  5523. has_fleet_flag = artist_enclave_station
  5524. }
  5525. }
  5526. }
  5527. }
  5528. observer_event = { id = observer.11 }
  5529. }
  5530. else = {
  5531. observer_event = { id = observer.12 }
  5532. }
  5533. }
  5534. }
  5535. }
  5536. # An artist station has been destroyed
  5537. country_event = {
  5538. id = leviathans.332
  5539. title = leviathans.300.name
  5540. desc = leviathans.332.desc
  5541. picture = GFX_evt_exploding_ship
  5542. show_sound = event_structural_collapse
  5543. location = event_target:destroyed_station_location
  5544.  
  5545. is_triggered_only = yes
  5546.  
  5547. option = {
  5548. name = WORRYING
  5549. trigger = {
  5550. NOT = { has_country_flag = enclave_artist_ignores }
  5551. }
  5552. }
  5553. option = {
  5554. name = OK
  5555. trigger = {
  5556. has_country_flag = enclave_artist_ignores
  5557. }
  5558. }
  5559. }
  5560. # All artist stations have been destroyed
  5561. country_event = {
  5562. id = leviathans.333
  5563. title = leviathans.300.name
  5564. desc = leviathans.333.desc
  5565. picture = GFX_evt_exploding_ship
  5566. show_sound = event_super_explosion
  5567. location = event_target:destroyed_station_location
  5568.  
  5569. is_triggered_only = yes
  5570.  
  5571. immediate = {
  5572. if = {
  5573. limit = {
  5574. OR = {
  5575. has_modifier = enclave_artist_patron
  5576. has_country_flag = artist_patron
  5577. }
  5578. }
  5579. remove_modifier = enclave_artist_patron
  5580. remove_country_flag = artist_patron
  5581. }
  5582. if = {
  5583. limit = {
  5584. OR = {
  5585. has_modifier = enclave_artist_festival
  5586. has_country_flag = artist_festival_purchased
  5587. }
  5588. }
  5589. remove_modifier = enclave_artist_festival
  5590. remove_country_flag = artist_festival_purchased
  5591. }
  5592. }
  5593.  
  5594. option = {
  5595. name = TERRIBLE
  5596. custom_tooltip = leviathans.307.a.tooltip
  5597. trigger = {
  5598. NOT = { has_country_flag = enclave_artist_ignores }
  5599. }
  5600. }
  5601. option = {
  5602. name = OK
  5603. custom_tooltip = leviathans.307.a.tooltip
  5604. trigger = {
  5605. has_country_flag = enclave_artist_ignores
  5606. }
  5607. }
  5608. }
  5609. # You destroyed an artist station
  5610. country_event = {
  5611. id = leviathans.334
  5612. title = leviathans.300.name
  5613. desc = {
  5614. trigger = {
  5615. switch = {
  5616. trigger = has_country_flag
  5617. enclave_artist_encountered = { text = leviathans.334.desc }
  5618. default = { text = leviathans.334.desc.unknown }
  5619. }
  5620. }
  5621. }
  5622. picture = GFX_evt_exploding_ship
  5623. show_sound = event_structural_collapse
  5624. location = fromfrom
  5625.  
  5626. is_triggered_only = yes
  5627.  
  5628. immediate = {
  5629. set_country_flag = destroyed_artist
  5630. fromfrom = {
  5631. solar_system = {
  5632. save_event_target_as = station_system
  5633. }
  5634. }
  5635. }
  5636.  
  5637. trigger = {
  5638. from = {
  5639. has_country_flag = artist_enclave_country
  5640. }
  5641. }
  5642.  
  5643. option = {
  5644. name = EXCELLENT
  5645. add_resource = {
  5646. energy = 2000
  5647. minerals = 2000
  5648. }
  5649. }
  5650. }
  5651.  
  5652. # Art College
  5653. country_event = {
  5654. id = leviathans.340
  5655. title = leviathans.340.name
  5656. desc = leviathans.340.desc
  5657.  
  5658. is_triggered_only = yes
  5659. diplomatic = yes
  5660. custom_gui = "enclave_artist_window"
  5661. custom_gui_option = "enclave_artist_option"
  5662.  
  5663. picture_event_data = {
  5664. portrait = event_target:artist_enclave_country
  5665. room = enclave_artist_room
  5666. }
  5667.  
  5668. immediate = {
  5669. set_country_flag = artist_enclave_diplomacy_engaged
  5670. random_system_within_border = {
  5671. limit = {
  5672. any_ship_in_system = {
  5673. exists = owner
  5674. owner = {
  5675. is_same_value = event_target:artist_enclave_country
  5676. }
  5677. }
  5678. }
  5679. save_event_target_as = artist_system
  5680. }
  5681. event_target:artist_enclave_country = {
  5682. set_country_flag = art_college@root
  5683. }
  5684. }
  5685.  
  5686. after = {
  5687. hidden_effect = {
  5688. remove_country_flag = artist_enclave_diplomacy_engaged
  5689. country_event = { id = leviathans.300 }
  5690. }
  5691. }
  5692.  
  5693. option = { # Back
  5694. name = leviathans.340.a
  5695. hidden_effect = {
  5696. set_country_flag = artist_enclave_diplomacy_continued
  5697. }
  5698. }
  5699. }
  5700.  
  5701. # Curator Main Menu (Initial)
  5702. country_event = {
  5703. id = leviathans.500
  5704. title = leviathans.500.name
  5705. desc = leviathans.500a.desc
  5706. desc = leviathans.500b.desc
  5707. desc = leviathans.500c.desc
  5708. desc = leviathans.500d.desc
  5709. desc = leviathans.500e.desc
  5710. desc = leviathans.500f.desc
  5711. desc = leviathans.500g.desc
  5712. desc = leviathans.500h.desc
  5713. desc = leviathans.500i.desc
  5714. desc = leviathans.500j.desc
  5715. desc = leviathans.500k.desc
  5716. desc = leviathans.500l.desc
  5717.  
  5718. is_triggered_only = yes
  5719. diplomatic = yes
  5720. custom_gui = "enclave_curator_window"
  5721. force_open = yes
  5722.  
  5723. picture_event_data = {
  5724. portrait = from
  5725. room = enclave_curator_room
  5726. }
  5727.  
  5728. trigger = {
  5729. from = {
  5730. is_country_type = enclave
  5731. has_country_flag = curator_enclave_country
  5732. }
  5733. NOT = { has_country_flag = curator_enclave_diplomacy_engaged }
  5734. NOT = { has_country_flag = attacked_curators }
  5735. }
  5736.  
  5737. immediate = {
  5738. set_country_flag = curator_enclave_diplomacy_engaged
  5739. FROM = { save_event_target_as = curators }
  5740. }
  5741.  
  5742. after = {
  5743. hidden_effect = {
  5744. remove_country_flag = curator_enclave_diplomacy_engaged
  5745. }
  5746. }
  5747.  
  5748. option = {
  5749. name = SCUM
  5750. trigger = { has_valid_civic = civic_fanatic_purifiers }
  5751. custom_gui = "enclave_curator_option"
  5752. hidden_effect = {
  5753. remove_country_flag = curator_enclave_diplomacy_engaged
  5754. }
  5755. }
  5756.  
  5757. option = {
  5758. name = TASTY
  5759. trigger = { has_valid_civic = civic_hive_devouring_swarm }
  5760. custom_gui = "enclave_curator_option"
  5761. hidden_effect = {
  5762. remove_country_flag = curator_enclave_diplomacy_engaged
  5763. }
  5764. }
  5765.  
  5766. option = {
  5767. name = EXTERMINATE
  5768. trigger = { has_valid_civic = civic_machine_terminator }
  5769. custom_gui = "enclave_curator_option"
  5770. hidden_effect = {
  5771. remove_country_flag = curator_enclave_diplomacy_engaged
  5772. }
  5773. }
  5774.  
  5775. option = { # Research
  5776. name = leviathans.500.b
  5777. custom_gui = "enclave_curator_option"
  5778. trigger = { NOR = { has_valid_civic = civic_fanatic_purifiers has_valid_civic = civic_hive_devouring_swarm has_valid_civic = civic_machine_terminator } }
  5779. allow = {
  5780. custom_tooltip = {
  5781. fail_text = leviathans.500.b.alreadyaided
  5782. NOT = { has_modifier = curator_insight }
  5783. }
  5784. }
  5785. hidden_effect = {
  5786. country_event = { id = leviathans.507 }
  5787. }
  5788. }
  5789.  
  5790. option = { # Guardians
  5791. name = leviathans.500.c
  5792. custom_gui = "enclave_curator_option"
  5793. trigger = { NOR = { has_valid_civic = civic_fanatic_purifiers has_valid_civic = civic_hive_devouring_swarm has_valid_civic = civic_machine_terminator } }
  5794. hidden_effect = {
  5795. country_event = { id = leviathans.508 }
  5796. }
  5797. }
  5798.  
  5799. option = { # Hire Scientist
  5800. name = leviathans.500.d
  5801. custom_gui = "enclave_curator_option"
  5802. trigger = { NOR = { has_valid_civic = civic_fanatic_purifiers has_valid_civic = civic_hive_devouring_swarm has_valid_civic = civic_machine_terminator } }
  5803. allow = {
  5804. custom_tooltip = {
  5805. fail_text = leviathans.500.d.opinion
  5806. event_target:curators = {
  5807. trust = {
  5808. who = root
  5809. value >= 50
  5810. }
  5811. }
  5812. }
  5813. custom_tooltip = {
  5814. fail_text = leviathans.500.d.alreadyrecruited
  5815. NOT = {
  5816. any_owned_leader = { has_trait = leader_trait_curator }
  5817. }
  5818. }
  5819. }
  5820. hidden_effect = {
  5821. country_event = { id = leviathans.590 }
  5822. }
  5823. }
  5824.  
  5825. option = { # Think Tank
  5826. name = leviathans.500.f
  5827. custom_gui = "enclave_curator_option"
  5828. trigger = {
  5829. NOR = { has_valid_civic = civic_fanatic_purifiers has_valid_civic = civic_hive_devouring_swarm has_valid_civic = civic_machine_terminator }
  5830. NOT = {
  5831. event_target:curators = { has_country_flag = think_tank@root }
  5832. }
  5833. any_system_within_border = {
  5834. has_star_flag = enclave
  5835. any_ship_in_system = {
  5836. exists = owner
  5837. owner = {
  5838. is_same_value = event_target:curators
  5839. }
  5840. }
  5841. }
  5842. }
  5843. allow = {
  5844. custom_tooltip = {
  5845. fail_text = leviathans.500.d.opinion
  5846. event_target:curators = {
  5847. trust = {
  5848. who = root
  5849. value >= 50
  5850. }
  5851. }
  5852. }
  5853. }
  5854. hidden_effect = {
  5855. country_event = { id = leviathans.511 }
  5856. }
  5857. }
  5858.  
  5859. option = {
  5860. name = leviathans.500.e
  5861. default_hide_option = yes
  5862. custom_gui = "enclave_curator_option"
  5863. trigger = { NOR = { has_valid_civic = civic_fanatic_purifiers has_valid_civic = civic_hive_devouring_swarm has_valid_civic = civic_machine_terminator } }
  5864. hidden_effect = {
  5865. remove_country_flag = curator_enclave_diplomacy_engaged
  5866. }
  5867. }
  5868. # Available after finishing Infinity Sphere chain
  5869. option = {
  5870. name = leviathans.500.g
  5871. custom_gui = "enclave_curator_option"
  5872. trigger = {
  5873. has_country_flag = pantagruel
  5874. has_country_flag = asked_about_infinity_machine
  5875. NOT = { has_country_flag = offered_information }
  5876. }
  5877. hidden_effect = {
  5878. country_event = { id = leviathans.4000 }
  5879. }
  5880. }
  5881.  
  5882. # L-Cluster clue
  5883. option = {
  5884. name = distar.11500.a
  5885. custom_gui = "enclave_curator_option"
  5886. trigger = {
  5887. has_event_chain = l_cluster_chain
  5888. NOR = {
  5889. is_homicidal = yes
  5890. has_global_flag = l_cluster_opened
  5891. has_completed_event_chain_counter = {
  5892. event_chain = l_cluster_chain
  5893. counter = clues
  5894. }
  5895. }
  5896. }
  5897. allow = {
  5898. custom_tooltip = {
  5899. fail_text = distar.11500.a.tooltip.noclue
  5900. NOT = { has_country_flag = curator_clue_purchased }
  5901. }
  5902. }
  5903. hidden_effect = {
  5904. country_event = { id = distar.11501 }
  5905. }
  5906. }
  5907. }
  5908.  
  5909. country_event = {
  5910. id = leviathans.4000
  5911. title = leviathans.4000.name
  5912. desc = leviathans.4000.desc
  5913.  
  5914. is_triggered_only = yes
  5915. diplomatic = yes
  5916. custom_gui = "enclave_curator_window"
  5917.  
  5918. picture_event_data = {
  5919. portrait = event_target:curators
  5920. room = enclave_curator_room
  5921. }
  5922.  
  5923. immediate = {
  5924. set_country_flag = curator_enclave_diplomacy_engaged
  5925. if = {
  5926. limit = {
  5927. any_country = {
  5928. is_country_type = default
  5929. NOT = {
  5930. is_same_value = root
  5931. }
  5932. OR = {
  5933. is_hostile_to = root
  5934. is_domineering_to = root
  5935. is_unfriendly_to = root
  5936. root = {
  5937. OR = {
  5938. is_hostile_to = prev
  5939. is_domineering_to = prev
  5940. is_unfriendly_to = prev
  5941. }
  5942. }
  5943. }
  5944. }
  5945. }
  5946. random_country = {
  5947. limit = {
  5948. any_country = {
  5949. is_country_type = default
  5950. NOT = {
  5951. is_same_value = root
  5952. }
  5953. OR = {
  5954. is_hostile_to = root
  5955. is_domineering_to = root
  5956. is_unfriendly_to = root
  5957. root = {
  5958. OR = {
  5959. is_hostile_to = prev
  5960. is_domineering_to = prev
  5961. is_unfriendly_to = prev
  5962. }
  5963. }
  5964. }
  5965. }
  5966. }
  5967. save_event_target_as = unfriends
  5968. }
  5969. }
  5970. else_if = {
  5971. random_country = {
  5972. limit = {
  5973. is_country_type = default
  5974. NOT = {
  5975. is_same_value = root
  5976. }
  5977. has_communications = root
  5978. }
  5979. save_event_target_as = unfriends
  5980. }
  5981. }
  5982. }
  5983.  
  5984. after = {
  5985. hidden_effect = {
  5986. remove_country_flag = curator_enclave_diplomacy_engaged
  5987. }
  5988. }
  5989.  
  5990. option = {
  5991. name = leviathans.4000.a
  5992. response_text = leviathans.4000.a.reply
  5993. set_country_flag = offered_information
  5994. custom_gui = "enclave_curator_option"
  5995. add_monthly_resource_mult = {
  5996. resource = engineering_research
  5997. value = @tier4researchreward
  5998. min = @tier4researchmin
  5999. max = @tier4researchmax
  6000. }
  6001. }
  6002.  
  6003. option = {
  6004. name = leviathans.4000.b
  6005. response_text = leviathans.4000.b.reply
  6006. custom_gui = "enclave_curator_option"
  6007. set_country_flag = offered_information
  6008. }
  6009.  
  6010. option = {
  6011. name = leviathans.500.e
  6012. default_hide_option = yes
  6013. custom_gui = "enclave_curator_option"
  6014. hidden_effect = {
  6015. remove_country_flag = curator_enclave_diplomacy_engaged
  6016. }
  6017. }
  6018. }
  6019.  
  6020. # Curator Main Menu
  6021. country_event = {
  6022. id = leviathans.505
  6023. title = leviathans.500.name
  6024. desc = leviathans.500a.desc
  6025. desc = leviathans.500b.desc
  6026. desc = leviathans.500c.desc
  6027. desc = leviathans.500d.desc
  6028. desc = leviathans.500e.desc
  6029. desc = leviathans.500f.desc
  6030. desc = leviathans.500g.desc
  6031. desc = leviathans.500h.desc
  6032. desc = leviathans.500i.desc
  6033. desc = leviathans.500j.desc
  6034. desc = leviathans.500k.desc
  6035. desc = leviathans.500l.desc
  6036.  
  6037. is_triggered_only = yes
  6038. diplomatic = yes
  6039. custom_gui = "enclave_curator_window"
  6040.  
  6041. picture_event_data = {
  6042. portrait = event_target:curators
  6043. room = enclave_curator_room
  6044. }
  6045.  
  6046. trigger = {
  6047. NOT = { has_country_flag = curator_enclave_diplomacy_engaged }
  6048. }
  6049.  
  6050. immediate = {
  6051. set_country_flag = curator_enclave_diplomacy_engaged
  6052. }
  6053.  
  6054. after = {
  6055. hidden_effect = {
  6056. remove_country_flag = curator_enclave_diplomacy_engaged
  6057. }
  6058. }
  6059.  
  6060. option = { # Research
  6061. name = leviathans.500.b
  6062. custom_gui = "enclave_curator_option"
  6063. allow = {
  6064. custom_tooltip = {
  6065. fail_text = leviathans.500.b.alreadyaided
  6066. NOT = { has_modifier = curator_insight }
  6067. }
  6068. }
  6069. hidden_effect = {
  6070. country_event = { id = leviathans.507 }
  6071. }
  6072. }
  6073.  
  6074. option = { # Guardians
  6075. name = leviathans.500.c
  6076. custom_gui = "enclave_curator_option"
  6077. hidden_effect = {
  6078. country_event = { id = leviathans.508 }
  6079. }
  6080. }
  6081.  
  6082. option = { # Hire Scientist
  6083. name = leviathans.500.d
  6084. custom_gui = "enclave_curator_option"
  6085. allow = {
  6086. custom_tooltip = {
  6087. fail_text = leviathans.500.d.opinion
  6088. event_target:curators = {
  6089. trust = {
  6090. who = root
  6091. value >= 50
  6092. }
  6093. }
  6094. }
  6095. custom_tooltip = {
  6096. fail_text = leviathans.500.d.alreadyrecruited
  6097. NOT = {
  6098. any_owned_leader = { has_trait = leader_trait_curator }
  6099. }
  6100. }
  6101. }
  6102. hidden_effect = {
  6103. country_event = { id = leviathans.590 }
  6104. }
  6105. }
  6106.  
  6107. option = { # Think Tank
  6108. name = leviathans.500.f
  6109. custom_gui = "enclave_curator_option"
  6110. trigger = {
  6111. any_system_within_border = {
  6112. has_star_flag = enclave
  6113. any_ship_in_system = {
  6114. exists = owner
  6115. owner = {
  6116. is_same_value = event_target:curators
  6117. }
  6118. }
  6119. }
  6120. }
  6121. allow = {
  6122. custom_tooltip = {
  6123. fail_text = leviathans.500.d.opinion
  6124. event_target:curators = {
  6125. trust = {
  6126. who = root
  6127. value >= 50
  6128. }
  6129. }
  6130. }
  6131. }
  6132. hidden_effect = {
  6133. country_event = { id = leviathans.511 }
  6134. }
  6135. }
  6136.  
  6137. option = {
  6138. name = leviathans.500.e
  6139. default_hide_option = yes
  6140. custom_gui = "enclave_curator_option"
  6141. hidden_effect = {
  6142. remove_country_flag = curator_enclave_diplomacy_engaged
  6143. }
  6144. }
  6145.  
  6146. option = {
  6147. name = leviathans.500.g
  6148. custom_gui = "enclave_curator_option"
  6149. trigger = {
  6150. has_country_flag = pantagruel
  6151. has_country_flag = asked_about_infinity_machine
  6152. NOT = { has_country_flag = offered_information }
  6153. }
  6154. hidden_effect = {
  6155. country_event = { id = leviathans.4000 }
  6156. }
  6157. }
  6158.  
  6159. option = {
  6160. name = distar.11500.a
  6161. custom_gui = "enclave_curator_option"
  6162. trigger = {
  6163. has_event_chain = l_cluster_chain
  6164. NOR = {
  6165. is_homicidal = yes
  6166. has_global_flag = l_cluster_opened
  6167. has_completed_event_chain_counter = {
  6168. event_chain = l_cluster_chain
  6169. counter = clues
  6170. }
  6171. }
  6172. }
  6173. allow = {
  6174. custom_tooltip = {
  6175. fail_text = distar.11500.a.tooltip.noclue
  6176. NOT = { has_country_flag = curator_clue_purchased }
  6177. }
  6178. }
  6179. hidden_effect = {
  6180. country_event = { id = distar.11501 }
  6181. }
  6182. }
  6183. }
  6184.  
  6185. # Curator Research Aid Menu
  6186. country_event = {
  6187. id = leviathans.507
  6188. title = leviathans.507.name
  6189. desc = leviathans.507.desc
  6190.  
  6191. is_triggered_only = yes
  6192. diplomatic = yes
  6193. custom_gui = "enclave_curator_window"
  6194.  
  6195. picture_event_data = {
  6196. portrait = event_target:curators
  6197. room = enclave_curator_room
  6198. }
  6199.  
  6200. immediate = {
  6201. set_country_flag = curator_enclave_diplomacy_engaged
  6202. }
  6203.  
  6204. after = {
  6205. hidden_effect = {
  6206. remove_country_flag = curator_enclave_diplomacy_engaged
  6207. }
  6208. }
  6209.  
  6210. option = {
  6211. name = leviathans.507.a
  6212. response_text = leviathans.507.a.reply
  6213. custom_gui = "enclave_curator_option"
  6214. trigger = { num_pops < 61 }
  6215. allow = {
  6216. resource_stockpile_compare = { resource = energy value >= 1000 }
  6217. hidden_trigger = {
  6218. NOT = { has_country_flag = attacked_curators }
  6219. }
  6220. }
  6221. add_resource = { energy = -1000 }
  6222. custom_tooltip = opinion20
  6223. add_modifier = {
  6224. modifier = curator_insight
  6225. days = 3600
  6226. }
  6227. hidden_effect = {
  6228. event_target:curators = {
  6229. add_trust = {
  6230. who = root
  6231. amount = 20
  6232. }
  6233. }
  6234. set_relation_flag = {
  6235. who = event_target:curators
  6236. flag = curator_trade
  6237. }
  6238. country_event = { id = leviathans.509 days = 3600 }
  6239. }
  6240. }
  6241.  
  6242. option = {
  6243. name = leviathans.507.a
  6244. response_text = leviathans.507.a.reply
  6245. custom_gui = "enclave_curator_option"
  6246. trigger = {
  6247. num_pops > 60
  6248. num_pops < 121
  6249. }
  6250. allow = {
  6251. resource_stockpile_compare = { resource = energy value >= 2000 }
  6252. hidden_trigger = {
  6253. NOT = { has_country_flag = attacked_curators }
  6254. }
  6255. }
  6256. add_resource = { energy = -2000 }
  6257. add_modifier = {
  6258. modifier = curator_insight
  6259. days = 3600
  6260. }
  6261. custom_tooltip = opinion20
  6262. hidden_effect = {
  6263. event_target:curators = {
  6264. add_trust = {
  6265. who = root
  6266. amount = 20
  6267. }
  6268. }
  6269. set_relation_flag = {
  6270. who = event_target:curators
  6271. flag = curator_trade
  6272. }
  6273. country_event = { id = leviathans.509 days = 3600 }
  6274. }
  6275. }
  6276.  
  6277. option = {
  6278. name = leviathans.507.a
  6279. response_text = leviathans.507.a.reply
  6280. custom_gui = "enclave_curator_option"
  6281. trigger = {
  6282. num_pops > 120
  6283. num_pops < 181
  6284. }
  6285. allow = {
  6286. resource_stockpile_compare = { resource = energy value >= 3000 }
  6287. hidden_trigger = {
  6288. NOT = { has_country_flag = attacked_curators }
  6289. }
  6290. }
  6291. add_resource = { energy = -3000 }
  6292. add_modifier = {
  6293. modifier = curator_insight
  6294. days = 3600
  6295. }
  6296. custom_tooltip = opinion20
  6297. hidden_effect = {
  6298. event_target:curators = {
  6299. add_trust = {
  6300. who = root
  6301. amount = 20
  6302. }
  6303. }
  6304. set_relation_flag = {
  6305. who = event_target:curators
  6306. flag = curator_trade
  6307. }
  6308. country_event = { id = leviathans.509 days = 3600 }
  6309. }
  6310. }
  6311.  
  6312. option = {
  6313. name = leviathans.507.a
  6314. response_text = leviathans.507.a.reply
  6315. custom_gui = "enclave_curator_option"
  6316. trigger = {
  6317. num_pops > 180
  6318. num_pops < 241
  6319. }
  6320. allow = {
  6321. resource_stockpile_compare = { resource = energy value >= 4000 }
  6322. hidden_trigger = {
  6323. NOT = { has_country_flag = attacked_curators }
  6324. }
  6325. }
  6326. add_resource = { energy = -4000 }
  6327. add_modifier = {
  6328. modifier = curator_insight
  6329. days = 3600
  6330. }
  6331. custom_tooltip = opinion20
  6332. hidden_effect = {
  6333. event_target:curators = {
  6334. add_trust = {
  6335. who = root
  6336. amount = 20
  6337. }
  6338. }
  6339. set_relation_flag = {
  6340. who = event_target:curators
  6341. flag = curator_trade
  6342. }
  6343. country_event = { id = leviathans.509 days = 3600 }
  6344. }
  6345. }
  6346.  
  6347. option = {
  6348. name = leviathans.507.a
  6349. response_text = leviathans.507.a.reply
  6350. custom_gui = "enclave_curator_option"
  6351. trigger = { num_pops > 240 }
  6352. allow = {
  6353. resource_stockpile_compare = { resource = energy value >= 5000 }
  6354. hidden_trigger = {
  6355. NOT = { has_country_flag = attacked_curators }
  6356. }
  6357. }
  6358. add_resource = { energy = -5000 }
  6359. add_modifier = {
  6360. modifier = curator_insight
  6361. days = 3600
  6362. }
  6363. custom_tooltip = opinion20
  6364. hidden_effect = {
  6365. event_target:curators = {
  6366. add_trust = {
  6367. who = root
  6368. amount = 20
  6369. }
  6370. }
  6371. set_relation_flag = {
  6372. who = event_target:curators
  6373. flag = curator_trade
  6374. }
  6375. country_event = { id = leviathans.509 days = 3600 }
  6376. }
  6377. }
  6378. option = { # Back
  6379. name = leviathans.506.d
  6380. custom_gui = "enclave_curator_option"
  6381. hidden_effect = {
  6382. country_event = { id = leviathans.505 }
  6383. }
  6384. }
  6385. option = { # Sign Off
  6386. name = leviathans.506.e
  6387. custom_gui = "enclave_curator_option"
  6388. default_hide_option = yes
  6389. }
  6390. }
  6391.  
  6392. # Curator Guardians Menu
  6393. country_event = {
  6394. id = leviathans.508
  6395. title = leviathans.508.name
  6396. desc = leviathans.508.desc
  6397.  
  6398. is_triggered_only = yes
  6399. diplomatic = yes
  6400. custom_gui = "enclave_curator_window"
  6401.  
  6402. picture_event_data = {
  6403. portrait = event_target:curators
  6404. room = enclave_curator_room
  6405. }
  6406.  
  6407. immediate = {
  6408. set_country_flag = curator_enclave_diplomacy_engaged
  6409. }
  6410.  
  6411. after = {
  6412. hidden_effect = {
  6413. remove_country_flag = curator_enclave_diplomacy_engaged
  6414. }
  6415. }
  6416.  
  6417. # "Find" option
  6418. option = {
  6419. name = leviathans.508.a
  6420. response_text = leviathans.508.a.reply
  6421. custom_gui = "enclave_curator_option"
  6422. custom_tooltip = opinion10
  6423. trigger = {
  6424. event_target:curators = { #debug_scope_type = country
  6425. any_owned_fleet = {
  6426. closest_system = {
  6427. min_steps = 0
  6428. max_steps = 999
  6429. limit = {
  6430. has_star_flag = guardian
  6431. any_ship_in_system = {
  6432. exists = owner
  6433. owner = {
  6434. NOT = {
  6435. has_communications = root
  6436. }
  6437. OR = {
  6438. is_country_type = guardian
  6439. is_country_type = guardian_dragon
  6440. is_country_type = guardian_sphere
  6441. is_country_type = guardian_wraith
  6442. is_country_type = guardian_horror
  6443. is_country_type = guardian_fortress
  6444. is_country_type = guardian_hiver
  6445. is_country_type = guardian_stellarite
  6446. is_country_type = guardian_dreadnought
  6447. is_country_type = guardian_hatchling
  6448. }
  6449. }
  6450. }
  6451. NOR = {
  6452. is_point_of_interest = {
  6453. id = curator_poi_dragon
  6454. owner = root
  6455. event_chain = curator_poi_chain
  6456. }
  6457. is_point_of_interest = {
  6458. id = curator_poi_technosphere
  6459. owner = root
  6460. event_chain = curator_poi_chain
  6461. }
  6462. is_point_of_interest = {
  6463. id = curator_poi_wraith
  6464. owner = root
  6465. event_chain = curator_poi_chain
  6466. }
  6467. is_point_of_interest = {
  6468. id = curator_poi_horror
  6469. owner = root
  6470. event_chain = curator_poi_chain
  6471. }
  6472. is_point_of_interest = {
  6473. id = curator_poi_fortress
  6474. owner = root
  6475. event_chain = curator_poi_chain
  6476. }
  6477. is_point_of_interest = {
  6478. id = curator_poi_hiver
  6479. owner = root
  6480. event_chain = curator_poi_chain
  6481. }
  6482. is_point_of_interest = {
  6483. id = curator_poi_stellarite
  6484. owner = root
  6485. event_chain = curator_poi_chain
  6486. }
  6487. is_point_of_interest = {
  6488. id = curator_poi_dreadnought
  6489. owner = root
  6490. event_chain = curator_poi_chain
  6491. }
  6492. is_point_of_interest = {
  6493. id = curator_poi_hatchling
  6494. owner = root
  6495. event_chain = curator_poi_chain
  6496. }
  6497. }
  6498. }
  6499. }
  6500. }
  6501. }
  6502. }
  6503. allow = {
  6504. resource_stockpile_compare = { resource = energy value >= 300 }
  6505. }
  6506. add_resource = { energy = -300 }
  6507. hidden_effect = {
  6508. event_target:curators = {
  6509. add_trust = {
  6510. who = root
  6511. amount = 10
  6512. }
  6513. }
  6514. event_target:curators = {
  6515. random_owned_fleet = {
  6516. limit = {}
  6517. closest_system = {
  6518. min_steps = 0
  6519. max_steps = 999
  6520. limit = {
  6521. has_star_flag = guardian
  6522. any_ship_in_system = {
  6523. exists = owner
  6524. owner = {
  6525. is_guardian_country = yes
  6526. NOT = {
  6527. has_communications = root
  6528. }
  6529. }
  6530. }
  6531. NOR = {
  6532. is_point_of_interest = {
  6533. id = curator_poi_dragon
  6534. owner = root
  6535. event_chain = curator_poi_chain
  6536. }
  6537. is_point_of_interest = {
  6538. id = curator_poi_technosphere
  6539. owner = root
  6540. event_chain = curator_poi_chain
  6541. }
  6542. is_point_of_interest = {
  6543. id = curator_poi_wraith
  6544. owner = root
  6545. event_chain = curator_poi_chain
  6546. }
  6547. is_point_of_interest = {
  6548. id = curator_poi_horror
  6549. owner = root
  6550. event_chain = curator_poi_chain
  6551. }
  6552. is_point_of_interest = {
  6553. id = curator_poi_fortress
  6554. owner = root
  6555. event_chain = curator_poi_chain
  6556. }
  6557. is_point_of_interest = {
  6558. id = curator_poi_hiver
  6559. owner = root
  6560. event_chain = curator_poi_chain
  6561. }
  6562. is_point_of_interest = {
  6563. id = curator_poi_stellarite
  6564. owner = root
  6565. event_chain = curator_poi_chain
  6566. }
  6567. is_point_of_interest = {
  6568. id = curator_poi_dreadnought
  6569. owner = root
  6570. event_chain = curator_poi_chain
  6571. }
  6572. is_point_of_interest = {
  6573. id = curator_poi_hatchling
  6574. owner = root
  6575. event_chain = curator_poi_chain
  6576. }
  6577. }
  6578. }
  6579. if = {
  6580. limit = {
  6581. any_ship_in_system = {
  6582. exists = owner
  6583. owner = {
  6584. NOT = {
  6585. has_communications = root
  6586. }
  6587. is_country_type = guardian_dragon
  6588. }
  6589. }
  6590. }
  6591. root = {
  6592. if = {
  6593. limit = {
  6594. NOT = {
  6595. has_event_chain = curator_poi_chain
  6596. }
  6597. }
  6598. begin_event_chain = {
  6599. event_chain = curator_poi_chain
  6600. target = this
  6601. }
  6602. }
  6603. create_point_of_interest = {
  6604. id = curator_poi_dragon
  6605. name = curator_poi_title
  6606. desc = curator_poi_desc
  6607. event_chain = curator_poi_chain
  6608. location = prev
  6609. }
  6610. }
  6611. break = yes
  6612. }
  6613. if = {
  6614. limit = {
  6615. any_ship_in_system = {
  6616. exists = owner
  6617. owner = {
  6618. NOT = {
  6619. has_communications = root
  6620. }
  6621. is_country_type = guardian_sphere
  6622. }
  6623. }
  6624. }
  6625. root = {
  6626. if = {
  6627. limit = {
  6628. NOT = {
  6629. has_event_chain = curator_poi_chain
  6630. }
  6631. }
  6632. begin_event_chain = {
  6633. event_chain = curator_poi_chain
  6634. target = this
  6635. }
  6636. }
  6637. create_point_of_interest = {
  6638. id = curator_poi_technosphere
  6639. name = curator_poi_title
  6640. desc = curator_poi_desc
  6641. event_chain = curator_poi_chain
  6642. location = prev
  6643. }
  6644. }
  6645. break = yes
  6646. }
  6647. if = {
  6648. limit = {
  6649. any_ship_in_system = {
  6650. exists = owner
  6651. owner = {
  6652. NOT = {
  6653. has_communications = root
  6654. }
  6655. is_country_type = guardian_horror
  6656. }
  6657. }
  6658. }
  6659. root = {
  6660. if = {
  6661. limit = {
  6662. NOT = {
  6663. has_event_chain = curator_poi_chain
  6664. }
  6665. }
  6666. begin_event_chain = {
  6667. event_chain = curator_poi_chain
  6668. target = this
  6669. }
  6670. }
  6671. create_point_of_interest = {
  6672. id = curator_poi_horror
  6673. name = curator_poi_title
  6674. desc = curator_poi_desc
  6675. event_chain = curator_poi_chain
  6676. location = prev
  6677. }
  6678. }
  6679. break = yes
  6680. }
  6681. if = {
  6682. limit = {
  6683. any_ship_in_system = {
  6684. exists = owner
  6685. owner = {
  6686. NOT = {
  6687. has_communications = root
  6688. }
  6689. is_country_type = guardian_stellarite
  6690. }
  6691. }
  6692. }
  6693. root = {
  6694. if = {
  6695. limit = {
  6696. NOT = {
  6697. has_event_chain = curator_poi_chain
  6698. }
  6699. }
  6700. begin_event_chain = {
  6701. event_chain = curator_poi_chain
  6702. target = this
  6703. }
  6704. }
  6705. create_point_of_interest = {
  6706. id = curator_poi_stellarite
  6707. name = curator_poi_title
  6708. desc = curator_poi_desc
  6709. event_chain = curator_poi_chain
  6710. location = prev
  6711. }
  6712. }
  6713. break = yes
  6714. }
  6715. if = {
  6716. limit = {
  6717. any_ship_in_system = {
  6718. exists = owner
  6719. owner = {
  6720. NOT = {
  6721. has_communications = root
  6722. }
  6723. is_country_type = guardian_hiver
  6724. }
  6725. }
  6726. }
  6727. root = {
  6728. if = {
  6729. limit = {
  6730. NOT = {
  6731. has_event_chain = curator_poi_chain
  6732. }
  6733. }
  6734. begin_event_chain = {
  6735. event_chain = curator_poi_chain
  6736. target = this
  6737. }
  6738. }
  6739. create_point_of_interest = {
  6740. id = curator_poi_hiver
  6741. name = curator_poi_title
  6742. desc = curator_poi_desc
  6743. event_chain = curator_poi_chain
  6744. location = prev
  6745. }
  6746. }
  6747. break = yes
  6748. }
  6749. if = {
  6750. limit = {
  6751. any_ship_in_system = {
  6752. exists = owner
  6753. owner = {
  6754. NOT = {
  6755. has_communications = root
  6756. }
  6757. is_country_type = guardian_fortress
  6758. }
  6759. }
  6760. }
  6761. root = {
  6762. if = {
  6763. limit = {
  6764. NOT = {
  6765. has_event_chain = curator_poi_chain
  6766. }
  6767. }
  6768. begin_event_chain = {
  6769. event_chain = curator_poi_chain
  6770. target = this
  6771. }
  6772. }
  6773. create_point_of_interest = {
  6774. id = curator_poi_fortress
  6775. name = curator_poi_title
  6776. desc = curator_poi_desc
  6777. event_chain = curator_poi_chain
  6778. location = prev
  6779. }
  6780. }
  6781. break = yes
  6782. }
  6783. if = {
  6784. limit = {
  6785. any_ship_in_system = {
  6786. exists = owner
  6787. owner = {
  6788. NOT = {
  6789. has_communications = root
  6790. }
  6791. is_country_type = guardian_wraith
  6792. }
  6793. }
  6794. }
  6795. root = {
  6796. if = {
  6797. limit = {
  6798. NOT = {
  6799. has_event_chain = curator_poi_chain
  6800. }
  6801. }
  6802. begin_event_chain = {
  6803. event_chain = curator_poi_chain
  6804. target = this
  6805. }
  6806. }
  6807. create_point_of_interest = {
  6808. id = curator_poi_wraith
  6809. name = curator_poi_title
  6810. desc = curator_poi_desc
  6811. event_chain = curator_poi_chain
  6812. location = prev
  6813. }
  6814. }
  6815. break = yes
  6816. }
  6817. if = {
  6818. limit = {
  6819. any_ship_in_system = {
  6820. exists = owner
  6821. owner = {
  6822. NOT = {
  6823. has_communications = root
  6824. }
  6825. is_country_type = guardian_dreadnought
  6826. }
  6827. }
  6828. }
  6829. root = {
  6830. if = {
  6831. limit = {
  6832. NOT = {
  6833. has_event_chain = curator_poi_chain
  6834. }
  6835. }
  6836. begin_event_chain = {
  6837. event_chain = curator_poi_chain
  6838. target = this
  6839. }
  6840. }
  6841. create_point_of_interest = {
  6842. id = curator_poi_dreadnought
  6843. name = curator_poi_title
  6844. desc = curator_poi_desc
  6845. event_chain = curator_poi_chain
  6846. location = prev
  6847. }
  6848. }
  6849. }
  6850. if = {
  6851. limit = {
  6852. any_ship_in_system = {
  6853. exists = owner
  6854. owner = {
  6855. NOT = {
  6856. has_communications = root
  6857. }
  6858. is_country_type = guardian_hatchling
  6859. }
  6860. }
  6861. }
  6862. root = {
  6863. if = {
  6864. limit = {
  6865. NOT = {
  6866. has_event_chain = curator_poi_chain
  6867. }
  6868. }
  6869. begin_event_chain = {
  6870. event_chain = curator_poi_chain
  6871. target = this
  6872. }
  6873. }
  6874. create_point_of_interest = {
  6875. id = curator_poi_hatchling
  6876. name = curator_poi_title
  6877. desc = curator_poi_desc
  6878. event_chain = curator_poi_chain
  6879. location = prev
  6880. }
  6881. }
  6882. }
  6883. }
  6884. }
  6885. }
  6886. }
  6887. }
  6888.  
  6889. # "Poison" options
  6890. # Dragon
  6891. option = {
  6892. name = leviathans.508.b
  6893. custom_gui = "enclave_curator_option"
  6894. trigger = {
  6895. any_country = {
  6896. is_country_type = guardian_dragon
  6897. has_communications = root
  6898. }
  6899. }
  6900. hidden_effect = {
  6901. country_event = { id = leviathans.510 }
  6902. }
  6903. }
  6904. # Enigmatic Fortress
  6905. option = {
  6906. name = leviathans.508.c
  6907. custom_gui = "enclave_curator_option"
  6908. trigger = {
  6909. any_country = {
  6910. is_country_type = guardian_fortress
  6911. has_communications = root
  6912. }
  6913. }
  6914. hidden_effect = {
  6915. country_event = { id = leviathans.515 }
  6916. }
  6917. }
  6918. # Stellarite
  6919. option = {
  6920. name = leviathans.508.d
  6921. custom_gui = "enclave_curator_option"
  6922. trigger = {
  6923. any_country = {
  6924. is_country_type = guardian_stellarite
  6925. has_communications = root
  6926. }
  6927. }
  6928. hidden_effect = {
  6929. country_event = { id = leviathans.520 }
  6930. }
  6931. }
  6932. # Dimensional Horror
  6933. option = {
  6934. name = leviathans.508.e
  6935. custom_gui = "enclave_curator_option"
  6936. trigger = {
  6937. any_country = {
  6938. is_country_type = guardian_horror
  6939. has_communications = root
  6940. }
  6941. }
  6942. hidden_effect = {
  6943. country_event = { id = leviathans.525 }
  6944. }
  6945. }
  6946. # Hiver
  6947. option = {
  6948. name = leviathans.508.f
  6949. custom_gui = "enclave_curator_option"
  6950. trigger = {
  6951. any_country = {
  6952. is_country_type = guardian_hiver
  6953. has_communications = root
  6954. }
  6955. }
  6956. hidden_effect = {
  6957. country_event = { id = leviathans.530 }
  6958. }
  6959. }
  6960. # Technosphere
  6961. option = {
  6962. name = leviathans.508.g
  6963. custom_gui = "enclave_curator_option"
  6964. trigger = {
  6965. any_country = {
  6966. is_country_type = guardian_sphere
  6967. has_communications = root
  6968. }
  6969. }
  6970. hidden_effect = {
  6971. country_event = { id = leviathans.535 }
  6972. }
  6973. }
  6974. # Automated Dreadnought
  6975. option = {
  6976. name = leviathans.508.h
  6977. custom_gui = "enclave_curator_option"
  6978. trigger = {
  6979. any_country = {
  6980. is_country_type = guardian_dreadnought
  6981. has_communications = root
  6982. }
  6983. }
  6984. hidden_effect = {
  6985. country_event = { id = leviathans.540 }
  6986. }
  6987. }
  6988. # Wraith
  6989. option = {
  6990. name = leviathans.508.i
  6991. custom_gui = "enclave_curator_option"
  6992. trigger = {
  6993. any_country = {
  6994. is_country_type = guardian_wraith
  6995. has_communications = root
  6996. }
  6997. }
  6998. hidden_effect = {
  6999. country_event = { id = leviathans.545 }
  7000. }
  7001. }
  7002. # Hatchling
  7003. option = {
  7004. name = leviathans.508.j
  7005. custom_gui = "enclave_curator_option"
  7006. trigger = {
  7007. any_country = {
  7008. is_country_type = guardian_hatchling
  7009. has_communications = root
  7010. }
  7011. }
  7012. hidden_effect = {
  7013. country_event = { id = leviathans.550 }
  7014. }
  7015. }
  7016. # Scavenger Bot
  7017. option = {
  7018. name = leviathans.508.k
  7019. custom_gui = "enclave_curator_option"
  7020. trigger = {
  7021. any_country = {
  7022. is_country_type = guardian_scavenger_bot
  7023. has_communications = root
  7024. }
  7025. }
  7026. hidden_effect = {
  7027. country_event = { id = leviathans.555 }
  7028. }
  7029. }
  7030. # Tiyanki Matriarch
  7031. option = {
  7032. name = leviathans.508.l
  7033. custom_gui = "enclave_curator_option"
  7034. trigger = {
  7035. any_country = {
  7036. is_country_type = guardian_elderly_tiyanki
  7037. has_communications = root
  7038. }
  7039. }
  7040. hidden_effect = {
  7041. country_event = { id = leviathans.556 }
  7042. }
  7043. }
  7044. option = {
  7045. name = leviathans.500.g
  7046. custom_gui = "enclave_curator_option"
  7047. trigger = {
  7048. has_country_flag = pantagruel
  7049. has_country_flag = asked_about_infinity_machine
  7050. NOT = { has_country_flag = offered_information }
  7051. }
  7052. hidden_effect = {
  7053. country_event = { id = leviathans.4000 }
  7054. }
  7055. }
  7056. option = { # Back
  7057. name = leviathans.506.d
  7058. custom_gui = "enclave_curator_option"
  7059. hidden_effect = {
  7060. country_event = { id = leviathans.505 }
  7061. }
  7062. }
  7063. option = { # Sign Off
  7064. name = leviathans.506.e
  7065. default_hide_option = yes
  7066. custom_gui = "enclave_curator_option"
  7067. }
  7068. }
  7069.  
  7070. # Continue Research Aid?
  7071. country_event = {
  7072. id = leviathans.509
  7073. title = leviathans.509.name
  7074. desc = leviathans.509.desc
  7075.  
  7076. is_triggered_only = yes
  7077. diplomatic = yes
  7078. custom_gui = "enclave_curator_window"
  7079.  
  7080. picture_event_data = {
  7081. portrait = event_target:curators
  7082. room = enclave_curator_room
  7083. }
  7084.  
  7085. trigger = {
  7086. NOT = { has_country_flag = attacked_curators }
  7087. exists = event_target:curators
  7088. }
  7089.  
  7090. immediate = {
  7091. remove_relation_flag = {
  7092. who = event_target:curators
  7093. flag = curator_trade
  7094. }
  7095. }
  7096.  
  7097. option = {
  7098. name = leviathans.509.a
  7099. response_text = leviathans.509.a.reply
  7100. custom_gui = "enclave_curator_option"
  7101. trigger = { num_pops < 61 }
  7102. allow = {
  7103. resource_stockpile_compare = { resource = energy value >= 1000 }
  7104. hidden_trigger = {
  7105. NOT = { has_country_flag = attacked_curators }
  7106. }
  7107. }
  7108. add_resource = { energy = -1000 }
  7109. custom_tooltip = opinion20
  7110. add_modifier = {
  7111. modifier = curator_insight
  7112. days = 3600
  7113. }
  7114. hidden_effect = {
  7115. event_target:curators = {
  7116. add_trust = {
  7117. who = root
  7118. amount = 20
  7119. }
  7120. }
  7121. set_relation_flag = {
  7122. who = event_target:curators
  7123. flag = curator_trade
  7124. }
  7125. country_event = { id = leviathans.509 days = 3600 }
  7126. }
  7127. }
  7128.  
  7129. option = {
  7130. name = leviathans.509.a
  7131. response_text = leviathans.509.a.reply
  7132. custom_gui = "enclave_curator_option"
  7133. trigger = {
  7134. num_pops > 60
  7135. num_pops < 121
  7136. }
  7137. allow = {
  7138. resource_stockpile_compare = { resource = energy value >= 2000 }
  7139. hidden_trigger = {
  7140. NOT = { has_country_flag = attacked_curators }
  7141. }
  7142. }
  7143. add_resource = { energy = -2000 }
  7144. add_modifier = {
  7145. modifier = curator_insight
  7146. days = 3600
  7147. }
  7148. custom_tooltip = opinion20
  7149. hidden_effect = {
  7150. event_target:curators = {
  7151. add_trust = {
  7152. who = root
  7153. amount = 20
  7154. }
  7155. }
  7156. set_relation_flag = {
  7157. who = event_target:curators
  7158. flag = curator_trade
  7159. }
  7160. country_event = { id = leviathans.509 days = 3600 }
  7161. }
  7162. }
  7163.  
  7164. option = {
  7165. name = leviathans.509.a
  7166. response_text = leviathans.509.a.reply
  7167. custom_gui = "enclave_curator_option"
  7168. trigger = {
  7169. num_pops > 120
  7170. num_pops < 181
  7171. }
  7172. allow = {
  7173. resource_stockpile_compare = { resource = energy value >= 3000 }
  7174. hidden_trigger = {
  7175. NOT = { has_country_flag = attacked_curators }
  7176. }
  7177. }
  7178. add_resource = { energy = -3000 }
  7179. add_modifier = {
  7180. modifier = curator_insight
  7181. days = 3600
  7182. }
  7183. custom_tooltip = opinion20
  7184. hidden_effect = {
  7185. event_target:curators = {
  7186. add_trust = {
  7187. who = root
  7188. amount = 20
  7189. }
  7190. }
  7191. set_relation_flag = {
  7192. who = event_target:curators
  7193. flag = curator_trade
  7194. }
  7195. country_event = { id = leviathans.509 days = 3600 }
  7196. }
  7197. }
  7198.  
  7199. option = {
  7200. name = leviathans.509.a
  7201. response_text = leviathans.509.a.reply
  7202. custom_gui = "enclave_curator_option"
  7203. trigger = {
  7204. num_pops > 180
  7205. num_pops < 241
  7206. }
  7207. allow = {
  7208. resource_stockpile_compare = { resource = energy value >= 4000 }
  7209. hidden_trigger = {
  7210. NOT = { has_country_flag = attacked_curators }
  7211. }
  7212. }
  7213. add_resource = { energy = -4000 }
  7214. add_modifier = {
  7215. modifier = curator_insight
  7216. days = 3600
  7217. }
  7218. custom_tooltip = opinion20
  7219. hidden_effect = {
  7220. event_target:curators = {
  7221. add_trust = {
  7222. who = root
  7223. amount = 20
  7224. }
  7225. }
  7226. set_relation_flag = {
  7227. who = event_target:curators
  7228. flag = curator_trade
  7229. }
  7230. country_event = { id = leviathans.509 days = 3600 }
  7231. }
  7232. }
  7233.  
  7234. option = {
  7235. name = leviathans.509.a
  7236. response_text = leviathans.509.a.reply
  7237. custom_gui = "enclave_curator_option"
  7238. trigger = { num_pops > 240 }
  7239. allow = {
  7240. resource_stockpile_compare = { resource = energy value >= 5000 }
  7241. hidden_trigger = {
  7242. NOT = { has_country_flag = attacked_curators }
  7243. }
  7244. }
  7245. add_resource = { energy = -5000 }
  7246. add_modifier = {
  7247. modifier = curator_insight
  7248. days = 3600
  7249. }
  7250. custom_tooltip = opinion20
  7251. hidden_effect = {
  7252. event_target:curators = {
  7253. add_trust = {
  7254. who = root
  7255. amount = 20
  7256. }
  7257. }
  7258. set_relation_flag = {
  7259. who = event_target:curators
  7260. flag = curator_trade
  7261. }
  7262. country_event = { id = leviathans.509 days = 3600 }
  7263. }
  7264. }
  7265.  
  7266. option = { # Sign Off
  7267. name = leviathans.509.e
  7268. custom_gui = "enclave_curator_option"
  7269. default_hide_option = yes
  7270. }
  7271. }
  7272.  
  7273. # Space Dragon
  7274. # Curator Guardians Menu
  7275. country_event = {
  7276. id = leviathans.510
  7277. title = leviathans.510.name
  7278. desc = leviathans.510.desc
  7279.  
  7280. is_triggered_only = yes
  7281. diplomatic = yes
  7282. custom_gui = "enclave_curator_window"
  7283.  
  7284. picture_event_data = {
  7285. portrait = event_target:curators
  7286. room = enclave_curator_room
  7287. }
  7288.  
  7289. immediate = {
  7290. set_country_flag = curator_enclave_diplomacy_engaged
  7291. }
  7292.  
  7293. after = {
  7294. hidden_effect = {
  7295. remove_country_flag = curator_enclave_diplomacy_engaged
  7296. }
  7297. }
  7298.  
  7299. option = {
  7300. name = leviathans.510.a
  7301. response_text = leviathans.510.a.reply
  7302. is_dialog_only = yes
  7303. custom_gui = "enclave_curator_option"
  7304. }
  7305. option = {
  7306. name = leviathans.510.b
  7307. response_text = leviathans.510.b.reply
  7308. trigger = {
  7309. NOT = { has_modifier = draconic_beats }
  7310. }
  7311. custom_gui = "enclave_curator_option"
  7312. allow = {
  7313. resource_stockpile_compare = { resource = energy value >= 1000 }
  7314. }
  7315. add_resource = { energy = -1000 }
  7316. add_modifier = {
  7317. modifier = draconic_beats
  7318. days = -1
  7319. }
  7320. custom_tooltip = opinion20
  7321. hidden_effect = {
  7322. event_target:curators = {
  7323. add_trust = {
  7324. who = root
  7325. amount = 20
  7326. }
  7327. }
  7328. }
  7329. }
  7330. option = { # Can we fight it? (No)
  7331. name = leviathans.506.f
  7332. trigger = { fleet_power < 5000 }
  7333. custom_gui = "enclave_curator_option"
  7334. response_text = leviathans.5106.f1.reply
  7335. }
  7336. option = { # Can we fight it? (Probably not)
  7337. name = leviathans.506.f
  7338. trigger = {
  7339. fleet_power > 5000
  7340. fleet_power < 15000
  7341. }
  7342. custom_gui = "enclave_curator_option"
  7343. response_text = leviathans.5106.f2.reply
  7344. }
  7345. option = { # Can we fight it? (Maybe)
  7346. name = leviathans.506.f
  7347. trigger = {
  7348. fleet_power > 15000
  7349. fleet_power < 30000
  7350. }
  7351. custom_gui = "enclave_curator_option"
  7352. response_text = leviathans.5106.f3.reply
  7353. }
  7354. option = { # Can we fight it? (Yes)
  7355. name = leviathans.506.f
  7356. trigger = { fleet_power > 30000 }
  7357. custom_gui = "enclave_curator_option"
  7358. response_text = leviathans.5106.f4.reply
  7359. }
  7360. option = { # Back
  7361. name = leviathans.506.d
  7362. custom_gui = "enclave_curator_option"
  7363. hidden_effect = {
  7364. country_event = { id = leviathans.505 }
  7365. }
  7366. }
  7367. option = { # Sign Off
  7368. name = leviathans.506.e
  7369. default_hide_option = yes
  7370. custom_gui = "enclave_curator_option"
  7371. }
  7372. }
  7373.  
  7374. # Curator Think Tank
  7375. country_event = {
  7376. id = leviathans.511
  7377. title = leviathans.511.name
  7378. desc = leviathans.511.desc
  7379.  
  7380. is_triggered_only = yes
  7381. diplomatic = yes
  7382. custom_gui = "enclave_curator_window"
  7383.  
  7384. picture_event_data = {
  7385. portrait = event_target:curators
  7386. room = enclave_curator_room
  7387. }
  7388.  
  7389. immediate = {
  7390. set_country_flag = curator_enclave_diplomacy_engaged
  7391. random_system_within_border = {
  7392. limit = {
  7393. any_ship_in_system = {
  7394. exists = owner
  7395. owner = {
  7396. is_same_value = event_target:curators
  7397. }
  7398. }
  7399. }
  7400. save_event_target_as = curator_system
  7401. }
  7402. event_target:curators = {
  7403. set_country_flag = think_tank@root
  7404. }
  7405. }
  7406.  
  7407. after = {
  7408. hidden_effect = {
  7409. remove_country_flag = curator_enclave_diplomacy_engaged
  7410. }
  7411. }
  7412.  
  7413. option = { # Back
  7414. name = leviathans.506.d
  7415. custom_gui = "enclave_curator_option"
  7416. hidden_effect = {
  7417. country_event = { id = leviathans.505 }
  7418. }
  7419. }
  7420. option = { # Sign Off
  7421. name = leviathans.506.e
  7422. default_hide_option = yes
  7423. custom_gui = "enclave_curator_option"
  7424. }
  7425. }
  7426.  
  7427. # Enigmatic Fortress
  7428. # Curator Guardians Menu
  7429. country_event = {
  7430. id = leviathans.515
  7431. title = leviathans.515.name
  7432. desc = leviathans.515.desc
  7433.  
  7434. is_triggered_only = yes
  7435. diplomatic = yes
  7436. custom_gui = "enclave_curator_window"
  7437.  
  7438. picture_event_data = {
  7439. portrait = event_target:curators
  7440. room = enclave_curator_room
  7441. }
  7442.  
  7443. immediate = {
  7444. set_country_flag = curator_enclave_diplomacy_engaged
  7445. }
  7446.  
  7447. after = {
  7448. hidden_effect = {
  7449. remove_country_flag = curator_enclave_diplomacy_engaged
  7450. }
  7451. }
  7452.  
  7453. option = {
  7454. name = leviathans.515.a
  7455. response_text = leviathans.515.a.reply
  7456. is_dialog_only = yes
  7457. custom_gui = "enclave_curator_option"
  7458. }
  7459. option = {
  7460. name = leviathans.515.b
  7461. response_text = leviathans.515.b.reply
  7462. custom_gui = "enclave_curator_option"
  7463. trigger = {
  7464. NOT = { has_country_flag = bought_fortress_info_1 }
  7465. }
  7466. allow = {
  7467. resource_stockpile_compare = { resource = energy value >= 200 }
  7468. }
  7469. hidden_effect = { set_country_flag = bought_fortress_info_1 }
  7470. add_resource = { energy = -200 }
  7471. }
  7472. option = {
  7473. name = leviathans.515.c
  7474. response_text = leviathans.515.c.reply
  7475. custom_gui = "enclave_curator_option"
  7476. trigger = {
  7477. NOT = { has_country_flag = bought_fortress_info_2 }
  7478. }
  7479. allow = {
  7480. resource_stockpile_compare = { resource = energy value >= 200 }
  7481. }
  7482. hidden_effect = { set_country_flag = bought_fortress_info_2 }
  7483. add_resource = { energy = -200 }
  7484. }
  7485. option = {
  7486. name = leviathans.515.d
  7487. response_text = leviathans.515.d.reply
  7488. custom_gui = "enclave_curator_option"
  7489. trigger = {
  7490. NOT = { has_country_flag = bought_fortress_info_3 }
  7491. }
  7492. allow = {
  7493. resource_stockpile_compare = { resource = energy value >= 200 }
  7494. }
  7495. hidden_effect = { set_country_flag = bought_fortress_info_3 }
  7496. add_resource = { energy = -200 }
  7497. }
  7498. option = {
  7499. name = leviathans.515.bb
  7500. response_text = leviathans.515.b.reply
  7501. custom_gui = "enclave_curator_option"
  7502. trigger = {
  7503. has_country_flag = bought_fortress_info_1
  7504. }
  7505. }
  7506. option = {
  7507. name = leviathans.515.cc
  7508. response_text = leviathans.515.c.reply
  7509. custom_gui = "enclave_curator_option"
  7510. trigger = {
  7511. has_country_flag = bought_fortress_info_2
  7512. }
  7513. }
  7514. option = {
  7515. name = leviathans.515.dd
  7516. response_text = leviathans.515.d.reply
  7517. custom_gui = "enclave_curator_option"
  7518. trigger = {
  7519. has_country_flag = bought_fortress_info_3
  7520. }
  7521. }
  7522. option = { # Can we fight it? (No)
  7523. name = leviathans.506.f
  7524. trigger = { fleet_power < 5000 }
  7525. custom_gui = "enclave_curator_option"
  7526. response_text = leviathans.5106.f1.reply
  7527. }
  7528. option = { # Can we fight it? (Probably not)
  7529. name = leviathans.506.f
  7530. trigger = {
  7531. fleet_power > 5000
  7532. fleet_power < 15000
  7533. }
  7534. custom_gui = "enclave_curator_option"
  7535. response_text = leviathans.5106.f2.reply
  7536. }
  7537. option = { # Can we fight it? (Maybe)
  7538. name = leviathans.506.f
  7539. trigger = {
  7540. fleet_power > 15000
  7541. fleet_power < 30000
  7542. }
  7543. custom_gui = "enclave_curator_option"
  7544. response_text = leviathans.5106.f3.reply
  7545. }
  7546. option = { # Can we fight it? (Yes)
  7547. name = leviathans.506.f
  7548. trigger = { fleet_power > 30000 }
  7549. custom_gui = "enclave_curator_option"
  7550. response_text = leviathans.5106.f4.reply
  7551. }
  7552. option = { # Back
  7553. name = leviathans.506.d
  7554. custom_gui = "enclave_curator_option"
  7555. hidden_effect = {
  7556. country_event = { id = leviathans.505 }
  7557. }
  7558. }
  7559. option = { # Sign Off
  7560. name = leviathans.506.e
  7561. default_hide_option = yes
  7562. custom_gui = "enclave_curator_option"
  7563. }
  7564. }
  7565.  
  7566. # Stellarite
  7567. # Curator Guardians Menu
  7568. country_event = {
  7569. id = leviathans.520
  7570. title = leviathans.520.name
  7571. desc = leviathans.520.desc
  7572.  
  7573. is_triggered_only = yes
  7574. diplomatic = yes
  7575. custom_gui = "enclave_curator_window"
  7576.  
  7577. picture_event_data = {
  7578. portrait = event_target:curators
  7579. room = enclave_curator_room
  7580. }
  7581.  
  7582. immediate = {
  7583. set_country_flag = curator_enclave_diplomacy_engaged
  7584. }
  7585.  
  7586. after = {
  7587. hidden_effect = {
  7588. remove_country_flag = curator_enclave_diplomacy_engaged
  7589. }
  7590. }
  7591.  
  7592. option = {
  7593. name = leviathans.510.a
  7594. response_text = leviathans.520.a.reply
  7595. is_dialog_only = yes
  7596. custom_gui = "enclave_curator_option"
  7597. }
  7598. option = {
  7599. name = leviathans.510.b
  7600. response_text = leviathans.520.b.reply
  7601. trigger = {
  7602. NOT = { has_modifier = curator_buff_stellarite }
  7603. }
  7604. custom_gui = "enclave_curator_option"
  7605. allow = {
  7606. resource_stockpile_compare = { resource = energy value >= 1000 }
  7607. }
  7608. add_resource = { energy = -1000 }
  7609. add_modifier = {
  7610. modifier = curator_buff_stellarite
  7611. days = -1
  7612. }
  7613. custom_tooltip = opinion20
  7614. hidden_effect = {
  7615. event_target:curators = {
  7616. add_trust = {
  7617. who = root
  7618. amount = 20
  7619. }
  7620. }
  7621. }
  7622. }
  7623. option = { # Can we fight it? (No)
  7624. name = leviathans.506.f
  7625. trigger = { fleet_power < 5000 }
  7626. custom_gui = "enclave_curator_option"
  7627. response_text = leviathans.5106.f1.reply
  7628. }
  7629. option = { # Can we fight it? (Probably not)
  7630. name = leviathans.506.f
  7631. trigger = {
  7632. fleet_power > 5000
  7633. fleet_power < 15000
  7634. }
  7635. custom_gui = "enclave_curator_option"
  7636. response_text = leviathans.5106.f2.reply
  7637. }
  7638. option = { # Can we fight it? (Maybe)
  7639. name = leviathans.506.f
  7640. trigger = {
  7641. fleet_power > 15000
  7642. fleet_power < 30000
  7643. }
  7644. custom_gui = "enclave_curator_option"
  7645. response_text = leviathans.5106.f3.reply
  7646. }
  7647. option = { # Can we fight it? (Yes)
  7648. name = leviathans.506.f
  7649. trigger = { fleet_power > 30000 }
  7650. custom_gui = "enclave_curator_option"
  7651. response_text = leviathans.5106.f4.reply
  7652. }
  7653. option = { # Back
  7654. name = leviathans.506.d
  7655. custom_gui = "enclave_curator_option"
  7656. hidden_effect = {
  7657. country_event = { id = leviathans.505 }
  7658. }
  7659. }
  7660. option = { # Sign Off
  7661. name = leviathans.506.e
  7662. default_hide_option = yes
  7663. custom_gui = "enclave_curator_option"
  7664. }
  7665. }
  7666.  
  7667. # Dimensional Horror
  7668. # Curator Guardians Menu
  7669. country_event = {
  7670. id = leviathans.525
  7671. title = leviathans.525.name
  7672. desc = leviathans.525.desc
  7673.  
  7674. is_triggered_only = yes
  7675. diplomatic = yes
  7676. custom_gui = "enclave_curator_window"
  7677.  
  7678. picture_event_data = {
  7679. portrait = event_target:curators
  7680. room = enclave_curator_room
  7681. }
  7682.  
  7683. immediate = {
  7684. set_country_flag = curator_enclave_diplomacy_engaged
  7685. }
  7686.  
  7687. after = {
  7688. hidden_effect = {
  7689. remove_country_flag = curator_enclave_diplomacy_engaged
  7690. }
  7691. }
  7692.  
  7693. option = {
  7694. name = leviathans.525.a
  7695. response_text = leviathans.525.a.reply
  7696. is_dialog_only = yes
  7697. custom_gui = "enclave_curator_option"
  7698. }
  7699. option = {
  7700. name = leviathans.525.b
  7701. response_text = leviathans.525.b.reply
  7702. trigger = {
  7703. NOT = { has_modifier = dimensional_horror_weak_points }
  7704. }
  7705. custom_gui = "enclave_curator_option"
  7706. allow = {
  7707. resource_stockpile_compare = { resource = energy value >= 1000 }
  7708. }
  7709. add_resource = { energy = -1000 }
  7710. add_modifier = {
  7711. modifier = dimensional_horror_weak_points
  7712. days = -1
  7713. }
  7714. custom_tooltip = opinion20
  7715. hidden_effect = {
  7716. event_target:curators = {
  7717. add_trust = {
  7718. who = root
  7719. amount = 20
  7720. }
  7721. }
  7722. }
  7723. }
  7724. option = { # Can we fight it? (No)
  7725. name = leviathans.506.f
  7726. trigger = { fleet_power < 5000 }
  7727. custom_gui = "enclave_curator_option"
  7728. response_text = leviathans.5106.f1.reply
  7729. }
  7730. option = { # Can we fight it? (Probably not)
  7731. name = leviathans.506.f
  7732. trigger = {
  7733. fleet_power > 5000
  7734. fleet_power < 15000
  7735. }
  7736. custom_gui = "enclave_curator_option"
  7737. response_text = leviathans.5106.f2.reply
  7738. }
  7739. option = { # Can we fight it? (Maybe)
  7740. name = leviathans.506.f
  7741. trigger = {
  7742. fleet_power > 15000
  7743. fleet_power < 30000
  7744. }
  7745. custom_gui = "enclave_curator_option"
  7746. response_text = leviathans.5106.f3.reply
  7747. }
  7748. option = { # Can we fight it? (Yes)
  7749. name = leviathans.506.f
  7750. trigger = { fleet_power > 30000 }
  7751. custom_gui = "enclave_curator_option"
  7752. response_text = leviathans.5106.f4.reply
  7753. }
  7754. option = { # Back
  7755. name = leviathans.506.d
  7756. custom_gui = "enclave_curator_option"
  7757. hidden_effect = {
  7758. country_event = { id = leviathans.505 }
  7759. }
  7760. }
  7761. option = { # Sign Off
  7762. name = leviathans.506.e
  7763. default_hide_option = yes
  7764. custom_gui = "enclave_curator_option"
  7765. }
  7766. }
  7767.  
  7768. # Hiver
  7769. # Curator Guardians Menu
  7770. country_event = {
  7771. id = leviathans.530
  7772. title = leviathans.530.name
  7773. desc = leviathans.530.desc
  7774.  
  7775. is_triggered_only = yes
  7776. diplomatic = yes
  7777. custom_gui = "enclave_curator_window"
  7778.  
  7779. picture_event_data = {
  7780. portrait = event_target:curators
  7781. room = enclave_curator_room
  7782. }
  7783.  
  7784. immediate = {
  7785. set_country_flag = curator_enclave_diplomacy_engaged
  7786. }
  7787.  
  7788. after = {
  7789. hidden_effect = {
  7790. remove_country_flag = curator_enclave_diplomacy_engaged
  7791. }
  7792. }
  7793.  
  7794. option = {
  7795. name = leviathans.530.a
  7796. response_text = leviathans.530.a.reply
  7797. is_dialog_only = yes
  7798. custom_gui = "enclave_curator_option"
  7799. }
  7800. option = {
  7801. name = leviathans.530.b
  7802. response_text = leviathans.530.b.reply
  7803. trigger = {
  7804. NOT = { has_modifier = asteroid_hive_weak_points }
  7805. }
  7806. custom_gui = "enclave_curator_option"
  7807. allow = {
  7808. resource_stockpile_compare = { resource = energy value >= 2000 }
  7809. }
  7810. add_resource = { energy = -2000 }
  7811. add_modifier = {
  7812. modifier = asteroid_hive_weak_points
  7813. days = -1
  7814. }
  7815. custom_tooltip = opinion10
  7816. hidden_effect = {
  7817. event_target:curators = {
  7818. add_trust = {
  7819. who = root
  7820. amount = 10
  7821. }
  7822. }
  7823. }
  7824. }
  7825. option = { # Can we fight it? (No)
  7826. name = leviathans.506.f
  7827. trigger = { fleet_power < 5000 }
  7828. custom_gui = "enclave_curator_option"
  7829. response_text = leviathans.5106.f1.reply
  7830. }
  7831. option = { # Can we fight it? (Probably not)
  7832. name = leviathans.506.f
  7833. trigger = {
  7834. fleet_power > 5000
  7835. fleet_power < 15000
  7836. }
  7837. custom_gui = "enclave_curator_option"
  7838. response_text = leviathans.5106.f2.reply
  7839. }
  7840. option = { # Can we fight it? (Maybe)
  7841. name = leviathans.506.f
  7842. trigger = {
  7843. fleet_power > 15000
  7844. fleet_power < 30000
  7845. }
  7846. custom_gui = "enclave_curator_option"
  7847. response_text = leviathans.5106.f3.reply
  7848. }
  7849. option = { # Can we fight it? (Yes)
  7850. name = leviathans.506.f
  7851. trigger = { fleet_power > 30000 }
  7852. custom_gui = "enclave_curator_option"
  7853. response_text = leviathans.5106.f4.reply
  7854. }
  7855. option = { # Back
  7856. name = leviathans.506.d
  7857. custom_gui = "enclave_curator_option"
  7858. hidden_effect = {
  7859. country_event = { id = leviathans.505 }
  7860. }
  7861. }
  7862. option = { # Sign Off
  7863. name = leviathans.506.e
  7864. default_hide_option = yes
  7865. custom_gui = "enclave_curator_option"
  7866. }
  7867. }
  7868.  
  7869. # Technosphere
  7870. # Curator Guardians Menu
  7871. country_event = {
  7872. id = leviathans.535
  7873. title = leviathans.535.name
  7874. desc = leviathans.535.desc
  7875.  
  7876. is_triggered_only = yes
  7877. diplomatic = yes
  7878. custom_gui = "enclave_curator_window"
  7879.  
  7880. picture_event_data = {
  7881. portrait = event_target:curators
  7882. room = enclave_curator_room
  7883. }
  7884.  
  7885. immediate = {
  7886. set_country_flag = curator_enclave_diplomacy_engaged
  7887. set_country_flag = asked_about_infinity_machine
  7888. }
  7889.  
  7890. after = {
  7891. hidden_effect = {
  7892. remove_country_flag = curator_enclave_diplomacy_engaged
  7893. }
  7894. }
  7895.  
  7896. option = {
  7897. name = leviathans.510.a
  7898. response_text = leviathans.535.a.reply
  7899. is_dialog_only = yes
  7900. custom_gui = "enclave_curator_option"
  7901. }
  7902. option = {
  7903. name = leviathans.510.b
  7904. response_text = leviathans.535.b.reply
  7905. trigger = {
  7906. NOT = { has_modifier = curator_buff_sphere }
  7907. }
  7908. custom_gui = "enclave_curator_option"
  7909. allow = {
  7910. resource_stockpile_compare = { resource = energy value >= 600 }
  7911. }
  7912. add_resource = { energy = -600 }
  7913. add_modifier = {
  7914. modifier = curator_buff_sphere
  7915. days = -1
  7916. }
  7917. custom_tooltip = opinion15
  7918. hidden_effect = {
  7919. event_target:curators = {
  7920. add_trust = {
  7921. who = root
  7922. amount = 15
  7923. }
  7924. }
  7925. }
  7926. }
  7927. option = { # Can we fight it? (No)
  7928. name = leviathans.506.f
  7929. trigger = { fleet_power < 5000 }
  7930. custom_gui = "enclave_curator_option"
  7931. response_text = leviathans.5106.f1.reply
  7932. }
  7933. option = { # Can we fight it? (Probably not)
  7934. name = leviathans.506.f
  7935. trigger = {
  7936. fleet_power > 5000
  7937. fleet_power < 15000
  7938. }
  7939. custom_gui = "enclave_curator_option"
  7940. response_text = leviathans.5106.f2.reply
  7941. }
  7942. option = { # Can we fight it? (Maybe)
  7943. name = leviathans.506.f
  7944. trigger = {
  7945. fleet_power > 15000
  7946. fleet_power < 30000
  7947. }
  7948. custom_gui = "enclave_curator_option"
  7949. response_text = leviathans.5106.f3.reply
  7950. }
  7951. option = { # Can we fight it? (Yes)
  7952. name = leviathans.506.f
  7953. trigger = { fleet_power > 30000 }
  7954. custom_gui = "enclave_curator_option"
  7955. response_text = leviathans.5106.f4.reply
  7956. }
  7957. option = { # Back
  7958. name = leviathans.506.d
  7959. custom_gui = "enclave_curator_option"
  7960. hidden_effect = {
  7961. country_event = { id = leviathans.505 }
  7962. }
  7963. }
  7964. option = { # Sign Off
  7965. name = leviathans.506.e
  7966. default_hide_option = yes
  7967. custom_gui = "enclave_curator_option"
  7968. }
  7969. }
  7970.  
  7971. # Automated Dreadnought
  7972. # Curator Guardians Menu
  7973. country_event = {
  7974. id = leviathans.540
  7975. title = leviathans.540.name
  7976. desc = leviathans.540.desc
  7977.  
  7978. is_triggered_only = yes
  7979. diplomatic = yes
  7980. custom_gui = "enclave_curator_window"
  7981.  
  7982. picture_event_data = {
  7983. portrait = event_target:curators
  7984. room = enclave_curator_room
  7985. }
  7986.  
  7987. immediate = {
  7988. set_country_flag = curator_enclave_diplomacy_engaged
  7989. }
  7990.  
  7991. after = {
  7992. hidden_effect = {
  7993. remove_country_flag = curator_enclave_diplomacy_engaged
  7994. }
  7995. }
  7996.  
  7997. option = {
  7998. name = leviathans.540.a
  7999. response_text = leviathans.540.a.reply
  8000. is_dialog_only = yes
  8001. custom_gui = "enclave_curator_option"
  8002. }
  8003. option = {
  8004. name = leviathans.540.b
  8005. response_text = leviathans.540.b.reply
  8006. trigger = {
  8007. NOT = { has_modifier = automated_dreadnought_weak_points }
  8008. }
  8009. custom_gui = "enclave_curator_option"
  8010. allow = {
  8011. resource_stockpile_compare = { resource = energy value >= 1000 }
  8012. }
  8013. add_resource = { energy = -1000 }
  8014. add_modifier = {
  8015. modifier = automated_dreadnought_weak_points
  8016. days = -1
  8017. }
  8018. custom_tooltip = opinion20
  8019. hidden_effect = {
  8020. event_target:curators = {
  8021. add_trust = {
  8022. who = root
  8023. amount = 20
  8024. }
  8025. }
  8026. }
  8027. }
  8028. option = { # Can we fight it? (No)
  8029. name = leviathans.506.f
  8030. trigger = { fleet_power < 5000 }
  8031. custom_gui = "enclave_curator_option"
  8032. response_text = leviathans.5106.f1.reply
  8033. }
  8034. option = { # Can we fight it? (Probably not)
  8035. name = leviathans.506.f
  8036. trigger = {
  8037. fleet_power > 5000
  8038. fleet_power < 15000
  8039. }
  8040. custom_gui = "enclave_curator_option"
  8041. response_text = leviathans.5106.f2.reply
  8042. }
  8043. option = { # Can we fight it? (Maybe)
  8044. name = leviathans.506.f
  8045. trigger = {
  8046. fleet_power > 15000
  8047. fleet_power < 30000
  8048. }
  8049. custom_gui = "enclave_curator_option"
  8050. response_text = leviathans.5106.f3.reply
  8051. }
  8052. option = { # Can we fight it? (Yes)
  8053. name = leviathans.506.f
  8054. trigger = { fleet_power > 30000 }
  8055. custom_gui = "enclave_curator_option"
  8056. response_text = leviathans.5106.f4.reply
  8057. }
  8058. option = { # Back
  8059. name = leviathans.506.d
  8060. custom_gui = "enclave_curator_option"
  8061. hidden_effect = {
  8062. country_event = { id = leviathans.505 }
  8063. }
  8064. }
  8065. option = { # Sign Off
  8066. name = leviathans.506.e
  8067. default_hide_option = yes
  8068. custom_gui = "enclave_curator_option"
  8069. }
  8070. }
  8071.  
  8072. # Wraith
  8073. # Curator Guardians Menu
  8074. country_event = {
  8075. id = leviathans.545
  8076. title = leviathans.545.name
  8077. desc = leviathans.545.desc
  8078.  
  8079. is_triggered_only = yes
  8080. diplomatic = yes
  8081. custom_gui = "enclave_curator_window"
  8082.  
  8083. picture_event_data = {
  8084. portrait = event_target:curators
  8085. room = enclave_curator_room
  8086. }
  8087.  
  8088. immediate = {
  8089. set_country_flag = curator_enclave_diplomacy_engaged
  8090. }
  8091.  
  8092. after = {
  8093. hidden_effect = {
  8094. remove_country_flag = curator_enclave_diplomacy_engaged
  8095. }
  8096. }
  8097.  
  8098. option = {
  8099. name = leviathans.545.a
  8100. response_text = leviathans.545.a.reply
  8101. is_dialog_only = yes
  8102. custom_gui = "enclave_curator_option"
  8103. }
  8104. option = {
  8105. name = leviathans.545.b
  8106. response_text = leviathans.545.b.reply
  8107. trigger = {
  8108. NOT = { has_country_flag = bought_wraith_info_1 }
  8109. }
  8110. custom_gui = "enclave_curator_option"
  8111. allow = {
  8112. resource_stockpile_compare = { resource = energy value >= 200 }
  8113. }
  8114. hidden_effect = { set_country_flag = bought_wraith_info_1 }
  8115. add_resource = { energy = -200 }
  8116. }
  8117. option = {
  8118. name = leviathans.545.c
  8119. response_text = leviathans.545.c.reply
  8120. trigger = {
  8121. NOT = { has_country_flag = bought_wraith_info_2 }
  8122. }
  8123. custom_gui = "enclave_curator_option"
  8124. allow = {
  8125. resource_stockpile_compare = { resource = energy value >= 200 }
  8126. }
  8127. hidden_effect = { set_country_flag = bought_wraith_info_2 }
  8128. add_resource = { energy = -200 }
  8129. }
  8130. option = {
  8131. name = leviathans.545.d
  8132. response_text = leviathans.545.d.reply
  8133. trigger = {
  8134. NOT = { has_country_flag = bought_wraith_info_3 }
  8135. }
  8136. custom_gui = "enclave_curator_option"
  8137. allow = {
  8138. resource_stockpile_compare = { resource = energy value >= 200 }
  8139. }
  8140. hidden_effect = { set_country_flag = bought_wraith_info_3 }
  8141. add_resource = { energy = -200 }
  8142. }
  8143. option = {
  8144. name = leviathans.545.b
  8145. response_text = leviathans.545.b.reply
  8146. custom_gui = "enclave_curator_option"
  8147. trigger = { has_country_flag = bought_wraith_info_1 }
  8148. }
  8149. option = {
  8150. name = leviathans.545.c
  8151. response_text = leviathans.545.c.reply
  8152. custom_gui = "enclave_curator_option"
  8153. trigger = { has_country_flag = bought_wraith_info_2 }
  8154. }
  8155. option = {
  8156. name = leviathans.545.d
  8157. response_text = leviathans.545.d.reply
  8158. custom_gui = "enclave_curator_option"
  8159. trigger = { has_country_flag = bought_wraith_info_3 }
  8160. }
  8161. option = { # Can we fight it? (No)
  8162. name = leviathans.506.f
  8163. trigger = { fleet_power < 5000 }
  8164. custom_gui = "enclave_curator_option"
  8165. response_text = leviathans.5106.f1.reply
  8166. }
  8167. option = { # Can we fight it? (Probably not)
  8168. name = leviathans.506.f
  8169. trigger = {
  8170. fleet_power > 5000
  8171. fleet_power < 15000
  8172. }
  8173. custom_gui = "enclave_curator_option"
  8174. response_text = leviathans.5106.f2.reply
  8175. }
  8176. option = { # Can we fight it? (Maybe)
  8177. name = leviathans.506.f
  8178. trigger = {
  8179. fleet_power > 15000
  8180. fleet_power < 30000
  8181. }
  8182. custom_gui = "enclave_curator_option"
  8183. response_text = leviathans.5106.f3.reply
  8184. }
  8185. option = { # Can we fight it? (Yes)
  8186. name = leviathans.506.f
  8187. trigger = { fleet_power > 30000 }
  8188. custom_gui = "enclave_curator_option"
  8189. response_text = leviathans.5106.f4.reply
  8190. }
  8191. option = { # Back
  8192. name = leviathans.506.d
  8193. custom_gui = "enclave_curator_option"
  8194. hidden_effect = {
  8195. country_event = { id = leviathans.505 }
  8196. }
  8197. }
  8198. option = { # Sign Off
  8199. name = leviathans.506.e
  8200. default_hide_option = yes
  8201. custom_gui = "enclave_curator_option"
  8202. }
  8203. }
  8204.  
  8205. # Hatchling
  8206. # Curator Guardians Menu
  8207. country_event = {
  8208. id = leviathans.550
  8209. title = leviathans.550.name
  8210. desc = leviathans.550.desc
  8211.  
  8212. is_triggered_only = yes
  8213. diplomatic = yes
  8214. custom_gui = "enclave_curator_window"
  8215.  
  8216. picture_event_data = {
  8217. portrait = event_target:curators
  8218. room = enclave_curator_room
  8219. }
  8220.  
  8221. immediate = {
  8222. set_country_flag = curator_enclave_diplomacy_engaged
  8223. }
  8224.  
  8225. after = {
  8226. hidden_effect = {
  8227. remove_country_flag = curator_enclave_diplomacy_engaged
  8228. }
  8229. }
  8230.  
  8231. option = {
  8232. name = leviathans.550.a
  8233. response_text = leviathans.550.a.reply
  8234. is_dialog_only = yes
  8235. custom_gui = "enclave_curator_option"
  8236. }
  8237. option = {
  8238. name = leviathans.550.b
  8239. response_text = leviathans.550.b.reply
  8240. trigger = {
  8241. NOT = { has_modifier = curator_buff_hatchling }
  8242. }
  8243. custom_gui = "enclave_curator_option"
  8244. allow = {
  8245. resource_stockpile_compare = { resource = energy value >= 1000 }
  8246. }
  8247. add_resource = { energy = -1000 }
  8248. add_modifier = {
  8249. modifier = curator_buff_hatchling
  8250. days = -1
  8251. }
  8252. custom_tooltip = opinion20
  8253. hidden_effect = {
  8254. event_target:curators = {
  8255. add_trust = {
  8256. who = root
  8257. amount = 20
  8258. }
  8259. }
  8260. }
  8261. }
  8262. option = { # Can we fight it? (No)
  8263. name = leviathans.506.f
  8264. trigger = { fleet_power < 5000 }
  8265. custom_gui = "enclave_curator_option"
  8266. response_text = leviathans.5106.f1.reply
  8267. }
  8268. option = { # Can we fight it? (Probably not)
  8269. name = leviathans.506.f
  8270. trigger = {
  8271. fleet_power > 5000
  8272. fleet_power < 15000
  8273. }
  8274. custom_gui = "enclave_curator_option"
  8275. response_text = leviathans.5106.f2.reply
  8276. }
  8277. option = { # Can we fight it? (Maybe)
  8278. name = leviathans.506.f
  8279. trigger = {
  8280. fleet_power > 15000
  8281. fleet_power < 30000
  8282. }
  8283. custom_gui = "enclave_curator_option"
  8284. response_text = leviathans.5106.f3.reply
  8285. }
  8286. option = { # Can we fight it? (Yes)
  8287. name = leviathans.506.f
  8288. trigger = { fleet_power > 30000 }
  8289. custom_gui = "enclave_curator_option"
  8290. response_text = leviathans.5106.f4.reply
  8291. }
  8292. option = { # Back
  8293. name = leviathans.506.d
  8294. custom_gui = "enclave_curator_option"
  8295. hidden_effect = {
  8296. country_event = { id = leviathans.505 }
  8297. }
  8298. }
  8299. option = { # Sign Off
  8300. name = leviathans.506.e
  8301. default_hide_option = yes
  8302. custom_gui = "enclave_curator_option"
  8303. }
  8304. }
  8305. # Scavenger Bot
  8306. # Curator Guardians Menu
  8307. country_event = {
  8308. id = leviathans.555
  8309. title = leviathans.555.name
  8310. desc = leviathans.555.desc
  8311.  
  8312. is_triggered_only = yes
  8313. diplomatic = yes
  8314. custom_gui = "enclave_curator_window"
  8315.  
  8316. picture_event_data = {
  8317. portrait = event_target:curators
  8318. room = enclave_curator_room
  8319. }
  8320.  
  8321. immediate = {
  8322. set_country_flag = curator_enclave_diplomacy_engaged
  8323. }
  8324.  
  8325. after = {
  8326. hidden_effect = {
  8327. remove_country_flag = curator_enclave_diplomacy_engaged
  8328. }
  8329. }
  8330.  
  8331. option = {
  8332. name = leviathans.555.a
  8333. response_text = leviathans.555.a.reply
  8334. trigger = {
  8335. NOT = { has_country_flag = bought_scavenger_info_1 }
  8336. }
  8337. custom_gui = "enclave_curator_option"
  8338. is_dialog_only = yes
  8339. hidden_effect = { set_country_flag = bought_scavenger_info_1 }
  8340. }
  8341. option = {
  8342. name = leviathans.555.b
  8343. response_text = leviathans.555.b.reply
  8344. trigger = {
  8345. NOT = { has_country_flag = bought_scavenger_info_2 }
  8346. }
  8347. custom_gui = "enclave_curator_option"
  8348. is_dialog_only = yes
  8349. hidden_effect = { set_country_flag = bought_scavenger_info_2 }
  8350. }
  8351. option = {
  8352. name = leviathans.555.c
  8353. response_text = leviathans.555.c.reply
  8354. trigger = {
  8355. NOT = { has_modifier = scavenger_weak_points }
  8356. }
  8357. custom_gui = "enclave_curator_option"
  8358. allow = {
  8359. resource_stockpile_compare = { resource = energy value >= 1000 }
  8360. }
  8361. add_resource = { energy = -1000 }
  8362. add_modifier = {
  8363. modifier = scavenger_weak_points
  8364. days = -1
  8365. }
  8366. custom_tooltip = opinion20
  8367. hidden_effect = {
  8368. event_target:curators = {
  8369. add_trust = {
  8370. who = root
  8371. amount = 20
  8372. }
  8373. }
  8374. }
  8375. }
  8376. option = {
  8377. name = leviathans.555.aa
  8378. response_text = leviathans.555.b.reply
  8379. trigger = {
  8380. has_country_flag = bought_scavenger_info_1
  8381. }
  8382. custom_gui = "enclave_curator_option"
  8383. is_dialog_only = yes
  8384. }
  8385. option = {
  8386. name = leviathans.555.bb
  8387. response_text = leviathans.555.b.reply
  8388. trigger = {
  8389. has_country_flag = bought_scavenger_info_2
  8390. }
  8391. custom_gui = "enclave_curator_option"
  8392. is_dialog_only = yes
  8393. }
  8394. option = { # Can we fight it? (No)
  8395. name = leviathans.506.f
  8396. trigger = { fleet_power < 5000 }
  8397. custom_gui = "enclave_curator_option"
  8398. response_text = leviathans.5106.f1.reply
  8399. }
  8400. option = { # Can we fight it? (Probably not)
  8401. name = leviathans.506.f
  8402. trigger = {
  8403. fleet_power > 5000
  8404. fleet_power < 15000
  8405. }
  8406. custom_gui = "enclave_curator_option"
  8407. response_text = leviathans.5106.f2.reply
  8408. }
  8409. option = { # Can we fight it? (Maybe)
  8410. name = leviathans.506.f
  8411. trigger = {
  8412. fleet_power > 15000
  8413. fleet_power < 30000
  8414. }
  8415. custom_gui = "enclave_curator_option"
  8416. response_text = leviathans.5106.f3.reply
  8417. }
  8418. option = { # Can we fight it? (Yes)
  8419. name = leviathans.506.f
  8420. trigger = { fleet_power > 30000 }
  8421. custom_gui = "enclave_curator_option"
  8422. response_text = leviathans.5106.f4.reply
  8423. }
  8424. option = { # Back
  8425. name = leviathans.506.d
  8426. custom_gui = "enclave_curator_option"
  8427. hidden_effect = {
  8428. country_event = { id = leviathans.505 }
  8429. }
  8430. }
  8431. option = { # Sign Off
  8432. name = leviathans.506.e
  8433. default_hide_option = yes
  8434. custom_gui = "enclave_curator_option"
  8435. }
  8436. }
  8437. # Tiyanki Matriarch
  8438. # Curator Guardians Menu
  8439. country_event = {
  8440. id = leviathans.556
  8441. title = leviathans.556.name
  8442. desc = leviathans.556.desc
  8443.  
  8444. is_triggered_only = yes
  8445. diplomatic = yes
  8446. custom_gui = "enclave_curator_window"
  8447.  
  8448. picture_event_data = {
  8449. portrait = event_target:curators
  8450. room = enclave_curator_room
  8451. }
  8452.  
  8453. immediate = {
  8454. set_country_flag = curator_enclave_diplomacy_engaged
  8455. }
  8456.  
  8457. after = {
  8458. hidden_effect = {
  8459. remove_country_flag = curator_enclave_diplomacy_engaged
  8460. }
  8461. }
  8462.  
  8463. option = {
  8464. name = leviathans.556.a
  8465. response_text = leviathans.556.a.reply
  8466. trigger = {
  8467. NOT = { has_country_flag = bought_matriarch_info_1 }
  8468. }
  8469. custom_gui = "enclave_curator_option"
  8470. is_dialog_only = yes
  8471. hidden_effect = { set_country_flag = bought_matriarch_info_1 }
  8472. }
  8473. option = {
  8474. name = leviathans.556.b
  8475. response_text = leviathans.556.b.reply
  8476. trigger = {
  8477. NOT = { has_country_flag = bought_matriarch_info_2 }
  8478. }
  8479. custom_gui = "enclave_curator_option"
  8480. is_dialog_only = yes
  8481. hidden_effect = { set_country_flag = bought_matriarch_info_2 }
  8482. }
  8483. option = {
  8484. name = leviathans.556.c
  8485. response_text = leviathans.556.c.reply
  8486. trigger = {
  8487. NOT = { has_modifier = elderly_tiyanki_weak_points }
  8488. }
  8489. custom_gui = "enclave_curator_option"
  8490. allow = {
  8491. resource_stockpile_compare = { resource = energy value >= 1000 }
  8492. }
  8493. add_resource = { energy = -1000 }
  8494. add_modifier = {
  8495. modifier = elderly_tiyanki_weak_points
  8496. days = -1
  8497. }
  8498. custom_tooltip = opinion20
  8499. hidden_effect = {
  8500. event_target:curators = {
  8501. add_trust = {
  8502. who = root
  8503. amount = 20
  8504. }
  8505. }
  8506. }
  8507. }
  8508. option = {
  8509. name = leviathans.556.aa
  8510. response_text = leviathans.556.a.reply
  8511. trigger = {
  8512. has_country_flag = bought_matriarch_info_1
  8513. }
  8514. custom_gui = "enclave_curator_option"
  8515. is_dialog_only = yes
  8516. }
  8517. option = {
  8518. name = leviathans.556.bb
  8519. response_text = leviathans.556.b.reply
  8520. trigger = {
  8521. has_country_flag = bought_matriarch_info_2
  8522. }
  8523. custom_gui = "enclave_curator_option"
  8524. is_dialog_only = yes
  8525. }
  8526. option = { # Can we fight it? (No)
  8527. name = leviathans.506.f
  8528. trigger = { fleet_power < 5000 }
  8529. custom_gui = "enclave_curator_option"
  8530. response_text = leviathans.5106.f1.reply
  8531. }
  8532. option = { # Can we fight it? (Probably not)
  8533. name = leviathans.506.f
  8534. trigger = {
  8535. fleet_power > 5000
  8536. fleet_power < 15000
  8537. }
  8538. custom_gui = "enclave_curator_option"
  8539. response_text = leviathans.5106.f2.reply
  8540. }
  8541. option = { # Can we fight it? (Maybe)
  8542. name = leviathans.506.f
  8543. trigger = {
  8544. fleet_power > 15000
  8545. fleet_power < 30000
  8546. }
  8547. custom_gui = "enclave_curator_option"
  8548. response_text = leviathans.5106.f3.reply
  8549. }
  8550. option = { # Can we fight it? (Yes)
  8551. name = leviathans.506.f
  8552. trigger = { fleet_power > 30000 }
  8553. custom_gui = "enclave_curator_option"
  8554. response_text = leviathans.5106.f4.reply
  8555. }
  8556. option = { # Back
  8557. name = leviathans.506.d
  8558. custom_gui = "enclave_curator_option"
  8559. hidden_effect = {
  8560. country_event = { id = leviathans.505 }
  8561. }
  8562. }
  8563. option = { # Sign Off
  8564. name = leviathans.506.e
  8565. default_hide_option = yes
  8566. custom_gui = "enclave_curator_option"
  8567. }
  8568. }
  8569.  
  8570. # Curator Hire Scientist Menu
  8571. country_event = {
  8572. id = leviathans.590
  8573. title = leviathans.590.name
  8574. desc = leviathans.590.desc
  8575.  
  8576. is_triggered_only = yes
  8577. diplomatic = yes
  8578. custom_gui = "enclave_curator_window"
  8579.  
  8580. picture_event_data = {
  8581. portrait = event_target:curators
  8582. room = enclave_curator_room
  8583. }
  8584.  
  8585. immediate = {
  8586. set_country_flag = curator_enclave_diplomacy_engaged
  8587. event_target:curators = {
  8588. owner_species = { save_event_target_as = curator_species }
  8589. }
  8590. }
  8591.  
  8592. after = {
  8593. hidden_effect = {
  8594. remove_country_flag = curator_enclave_diplomacy_engaged
  8595. }
  8596. }
  8597.  
  8598. option = {
  8599. name = leviathans.590.a
  8600. response_text = leviathans.590.a.reply
  8601. custom_gui = "enclave_curator_option"
  8602. allow = {
  8603. resource_stockpile_compare = { resource = energy value >= 1000 }
  8604. hidden_trigger = {
  8605. NOT = { has_country_flag = attacked_curators }
  8606. }
  8607. }
  8608. add_resource = { energy = -1000 }
  8609. custom_tooltip = opinion20
  8610. hidden_effect = {
  8611. set_country_flag = curator_scientist_recruited
  8612. event_target:curators = {
  8613. add_trust = {
  8614. who = root
  8615. amount = 20
  8616. }
  8617. }
  8618. random_list = {
  8619. 20 = {
  8620. create_leader = {
  8621. class = scientist
  8622. species = event_target:curator_species
  8623. name = "NAME_Professor_Zarg"
  8624. skill = 5
  8625. traits = {
  8626. trait = leader_trait_curator
  8627. }
  8628. event_leader = yes # prevents this leader from leading factions and winning elections
  8629. }
  8630. last_created_leader = {
  8631. set_age = 41
  8632. }
  8633. }
  8634. 20 = {
  8635. create_leader = {
  8636. class = scientist
  8637. species = event_target:curator_species
  8638. name = "NAME_Doctor_Xib"
  8639. skill = 5
  8640. traits = {
  8641. trait = leader_trait_curator
  8642. }
  8643. event_leader = yes # prevents this leader from leading factions and winning elections
  8644. }
  8645. last_created_leader = {
  8646. set_age = 45
  8647. }
  8648. }
  8649. 20 = {
  8650. create_leader = {
  8651. class = scientist
  8652. species = event_target:curator_species
  8653. name = "NAME_The_Mentat"
  8654. skill = 5
  8655. traits = {
  8656. trait = leader_trait_curator
  8657. }
  8658. event_leader = yes # prevents this leader from leading factions and winning elections
  8659. }
  8660. last_created_leader = {
  8661. set_age = 43
  8662. }
  8663. }
  8664. 20 = {
  8665. create_leader = {
  8666. class = scientist
  8667. species = event_target:curator_species
  8668. name = "NAME_Kix_the_Brilliant"
  8669. skill = 5
  8670. traits = {
  8671. trait = leader_trait_curator
  8672. }
  8673. event_leader = yes # prevents this leader from leading factions and winning elections
  8674. }
  8675. last_created_leader = {
  8676. set_age = 47
  8677. }
  8678. }
  8679. 20 = {
  8680. create_leader = {
  8681. class = scientist
  8682. species = event_target:curator_species
  8683. name = "NAME_Sensei_Borkaz"
  8684. skill = 5
  8685. traits = {
  8686. trait = leader_trait_curator
  8687. }
  8688. event_leader = yes # prevents this leader from leading factions and winning elections
  8689. }
  8690. last_created_leader = {
  8691. set_age = 42
  8692. }
  8693. }
  8694. }
  8695. }
  8696. }
  8697. option = { # Back
  8698. name = leviathans.506.d
  8699. custom_gui = "enclave_curator_option"
  8700. hidden_effect = {
  8701. country_event = { id = leviathans.505 }
  8702. }
  8703. }
  8704. option = { # Sign Off
  8705. name = leviathans.506.e
  8706. custom_gui = "enclave_curator_option"
  8707. default_hide_option = yes
  8708. }
  8709. }
  8710.  
  8711. # Port
  8712. country_event = {
  8713. id = leviathans.501
  8714. hide_window = yes
  8715. is_triggered_only = yes
  8716. immediate = {
  8717. from = {
  8718. country_event = { id = leviathans.502 }
  8719. }
  8720. }
  8721. }
  8722.  
  8723. # Curator Introduction
  8724. country_event = {
  8725. id = leviathans.502
  8726. title = leviathans.502.name
  8727.  
  8728. desc = {
  8729. text = leviathans.502a.desc
  8730. trigger = {
  8731. NOT = { has_country_flag = curator_intro }
  8732. }
  8733. }
  8734. desc = {
  8735. text = leviathans.502b.desc
  8736. trigger = { has_country_flag = curator_intro }
  8737. }
  8738.  
  8739. diplomatic = yes
  8740. custom_gui = "enclave_curator_window"
  8741.  
  8742. picture_event_data = {
  8743. portrait = from
  8744. room = enclave_curator_room
  8745. }
  8746.  
  8747. is_triggered_only = yes
  8748.  
  8749. after = {
  8750. if = {
  8751. limit = {
  8752. NOT = { has_country_flag = curator_intro }
  8753. }
  8754. set_country_flag = curator_intro
  8755. }
  8756. }
  8757.  
  8758. option = {
  8759. name = leviathans.502.a
  8760. custom_gui = "enclave_curator_option"
  8761. trigger = {
  8762. NOR = { has_valid_civic = civic_fanatic_purifiers has_valid_civic = civic_hive_devouring_swarm has_valid_civic = civic_machine_terminator }
  8763. }
  8764. }
  8765.  
  8766. option = {
  8767. name = SCUM
  8768. custom_gui = "enclave_curator_option"
  8769. trigger = {
  8770. has_valid_civic = civic_fanatic_purifiers
  8771. }
  8772. }
  8773.  
  8774. option = {
  8775. name = TASTY
  8776. custom_gui = "enclave_curator_option"
  8777. trigger = {
  8778. has_valid_civic = civic_hive_devouring_swarm
  8779. }
  8780. }
  8781.  
  8782. option = {
  8783. name = EXTERMINATE
  8784. custom_gui = "enclave_curator_option"
  8785. trigger = {
  8786. has_valid_civic = civic_machine_terminator
  8787. }
  8788. }
  8789. }
  8790.  
  8791. # Enclave Communication Spread
  8792. country_event = {
  8793. id = leviathans.560
  8794. hide_window = yes
  8795.  
  8796. trigger = {
  8797. is_country_type = enclave
  8798. any_relation = {
  8799. is_country_type = default
  8800. any_relation = {
  8801. is_country_type = default
  8802. NOT = { has_communications = ROOT }
  8803. }
  8804. }
  8805. }
  8806.  
  8807. mean_time_to_happen = {
  8808. months = 80
  8809. }
  8810.  
  8811. immediate = {
  8812. random_relation = {
  8813. limit = {
  8814. any_relation = {
  8815. is_country_type = default
  8816. NOT = { has_communications = ROOT }
  8817. }
  8818. }
  8819. random_relation = {
  8820. limit = {
  8821. is_country_type = default
  8822. NOT = { has_communications = ROOT }
  8823. }
  8824. root = { establish_communications_no_message = prev }
  8825. country_event = { id = leviathans.98 }
  8826. }
  8827. }
  8828. }
  8829. }
  8830.  
  8831. # Curator Destroyed (HIDDEN)
  8832. country_event = {
  8833. id = leviathans.592
  8834. hide_window = yes
  8835.  
  8836. is_triggered_only = yes
  8837.  
  8838. trigger = {
  8839. is_country_type = enclave
  8840. has_country_flag = curator_enclave_country
  8841. FROMFROM = {
  8842. is_ship_size = enclave_station
  8843. }
  8844. }
  8845.  
  8846. immediate = {
  8847. FROMFROM = {
  8848. solar_system = { save_event_target_as = curator_system }
  8849. }
  8850. FROM = {
  8851. country_event = { id = leviathans.593 }
  8852. save_event_target_as = curator_destroyer
  8853. }
  8854. observer_event = { id = observer.7 }
  8855. every_country = {
  8856. limit = {
  8857. has_communications = ROOT
  8858. NOT = { is_country = event_target:curator_destroyer }
  8859. is_country_type = default
  8860. }
  8861. country_event = { id = leviathans.594 }
  8862. }
  8863. }
  8864. }
  8865.  
  8866. # Curator Destroyed (Destroyer)
  8867. country_event = {
  8868. id = leviathans.593
  8869. title = "leviathans.593"
  8870. desc = "leviathans.593.desc"
  8871. picture = GFX_evt_space_debris
  8872. location = event_target:curator_system
  8873. show_sound = event_ship_bridge
  8874.  
  8875. is_triggered_only = yes
  8876.  
  8877. immediate = {
  8878. set_country_flag = destroyed_curator
  8879. if = {
  8880. limit = {
  8881. has_modifier = curator_insight
  8882. has_relation_flag = {
  8883. who = FROM
  8884. flag = curator_trade
  8885. }
  8886. }
  8887. remove_modifier = "curator_insight"
  8888. remove_relation_flag = {
  8889. who = FROM
  8890. flag = curator_trade
  8891. }
  8892. }
  8893. }
  8894.  
  8895. option = {
  8896. name = EXCELLENT
  8897. add_resource = {
  8898. physics_research = 1000
  8899. society_research = 1000
  8900. engineering_research = 1000
  8901. }
  8902. if = {
  8903. limit = { has_ancrel = yes }
  8904. medium_artifact_reward = yes
  8905. }
  8906. }
  8907. }
  8908.  
  8909. # Curator Destroyed
  8910. country_event = {
  8911. id = leviathans.594
  8912. title = "leviathans.593"
  8913. desc = {
  8914. text = leviathans.594.a.desc
  8915. trigger = {
  8916. NOT = {
  8917. has_relation_flag = {
  8918. who = FROM
  8919. flag = curator_trade
  8920. }
  8921. }
  8922. has_communications = event_target:curator_destroyer
  8923. }
  8924. }
  8925. desc = {
  8926. text = leviathans.594.b.desc
  8927. trigger = {
  8928. NOT = {
  8929. has_relation_flag = {
  8930. who = FROM
  8931. flag = curator_trade
  8932. }
  8933. }
  8934. NOT = { has_communications = event_target:curator_destroyer }
  8935. }
  8936. }
  8937. desc = {
  8938. text = leviathans.594.c.desc
  8939. trigger = {
  8940. has_relation_flag = {
  8941. who = FROM
  8942. flag = curator_trade
  8943. }
  8944. FROM = {
  8945. count_owned_ships = {
  8946. limit = { is_ship_size = enclave_station }
  8947. count < 1
  8948. }
  8949. }
  8950. has_communications = event_target:curator_destroyer
  8951. }
  8952. }
  8953. desc = {
  8954. text = leviathans.594.d.desc
  8955. trigger = {
  8956. has_relation_flag = {
  8957. who = FROM
  8958. flag = curator_trade
  8959. }
  8960. FROM = {
  8961. count_owned_ships = {
  8962. limit = { is_ship_size = enclave_station }
  8963. count < 1
  8964. }
  8965. }
  8966. NOT = { has_communications = event_target:curator_destroyer }
  8967. }
  8968. }
  8969. picture = GFX_evt_exploding_ship
  8970. location = event_target:curator_system
  8971. show_sound = event_ship_explosion
  8972.  
  8973. is_triggered_only = yes
  8974.  
  8975. immediate = {
  8976. if = {
  8977. limit = {
  8978. has_modifier = curator_insight
  8979. has_relation_flag = {
  8980. who = FROM
  8981. flag = curator_trade
  8982. }
  8983. FROM = {
  8984. count_owned_ships = {
  8985. limit = { is_ship_size = enclave_station }
  8986. count < 1
  8987. }
  8988. }
  8989. }
  8990. remove_modifier = "curator_insight"
  8991. }
  8992. if = {
  8993. limit = {
  8994. has_relation_flag = {
  8995. who = FROM
  8996. flag = curator_trade
  8997. }
  8998. FROM = {
  8999. count_owned_ships = {
  9000. limit = { is_ship_size = enclave_station }
  9001. count < 1
  9002. }
  9003. }
  9004. is_ai = yes
  9005. }
  9006. add_opinion_modifier = {
  9007. who = event_target:curator_destroyer
  9008. modifier = opinion_destroyed_curator_insight
  9009. }
  9010. }
  9011. if = {
  9012. limit = {
  9013. NOT = {
  9014. has_relation_flag = {
  9015. who = FROM
  9016. flag = curator_trade
  9017. }
  9018. }
  9019. is_ai = yes
  9020. }
  9021. add_opinion_modifier = {
  9022. who = event_target:curator_destroyer
  9023. modifier = opinion_destroyed_curator
  9024. }
  9025. }
  9026. }
  9027.  
  9028. option = {
  9029. name = "leviathans.594.a"
  9030. trigger = {
  9031. NOT = {
  9032. has_relation_flag = {
  9033. who = FROM
  9034. flag = curator_trade
  9035. }
  9036. }
  9037. }
  9038. }
  9039. option = {
  9040. name = "leviathans.594.b"
  9041. trigger = {
  9042. has_relation_flag = {
  9043. who = FROM
  9044. flag = curator_trade
  9045. }
  9046. FROM = {
  9047. count_owned_ships = {
  9048. limit = { is_ship_size = enclave_station }
  9049. count < 1
  9050. }
  9051. }
  9052. }
  9053. hidden_effect = {
  9054. remove_relation_flag = {
  9055. who = FROM
  9056. flag = curator_trade
  9057. }
  9058. }
  9059. }
  9060. }
  9061.  
  9062. # Attacked Curators (HIDDEN)
  9063. country_event = {
  9064. id = leviathans.595
  9065. hide_window = yes
  9066. is_triggered_only = yes
  9067.  
  9068. trigger = {
  9069. is_country_type = default
  9070. FROM = { has_country_flag = curator_enclave_country }
  9071. }
  9072.  
  9073. immediate = {
  9074. FROM = {
  9075. save_event_target_as = curators
  9076. add_trust = {
  9077. who = ROOT
  9078. amount = -100
  9079. }
  9080. }
  9081. set_country_flag = attacked_curators
  9082. if = {
  9083. limit = { has_modifier = curator_insight }
  9084. remove_modifier = curator_insight
  9085. country_event = { id = leviathans.596}
  9086. }
  9087. }
  9088. }
  9089.  
  9090. # Attacked Curators - Research Agreement Terminated
  9091. country_event = {
  9092. id = leviathans.596
  9093. title = leviathans.500.name
  9094. desc = leviathans.596.desc
  9095.  
  9096. is_triggered_only = yes
  9097. diplomatic = yes
  9098. custom_gui = "enclave_curator_window"
  9099.  
  9100. picture_event_data = {
  9101. portrait = event_target:curators
  9102. room = enclave_curator_room
  9103. }
  9104.  
  9105. option = {
  9106. name = leviathans.156.a
  9107. custom_gui = "enclave_curator_option"
  9108. }
  9109. }
  9110.  
  9111. # Attacked Curators - Refuses Communications
  9112. country_event = {
  9113. id = leviathans.597
  9114. title = leviathans.500.name
  9115. desc = leviathans.597a.desc
  9116. desc = leviathans.597b.desc
  9117. desc = leviathans.597c.desc
  9118. desc = leviathans.597d.desc
  9119.  
  9120. is_triggered_only = yes
  9121. diplomatic = yes
  9122. custom_gui = "enclave_curator_window"
  9123. force_open = yes
  9124.  
  9125. picture_event_data = {
  9126. portrait = event_target:curators
  9127. room = enclave_curator_room
  9128. }
  9129.  
  9130. trigger = {
  9131. FROM = {
  9132. is_country_type = enclave
  9133. has_country_flag = curator_enclave_country
  9134. }
  9135. has_country_flag = attacked_curators
  9136. NOT = { has_country_flag = curator_enclave_diplomacy_engaged }
  9137. }
  9138.  
  9139. immediate = {
  9140. set_country_flag = curator_enclave_diplomacy_engaged
  9141. FROM = { save_event_target_as = curators }
  9142. }
  9143.  
  9144. after = {
  9145. hidden_effect = {
  9146. remove_country_flag = curator_enclave_diplomacy_engaged
  9147. }
  9148. }
  9149.  
  9150. option = {
  9151. name = SCUM
  9152. trigger = { has_valid_civic = civic_fanatic_purifiers }
  9153. custom_gui = "enclave_curator_option"
  9154. }
  9155.  
  9156. option = {
  9157. name = TASTY
  9158. trigger = { has_valid_civic = civic_hive_devouring_swarm }
  9159. custom_gui = "enclave_curator_option"
  9160. }
  9161.  
  9162. option = {
  9163. name = EXTERMINATE
  9164. trigger = {
  9165. has_valid_civic = civic_machine_terminator
  9166. }
  9167. custom_gui = "enclave_curator_option"
  9168. }
  9169.  
  9170. option = {
  9171. name = leviathans.156.a
  9172. custom_gui = "enclave_curator_option"
  9173. trigger = { NOR = { has_valid_civic = civic_fanatic_purifiers has_valid_civic = civic_hive_devouring_swarm has_valid_civic = civic_machine_terminator } }
  9174. default_hide_option = yes
  9175. }
  9176. }
  9177.  
  9178. # RESTART DEBUG
  9179. fleet_event = {
  9180. id = leviathans.601
  9181. hide_window = yes
  9182. trigger = { always = no }
  9183. immediate = { fleet_event = { id = leviathans.602 } }
  9184. }
  9185. fleet_event = {
  9186. id = leviathans.602
  9187. hide_window = yes
  9188. trigger = { always = no }
  9189. immediate = { owner = { country_event = { id = leviathans.640 } } }
  9190. }
  9191.  
  9192. # Encounter
  9193. fleet_event = {
  9194. id = leviathans.610
  9195. title = leviathans.610.name
  9196. desc = leviathans.610.desc
  9197. picture = GFX_evt_space_dragon
  9198. location = from
  9199. show_sound = event_yellow_alert
  9200.  
  9201. is_triggered_only = yes
  9202.  
  9203. trigger = {
  9204. from = {
  9205. has_star_flag = guardians_dragon_system
  9206. any_ship_in_system = { is_ship_size = space_dragon_red }
  9207. }
  9208. owner = {
  9209. NOT = {
  9210. has_country_flag = dragon_encounter
  9211. }
  9212. OR = {
  9213. is_country_type = default
  9214. is_country_type = fallen_empire
  9215. is_country_type = awakened_fallen_empire
  9216. }
  9217. }
  9218. }
  9219.  
  9220. immediate = {
  9221. owner = {
  9222. set_country_flag = dragon_encounter
  9223. }
  9224. }
  9225.  
  9226. option = {
  9227. name = leviathans.610.a
  9228. }
  9229. }
  9230.  
  9231. # Restart mission after battle
  9232. country_event = {
  9233. id = leviathans.640
  9234. hide_window = yes
  9235. trigger = {
  9236. is_country_type = guardian_dragon
  9237. has_country_flag = dragon_country
  9238. fromfrom = {
  9239. has_hp_percentage > 0.15
  9240. solar_system = {
  9241. NOT = {
  9242. has_star_flag = guardians_dragon_system
  9243. }
  9244. }
  9245. }
  9246. }
  9247.  
  9248. is_triggered_only = yes
  9249.  
  9250. immediate = {
  9251. fromfrom = {
  9252. if = {
  9253. limit = {
  9254. has_fleet_flag = dragon_mission_1
  9255. }
  9256. queue_actions = {
  9257. repeat = {
  9258. find_closest_system = {
  9259. trigger = {
  9260. id = dragon.1.retaliation.1x
  9261. has_star_flag = system_target_1
  9262. }
  9263. found_system = {
  9264. move_to = this
  9265. find_closest_planet = {
  9266. trigger = {
  9267. id = dragon.1.retaliation.2x
  9268. is_star = yes
  9269. }
  9270. found_planet = {
  9271. move_to = this
  9272. wait = {
  9273. duration = 60
  9274. }
  9275. effect = {
  9276. id = dragon.1.retaliation.3x
  9277. solar_system = {
  9278. remove_star_flag = system_target_1
  9279. }
  9280. root = {
  9281. remove_fleet_flag = dragon_mission_1
  9282. clear_fleet_actions = this
  9283. }
  9284. }
  9285. }
  9286. }
  9287. }
  9288. }
  9289. }
  9290. }
  9291. if = {
  9292. limit = {
  9293. any_system = {
  9294. has_star_flag = system_target_2
  9295. }
  9296. }
  9297. queue_actions = {
  9298. repeat = {
  9299. find_closest_system = {
  9300. trigger = {
  9301. id = dragon.2.retaliation.1x
  9302. is_same_value = event_target:system_target_2
  9303. }
  9304. found_system = {
  9305. move_to = this
  9306. find_closest_planet = {
  9307. trigger = {
  9308. id = dragon.2.retaliation.2x
  9309. is_star = yes
  9310. }
  9311. found_planet = {
  9312. move_to = this
  9313. wait = {
  9314. duration = 60
  9315. }
  9316. effect = {
  9317. id = dragon.2.retaliation.3x
  9318. solar_system = {
  9319. remove_star_flag = system_target_2
  9320. }
  9321. root = {
  9322. remove_fleet_flag = dragon_mission_2
  9323. clear_fleet_actions = this
  9324. }
  9325. }
  9326. }
  9327. }
  9328. }
  9329. }
  9330. }
  9331. }
  9332. queue_actions = {
  9333. repeat = {
  9334. find_closest_system = {
  9335. trigger = {
  9336. id = dragon.3.retaliation.1x
  9337. has_star_flag = guardians_dragon_system
  9338. }
  9339. found_system = {
  9340. move_to = this
  9341. find_closest_planet = {
  9342. trigger = {
  9343. id = dragon.3.retaliation.2x
  9344. has_planet_flag = hoard_planet
  9345. }
  9346. found_planet = {
  9347. move_to = this
  9348. effect = {
  9349. id = dragon.3.retaliation.3x
  9350. root = {
  9351. remove_fleet_flag = dragon_mission_3
  9352. clear_fleet_actions = this
  9353. }
  9354. }
  9355. }
  9356. }
  9357. }
  9358. }
  9359. }
  9360. }
  9361. }
  9362. break = yes
  9363. }
  9364. if = {
  9365. limit = {
  9366. has_fleet_flag = dragon_mission_2
  9367. }
  9368. queue_actions = {
  9369. repeat = {
  9370. find_closest_system = {
  9371. trigger = {
  9372. id = dragon.2.retaliation.1y
  9373. has_star_flag = system_target_2
  9374. }
  9375. found_system = {
  9376. move_to = this
  9377. }
  9378. }
  9379. find_closest_planet = {
  9380. trigger = {
  9381. id = dragon.2.retaliation.2y
  9382. is_star = yes
  9383. }
  9384. found_planet = {
  9385. move_to = this
  9386. wait = {
  9387. duration = 60
  9388. }
  9389. effect = {
  9390. id = dragon.2.retaliation.3y
  9391. solar_system = {
  9392. remove_star_flag = system_target_2
  9393. }
  9394. root = {
  9395. remove_fleet_flag = dragon_mission_2
  9396. clear_fleet_actions = this
  9397. }
  9398. }
  9399. }
  9400. }
  9401. }
  9402. }
  9403. queue_actions = {
  9404. repeat = {
  9405. find_closest_system = {
  9406. trigger = {
  9407. id = dragon.3.retaliation.1y
  9408. has_star_flag = guardians_dragon_system
  9409. }
  9410. found_system = {
  9411. move_to = this
  9412. find_closest_planet = {
  9413. trigger = {
  9414. id = dragon.3.retaliation.2y
  9415. has_planet_flag = hoard_planet
  9416. }
  9417. found_planet = {
  9418. move_to = this
  9419. effect = {
  9420. id = dragon.3.retaliation.3y
  9421. root = {
  9422. remove_fleet_flag = dragon_mission_3
  9423. clear_fleet_actions = this
  9424. }
  9425. }
  9426. }
  9427. }
  9428. }
  9429. }
  9430. }
  9431. }
  9432. break = yes
  9433. }
  9434. if = {
  9435. limit = {
  9436. has_fleet_flag = dragon_mission_3
  9437. }
  9438. queue_actions = {
  9439. repeat = {
  9440. find_closest_system = {
  9441. trigger = {
  9442. id = dragon.3.retaliation.1z
  9443. has_star_flag = guardians_dragon_system
  9444. }
  9445. found_system = {
  9446. move_to = this
  9447. find_closest_planet = {
  9448. trigger = {
  9449. id = dragon.3.retaliation.2z
  9450. has_planet_flag = hoard_planet
  9451. }
  9452. found_planet = {
  9453. move_to = this
  9454. effect = {
  9455. id = dragon.3.retaliation.3z
  9456. root = {
  9457. remove_fleet_flag = dragon_mission_3
  9458. clear_fleet_actions = this
  9459. }
  9460. }
  9461. }
  9462. }
  9463. }
  9464. }
  9465. }
  9466. }
  9467. }
  9468. }
  9469. }
  9470. }
  9471.  
  9472. # Dragon retaliates if hurt and fleet destroyed
  9473. country_event = {
  9474. id = leviathans.648
  9475. hide_window = yes
  9476. is_triggered_only = yes
  9477.  
  9478. trigger = {
  9479. is_country_type = guardian_dragon
  9480. any_owned_ship = {
  9481. is_ship_size = space_dragon_red
  9482. has_hp_percentage < 0.80
  9483. has_hp_percentage > 0.15
  9484. fleet = {
  9485. NOT = {
  9486. has_fleet_flag = aggro_cooldown
  9487. }
  9488. exists = solar_system
  9489. solar_system = {
  9490. has_star_flag = guardians_dragon_system
  9491. }
  9492. }
  9493. }
  9494. from = {
  9495. is_country_type = default
  9496. }
  9497. }
  9498.  
  9499. immediate = {
  9500. random_owned_fleet = {
  9501. limit = {
  9502. any_owned_ship = {
  9503. is_ship_size = space_dragon_red
  9504. }
  9505. }
  9506. set_timed_fleet_flag = {
  9507. flag = aggro_cooldown
  9508. days = 60
  9509. }
  9510. clear_fleet_actions = this
  9511. fleet_event = { id = leviathans.652 }
  9512. }
  9513. from = {
  9514. country_event = { id = leviathans.649 }
  9515. }
  9516. }
  9517. }
  9518.  
  9519. # Retaliation notification
  9520. country_event = {
  9521. id = leviathans.649
  9522. title = leviathans.650.name
  9523. desc = {
  9524. text = leviathans.649.desc
  9525. trigger = {
  9526. NOT = { has_ethic = ethic_gestalt_consciousness }
  9527. }
  9528. }
  9529. desc = {
  9530. text = leviathans.649.desc.gesta
  9531. trigger = {
  9532. has_ethic = ethic_gestalt_consciousness
  9533. }
  9534. }
  9535. picture = GFX_evt_exploding_ship
  9536. is_triggered_only = yes
  9537.  
  9538. trigger = {
  9539. from = { is_country_type = guardian_dragon }
  9540. }
  9541.  
  9542. option = {
  9543. name = leviathans.649.a
  9544. trigger = {
  9545. NOT = { has_ethic = ethic_gestalt_consciousness }
  9546. }
  9547. }
  9548.  
  9549. option = {
  9550. name = leviathans.649.b.gesta
  9551. trigger = {
  9552. has_ethic = ethic_gestalt_consciousness
  9553. }
  9554. }
  9555. }
  9556.  
  9557. # Dragon pursues if fleet flees
  9558. # Fired before entering FTL - does combat still exist?
  9559. fleet_event = {
  9560. id = leviathans.650
  9561. #hide_window = yes
  9562. title = leviathans.650.name
  9563. desc = {
  9564. text = leviathans.650.desc
  9565. trigger = {
  9566. owner = { NOT = { has_ethic = ethic_gestalt_consciousness } }
  9567. }
  9568. }
  9569. desc = {
  9570. text = leviathans.650.desc.gesta
  9571. trigger = {
  9572. owner = { has_ethic = ethic_gestalt_consciousness }
  9573. }
  9574. }
  9575. picture = GFX_evt_space_dragon
  9576. is_triggered_only = yes
  9577.  
  9578. trigger = {
  9579. owner = {
  9580. is_country_type = default
  9581. }
  9582. from = {
  9583. has_star_flag = guardians_dragon_system
  9584. }
  9585. any_combatant_fleet = {
  9586. exists = owner
  9587. owner = {
  9588. is_country_type = guardian_dragon
  9589. }
  9590. NOT = { has_fleet_flag = aggro_cooldown }
  9591. any_owned_ship = {
  9592. is_ship_size = space_dragon_red
  9593. has_hp_percentage < 0.80
  9594. has_hp_percentage > 0.15
  9595. }
  9596. }
  9597. }
  9598.  
  9599. immediate = {
  9600. random_combatant_fleet = {
  9601. limit = {
  9602. exists = owner
  9603. owner = {
  9604. is_country_type = guardian_dragon
  9605. }
  9606. any_owned_ship = {
  9607. is_ship_size = space_dragon_red
  9608. }
  9609. }
  9610. #save_event_target_as = retaliating_dragon
  9611. set_timed_fleet_flag = {
  9612. flag = aggro_cooldown
  9613. days = 30
  9614. }
  9615. clear_fleet_actions = this
  9616. fleet_event = { id = leviathans.651 }
  9617. }
  9618. }
  9619.  
  9620. option = {
  9621. name = leviathans.649.a
  9622. trigger = { owner = { NOT = { has_ethic = ethic_gestalt_consciousness } } }
  9623. }
  9624.  
  9625. option = {
  9626. name = leviathans.649.b.gesta
  9627. trigger = { owner = { has_ethic = ethic_gestalt_consciousness } }
  9628. }
  9629. }
  9630.  
  9631. # Goes to two of fleeing country's systems (with stations) and gets wreckin'
  9632. fleet_event = {
  9633. id = leviathans.651
  9634. hide_window = yes
  9635.  
  9636. is_triggered_only = yes
  9637.  
  9638. trigger = {
  9639. exists = from
  9640. exists = from.owner
  9641. }
  9642.  
  9643. immediate = {
  9644. closest_system = {
  9645. limit = {
  9646. any_ship_in_system = {
  9647. OR = {
  9648. is_ship_size = mining_station
  9649. is_ship_size = research_station
  9650. is_ship_class = shipclass_starbase
  9651. }
  9652. exists = owner
  9653. owner = {
  9654. is_same_value = from.owner
  9655. }
  9656. }
  9657. }
  9658. set_star_flag = system_target_1
  9659. save_event_target_as = system_target_1
  9660. }
  9661. if = {
  9662. limit = {
  9663. exists = event_target:system_target_1
  9664. }
  9665. set_fleet_flag = dragon_mission_1
  9666. #from.owner = { country_event = { id = leviathans.649 } }
  9667. queue_actions = {
  9668. repeat = {
  9669. max_iterations = 1
  9670. find_closest_system = {
  9671. trigger = {
  9672. id = dragon.1.retaliation.1
  9673. is_same_value = event_target:system_target_1
  9674. }
  9675. found_system = {
  9676. move_to = this
  9677. find_closest_planet = {
  9678. trigger = {
  9679. id = dragon.1.retaliation.2
  9680. is_star = yes
  9681. }
  9682. found_planet = {
  9683. move_to = this
  9684. wait = {
  9685. duration = 1
  9686. }
  9687. effect = {
  9688. id = dragon.1.retaliation.3
  9689. solar_system = {
  9690. remove_star_flag = system_target_1
  9691. }
  9692. root = {
  9693. remove_fleet_flag = dragon_mission_1
  9694. #clear_fleet_actions = this
  9695. }
  9696. }
  9697. find_closest_system = {
  9698. trigger = {
  9699. id = dragon.3.retaliation.1
  9700. has_star_flag = guardians_dragon_system
  9701. }
  9702. found_system = {
  9703. move_to = this
  9704. find_closest_planet = {
  9705. trigger = {
  9706. id = dragon.3.retaliation.2
  9707. has_planet_flag = hoard_planet
  9708. }
  9709. found_planet = {
  9710. move_to = this
  9711. effect = {
  9712. id = dragon.3.retaliation.3
  9713. root = {
  9714. remove_fleet_flag = dragon_mission_3
  9715. clear_fleet_actions = this
  9716. }
  9717. }
  9718. }
  9719. }
  9720. }
  9721. }
  9722. }
  9723. }
  9724. }
  9725. }
  9726. }
  9727. }
  9728. }
  9729. }
  9730. }
  9731.  
  9732. # Goes to two of destroyed fleet owner's systems (with stations) and gets wreckin'
  9733. fleet_event = {
  9734. id = leviathans.652
  9735. hide_window = yes
  9736.  
  9737. is_triggered_only = yes
  9738.  
  9739. trigger = {
  9740. exists = fromfrom
  9741. }
  9742.  
  9743. immediate = {
  9744. closest_system = {
  9745. limit = {
  9746. any_ship_in_system = {
  9747. OR = {
  9748. is_ship_size = mining_station
  9749. is_ship_size = research_station
  9750. is_ship_class = shipclass_starbase
  9751. }
  9752. exists = owner
  9753. owner = {
  9754. is_same_value = fromfrom
  9755. }
  9756. }
  9757. }
  9758. set_star_flag = system_target_3
  9759. save_event_target_as = system_target_3
  9760. }
  9761. if = {
  9762. limit = {
  9763. exists = event_target:system_target_3
  9764. }
  9765. set_fleet_flag = dragon_mission_1
  9766. #fromfrom = { country_event = { id = leviathans.649 } }
  9767. queue_actions = {
  9768. repeat = {
  9769. max_iterations = 1
  9770. find_closest_system = {
  9771. trigger = {
  9772. id = dragon.4.retaliation.1
  9773. is_same_value = event_target:system_target_3
  9774. }
  9775. found_system = {
  9776. move_to = this
  9777. find_closest_planet = {
  9778. trigger = {
  9779. id = dragon.4.retaliation.2
  9780. is_star = yes
  9781. }
  9782. found_planet = {
  9783. move_to = this
  9784. wait = {
  9785. duration = 1
  9786. }
  9787. effect = {
  9788. id = dragon.4.retaliation.3
  9789. solar_system = {
  9790. remove_star_flag = system_target_3
  9791. }
  9792. root = {
  9793. remove_fleet_flag = dragon_mission_3
  9794. #clear_fleet_actions = this
  9795. }
  9796. }
  9797. find_closest_system = {
  9798. trigger = {
  9799. id = dragon.5.retaliation.1
  9800. has_star_flag = guardians_dragon_system
  9801. }
  9802. found_system = {
  9803. move_to = this
  9804. find_closest_planet = {
  9805. trigger = {
  9806. id = dragon.5.retaliation.2
  9807. has_planet_flag = hoard_planet
  9808. }
  9809. found_planet = {
  9810. move_to = this
  9811. effect = {
  9812. id = dragon.5.retaliation.3
  9813. root = {
  9814. remove_fleet_flag = dragon_mission_3
  9815. clear_fleet_actions = this
  9816. }
  9817. }
  9818. }
  9819. }
  9820. }
  9821. }
  9822. }
  9823. }
  9824. }
  9825. }
  9826. }
  9827. }
  9828. }
  9829. }
  9830. }
  9831.  
  9832. fleet_event = {
  9833. id = leviathans.654
  9834. hide_window = yes
  9835.  
  9836. is_triggered_only = yes
  9837.  
  9838. trigger = {
  9839. owner = {
  9840. is_country_type = default
  9841. }
  9842. from = {
  9843. has_star_flag = guardians_dragon_system
  9844. }
  9845. any_combatant_fleet = {
  9846. exists = owner
  9847. owner = {
  9848. is_country_type = guardian_dragon
  9849. }
  9850. #NOT = { has_fleet_flag = aggro_cooldown }
  9851. any_owned_ship = {
  9852. is_ship_size = space_dragon_red
  9853. has_hp_percentage < 0.16
  9854. }
  9855. }
  9856. }
  9857.  
  9858. immediate = {
  9859. from = {
  9860. random_fleet_in_system = {
  9861. limit = {
  9862. exists = owner
  9863. owner = {
  9864. is_country_type = guardian_dragon
  9865. }
  9866. #NOT = { has_fleet_flag = aggro_cooldown }
  9867. any_owned_ship = {
  9868. is_ship_size = space_dragon_red
  9869. }
  9870. }
  9871. random_owned_ship = {
  9872. limit = { is_ship_size = space_dragon_red }
  9873. save_event_target_as = dragon_ship
  9874. }
  9875. clear_fleet_actions = this
  9876. queue_actions = {
  9877. repeat = {
  9878. max_iterations = 1
  9879. find_random_system = {
  9880. trigger = {
  9881. id = guardian.hibernate.7
  9882. has_star_flag = guardians_dragon_system
  9883. }
  9884. found_system = {
  9885. move_to = this
  9886. find_random_planet = {
  9887. trigger = {
  9888. id = guardian.hibernate.8
  9889. is_star = yes
  9890. }
  9891. found_planet = {
  9892. move_to = this
  9893. orbit_planet = this
  9894. effect = {
  9895. id = guardian.hibernate.9
  9896. event_target:dragon_ship = {
  9897. repair_ship = yes
  9898. }
  9899. }
  9900. }
  9901. }
  9902. wait = {
  9903. duration = 60
  9904. }
  9905. }
  9906. }
  9907. }
  9908. }
  9909. }
  9910. }
  9911. }
  9912. }
  9913.  
  9914. # On won battle but wounded, hibernate
  9915. country_event = {
  9916. id = leviathans.655
  9917. hide_window = yes
  9918.  
  9919. is_triggered_only = yes
  9920.  
  9921. trigger = {
  9922. is_country_type = guardian_dragon
  9923. fromfrom = {
  9924. any_owned_ship = {
  9925. has_hp_percentage < 0.16
  9926. }
  9927. NOR = {
  9928. has_fleet_flag = dragon_mission_1
  9929. has_fleet_flag = dragon_mission_2
  9930. has_fleet_flag = dragon_mission_3
  9931. }
  9932. }
  9933. }
  9934.  
  9935. immediate = {
  9936. fromfrom = {
  9937. clear_fleet_actions = this
  9938. queue_actions = {
  9939. repeat = {
  9940. max_iterations = 1
  9941. find_random_system = {
  9942. trigger = {
  9943. id = guardian.hibernate.1
  9944. has_star_flag = guardians_dragon_system
  9945. }
  9946. found_system = {
  9947. move_to = this
  9948. find_random_planet = {
  9949. trigger = {
  9950. id = guardian.hibernate.2
  9951. is_star = yes
  9952. }
  9953. found_planet = {
  9954. orbit_planet = this
  9955. effect = {
  9956. id = guardian.hibernate.3
  9957. root.fromfrom = { random_owned_ship = { repair_ship = yes } }
  9958. }
  9959. }
  9960. }
  9961. wait = {
  9962. duration = 60
  9963. }
  9964. }
  9965. }
  9966. }
  9967. }
  9968. }
  9969. }
  9970. }
  9971.  
  9972. fleet_event = {
  9973. id = leviathans.1
  9974. hide_window = yes
  9975.  
  9976. trigger = { always = no }
  9977.  
  9978. immediate = {
  9979. destroy_fleet = this
  9980. }
  9981. }
  9982.  
  9983. planet_event = {
  9984. id = leviathans.660
  9985. hide_window = yes
  9986. mean_time_to_happen = {
  9987. years = 50
  9988. }
  9989.  
  9990. trigger = {
  9991. has_planet_flag = hoard_planet
  9992. #has_deposit = d_guardian_dragon_hoard
  9993. NOT = {
  9994. has_planet_flag = deboned
  9995. }
  9996. has_mining_station = yes
  9997. exists = controller
  9998. controller = {
  9999. is_country_type = default
  10000. }
  10001. }
  10002.  
  10003. immediate = {
  10004. set_planet_flag = deboned
  10005. controller = {
  10006. country_event = { id = leviathans.661 }
  10007. }
  10008. }
  10009. }
  10010.  
  10011. # Dragon Hoard event - Bones
  10012. country_event = {
  10013. id = leviathans.661
  10014. title = "leviathans.660.name"
  10015. desc = "leviathans.660.desc"
  10016. picture = GFX_evt_archaeological_dig
  10017. location = from
  10018. show_sound = event_mystic_reveal
  10019.  
  10020. is_triggered_only = yes
  10021.  
  10022. option = {
  10023. name = leviathans.660.a
  10024. add_research_option = tech_dragon_armor
  10025. add_tech_progress = {
  10026. tech = tech_dragon_armor
  10027. progress = 0.3
  10028. }
  10029. }
  10030.  
  10031. option = {
  10032. name = leviathans.660.b
  10033. add_monthly_resource_mult = {
  10034. resource = minerals
  10035. value = 36
  10036. min = 100
  10037. max = 4000
  10038. }
  10039. add_monthly_resource_mult = {
  10040. resource = society_research
  10041. value = 30
  10042. min = 1000
  10043. max = 5000
  10044. }
  10045. }
  10046. }
  10047.  
  10048. planet_event = {
  10049. id = leviathans.662
  10050. hide_window = yes
  10051.  
  10052. mean_time_to_happen = {
  10053. years = 50
  10054. }
  10055.  
  10056. trigger = {
  10057. has_planet_flag = hoard_planet
  10058. #has_deposit = d_guardian_dragon_hoard
  10059. NOT = {
  10060. has_planet_flag = deegged
  10061. }
  10062. has_mining_station = yes
  10063. exists = controller
  10064. controller = {
  10065. is_country_type = default
  10066. }
  10067. }
  10068.  
  10069. immediate = {
  10070. set_planet_flag = deegged
  10071. controller = {
  10072. country_event = { id = leviathans.663 }
  10073. }
  10074. }
  10075. }
  10076.  
  10077. # Dragon Hoard event - Egg
  10078. country_event = {
  10079. id = leviathans.663
  10080. title = "leviathans.661.name"
  10081. desc = "leviathans.661.desc"
  10082. picture = GFX_evt_archaeological_dig
  10083. location = root
  10084. show_sound = event_mystic_reveal
  10085. trackable = yes
  10086.  
  10087. is_triggered_only = yes
  10088.  
  10089. option = {
  10090. name = leviathans.661.a
  10091. custom_tooltip = leviathans.661.a.tooltip
  10092. capital_scope = {
  10093. enable_special_project = {
  10094. name = "DRAGON_INCUBATION_PROJECT"
  10095. location = this
  10096. owner = root
  10097. }
  10098. }
  10099. }
  10100.  
  10101. option = {
  10102. name = leviathans.661.b
  10103. custom_tooltip = leviathans.661.b.tooltip
  10104. add_resource = { influence = 300 }
  10105. }
  10106. }
  10107.  
  10108. # Egg incubated
  10109. planet_event = {
  10110. id = leviathans.664
  10111. title = leviathans.664.name
  10112. desc = leviathans.664.desc
  10113. picture = GFX_evt_space_dragon
  10114. location = root
  10115. show_sound = event_mystic_reveal
  10116.  
  10117. is_triggered_only = yes
  10118.  
  10119. immediate = {
  10120. create_fleet = {
  10121. name = "NAME_Ether_Hatchling"
  10122. settings = {
  10123. can_upgrade = no
  10124. can_change_composition = no
  10125. can_change_leader = no
  10126. uses_naval_capacity = no
  10127. spawn_debris = no
  10128. }
  10129. effect = {
  10130. set_owner = root.owner
  10131. create_ship_design = {
  10132. design = NAME_Dragonspawn
  10133. }
  10134. create_ship = {
  10135. design = last_created_design
  10136. name = "NAME_Scile"
  10137. prefix = no
  10138. upgradable = no
  10139. }
  10140. set_location = root
  10141. }
  10142. }
  10143. owner = { set_country_flag = hatched_dragon }
  10144. }
  10145.  
  10146. option = {
  10147. name = leviathans.664.a
  10148. custom_tooltip = leviathans.664.a.tooltip
  10149. }
  10150. }
  10151.  
  10152. country_event = {
  10153. id = leviathans.665
  10154. title = leviathans.665.name
  10155. desc = {
  10156. text = leviathans.665.desc
  10157. trigger = { NOT = { has_ethic = ethic_gestalt_consciousness } }
  10158. }
  10159. desc = {
  10160. text = leviathans.665.desc.gesta
  10161. trigger = { has_ethic = ethic_gestalt_consciousness }
  10162. }
  10163. picture = GFX_evt_throne_room
  10164. location = capital_scope
  10165. show_sound = event_mystic_reveal
  10166.  
  10167. is_triggered_only = yes
  10168.  
  10169. option = {
  10170. name = UNFORTUNATE
  10171. }
  10172. }
  10173.  
  10174. # victorious admiral gains dragonslayer trait
  10175. country_event = {
  10176. id = leviathans.670
  10177. title = leviathans.670.name
  10178. desc = {
  10179. text = leviathans.670.desc
  10180. trigger = {
  10181. NOT = { has_ethic = ethic_gestalt_consciousness }
  10182. fromfrom = {
  10183. exists = leader
  10184. }
  10185. }
  10186. }
  10187. desc = {
  10188. text = leviathans.670.desc.noleader
  10189. trigger = {
  10190. NOT = { has_ethic = ethic_gestalt_consciousness }
  10191. fromfrom = {
  10192. NOT = { exists = leader }
  10193. }
  10194. }
  10195. }
  10196. desc = {
  10197. text = leviathans.670.desc.gesta
  10198. trigger = {
  10199. has_ethic = ethic_gestalt_consciousness
  10200. fromfrom = {
  10201. NOT = { exists = leader }
  10202. }
  10203. }
  10204. }
  10205. picture = GFX_evt_space_dragon
  10206. location = fromfrom
  10207. show_sound = event_mystic_reveal
  10208.  
  10209. is_triggered_only = yes
  10210.  
  10211. trigger = {
  10212. from = {
  10213. is_country_type = guardian_dragon
  10214. NOT = { has_country_flag = rubricator_dragon_country }
  10215. }
  10216. #fromfromfrom = {
  10217. # has_fleet_flag = dragon_fleet
  10218. #}
  10219. }
  10220.  
  10221. immediate = {
  10222. every_country = {
  10223. limit = {
  10224. is_country_type = default
  10225. has_modifier = draconic_beats
  10226. }
  10227. remove_modifier = draconic_beats
  10228. }
  10229. fromfrom.solar_system = {
  10230. save_event_target_as = slain_guardian_system
  10231. }
  10232. every_country = {
  10233. limit = {
  10234. is_country_type = default
  10235. has_event_chain = curator_poi_chain
  10236. event_target:slain_guardian_system = {
  10237. is_point_of_interest = {
  10238. id = curator_poi_dragon
  10239. event_chain = curator_poi_chain
  10240. owner = prev
  10241. }
  10242. }
  10243. }
  10244. remove_point_of_interest = curator_poi_dragon
  10245. end_curator_chain = yes
  10246. }
  10247. }
  10248.  
  10249. option = {
  10250. name = leviathans.670.a
  10251. trigger = {
  10252. fromfrom = {
  10253. exists = leader
  10254. }
  10255. }
  10256. fromfrom = {
  10257. leader = {
  10258. add_trait = leader_trait_dragonslayer
  10259. }
  10260. }
  10261. add_resource = { influence = 300 }
  10262. add_relic = r_dragon_trophy
  10263. capital_scope = {
  10264. add_deposit = d_dragon_monument
  10265. }
  10266. }
  10267.  
  10268. option = {
  10269. name = leviathans.670.a
  10270. trigger = {
  10271. fromfrom = {
  10272. NOT = {
  10273. exists = leader
  10274. }
  10275. }
  10276. }
  10277. add_resource = { influence = 300 }
  10278. add_relic = r_dragon_trophy
  10279. capital_scope = {
  10280. add_deposit = d_dragon_monument
  10281. }
  10282. }
  10283. }
  10284.  
  10285. ### STELLARITE ###
  10286. # Stellarite spawns as an empire enters its system
  10287. ship_event = {
  10288. id = leviathans.999
  10289. title = leviathans.999.name
  10290. desc = leviathans.999.desc
  10291. picture = GFX_evt_star_yellow
  10292. show_sound = event_radio_chatter
  10293. location = root
  10294.  
  10295. is_triggered_only = yes
  10296.  
  10297. trigger = {
  10298. from = {
  10299. has_star_flag = guardians_stellarite_system
  10300. NOT = {
  10301. has_star_flag = guardians_stellarite_about_to_spawn
  10302. }
  10303. }
  10304. }
  10305.  
  10306. immediate = {
  10307. from = {
  10308. set_star_flag = guardians_stellarite_about_to_spawn
  10309. save_event_target_as = stellarite_system
  10310. set_star_flag = stellarite_present
  10311. every_system_planet = {
  10312. limit = {
  10313. is_star = no
  10314. is_asteroid = no
  10315. }
  10316. add_modifier = {
  10317. modifier = stellarite_low_temp
  10318. days = -1
  10319. }
  10320. }
  10321. }
  10322. }
  10323.  
  10324. option = {
  10325. name = leviathans.999.a
  10326. hidden_effect = {
  10327. owner = {
  10328. country_event = { id = leviathans.1000 days = 7 }
  10329. }
  10330. }
  10331. }
  10332. }
  10333. # Stellarite spawns
  10334. country_event = {
  10335. id = leviathans.1000
  10336. title = leviathans.1000.name
  10337. desc = leviathans.1000.desc
  10338. picture = GFX_evt_stellarites
  10339. show_sound = event_radio_chatter
  10340. location = fromfrom
  10341.  
  10342. is_triggered_only = yes
  10343.  
  10344. trigger = {
  10345. NOT = { has_country_flag = guardians_stellarite_encountered }
  10346. any_system = {
  10347. has_star_flag = guardians_stellarite_about_to_spawn
  10348. has_star_flag = guardians_stellarite_system
  10349. }
  10350. }
  10351.  
  10352. option = {
  10353. name = BATTLESTATIONS
  10354. hidden_effect = {
  10355. set_country_flag = guardians_stellarite_encountered
  10356. country_event = { id = story.8 days = 15 }
  10357. event_target:stellarite_system = {
  10358. random_system_planet = {
  10359. limit = {
  10360. is_star = yes
  10361. }
  10362. change_planet_size = -5
  10363. spawn_sun_temperature_effect = yes
  10364. create_country = {
  10365. name = "NAME_Stellarite"
  10366. type = guardian_stellarite
  10367. flag = {
  10368. icon = {
  10369. category = "zoological"
  10370. file = "flag_zoological_1.dds"
  10371. }
  10372. background= {
  10373. category = "backgrounds"
  10374. file = "00_solid.dds"
  10375. }
  10376. colors={
  10377. "black"
  10378. "black"
  10379. "null"
  10380. "null"
  10381. }
  10382. }
  10383. }
  10384. last_created_country = {
  10385. save_global_event_target_as = stellarite_country
  10386. set_country_flag = guardian_stellarite_country
  10387. create_fleet = {
  10388. name = "NAME_Stellarite_Devourer"
  10389. settings = {
  10390. spawn_debris = no
  10391. is_boss = yes
  10392. }
  10393. effect = {
  10394. set_owner = event_target:stellarite_country
  10395. create_ship = {
  10396. name = "NAME_Stellar_Devourer"
  10397. design = "NAME_Stellarite"
  10398. effect = {
  10399. set_ship_flag = stellarite_ship
  10400. save_global_event_target_as = stellarite
  10401. }
  10402. }
  10403. set_location = PREVPREV
  10404. set_fleet_stance = aggressive
  10405. set_aggro_range_measure_from = self
  10406. set_aggro_range = 100
  10407. }
  10408. }
  10409. }
  10410. }
  10411. }
  10412. establish_communications_no_message = event_target:stellarite_country
  10413. }
  10414. }
  10415. }
  10416.  
  10417. # Players who haven't encountered the stellarite gets a message
  10418. ship_event = {
  10419. id = leviathans.1001
  10420. title = leviathans.1000.name
  10421. desc = {
  10422. trigger = {
  10423. hidden:fromfromfrom = {
  10424. hidden:solar_system = {
  10425. switch = {
  10426. trigger = has_star_flag
  10427. guardians_stellarite_system = { text = leviathans.1000.desc }
  10428. default = { text = leviathans.1001.desc }
  10429. }
  10430. }
  10431. }
  10432. }
  10433. }
  10434. picture = GFX_evt_stellarites
  10435. show_sound = event_radio_chatter
  10436. location = root
  10437.  
  10438. is_triggered_only = yes
  10439.  
  10440. trigger = {
  10441. fromfrom = {
  10442. is_ai = no
  10443. NOT = { has_country_flag = guardians_stellarite_encountered }
  10444. }
  10445. from = {
  10446. any_ship_in_system = {
  10447. exists = owner
  10448. owner = {
  10449. is_country_type = guardian_stellarite
  10450. has_country_flag = guardian_stellarite_country
  10451. }
  10452. }
  10453. }
  10454. }
  10455.  
  10456. immediate = {
  10457. fromfrom = {
  10458. country_event = { id = story.8 days = 15 }
  10459. set_country_flag = guardians_stellarite_encountered
  10460. establish_communications_no_message = event_target:stellarite_country
  10461. }
  10462. }
  10463.  
  10464. option = {
  10465. name = DISCONCERTING
  10466. }
  10467. }
  10468.  
  10469. # Stellarite enter system - temperature change
  10470. fleet_event = {
  10471. id = leviathans.1005
  10472. hide_window = yes
  10473. is_triggered_only = yes
  10474.  
  10475. trigger = {
  10476. exists = owner
  10477. owner = {
  10478. is_country_type = guardian_stellarite
  10479. has_country_flag = guardian_stellarite_country
  10480. }
  10481. solar_system = {
  10482. NOT = { has_star_flag = guardians_stellarite_system }
  10483. }
  10484. }
  10485.  
  10486. immediate = {
  10487. if = {
  10488. limit = {
  10489. any_system = {
  10490. has_star_flag = stellarite_present
  10491. NOT = {
  10492. any_ship_in_system = {
  10493. owner = {
  10494. has_country_flag = guardian_stellarite_country
  10495. }
  10496. }
  10497. }
  10498. }
  10499. }
  10500. random_system = {
  10501. limit = {
  10502. has_star_flag = stellarite_present
  10503. }
  10504. remove_star_flag = stellarite_present
  10505. every_system_planet = {
  10506. limit = {
  10507. has_modifier = stellarite_high_temp
  10508. }
  10509. remove_modifier = stellarite_high_temp
  10510. }
  10511. }
  10512. }
  10513. solar_system = {
  10514. set_star_flag = stellarite_present
  10515. every_system_planet = {
  10516. limit = {
  10517. is_star = no
  10518. is_asteroid = no
  10519. }
  10520. add_modifier = {
  10521. modifier = stellarite_high_temp
  10522. days = -1
  10523. }
  10524. }
  10525. }
  10526. }
  10527. }
  10528. # Stellarite behaviour - chase aggressor setup - from destroyed fleet
  10529. country_event = {
  10530. id = leviathans.1009
  10531. hide_window = yes
  10532. is_triggered_only = yes
  10533.  
  10534. trigger = {
  10535. fromfrom = {
  10536. owner = {
  10537. is_country_type = guardian_stellarite
  10538. }
  10539. any_owned_ship = {
  10540. has_ship_flag = stellarite_ship
  10541. }
  10542. has_hp_percentage < 0.995
  10543. has_hp_percentage > 0.33
  10544. }
  10545. }
  10546.  
  10547. immediate = {
  10548. from = {
  10549. save_event_target_as = attacker_country
  10550. set_timed_country_flag = { flag = stellarite_in_pursuit days = 90 } #set so the stellarite finds them
  10551. }
  10552. fromfrom = {
  10553. clear_fleet_actions = this
  10554. save_event_target_as = stellarite_fleet
  10555. set_timed_fleet_flag = { flag = stellarite_in_pursuit days = 90 } #set so the stellarite knows when to stop chase
  10556. queue_actions = {
  10557. repeat = {
  10558. while = {
  10559. id = leviathans.1009.trigger.1
  10560. has_hp_percentage > 0.33
  10561. has_fleet_flag = stellarite_in_pursuit
  10562. }
  10563. find_closest_system = {
  10564. trigger = {
  10565. id = leviathans.1009.trigger.2
  10566. exists = space_owner
  10567. space_owner = { has_country_flag = stellarite_in_pursuit }
  10568. any_system_planet = {
  10569. OR = {
  10570. has_mining_station = yes
  10571. has_research_station = yes
  10572. }
  10573. is_owned_by = event_target:attacker_country
  10574. }
  10575. }
  10576. found_system = {
  10577. move_to = this
  10578. find_closest_planet = {
  10579. trigger = {
  10580. id = leviathans.1009.trigger.3
  10581. OR = {
  10582. has_mining_station = yes
  10583. has_research_station = yes
  10584. }
  10585. is_owned_by = event_target:attacker_country
  10586. }
  10587. found_planet = {
  10588. move_to = this
  10589. effect = {
  10590. id = leviathans.1009.effect.3
  10591. event_target:stellarite_fleet = {
  10592. fleet_event = { id = leviathans.1011 }
  10593. owner = { country_event = { id = leviathans.1015 } }
  10594. }
  10595. }
  10596. }
  10597. failed = {
  10598. effect = {
  10599. id = leviathans.1009.effect.2
  10600. event_target:stellarite_fleet = {
  10601. set_timed_fleet_flag = { flag = returning_home days = 7 }
  10602. owner = { country_event = { id = leviathans.1015 } }
  10603. }
  10604. }
  10605. }
  10606. }
  10607. }
  10608. failed = {
  10609. effect = {
  10610. id = leviathans.1009.effect.1
  10611. event_target:stellarite_fleet = {
  10612. set_timed_fleet_flag = { flag = returning_home days = 7 }
  10613. owner = { country_event = { id = leviathans.1015 } }
  10614. }
  10615. }
  10616. }
  10617. }
  10618. }
  10619. }
  10620. }
  10621. }
  10622. }
  10623. # Stellarite behaviour - chase aggressor setup - from emergency ftl
  10624. fleet_event = {
  10625. id = leviathans.1010
  10626. hide_window = yes
  10627. is_triggered_only = yes
  10628.  
  10629. trigger = {
  10630. any_combatant_fleet = {
  10631. owner = {
  10632. is_country_type = guardian_stellarite
  10633. }
  10634. any_owned_ship = {
  10635. has_ship_flag = stellarite_ship
  10636. }
  10637. has_hp_percentage < 0.995
  10638. has_hp_percentage > 0.33
  10639. }
  10640. }
  10641.  
  10642. immediate = {
  10643. owner = {
  10644. save_event_target_as = attacker_country
  10645. set_timed_country_flag = { flag = stellarite_in_pursuit days = 90 } #set so the stellarite finds them
  10646. }
  10647. random_combatant_fleet = {
  10648. limit = {
  10649. any_owned_ship = {
  10650. has_ship_flag = stellarite_ship
  10651. }
  10652. }
  10653. clear_fleet_actions = this
  10654. save_event_target_as = stellarite_fleet
  10655. set_timed_fleet_flag = { flag = stellarite_in_pursuit days = 90 } #set so the stellarite knows when to stop chase
  10656. queue_actions = {
  10657. repeat = {
  10658. while = {
  10659. id = leviathans.1010.trigger.1
  10660. has_hp_percentage > 0.33
  10661. has_fleet_flag = stellarite_in_pursuit
  10662. }
  10663. find_closest_system = {
  10664. trigger = {
  10665. id = leviathans.1010.trigger.2
  10666. exists = space_owner
  10667. space_owner = { has_country_flag = stellarite_in_pursuit }
  10668. any_system_planet = {
  10669. OR = {
  10670. has_mining_station = yes
  10671. has_research_station = yes
  10672. }
  10673. is_owned_by = event_target:attacker_country
  10674. }
  10675. }
  10676. found_system = {
  10677. move_to = this
  10678. find_closest_planet = {
  10679. trigger = {
  10680. id = leviathans.1010.trigger.3
  10681. OR = {
  10682. has_mining_station = yes
  10683. has_research_station = yes
  10684. }
  10685. is_owned_by = event_target:attacker_country
  10686. }
  10687. found_planet = {
  10688. move_to = this
  10689. effect = {
  10690. id = leviathans.1010.effect.3
  10691. event_target:stellarite_fleet = {
  10692. fleet_event = { id = leviathans.1011 }
  10693. owner = { country_event = { id = leviathans.1015 } }
  10694. }
  10695. }
  10696. }
  10697. failed = {
  10698. effect = {
  10699. id = leviathans.1010.effect.2
  10700. event_target:stellarite_fleet = {
  10701. set_timed_fleet_flag = { flag = returning_home days = 7 }
  10702. owner = { country_event = { id = leviathans.1015 } }
  10703. }
  10704. }
  10705. }
  10706. }
  10707. }
  10708. failed = {
  10709. effect = {
  10710. id = leviathans.1010.effect.1
  10711. event_target:stellarite_fleet = {
  10712. set_timed_fleet_flag = { flag = returning_home days = 7 }
  10713. owner = { country_event = { id = leviathans.1015 } }
  10714. }
  10715. }
  10716. }
  10717. }
  10718. }
  10719. }
  10720. }
  10721. }
  10722. }
  10723.  
  10724. # Stellarite behaviour - chase aggressor continuation
  10725. fleet_event = {
  10726. id = leviathans.1011
  10727. hide_window = yes
  10728. is_triggered_only = yes
  10729.  
  10730. trigger = {
  10731. owner = {
  10732. is_country_type = guardian_stellarite
  10733. }
  10734. has_fleet_flag = stellarite_in_pursuit
  10735. has_hp_percentage < 0.995
  10736. has_hp_percentage > 0.33
  10737. }
  10738.  
  10739. immediate = {
  10740. clear_fleet_actions = this
  10741. save_event_target_as = stellarite_fleet
  10742. queue_actions = {
  10743. repeat = {
  10744. while = {
  10745. id = leviathans.1011.trigger.1
  10746. has_hp_percentage > 0.33
  10747. has_fleet_flag = stellarite_in_pursuit
  10748. }
  10749. find_closest_system = {
  10750. trigger = {
  10751. id = leviathans.1011.trigger.2
  10752. exists = space_owner
  10753. space_owner = { has_country_flag = stellarite_in_pursuit }
  10754. any_system_planet = {
  10755. OR = {
  10756. has_mining_station = yes
  10757. has_research_station = yes
  10758. }
  10759. is_owned_by = event_target:attacker_country
  10760. }
  10761. }
  10762. found_system = {
  10763. move_to = this
  10764. find_closest_planet = {
  10765. trigger = {
  10766. id = leviathans.1011.trigger.3
  10767. OR = {
  10768. has_mining_station = yes
  10769. has_research_station = yes
  10770. }
  10771. is_owned_by = event_target:attacker_country
  10772. }
  10773. found_planet = {
  10774. move_to = this
  10775. effect = {
  10776. id = leviathans.1011.effect.3
  10777. event_target:stellarite_fleet = {
  10778. fleet_event = { id = leviathans.1011 }
  10779. owner = { country_event = { id = leviathans.1015 } }
  10780. }
  10781. }
  10782. }
  10783. failed = {
  10784. effect = {
  10785. id = leviathans.1011.effect.2
  10786. event_target:stellarite_fleet = {
  10787. set_timed_fleet_flag = { flag = returning_home days = 7 }
  10788. owner = { country_event = { id = leviathans.1015 } }
  10789. }
  10790. }
  10791. }
  10792. }
  10793. }
  10794. failed = {
  10795. effect = {
  10796. id = leviathans.1011.effect.1
  10797. event_target:stellarite_fleet = {
  10798. set_timed_fleet_flag = { flag = returning_home days = 7 }
  10799. owner = { country_event = { id = leviathans.1015 } }
  10800. }
  10801. }
  10802. }
  10803. }
  10804. }
  10805. }
  10806. }
  10807. }
  10808. # Stellarite behaviour - chase aggressor continuation from combat
  10809. country_event = {
  10810. id = leviathans.1012
  10811. hide_window = yes
  10812. is_triggered_only = yes
  10813.  
  10814. trigger = {
  10815. is_country_type = guardian_stellarite
  10816. any_owned_ship = {
  10817. has_ship_flag = stellarite_ship
  10818. fleet = {
  10819. has_hp_percentage < 0.995
  10820. has_hp_percentage > 0.33
  10821. }
  10822. }
  10823. }
  10824.  
  10825. immediate = {
  10826. from = {
  10827. if = {
  10828. limit = {
  10829. NOT = { has_country_flag = stellarite_in_pursuit }
  10830. }
  10831. set_timed_country_flag = { flag = stellarite_in_pursuit days = 90 }
  10832. }
  10833. }
  10834. fromfrom = {
  10835. set_timed_fleet_flag = { flag = stellarite_in_pursuit days = 90 }
  10836. save_event_target_as = stellarite_fleet
  10837. clear_fleet_actions = this
  10838. queue_actions = {
  10839. repeat = {
  10840. while = {
  10841. id = leviathans.1012.trigger.1
  10842. has_hp_percentage > 0.33
  10843. has_fleet_flag = stellarite_in_pursuit
  10844. }
  10845. find_closest_system = {
  10846. trigger = {
  10847. id = leviathans.1012.trigger.2
  10848. exists = space_owner
  10849. space_owner = { has_country_flag = stellarite_in_pursuit }
  10850. any_system_planet = {
  10851. OR = {
  10852. has_mining_station = yes
  10853. has_research_station = yes
  10854. }
  10855. is_owned_by = event_target:attacker_country
  10856. }
  10857. }
  10858. found_system = {
  10859. move_to = this
  10860. find_closest_planet = {
  10861. trigger = {
  10862. id = leviathans.1012.trigger.3
  10863. OR = {
  10864. has_mining_station = yes
  10865. has_research_station = yes
  10866. }
  10867. is_owned_by = event_target:attacker_country
  10868. }
  10869. found_planet = {
  10870. move_to = this
  10871. effect = {
  10872. id = leviathans.1012.effect.3
  10873. event_target:stellarite_fleet = {
  10874. fleet_event = { id = leviathans.1011 }
  10875. owner = { country_event = { id = leviathans.1015 } }
  10876. }
  10877. }
  10878. }
  10879. failed = {
  10880. effect = {
  10881. id = leviathans.1012.effect.2
  10882. event_target:stellarite_fleet = {
  10883. set_timed_fleet_flag = { flag = returning_home days = 7 }
  10884. owner = { country_event = { id = leviathans.1015 } }
  10885. }
  10886. }
  10887. }
  10888. }
  10889. }
  10890. failed = {
  10891. effect = {
  10892. id = leviathans.1012.effect.1
  10893. event_target:stellarite_fleet = {
  10894. set_timed_fleet_flag = { flag = returning_home days = 7 }
  10895. owner = { country_event = { id = leviathans.1015 } }
  10896. }
  10897. }
  10898. }
  10899. }
  10900. }
  10901. }
  10902. }
  10903. }
  10904. }
  10905.  
  10906. # Stellarite behaviour - chase aggressor setup
  10907. fleet_event = {
  10908. id = leviathans.1013
  10909. hide_window = yes
  10910. is_triggered_only = yes
  10911.  
  10912. trigger = {
  10913. any_combatant_fleet = {
  10914. any_owned_ship = {
  10915. has_ship_flag = stellarite_ship
  10916. }
  10917. has_hp_percentage < 0.995
  10918. has_hp_percentage > 0.33
  10919. }
  10920. }
  10921.  
  10922. immediate = {
  10923. random_combatant_fleet = {
  10924. owner = { country_event = { id = leviathans.1015 } }
  10925. }
  10926. }
  10927. }
  10928.  
  10929. # Stellarite behavior - chase aggressor setup
  10930. fleet_event = {
  10931. id = leviathans.1014
  10932. hide_window = yes
  10933. is_triggered_only = yes
  10934.  
  10935. trigger = {
  10936. any_combatant_fleet = {
  10937. any_owned_ship = {
  10938. has_ship_flag = stellarite_ship
  10939. }
  10940. has_hp_percentage < 0.995
  10941. has_hp_percentage > 0.33
  10942. }
  10943. }
  10944.  
  10945. immediate = {
  10946. random_combatant_fleet = {
  10947. limit = {
  10948. any_owned_ship = {
  10949. has_ship_flag = stellarite_ship
  10950. }
  10951. }
  10952. fleet_event = { id = leviathans.1011 }
  10953. }
  10954. }
  10955. }
  10956. # Stellarite behavior - return home if bored with weak opponent
  10957. fleet_event = {
  10958. id = leviathans.1020
  10959. hide_window = yes
  10960. is_triggered_only = yes
  10961.  
  10962. trigger = {
  10963. any_combatant_fleet = {
  10964. any_owned_ship = {
  10965. has_ship_flag = stellarite_ship
  10966. }
  10967. has_hp_percentage > 0.995
  10968. has_hp_percentage < 0.33
  10969. }
  10970. }
  10971.  
  10972. immediate = {
  10973. random_combatant_fleet = {
  10974. limit = {
  10975. any_owned_ship = {
  10976. has_ship_flag = stellarite_ship
  10977. }
  10978. }
  10979. owner = { country_event = { id = leviathans.1015 } }
  10980. }
  10981. }
  10982. }
  10983.  
  10984. # Stellarite behavior - return home to feed
  10985. country_event = {
  10986. id = leviathans.1015
  10987. hide_window = yes
  10988. is_triggered_only = yes
  10989.  
  10990. trigger = {
  10991. any_owned_fleet = {
  10992. any_owned_ship = { has_ship_flag = stellarite_ship }
  10993. OR = {
  10994. has_hp_percentage < 0.33
  10995. has_fleet_flag = returning_home
  10996. }
  10997. }
  10998. }
  10999.  
  11000. immediate = {
  11001. random_owned_fleet = {
  11002. limit = {
  11003. any_ship = { has_ship_flag = stellarite_ship }
  11004. }
  11005. clear_fleet_actions = this
  11006. queue_actions = {
  11007. repeat = {
  11008. max_iterations = 1
  11009. find_random_system = {
  11010. trigger = {
  11011. id = leviathans.1004.trigger.1
  11012. has_star_flag = guardians_stellarite_system
  11013. }
  11014. found_system = {
  11015. move_to = this
  11016. find_random_planet = {
  11017. trigger = {
  11018. id = leviathans.1004.trigger.2
  11019. is_star = yes
  11020. }
  11021. found_planet = {
  11022. orbit_planet = this
  11023. }
  11024. }
  11025. }
  11026. }
  11027. repeat = {
  11028. while = {
  11029. id = leviathans.1004.trigger.3
  11030. has_hp_percentage < 1.0
  11031. }
  11032. wait = {
  11033. duration = 30
  11034. }
  11035. effect = {
  11036. id = leviathans.1004.trigger.4
  11037. repair_percentage = 0.075
  11038. }
  11039. }
  11040. }
  11041. }
  11042. }
  11043. }
  11044. }
  11045.  
  11046. # Stellarite dies and creates special project
  11047. country_event = {
  11048. id = leviathans.1016
  11049. title = leviathans.1000.name
  11050. desc = {
  11051. text = leviathans.1016.desc
  11052. trigger = { NOT = { has_ethic = ethic_gestalt_consciousness } }
  11053. }
  11054. desc = {
  11055. text = leviathans.1016.desc.gesta
  11056. trigger = { has_ethic = ethic_gestalt_consciousness }
  11057. }
  11058. picture = GFX_evt_stellarites
  11059. show_sound = event_radio_chatter
  11060. location = event_target:stellarite_project_object
  11061. trackable = yes
  11062.  
  11063. is_triggered_only = yes
  11064.  
  11065. trigger = {
  11066. is_country_type = default
  11067. from = { is_country_type = guardian_stellarite }
  11068. fromfromfrom = {
  11069. has_ship_flag = stellarite_ship
  11070. solar_system = {
  11071. has_star_flag = stellarite_present
  11072. NOT = {
  11073. has_star_flag = stellarite_slain
  11074. }
  11075. }
  11076. }
  11077. }
  11078.  
  11079. immediate = {
  11080. fromfromfrom = {
  11081. solar_system = {
  11082. save_event_target_as = slain_guardian_system
  11083. }
  11084. create_ambient_object = {
  11085. type = stellarite_object
  11086. location = this
  11087. }
  11088. }
  11089. every_country = {
  11090. limit = {
  11091. is_country_type = default
  11092. has_event_chain = curator_poi_chain
  11093. event_target:slain_guardian_system = {
  11094. is_point_of_interest = {
  11095. id = curator_poi_stellarite
  11096. event_chain = curator_poi_chain
  11097. owner = prev
  11098. }
  11099. }
  11100. }
  11101. remove_point_of_interest = curator_poi_stellarite
  11102. end_curator_chain = yes
  11103. }
  11104. last_created_ambient_object = {
  11105. save_event_target_as = stellarite_project_object
  11106. set_ambient_object_flag = stellarite_project_object
  11107. solar_system = {
  11108. set_star_flag = stellarite_slain
  11109. }
  11110. }
  11111.  
  11112. random_system = {
  11113. limit = {
  11114. has_star_flag = stellarite_present
  11115. }
  11116. every_system_planet = {
  11117. limit = {
  11118. has_modifier = stellarite_high_temp
  11119. }
  11120. remove_modifier = stellarite_high_temp
  11121. }
  11122. }
  11123. }
  11124.  
  11125. option = {
  11126. name = leviathans.1016.a
  11127. #hidden_effect = {
  11128. event_target:stellarite_project_object = {
  11129. enable_special_project = {
  11130. name = "STELLARITE_DEAD_PROJECT"
  11131. location = this
  11132. owner = root
  11133. }
  11134. }
  11135. #}
  11136. }
  11137. option = {
  11138. name = leviathans.1016.b
  11139. trigger = {
  11140. OR = {
  11141. has_ethic = ethic_militarist
  11142. has_ethic = ethic_fanatic_militarist
  11143. has_ethic = ethic_xenophobe
  11144. has_ethic = ethic_fanatic_xenophobe
  11145. }
  11146. }
  11147. add_resource = { influence = 500 }
  11148. capital_scope = {
  11149. add_deposit = d_stellarite_trophy
  11150. }
  11151. hidden_effect = {
  11152. set_country_flag = stellarite_trophy_allowed
  11153. random_ambient_object = {
  11154. limit = {
  11155. has_ambient_object_flag = stellarite_project_object
  11156. }
  11157. destroy_ambient_object = this
  11158. }
  11159. }
  11160. }
  11161.  
  11162. after = {
  11163. hidden_effect = {
  11164. random_system = {
  11165. limit = {
  11166. has_star_flag = stellarite_present
  11167. }
  11168. remove_star_flag = stellarite_present
  11169. }
  11170. }
  11171. }
  11172. }
  11173.  
  11174. # Stellarite sun project to increase temperature
  11175. ship_event = {
  11176. id = leviathans.1017
  11177. title = leviathans.1000.name
  11178. desc = {
  11179. text = leviathans.1017.desc
  11180. trigger = {
  11181. NOT = { owner = { has_ethic = ethic_gestalt_consciousness } }
  11182. }
  11183. }
  11184. desc = {
  11185. text = leviathans.1017.desc.gesta
  11186. trigger = {
  11187. owner = { has_ethic = ethic_gestalt_consciousness }
  11188. }
  11189. }
  11190. picture = GFX_evt_star_yellow
  11191. show_sound = event_radio_chatter
  11192. location = root
  11193. trackable = yes
  11194.  
  11195. is_triggered_only = yes
  11196.  
  11197. immediate = {
  11198. solar_system = {
  11199. random_system_ambient_object = {
  11200. limit = { has_ambient_object_flag = stellarite_project_object }
  11201. destroy_ambient_object = this
  11202. }
  11203. }
  11204. random_system = {
  11205. limit = {
  11206. has_star_flag = guardians_stellarite_system
  11207. }
  11208. save_event_target_as = guardians_stellarite_home_system
  11209. }
  11210. }
  11211.  
  11212. option = {
  11213. name = leviathans.1017.a
  11214. random_system = {
  11215. limit = {
  11216. has_star_flag = guardians_stellarite_system
  11217. }
  11218. random_system_planet = {
  11219. limit = {
  11220. is_star = yes
  11221. }
  11222. enable_special_project = {
  11223. name = "STELLARITE_STAR_PROJECT"
  11224. location = this
  11225. owner = root.owner
  11226. }
  11227. }
  11228. }
  11229. }
  11230. option = {
  11231. name = leviathans.1017.b
  11232. owner = {
  11233. add_monthly_resource_mult = {
  11234. resource = energy
  11235. value = @tier4materialreward
  11236. min = @tier4materialmin
  11237. max = @tier4materialmax
  11238. }
  11239. add_monthly_resource_mult = {
  11240. resource = minerals
  11241. value = @tier2materialreward
  11242. min = @tier2materialmin
  11243. max = @tier2materialmax
  11244. }
  11245. add_monthly_resource_mult = {
  11246. resource = influence
  11247. value = @tier2influencereward
  11248. min = @tier2influencemin
  11249. max = @tier2influencemax
  11250. }
  11251. }
  11252. }
  11253. }
  11254.  
  11255. # Stellarite system is updated and Gaia world unlocks
  11256. ship_event = {
  11257. id = leviathans.1018
  11258. title = leviathans.1000.name
  11259. desc = {
  11260. trigger = {
  11261. hidden:owner = {
  11262. switch = {
  11263. trigger = has_country_flag
  11264. stellarite_project_success = { text = leviathans.1018.desc }
  11265. default = { text = leviathans.1018.alt.desc }
  11266. }
  11267. }
  11268. }
  11269. }
  11270. picture = GFX_evt_star_yellow
  11271. show_sound = event_radio_chatter
  11272. location = root
  11273.  
  11274. is_triggered_only = yes
  11275.  
  11276. immediate = {
  11277. random_system = {
  11278. limit = {
  11279. has_star_flag = guardians_stellarite_system
  11280. }
  11281. save_event_target_as = guardians_stellarite_home_system
  11282. random_system_planet = {
  11283. limit = {
  11284. is_planet_class = pc_frozen
  11285. }
  11286. save_event_target_as = stellarite_rich_planet
  11287. }
  11288. }
  11289. random_list = {
  11290. 70 = { owner = { set_country_flag = stellarite_project_success } }
  11291. 30 = {
  11292. root = {
  11293. kill_leader = { type = scientist show_notification = no }
  11294. fleet = {
  11295. destroy_fleet = this
  11296. }
  11297. }
  11298. }
  11299. }
  11300. }
  11301.  
  11302. option = {
  11303. name = EXCELLENT
  11304. custom_tooltip = leviathans.1018.a.tooltip
  11305. trigger = {
  11306. owner = {
  11307. has_country_flag = stellarite_project_success
  11308. }
  11309. }
  11310. hidden_effect = {
  11311. owner = { remove_country_flag = stellarite_project_success }
  11312. random_system = {
  11313. limit = {
  11314. has_star_flag = guardians_stellarite_system
  11315. }
  11316. random_system_planet = {
  11317. limit = {
  11318. is_star = yes
  11319. }
  11320. change_planet_size = 12
  11321. spawn_sun_temperature_effect = yes
  11322. }
  11323. every_system_planet = {
  11324. limit = {
  11325. is_star = no
  11326. is_asteroid = no
  11327. }
  11328. spawn_planet_temperature_effect = yes
  11329. remove_modifier = stellarite_low_temp
  11330. if = {
  11331. limit = {
  11332. is_planet_class = pc_frozen
  11333. NOT = { has_planet_flag = stellarite_terraformed }
  11334. solar_system = {
  11335. NOT = { has_star_flag = gaia_planet_gained }
  11336. }
  11337. }
  11338. change_pc = pc_gaia
  11339. set_planet_flag = stellarite_terraformed
  11340. reroll_planet = yes
  11341. solar_system = { set_star_flag = gaia_planet_gained }
  11342. }
  11343. else_if = {
  11344. limit = {
  11345. is_planet_class = pc_frozen
  11346. NOT = { has_planet_flag = stellarite_terraformed }
  11347. solar_system = {
  11348. has_star_flag = gaia_planet_gained
  11349. }
  11350. }
  11351. increase_planet_temperature = yes
  11352. set_planet_flag = stellarite_terraformed
  11353. }
  11354. else = {
  11355. increase_planet_temperature = yes
  11356. set_planet_flag = stellarite_terraformed
  11357. }
  11358. }
  11359. }
  11360. }
  11361. }
  11362. option = {
  11363. name = UNFORTUNATE
  11364. custom_tooltip = leviathans.1018.b.tooltip
  11365. trigger = {
  11366. owner = {
  11367. NOT = { has_country_flag = stellarite_project_success }
  11368. }
  11369. }
  11370. hidden_effect = {
  11371. random_system = {
  11372. limit = {
  11373. has_star_flag = guardians_stellarite_system
  11374. }
  11375. random_system_planet = {
  11376. limit = {
  11377. is_star = yes
  11378. }
  11379. change_planet_size = 8
  11380. planet_event = { id = leviathans.1019 }
  11381. }
  11382. every_system_planet = {
  11383. limit = {
  11384. is_star = no
  11385. is_asteroid = no
  11386. }
  11387. spawn_planet_temperature_effect = yes
  11388. remove_modifier = stellarite_low_temp
  11389. if = {
  11390. limit = {
  11391. is_planet_class = pc_frozen
  11392. NOT = { has_planet_flag = stellarite_terraformed }
  11393. }
  11394. change_pc = pc_tundra
  11395. set_planet_flag = stellarite_terraformed
  11396. reroll_planet = yes
  11397. }
  11398. else_if = {
  11399. limit = {
  11400. is_planet_class = pc_frozen
  11401. NOT = { has_planet_flag = stellarite_terraformed }
  11402. solar_system = {
  11403. has_star_flag = gaia_planet_gained
  11404. }
  11405. }
  11406. increase_planet_temperature = yes
  11407. set_planet_flag = stellarite_terraformed
  11408. reroll_planet = yes
  11409. }
  11410. else = {
  11411. increase_planet_temperature = yes
  11412. set_planet_flag = stellarite_terraformed
  11413. reroll_planet = yes
  11414. }
  11415. }
  11416. }
  11417. }
  11418. }
  11419. }
  11420.  
  11421. planet_event = {
  11422. id = leviathans.1019
  11423. hide_window = yes
  11424. is_triggered_only = yes
  11425.  
  11426. immediate = {
  11427. spawn_sun_temperature_effect = yes
  11428. }
  11429. }
  11430.  
  11431. ### TECHNOSPHERE ###
  11432. #Encountering Technosphere for the first time
  11433. fleet_event = {
  11434. id = leviathans.1030
  11435. title = leviathans.1030.name
  11436. desc = {
  11437. trigger = {
  11438. hidden:from = {
  11439. switch = {
  11440. trigger = has_star_flag
  11441. guardians_technosphere_system = { text = leviathans.1030.desc }
  11442. default = { text = leviathans.1030.desc.alt }
  11443. }
  11444. }
  11445. }
  11446. }
  11447. picture = GFX_evt_technosphere
  11448. show_sound = event_yellow_alert
  11449. location = from
  11450.  
  11451. is_triggered_only = yes
  11452.  
  11453. trigger = {
  11454. from = {
  11455. any_ship_in_system = {
  11456. exists = owner
  11457. owner = {
  11458. is_country_type = guardian_sphere
  11459. }
  11460. }
  11461. }
  11462. owner = {
  11463. is_ai = no
  11464. NOR = {
  11465. has_country_flag = guardians_technosphere_encountered
  11466. has_country_flag = worm_events_available
  11467. }
  11468. }
  11469. }
  11470.  
  11471. immediate = {
  11472. owner = {
  11473. country_event = { id = story.8 days = 15 }
  11474. set_country_flag = guardians_technosphere_encountered
  11475. establish_communications_no_message = event_target:guardian_technosphere_country
  11476. }
  11477. }
  11478.  
  11479. option = {
  11480. name = INTERESTING
  11481. owner = {
  11482. begin_event_chain = {
  11483. event_chain = technosphere_chain
  11484. target = root.owner
  11485. }
  11486. }
  11487. hidden_effect = {
  11488. owner = {
  11489. create_point_of_interest = {
  11490. id = technosphere_chain_poi
  11491. name = technosphere_chain_title
  11492. desc = technosphere_chain_desc
  11493. event_chain = technosphere_chain
  11494. location = root.solar_system
  11495. }
  11496. country_event = { id = leviathans.1050 days = 520 random = 200 }
  11497. }
  11498. }
  11499. }
  11500. }
  11501.  
  11502. #Technosphere return to black hole to heal
  11503. fleet_event = {
  11504. id = leviathans.1031
  11505. hide_window = yes
  11506. is_triggered_only = yes
  11507.  
  11508. trigger = {
  11509. any_combatant_fleet = {
  11510. has_fleet_flag = technosphere_fleet
  11511. }
  11512. }
  11513.  
  11514. immediate = {
  11515. random_combatant_fleet = {
  11516. limit = {
  11517. has_fleet_flag = technosphere_fleet
  11518. }
  11519. clear_fleet_actions = this
  11520. queue_actions = {
  11521. repeat = {
  11522. max_iterations = 1
  11523. find_random_system = {
  11524. trigger = {
  11525. id = leviathans.1031.trigger.1
  11526. has_star_flag = guardians_technosphere_system
  11527. }
  11528. found_system = {
  11529. move_to = this
  11530. #find_random_planet = {
  11531. # trigger = {
  11532. # id = leviathans.1031.trigger.2
  11533. # is_star = yes
  11534. # }
  11535. # found_planet = {
  11536. # orbit_planet = this
  11537. # }
  11538. #}
  11539. }
  11540. }
  11541. repeat = {
  11542. while = {
  11543. id = leviathans.1031.trigger.3
  11544. has_hp_percentage < 1.0
  11545. }
  11546. wait = {
  11547. duration = 30
  11548. }
  11549. effect = {
  11550. id = leviathans.1031.trigger.4
  11551. repair_percentage = 0.075
  11552. }
  11553. }
  11554. }
  11555. }
  11556. }
  11557. }
  11558. }
  11559.  
  11560. country_event = {
  11561. id = leviathans.1032
  11562. hide_window = yes
  11563. is_triggered_only = yes
  11564.  
  11565. trigger = {
  11566. fromfrom = {
  11567. has_fleet_flag = technosphere_fleet
  11568. }
  11569. }
  11570.  
  11571. immediate = {
  11572. fromfrom = {
  11573. clear_fleet_actions = this
  11574. queue_actions = {
  11575. repeat = {
  11576. max_iterations = 1
  11577. find_random_system = {
  11578. trigger = {
  11579. id = leviathans.1032.trigger.1
  11580. has_star_flag = guardians_technosphere_system
  11581. }
  11582. found_system = {
  11583. move_to = this
  11584. find_random_planet = {
  11585. trigger = {
  11586. id = leviathans.1032.trigger.2
  11587. is_star = yes
  11588. }
  11589. found_planet = {
  11590. orbit_planet = this
  11591. }
  11592. }
  11593. }
  11594. }
  11595. repeat = {
  11596. while = {
  11597. id = leviathans.1032.trigger.3
  11598. has_hp_percentage < 1.0
  11599. }
  11600. wait = {
  11601. duration = 30
  11602. }
  11603. effect = {
  11604. id = leviathans.1032.trigger.4
  11605. repair_percentage = 0.075
  11606. }
  11607. }
  11608. }
  11609. }
  11610. }
  11611. }
  11612. }
  11613.  
  11614. #Killing the Technosphere
  11615. country_event = {
  11616. id = leviathans.1039
  11617. hide_window = yes
  11618. is_triggered_only = yes
  11619.  
  11620. immediate = {
  11621. every_country = {
  11622. limit = {
  11623. is_country_type = default
  11624. has_event_chain = curator_poi_chain
  11625. event_target:slain_guardian_system = {
  11626. is_point_of_interest = {
  11627. id = curator_poi_technosphere
  11628. event_chain = curator_poi_chain
  11629. owner = prev
  11630. }
  11631. }
  11632. }
  11633. remove_point_of_interest = curator_poi_technosphere
  11634. end_curator_chain = yes
  11635. }
  11636. every_country = {
  11637. limit = {
  11638. is_country_type = default
  11639. has_event_chain = technosphere_chain
  11640. }
  11641. end_event_chain = technosphere_chain
  11642. }
  11643. every_country = {
  11644. limit = {
  11645. NOR = {
  11646. is_same_value = root
  11647. is_hostile = event_target:guardian_technosphere_country
  11648. }
  11649. is_country_type = default
  11650. OR = {
  11651. has_modifier = infinity_calculations
  11652. has_modifier = technosphere_praising
  11653. has_country_flag = guardians_technosphere_encountered
  11654. }
  11655. }
  11656. country_event = { id = leviathans.1041 }
  11657. }
  11658. }
  11659.  
  11660. after = {
  11661. if = {
  11662. limit = {
  11663. has_modifier = infinity_calculations
  11664. }
  11665. remove_modifier = infinity_calculations
  11666. }
  11667. if = {
  11668. limit = {
  11669. has_modifier = technosphere_praising
  11670. }
  11671. remove_modifier = technosphere_praising
  11672. }
  11673. }
  11674. }
  11675.  
  11676. country_event = {
  11677. id = leviathans.1040
  11678. title = leviathans.1030.name
  11679. desc = {
  11680. trigger = {
  11681. switch = {
  11682. trigger = has_country_flag
  11683. technosphere_sabotaged = { text = leviathans.1040.desc.alt }
  11684. technosphere_studied = { text = leviathans.1040.desc.detail }
  11685. default = { text = leviathans.1040.desc }
  11686. }
  11687. }
  11688. }
  11689. picture = GFX_evt_technosphere
  11690. show_sound = event_super_explosion
  11691. location = fromfrom
  11692.  
  11693. is_triggered_only = yes
  11694.  
  11695. trigger = {
  11696. OR = {
  11697. AND = {
  11698. has_country_flag = technosphere_sabotaged
  11699. fromfrom = { owner = { is_country_type = guardian_sphere } }
  11700. }
  11701. AND = {
  11702. from = {
  11703. is_country_type = guardian_sphere
  11704. }
  11705. }
  11706. }
  11707. }
  11708.  
  11709. immediate = {
  11710. fromfrom = {
  11711. solar_system = {
  11712. save_event_target_as = technosphere_location
  11713. save_event_target_as = slain_guardian_system
  11714. }
  11715. }
  11716. every_country = {
  11717. limit = {
  11718. is_country_type = default
  11719. has_event_chain = curator_poi_chain
  11720. event_target:slain_guardian_system = {
  11721. is_point_of_interest = {
  11722. id = curator_poi_technosphere
  11723. event_chain = curator_poi_chain
  11724. owner = prev
  11725. }
  11726. }
  11727. }
  11728. remove_point_of_interest = curator_poi_technosphere
  11729. end_curator_chain = yes
  11730. }
  11731. every_country = {
  11732. limit = {
  11733. is_country_type = default
  11734. has_event_chain = technosphere_chain
  11735. }
  11736. end_event_chain = technosphere_chain
  11737. }
  11738. every_country = {
  11739. limit = {
  11740. NOR = {
  11741. is_same_value = root
  11742. is_hostile = event_target:guardian_technosphere_country
  11743. }
  11744. is_country_type = default
  11745. OR = {
  11746. has_modifier = infinity_calculations
  11747. has_modifier = technosphere_praising
  11748. has_country_flag = guardians_technosphere_encountered
  11749. }
  11750. }
  11751. country_event = { id = leviathans.1041 }
  11752. }
  11753. }
  11754.  
  11755. after = {
  11756. if = {
  11757. limit = {
  11758. has_modifier = infinity_calculations
  11759. }
  11760. remove_modifier = infinity_calculations
  11761. }
  11762. if = {
  11763. limit = {
  11764. has_modifier = technosphere_praising
  11765. }
  11766. remove_modifier = technosphere_praising
  11767. }
  11768. }
  11769.  
  11770. option = {
  11771. name = leviathans.1040.a
  11772. add_monthly_resource_mult = {
  11773. resource = influence
  11774. value = @tier5influencereward
  11775. min = @tier5influencemin
  11776. max = @tier5influencemax
  11777. }
  11778. add_monthly_resource_mult = {
  11779. resource = minerals
  11780. value = @tier5materialreward
  11781. min = @tier5materialmin
  11782. max = @tier5materialmax
  11783. }
  11784. }
  11785. option = {
  11786. name = leviathans.1040.c
  11787. trigger = {
  11788. NOR = {
  11789. has_ethic = ethic_gestalt_consciousness
  11790. has_technology = tech_robotic_workers
  11791. has_technology = tech_droid_workers
  11792. has_technology = tech_synthetic_workers
  11793. has_technology = tech_synthetic_leaders
  11794. }
  11795. }
  11796. add_research_option = tech_robotic_workers
  11797. add_tech_progress = {
  11798. tech = tech_robotic_workers
  11799. progress = 0.50
  11800. }
  11801. }
  11802. option = {
  11803. name = leviathans.1040.c
  11804. trigger = {
  11805. has_technology = tech_robotic_workers
  11806. NOR = {
  11807. has_ethic = ethic_gestalt_consciousness
  11808. has_technology = tech_droid_workers
  11809. has_technology = tech_synthetic_workers
  11810. has_technology = tech_synthetic_leaders
  11811. }
  11812. }
  11813. add_research_option = tech_droid_workers
  11814. add_tech_progress = {
  11815. tech = tech_droid_workers
  11816. progress = 0.50
  11817. }
  11818. }
  11819. option = {
  11820. name = leviathans.1040.c
  11821. trigger = {
  11822. has_technology = tech_robotic_workers
  11823. has_technology = tech_droid_workers
  11824. NOR = {
  11825. has_ethic = ethic_gestalt_consciousness
  11826. has_technology = tech_synthetic_workers
  11827. has_technology = tech_synthetic_leaders
  11828. }
  11829. }
  11830. add_research_option = tech_synthetic_workers
  11831. add_tech_progress = {
  11832. tech = tech_synthetic_workers
  11833. progress = 0.50
  11834. }
  11835. }
  11836. option = {
  11837. name = leviathans.1040.c
  11838. trigger = {
  11839. has_technology = tech_robotic_workers
  11840. has_technology = tech_droid_workers
  11841. has_technology = tech_synthetic_workers
  11842. NOR = {
  11843. has_ethic = ethic_gestalt_consciousness
  11844. has_technology = tech_synthetic_leaders
  11845. }
  11846. }
  11847. add_research_option = tech_synthetic_leaders
  11848. add_tech_progress = {
  11849. tech = tech_synthetic_leaders
  11850. progress = 0.50
  11851. }
  11852. }
  11853. }
  11854.  
  11855. country_event = {
  11856. id = leviathans.1041
  11857. title = leviathans.1030.name
  11858. desc = leviathans.1041.desc
  11859. picture = GFX_evt_technosphere
  11860. show_sound = event_super_explosion
  11861. location = event_target:technosphere_ship
  11862.  
  11863. is_triggered_only = yes
  11864.  
  11865. after = {
  11866. if = {
  11867. limit = {
  11868. has_modifier = infinity_calculations
  11869. }
  11870. remove_modifier = infinity_calculations
  11871. }
  11872. if = {
  11873. limit = {
  11874. has_modifier = technosphere_praising
  11875. }
  11876. remove_modifier = technosphere_praising
  11877. }
  11878. }
  11879.  
  11880. option = {
  11881. name = TERRIBLE
  11882. trigger = {
  11883. NOR = {
  11884. has_ethic = ethic_fanatic_militarist
  11885. has_ethic = ethic_militarist
  11886. has_ethic = ethic_fanatic_materialist
  11887. has_ethic = ethic_materialist
  11888. }
  11889. }
  11890. }
  11891. option = {
  11892. name = CURSES
  11893. trigger = {
  11894. OR = {
  11895. has_ethic = ethic_fanatic_militarist
  11896. has_ethic = ethic_militarist
  11897. has_ethic = ethic_fanatic_materialist
  11898. has_ethic = ethic_materialist
  11899. }
  11900. }
  11901. }
  11902. }
  11903.  
  11904. #Investigating the Technosphere
  11905. country_event = {
  11906. id = leviathans.1050
  11907. title = leviathans.1050.name
  11908. desc = leviathans.1050.desc
  11909. picture = GFX_evt_technosphere
  11910. show_sound = event_sensor_ping
  11911. location = event_target:technosphere_ship
  11912. trackable = yes
  11913.  
  11914. is_triggered_only = yes
  11915.  
  11916. trigger = {
  11917. exists = event_target:technosphere_ship
  11918. is_ai = no
  11919. has_country_flag = guardians_technosphere_encountered
  11920. any_system = {
  11921. has_star_flag = guardians_technosphere_system
  11922. any_ship_in_system = {
  11923. exists = owner
  11924. owner = {
  11925. is_country_type = guardian_sphere
  11926. }
  11927. }
  11928. }
  11929. NOR = {
  11930. has_country_flag = worm_events_available
  11931. event_target:guardian_technosphere_country = {
  11932. is_hostile = root
  11933. }
  11934. }
  11935. }
  11936.  
  11937. immediate = {
  11938. event_target:guardian_technosphere_country = {
  11939. random_owned_ship = {
  11940. limit = {
  11941. is_ship_size = sphere
  11942. }
  11943. save_event_target_as = technosphere_location
  11944. }
  11945. }
  11946. end_event_chain = technosphere_chain
  11947. }
  11948.  
  11949. option = {
  11950. name = FASCINATING
  11951. enable_special_project = {
  11952. name = "TECHNOSPHERE_PROJECT"
  11953. location = event_target:technosphere_ship
  11954. owner = root
  11955. }
  11956. }
  11957. option = {
  11958. name = NOTIME
  11959. add_resource = { influence = 50 }
  11960. }
  11961. }
  11962.  
  11963. #Succeeded in researching the Technosphere
  11964. country_event = {
  11965. id = leviathans.1051
  11966. title = leviathans.1050.name
  11967. desc = leviathans.1051.desc
  11968. picture = GFX_evt_technosphere
  11969. show_sound = event_mystic_reveal
  11970. location = event_target:technosphere_ship
  11971. trackable = yes
  11972.  
  11973. is_triggered_only = yes
  11974.  
  11975. trigger = {
  11976. exists = event_target:technosphere_ship
  11977. NOT = { has_country_flag = worm_events_available }
  11978. }
  11979.  
  11980. immediate = {
  11981. set_country_flag = technosphere_studied
  11982. event_target:guardian_technosphere_country = {
  11983. random_owned_ship = {
  11984. limit = {
  11985. is_ship_size = sphere
  11986. }
  11987. save_event_target_as = technosphere_location
  11988. }
  11989. }
  11990. }
  11991.  
  11992. option = {
  11993. name = leviathans.1051.a
  11994. trigger = {
  11995. NOT = { has_ethic = ethic_gestalt_consciousness }
  11996. }
  11997. hidden_effect = {
  11998. country_event = { id = leviathans.1055 }
  11999. }
  12000. }
  12001. option = {
  12002. name = leviathans.1051.c #praise it as your god
  12003. trigger = {
  12004. OR = {
  12005. has_ethic = ethic_fanatic_spiritualist
  12006. has_ethic = ethic_spiritualist
  12007. }
  12008. }
  12009. add_modifier = {
  12010. modifier = technosphere_praising
  12011. days = -1
  12012. }
  12013. }
  12014. option = {
  12015. name = leviathans.1051.b #hack it
  12016. trigger = {
  12017. OR = {
  12018. has_ethic = ethic_fanatic_materialist
  12019. has_ethic = ethic_materialist
  12020. }
  12021. }
  12022. enable_special_project = {
  12023. name = TECHNOSPHERE_HACKING
  12024. location = event_target:technosphere_ship
  12025. owner = root
  12026. }
  12027. }
  12028. option = {
  12029. name = leviathans.1051.d #sabotage it
  12030. #custom_tooltip = leviathans.1051.d.tooltip
  12031. trigger = {
  12032. OR = {
  12033. has_ethic = ethic_fanatic_militarist
  12034. has_ethic = ethic_militarist
  12035. }
  12036. }
  12037. hidden_effect = {
  12038. set_country_flag = technosphere_sabotaged
  12039. }
  12040. event_target:technosphere_ship = {
  12041. enable_special_project = {
  12042. name = TECHNOSPHERE_DESTRUCTION
  12043. location = this
  12044. owner = root
  12045. }
  12046. }
  12047. }
  12048. option = {
  12049. name = leviathans.1051.e #hack it - Gestalt Consciousness
  12050. trigger = {
  12051. has_ethic = ethic_gestalt_consciousness
  12052. }
  12053. enable_special_project = {
  12054. name = TECHNOSPHERE_HACKING
  12055. location = event_target:technosphere_ship
  12056. owner = root
  12057. }
  12058. }
  12059. }
  12060.  
  12061. #Hacking the technosphere - success
  12062. country_event = {
  12063. id = leviathans.1052
  12064. title = leviathans.1050.name
  12065. desc = {
  12066. trigger = {
  12067. NOT = { has_ethic = ethic_gestalt_consciousness }
  12068. }
  12069. text = leviathans.1052.desc
  12070. }
  12071. desc = {
  12072. trigger = { has_ethic = ethic_gestalt_consciousness }
  12073. text = leviathans.1052.gestalt.desc
  12074. }
  12075. picture = GFX_evt_technosphere
  12076. show_sound = event_ai_started
  12077. location = event_target:technosphere_ship
  12078. is_triggered_only = yes
  12079.  
  12080. trigger = {
  12081. exists = event_target:technosphere_ship
  12082. }
  12083.  
  12084. immediate = {
  12085. event_target:guardian_technosphere_country = {
  12086. random_owned_ship = {
  12087. limit = {
  12088. is_ship_size = sphere
  12089. }
  12090. save_event_target_as = technosphere_location
  12091. }
  12092. }
  12093. }
  12094. after = {
  12095. add_modifier = {
  12096. modifier = infinity_calculations_hacked
  12097. days = -1
  12098. }
  12099. event_target:technosphere_location = {
  12100. solar_system = {
  12101. save_event_target_as = slain_guardian_system
  12102. }
  12103. fleet = {
  12104. destroy_fleet = this
  12105. }
  12106. }
  12107. hidden_effect = {
  12108. country_event = { id = leviathans.1039 }
  12109. }
  12110. }
  12111. option = {
  12112. name = leviathans.1052.a
  12113. give_technology = { tech = tech_sapient_ai }
  12114. trigger = {
  12115. NOT = {
  12116. has_technology = tech_sapient_ai
  12117. }
  12118. }
  12119. }
  12120. option = {
  12121. name = leviathans.1052.a
  12122. trigger = {
  12123. has_technology = tech_sapient_ai
  12124. NOT = {
  12125. has_technology = tech_zero_point_power
  12126. }
  12127. }
  12128. give_technology = { tech = tech_zero_point_power }
  12129. }
  12130. option = {
  12131. name = leviathans.1052.a
  12132. trigger = {
  12133. has_technology = tech_sapient_ai
  12134. has_technology = tech_zero_point_power
  12135. }
  12136. add_monthly_resource_mult = {
  12137. resource = society_research
  12138. value = 24
  12139. min = 1000
  12140. max = 5000
  12141. }
  12142. }
  12143. }
  12144.  
  12145. #Hacking the technosphere - fail
  12146. country_event = {
  12147. id = leviathans.1053
  12148. title = sphere
  12149. desc = leviathans.1053.desc
  12150. is_triggered_only = yes
  12151. diplomatic = yes
  12152.  
  12153. trigger = { exists = event_target:technosphere_ship }
  12154.  
  12155. picture_event_data = {
  12156. room = technosphere_room
  12157. }
  12158.  
  12159. option = {
  12160. name = leviathans.1053.a
  12161. response_text = leviathans.1053.a.reply
  12162. default_hide_option = yes
  12163. }
  12164. option = {
  12165. name = leviathans.1053.b
  12166. response_text = leviathans.1053.b.reply
  12167. }
  12168. }
  12169.  
  12170. #Contacting the technosphere
  12171. country_event = {
  12172. id = leviathans.1055
  12173. title = sphere
  12174. desc = leviathans.1055.desc
  12175. is_triggered_only = yes
  12176. diplomatic = yes
  12177.  
  12178. trigger = {
  12179. exists = event_target:technosphere_ship
  12180. NOT = { has_country_flag = worm_events_available }
  12181. }
  12182.  
  12183. picture_event_data = {
  12184. room = technosphere_room
  12185. }
  12186.  
  12187. option = {
  12188. name = leviathans.1055.a
  12189. #default_hide_option = yes
  12190. hidden_effect = {
  12191. country_event = { id = leviathans.1056 }
  12192. }
  12193. }
  12194. }
  12195.  
  12196. #Dialogue with the Technosphere
  12197. country_event = {
  12198. id = leviathans.1056
  12199. title = sphere
  12200. desc = leviathans.1056.desc
  12201. is_triggered_only = yes
  12202. diplomatic = yes
  12203.  
  12204. trigger = { exists = event_target:technosphere_ship }
  12205.  
  12206. picture_event_data = {
  12207. room = technosphere_room
  12208. }
  12209.  
  12210. option = {
  12211. name = leviathans.1056.a
  12212. response_text = leviathans.1056.a.reply
  12213. is_dialog_only = yes
  12214. }
  12215. option = {
  12216. name = leviathans.1056.b
  12217. response_text = leviathans.1056.b.reply
  12218. is_dialog_only = yes
  12219. }
  12220. option = {
  12221. name = leviathans.1056.c
  12222. response_text = leviathans.1056.c.reply
  12223. is_dialog_only = yes
  12224. trigger = {
  12225. OR = {
  12226. has_ethic = ethic_fanatic_militarist
  12227. has_ethic = ethic_militarist
  12228. has_ethic = ethic_fanatic_egalitarian
  12229. }
  12230. }
  12231. }
  12232. option = {
  12233. name = leviathans.1056.d
  12234. hidden_effect = {
  12235. country_event = { id = leviathans.1060 }
  12236. }
  12237. }
  12238. option = {
  12239. name = leviathans.1056.e
  12240. response_text = leviathans.1056.e.reply
  12241. add_resource = { influence = 100 }
  12242. }
  12243. }
  12244.  
  12245. #Offer your services to the Technosphere
  12246. country_event = {
  12247. id = leviathans.1060
  12248. title = sphere
  12249. desc = leviathans.1060.desc
  12250. is_triggered_only = yes
  12251. diplomatic = yes
  12252. trackable = yes
  12253.  
  12254. trigger = { exists = event_target:technosphere_ship }
  12255.  
  12256. picture_event_data = {
  12257. room = technosphere_room
  12258. }
  12259.  
  12260. immediate = {
  12261. random_system = {
  12262. limit = {
  12263. has_star_flag = guardians_technosphere_system
  12264. }
  12265. random_system_planet = {
  12266. limit = {
  12267. is_star = yes
  12268. }
  12269. save_event_target_as = technosphere_blackhole
  12270. }
  12271. }
  12272. }
  12273.  
  12274. option = {
  12275. name = leviathans.1060.a
  12276. response_text = leviathans.1060.a.reply
  12277. enable_special_project = {
  12278. name = TECHNOSPHERE_BLACKHOLE
  12279. location = event_target:technosphere_blackhole
  12280. owner = root
  12281. }
  12282. }
  12283. option = {
  12284. name = leviathans.1056.e #GOODBYE
  12285. response_text = leviathans.1056.e.reply
  12286. add_resource = { influence = 100 }
  12287. }
  12288. }
  12289.  
  12290. #Researching the black hole - success
  12291. country_event = {
  12292. id = leviathans.1061
  12293. title = sphere
  12294. desc = leviathans.1061.desc
  12295. is_triggered_only = yes
  12296. diplomatic = yes
  12297.  
  12298. trigger = { exists = event_target:technosphere_ship }
  12299.  
  12300. picture_event_data = {
  12301. room = technosphere_room
  12302. }
  12303.  
  12304. immediate = {
  12305. random_system = {
  12306. limit = {
  12307. has_star_flag = guardians_technosphere_system
  12308. }
  12309. random_system_planet = {
  12310. limit = {
  12311. is_star = yes
  12312. }
  12313. save_event_target_as = technosphere_blackhole
  12314. }
  12315. }
  12316. }
  12317.  
  12318. option = {
  12319. name = leviathans.1061.a
  12320. response_text = leviathans.1061.a.reply
  12321. give_technology = { tech = tech_sapient_ai }
  12322. add_resource = { influence = 150 }
  12323. trigger = {
  12324. NOT = {
  12325. has_technology = tech_sapient_ai
  12326. }
  12327. }
  12328. }
  12329. option = {
  12330. name = leviathans.1061.a
  12331. response_text = leviathans.1061.a.reply
  12332. give_technology = { tech = tech_zero_point_power }
  12333. add_resource = { influence = 150 }
  12334. trigger = {
  12335. has_technology = tech_sapient_ai
  12336. NOT = {
  12337. has_technology = tech_zero_point_power
  12338. }
  12339. }
  12340. }
  12341. option = {
  12342. name = leviathans.1061.b
  12343. response_text = leviathans.1061.b.reply
  12344. add_modifier = {
  12345. modifier = infinity_calculations
  12346. days = -1
  12347. }
  12348. trigger = {
  12349. NOR = {
  12350. has_technology = tech_sapient_ai
  12351. has_technology = tech_zero_point_power
  12352. }
  12353. }
  12354. }
  12355. option = {
  12356. name = leviathans.1061.b.alt
  12357. response_text = leviathans.1061.b.reply
  12358. add_modifier = {
  12359. modifier = infinity_calculations
  12360. days = -1
  12361. }
  12362. trigger = {
  12363. has_technology = tech_sapient_ai
  12364. has_technology = tech_zero_point_power
  12365. }
  12366. }
  12367. }
  12368.  
  12369. #Researching the black hole - submerge check (fail or special event)
  12370. country_event = {
  12371. id = leviathans.1062
  12372. title = sphere
  12373. desc = leviathans.1062.desc
  12374. show_sound = event_mystic_reveal
  12375. location = event_target:technosphere_ship
  12376. diplomatic = yes
  12377.  
  12378. trigger = { exists = event_target:technosphere_ship }
  12379.  
  12380. picture_event_data = {
  12381. room = technosphere_room
  12382. }
  12383.  
  12384. is_triggered_only = yes
  12385.  
  12386. immediate = {
  12387. set_country_flag = technosphere_studied
  12388. event_target:guardian_technosphere_country = {
  12389. random_owned_ship = {
  12390. limit = {
  12391. is_ship_size = sphere
  12392. }
  12393. save_event_target_as = technosphere_location
  12394. }
  12395. }
  12396.  
  12397. random_system = {
  12398. limit = {
  12399. has_star_flag = guardians_technosphere_system
  12400. }
  12401. random_system_planet = {
  12402. limit = {
  12403. is_star = yes
  12404. }
  12405. save_event_target_as = technosphere_blackhole
  12406. }
  12407. }
  12408. }
  12409.  
  12410. option = {
  12411. name = leviathans.1062.a
  12412. hidden_effect = {
  12413. event_target:guardian_technosphere_country = {
  12414. random_owned_ship = {
  12415. limit = {
  12416. is_ship_size = sphere
  12417. }
  12418. fleet = {
  12419. queue_actions = {
  12420. find_closest_planet = {
  12421. trigger = {
  12422. id = leviathans.1062.trigger.1
  12423. is_planet_class = pc_black_hole
  12424. solar_system = {
  12425. has_star_flag = guardians_technosphere_system
  12426. }
  12427. }
  12428. found_planet = {
  12429. move_to = this
  12430. effect = {
  12431. id = leviathans.1062.effect.1
  12432. root = {
  12433. if = {
  12434. limit = {
  12435. has_country_flag = technosphere_special
  12436. }
  12437. remove_country_flag = technosphere_special
  12438. country_event = { id = leviathans.1065 }
  12439. }
  12440. else = {
  12441. country_event = { id = leviathans.1063 }
  12442. }
  12443. }
  12444. }
  12445. }
  12446. }
  12447. }
  12448. }
  12449. }
  12450. }
  12451. }
  12452. }
  12453. }
  12454.  
  12455. #The technosphere submerges itself into the hole - FAIL
  12456. country_event = {
  12457. id = leviathans.1063
  12458. title = sphere
  12459. desc = leviathans.1063.desc
  12460. picture = GFX_evt_technosphere
  12461. show_sound = event_mystic_reveal
  12462. location = event_target:technosphere_ship
  12463.  
  12464. is_triggered_only = yes
  12465.  
  12466. trigger = { exists = event_target:technosphere_ship }
  12467.  
  12468. option = {
  12469. name = PECULIAR
  12470. custom_tooltip = leviathans.1063.a.tooltip
  12471. add_resource = { influence = 150 }
  12472. if = {
  12473. limit = {
  12474. NOT = {
  12475. has_technology = tech_sapient_ai
  12476. }
  12477. }
  12478. give_technology = { tech = tech_sapient_ai }
  12479. }
  12480. else_if = {
  12481. limit = {
  12482. NOT = { has_technology = tech_zero_point_power }
  12483. }
  12484. give_technology = { tech = tech_zero_point_power }
  12485. }
  12486. else = {
  12487. add_resource = { influence = 150 }
  12488. }
  12489. hidden_effect = {
  12490. event_target:technosphere_ship = {
  12491. solar_system = {
  12492. random_system_planet = {
  12493. limit = { is_star = yes }
  12494. add_deposit = d_physics_4
  12495. add_deposit = d_engineering_4
  12496. add_deposit = d_society_4
  12497. }
  12498. }
  12499. }
  12500. event_target:technosphere_ship = {
  12501. solar_system = {
  12502. save_event_target_as = slain_guardian_system
  12503. }
  12504. delete_fleet = this
  12505. }
  12506. country_event = { id = leviathans.1039 }
  12507. }
  12508. }
  12509. }
  12510.  
  12511. #The technosphere submerges itself into the hole - secret
  12512. country_event = {
  12513. id = leviathans.1065
  12514. title = sphere
  12515. desc = leviathans.1065.desc
  12516. picture = GFX_evt_technosphere
  12517. show_sound = event_mystic_reveal
  12518. location = event_target:technosphere_ship
  12519.  
  12520. is_triggered_only = yes
  12521.  
  12522. trigger = { exists = event_target:technosphere_ship }
  12523.  
  12524. immediate = {
  12525. set_country_flag = pantagruel
  12526. }
  12527.  
  12528. option = {
  12529. name = AMAZING
  12530. custom_tooltip = leviathans.1065.a.tooltip
  12531. add_modifier = {
  12532. modifier = black_hole_pantagruel_research
  12533. days = -1
  12534. }
  12535. hidden_effect = {
  12536. add_resource = { influence = 200 }
  12537. event_target:technosphere_ship.solar_system = {
  12538. random_system_planet = {
  12539. limit = { is_star = yes }
  12540. solar_system = {
  12541. set_name = "NAME_Pantagruel"
  12542. }
  12543. set_name = "NAME_Pantagruel"
  12544. change_planet_size = -30
  12545. create_ambient_object = {
  12546. type = explosion_particle_object
  12547. location = this
  12548. duration = 5
  12549.  
  12550. use_3d_location = yes
  12551.  
  12552. entity_offset = { min = 0 max = 0 }
  12553. entity_offset_angle = { min = 0 max = 0 }
  12554. entity_offset_height = { min = 0 max = 0 }
  12555.  
  12556. entity_scale_to_size = yes
  12557. scale = 100
  12558. }
  12559. add_deposit = d_physics_2
  12560. add_deposit = d_physics_4
  12561. add_deposit = d_physics_4
  12562. add_deposit = d_engineering_2
  12563. add_deposit = d_engineering_4
  12564. add_deposit = d_engineering_4
  12565. add_deposit = d_society_2
  12566. add_deposit = d_society_4
  12567. add_deposit = d_society_4
  12568. add_modifier = {
  12569. modifier = black_hole_pantagruel
  12570. days = -1
  12571. }
  12572. if = {
  12573. limit = {
  12574. exists = space_owner
  12575. space_owner = { is_same_value = root }
  12576. }
  12577. space_owner = {
  12578. add_modifier = {
  12579. modifier = black_hole_pantagruel_research
  12580. days = -1
  12581. }
  12582. }
  12583. }
  12584. if = {
  12585. limit = {
  12586. is_surveyed = {
  12587. who = root
  12588. status = no
  12589. }
  12590. }
  12591. surveyed = {
  12592. set_surveyed = yes
  12593. surveyor = root
  12594. }
  12595. }
  12596. }
  12597. }
  12598. event_target:technosphere_ship = {
  12599. solar_system = {
  12600. save_event_target_as = slain_guardian_system
  12601. }
  12602. #fleet = {
  12603. delete_fleet = this
  12604. #}
  12605. }
  12606. country_event = { id = leviathans.1039 }
  12607. }
  12608. }
  12609. }
  12610.  
  12611. #############################################################
  12612.  
  12613. # wraith won't be discovered past the midgame
  12614. event = {
  12615. id = leviathans.20101
  12616. hide_window = yes
  12617.  
  12618. is_triggered_only = yes
  12619.  
  12620. trigger = {
  12621. any_system = {
  12622. any_system_planet = { has_planet_flag = guardians_wraith_pulsar }
  12623. }
  12624. }
  12625.  
  12626. immediate = {
  12627. random_planet = {
  12628. limit = { has_planet_flag = guardians_wraith_pulsar }
  12629. remove_planet_flag = guardians_wraith_pulsar
  12630. }
  12631. }
  12632. }
  12633.  
  12634. ### WRAITH ###
  12635. # First scan of the neutron star, sets Wraith spawn timer
  12636. ship_event = {
  12637. id = leviathans.2010
  12638. title = "leviathans.2010.name"
  12639. desc = {
  12640. text = leviathans.2010.desc
  12641. trigger = {
  12642. owner = { NOT = { has_ethic = ethic_gestalt_consciousness } }
  12643. }
  12644. }
  12645. desc = {
  12646. text = leviathans.2010.desc.gesta
  12647. trigger = {
  12648. owner = { has_ethic = ethic_gestalt_consciousness }
  12649. }
  12650. }
  12651. picture = GFX_evt_star_pulsar
  12652. show_sound = event_mystic_reveal
  12653.  
  12654. is_triggered_only = yes
  12655.  
  12656. trigger = {
  12657. from = { has_planet_flag = guardians_wraith_pulsar }
  12658. }
  12659.  
  12660. immediate = {
  12661. from = {
  12662. remove_planet_flag = guardians_wraith_pulsar
  12663. add_modifier = {
  12664. modifier = germinating_wraith
  12665. days = -1
  12666. }
  12667. }
  12668. }
  12669.  
  12670. option = {
  12671. name = leviathans.2010.a
  12672. custom_tooltip = leviathans.2010.c
  12673. }
  12674. }
  12675.  
  12676. # Wraith is born
  12677. event = {
  12678. id = leviathans.2011
  12679. hide_window = yes
  12680.  
  12681. is_triggered_only = yes
  12682.  
  12683. trigger = {
  12684. any_system = {
  12685. any_system_planet = { has_modifier = germinating_wraith }
  12686. }
  12687. }
  12688.  
  12689. immediate = {
  12690. random_planet = {
  12691. limit = { has_modifier = germinating_wraith }
  12692. save_event_target_as = wraith_star
  12693. remove_modifier = germinating_wraith
  12694. create_country = {
  12695. name = "NAME_Wraith"
  12696. type = guardian_wraith
  12697. flag = {
  12698. icon = {
  12699. category = "zoological"
  12700. file = "flag_zoological_5.dds"
  12701. }
  12702. background= {
  12703. category = "backgrounds"
  12704. file = "00_solid.dds"
  12705. }
  12706. colors={
  12707. "red"
  12708. "red"
  12709. "null"
  12710. "null"
  12711. }
  12712. }
  12713. }
  12714. last_created_country = {
  12715. set_country_flag = wraith_country
  12716. save_global_event_target_as = wraith_country
  12717. create_fleet = {
  12718. name = "NAME_Specter"
  12719. settings = {
  12720. spawn_debris = no
  12721. is_boss = yes
  12722. }
  12723. effect = {
  12724. set_owner = event_target:wraith_country
  12725. random_list = {
  12726. 33 = {
  12727. create_ship = {
  12728. name = "NAME_Wraith_650THz"
  12729. design = "NAME_Spectral_Wraith_650THz"
  12730. effect = {
  12731. set_ship_flag = wraith_ship
  12732. set_ship_flag = wraith_freq_blue
  12733. }
  12734. }
  12735. }
  12736. 33 = {
  12737. create_ship = {
  12738. name = "NAME_Wraith_450THz"
  12739. design = "NAME_Spectral_Wraith_450THz"
  12740. effect = {
  12741. set_ship_flag = wraith_ship
  12742. set_ship_flag = wraith_freq_red
  12743. }
  12744. }
  12745. }
  12746. 33 = {
  12747. create_ship = {
  12748. name = "NAME_Wraith_520THz"
  12749. design = "NAME_Spectral_Wraith_520THz"
  12750. effect = {
  12751. set_ship_flag = wraith_ship
  12752. set_ship_flag = wraith_freq_yellow
  12753. }
  12754. }
  12755. }
  12756. }
  12757. save_global_event_target_as = wraith_fleet
  12758. set_location = event_target:wraith_star
  12759. set_fleet_stance = aggressive
  12760. set_aggro_range_measure_from = self
  12761. set_aggro_range = 20
  12762. queue_actions = {
  12763. repeat = {
  12764. find_closest_system = {
  12765. trigger = {
  12766. id = wraith.1.trigger.1
  12767. NOR = {
  12768. exists = space_owner
  12769. any_ship_in_system = {
  12770. fleet = { is_same_value = event_target:wraith_fleet }
  12771. }
  12772. has_star_flag = guardians_wraith_visited
  12773. }
  12774. }
  12775. found_system = {
  12776. move_to = this
  12777. find_closest_planet = {
  12778. trigger = {
  12779. id = wraith.1.trigger.2
  12780. is_star = yes
  12781. }
  12782. found_planet = {
  12783. move_to = this
  12784. #orbit_planet = this
  12785. wait = {
  12786. duration = 10
  12787. }
  12788. }
  12789. }
  12790. }
  12791. }
  12792. }
  12793. }
  12794. }
  12795. }
  12796. }
  12797. if = {
  12798. limit = { exists = space_owner }
  12799. space_owner = {
  12800. country_event = { id = leviathans.2012 }
  12801. }
  12802. }
  12803. }
  12804. }
  12805. }
  12806.  
  12807. # Wraith Spawned in Territory
  12808. country_event = {
  12809. id = leviathans.2012
  12810. title = "leviathans.2012.name"
  12811. desc = {
  12812. text = leviathans.2012.desc
  12813. trigger = {
  12814. NOT = { has_ethic = ethic_gestalt_consciousness }
  12815. }
  12816. }
  12817. desc = {
  12818. text = leviathans.2012.desc.gesta
  12819. trigger = {
  12820. has_ethic = ethic_gestalt_consciousness
  12821. }
  12822. }
  12823. picture = GFX_evt_wraith
  12824. show_sound = event_space_whale
  12825.  
  12826. is_triggered_only = yes
  12827.  
  12828. immediate = {
  12829. country_event = { id = story.8 days = 15 }
  12830. establish_communications_no_message = event_target:wraith_country
  12831. set_country_flag = guardians_wraith_encountered
  12832. }
  12833.  
  12834. option = {
  12835. name = leviathans.2012.a
  12836. }
  12837. }
  12838.  
  12839. # Wraith Enters Territory
  12840. country_event = {
  12841. id = leviathans.2013
  12842. title = "leviathans.2012.name"
  12843. desc = leviathans.2013.desc
  12844. picture = GFX_evt_wraith
  12845. show_sound = event_space_whale
  12846.  
  12847. is_triggered_only = yes
  12848.  
  12849. trigger = {
  12850. FROM.OWNER = { has_country_flag = wraith_country }
  12851. NOT = { has_country_flag = guardians_wraith_encountered }
  12852. }
  12853.  
  12854. immediate = {
  12855. country_event = { id = story.8 days = 15 }
  12856. establish_communications_no_message = event_target:wraith_country
  12857. set_country_flag = guardians_wraith_encountered
  12858. }
  12859.  
  12860. option = {
  12861. name = leviathans.2013.a
  12862. }
  12863. }
  12864.  
  12865. # Wraith killed
  12866. country_event = {
  12867. id = leviathans.2014
  12868. title = "leviathans.2014.name"
  12869. desc = {
  12870. text = leviathans.2014.desc
  12871. trigger = {
  12872. NOT = { has_ethic = ethic_gestalt_consciousness }
  12873. }
  12874. }
  12875. desc = {
  12876. text = leviathans.2014.desc.gesta
  12877. trigger = {
  12878. has_ethic = ethic_gestalt_consciousness
  12879. }
  12880. }
  12881. picture = GFX_evt_wraith
  12882. show_sound = event_space_whale
  12883.  
  12884. is_triggered_only = yes
  12885.  
  12886. trigger = {
  12887. from = { has_country_flag = wraith_country }
  12888. }
  12889.  
  12890. immediate = {
  12891. set_country_flag = killed_wraith
  12892. fromfrom.solar_system = {
  12893. save_event_target_as = slain_guardian_system
  12894. }
  12895. every_country = {
  12896. limit = {
  12897. is_country_type = default
  12898. has_event_chain = curator_poi_chain
  12899. event_target:slain_guardian_system = {
  12900. is_point_of_interest = {
  12901. id = curator_poi_wraith
  12902. event_chain = curator_poi_chain
  12903. owner = prev
  12904. }
  12905. }
  12906. }
  12907. remove_point_of_interest = curator_poi_wraith
  12908. end_curator_chain = yes
  12909. }
  12910. }
  12911.  
  12912. option = {
  12913. name = leviathans.2014.a
  12914. add_modifier = {
  12915. modifier = "spectral_residue_studies"
  12916. days = -1
  12917. }
  12918. }
  12919. }
  12920.  
  12921. # Wraith Frequency Modifier Mechanics
  12922. ship_event = {
  12923. id = leviathans.2061
  12924. hide_window = yes
  12925. is_triggered_only = yes
  12926.  
  12927. trigger = { has_ship_flag = wraith_ship }
  12928.  
  12929. immediate = {
  12930. solar_system = {
  12931. set_star_flag = guardians_wraith_visited
  12932. if = {
  12933. limit = {
  12934. exists = space_owner
  12935. space_owner = { NOT = { has_country_flag = guardians_wraith_encountered } }
  12936. }
  12937. space_owner = {
  12938. country_event = { id = leviathans.2013 }
  12939. }
  12940. }
  12941. }
  12942. if = {
  12943. limit = { has_modifier = wraith_frequency_sync }
  12944. # Removes the modifier when the right star class is not present
  12945. if = {
  12946. limit = {
  12947. has_ship_flag = wraith_freq_blue
  12948. NOT = {
  12949. solar_system = {
  12950. OR = {
  12951. is_star_class = sc_b
  12952. is_star_class = sc_a
  12953. }
  12954. }
  12955. }
  12956. }
  12957. remove_modifier = "wraith_frequency_sync"
  12958. }
  12959. if = {
  12960. limit = {
  12961. has_ship_flag = wraith_freq_yellow
  12962. NOT = {
  12963. solar_system = {
  12964. is_star_class = sc_g
  12965. }
  12966. }
  12967. }
  12968. remove_modifier = "wraith_frequency_sync"
  12969. }
  12970. if = {
  12971. limit = {
  12972. has_ship_flag = wraith_freq_red
  12973. NOT = {
  12974. solar_system = {
  12975. is_star_class = sc_m
  12976. }
  12977. }
  12978. }
  12979. remove_modifier = "wraith_frequency_sync"
  12980. }
  12981. }
  12982. if = {
  12983. limit = { NOT = { has_modifier = wraith_frequency_sync } }
  12984. # Adds the modifier when the right star class is present
  12985. if = {
  12986. limit = {
  12987. has_ship_flag = wraith_freq_blue
  12988. solar_system = {
  12989. OR = {
  12990. is_star_class = sc_b
  12991. is_star_class = sc_a
  12992. }
  12993. }
  12994. }
  12995. add_modifier = { modifier = "wraith_frequency_sync" days = -1 }
  12996. }
  12997. if = {
  12998. limit = {
  12999. has_ship_flag = wraith_freq_yellow
  13000. solar_system = {
  13001. is_star_class = sc_g
  13002. }
  13003. }
  13004. add_modifier = { modifier = "wraith_frequency_sync" days = -1 }
  13005. }
  13006. if = {
  13007. limit = {
  13008. has_ship_flag = wraith_freq_red
  13009. solar_system = {
  13010. is_star_class = sc_m
  13011. }
  13012. }
  13013. add_modifier = { modifier = "wraith_frequency_sync" days = -1 }
  13014. }
  13015. }
  13016. }
  13017. }
  13018.  
  13019. # Enigmatic Fortress Disabled (HIDDEN)
  13020. ship_event = {
  13021. id = leviathans.2100
  13022. hide_window = yes
  13023.  
  13024. is_triggered_only = yes
  13025.  
  13026. trigger = {
  13027. has_ship_flag = fortress_vault
  13028. from.owner = { is_country_type = default }
  13029. }
  13030.  
  13031. immediate = {
  13032. from.owner = { country_event = { id = leviathans.2101 } }
  13033. }
  13034. }
  13035.  
  13036. # Ship destroyed perp port
  13037. country_event = {
  13038. id = leviathans.2099
  13039. title = "leviathans.2101.name"
  13040. desc = {
  13041. text = "leviathans.2101.desc"
  13042. trigger = { NOT = { has_ethic = ethic_gestalt_consciousness } }
  13043. }
  13044. desc = {
  13045. text = "leviathans.2101.desc.gesta"
  13046. trigger = { has_ethic = ethic_gestalt_consciousness }
  13047. }
  13048. picture = GFX_evt_enigmatic_fortress
  13049. show_sound = event_space_battle
  13050. location = fromfrom
  13051.  
  13052. is_triggered_only = yes
  13053.  
  13054. trigger = {
  13055. exists = from
  13056. exists = event_target:fortress_country
  13057. from = { is_same_value = event_target:fortress_country }
  13058. exists = event_target:fortress_vault_core
  13059. event_target:fortress_country = {
  13060. count_owned_ships = { # Check that all ships are disabled
  13061. limit = { is_disabled = no }
  13062. count < 1
  13063. }
  13064. }
  13065. }
  13066.  
  13067. immediate = {
  13068. country_event = { id = story.8 days = 15 }
  13069. establish_communications_no_message = event_target:fortress_country
  13070. #event_target:fortress_country = {
  13071. event_target:fortress_vault_core = {
  13072. #limit = { has_ship_flag = fortress_vault }
  13073. save_global_event_target_as = disabled_enigmatic_fortress
  13074. }
  13075. #}
  13076. every_playable_country = {
  13077. limit = { has_event_chain = "enigmatic_fortress_chain" }
  13078. end_event_chain = "enigmatic_fortress_chain"
  13079. }
  13080. }
  13081.  
  13082. option = {
  13083. name = "leviathans.2101.a"
  13084. begin_event_chain = {
  13085. event_chain = "enigmatic_fortress_chain"
  13086. target = root
  13087. }
  13088. hidden_effect = { country_event = { id = leviathans.2111 } }
  13089. trigger = { NOT = { has_ethic = ethic_gestalt_consciousness } }
  13090. }
  13091.  
  13092. option = {
  13093. name = "leviathans.2101.b"
  13094. hidden_effect = { country_event = { id = leviathans.2160 days = 360 } }
  13095. trigger = { NOT = { has_ethic = ethic_gestalt_consciousness } }
  13096. }
  13097.  
  13098. option = {
  13099. name = leviathans.2101.c.gesta
  13100. trigger = { has_ethic = ethic_gestalt_consciousness }
  13101. add_monthly_resource_mult = {
  13102. resource = engineering_research
  13103. value = 24
  13104. min = 1000
  13105. max = 5000
  13106. }
  13107. add_monthly_resource_mult = {
  13108. resource = physics_research
  13109. value = 24
  13110. min = 1000
  13111. max = 5000
  13112. }
  13113. add_monthly_resource_mult = {
  13114. resource = society_research
  13115. value = 24
  13116. min = 1000
  13117. max = 5000
  13118. }
  13119. add_research_option = tech_enigmatic_encoder
  13120. add_tech_progress = {
  13121. tech = tech_enigmatic_encoder
  13122. progress = 0.30
  13123. }
  13124. add_research_option = tech_enigmatic_decoder
  13125. add_tech_progress = {
  13126. tech = tech_enigmatic_decoder
  13127. progress = 0.30
  13128. }
  13129. hidden_effect = {
  13130. # scuttle fortress
  13131. event_target:fortress_vault_core = {
  13132. fleet = {
  13133. set_event_locked = no
  13134. destroy_fleet = this
  13135. }
  13136. }
  13137. #event_target:fortress_country = {
  13138. # every_owned_fleet = {
  13139. # delete_fleet = this
  13140. # }
  13141. #}
  13142. #event_target:fortress_vault_core = {
  13143. # solar_system = {
  13144. # random_system_planet = {
  13145. # limit = { is_star = yes }
  13146. # create_ambient_object = {
  13147. # type = "dead_enigmatic_fortress_object"
  13148. # location = solar_system
  13149. # }
  13150. # last_created_ambient_object = {
  13151. # save_global_event_target_as = fortress_ambient
  13152. # set_location = {
  13153. # target = PREV
  13154. # distance = 110
  13155. # angle = 110
  13156. # }
  13157. # }
  13158. # }
  13159. # }
  13160. # fleet = {
  13161. # delete_fleet = this
  13162. # }
  13163. #}
  13164. }
  13165. }
  13166. }
  13167.  
  13168.  
  13169.  
  13170. # The Enigmatic Fortress
  13171. country_event = {
  13172. id = leviathans.2101
  13173. title = "leviathans.2101.name"
  13174. desc = "leviathans.2101.desc"
  13175. picture = GFX_evt_enigmatic_fortress
  13176. show_sound = event_space_battle
  13177. location = from
  13178.  
  13179. is_triggered_only = yes
  13180.  
  13181. trigger = {
  13182. from.owner = { is_same_value = event_target:fortress_country }
  13183. event_target:fortress_country = {
  13184. count_owned_ships = { # Check that all ships are disabled
  13185. limit = { is_disabled = no }
  13186. count < 1
  13187. }
  13188. }
  13189. }
  13190.  
  13191. immediate = {
  13192. if = {
  13193. limit = {
  13194. NOT = { has_communications = event_target:fortress_country }
  13195. }
  13196. country_event = { id = story.8 days = 15 }
  13197. establish_communications_no_message = event_target:fortress_country
  13198. }
  13199. event_target:fortress_country = {
  13200. random_owned_ship = {
  13201. limit = { has_ship_flag = fortress_vault }
  13202. save_global_event_target_as = disabled_enigmatic_fortress
  13203. }
  13204. }
  13205. }
  13206.  
  13207. option = {
  13208. name = "leviathans.2101.a"
  13209. begin_event_chain = {
  13210. event_chain = "enigmatic_fortress_chain"
  13211. target = root
  13212. }
  13213. hidden_effect = { country_event = { id = leviathans.2111 } }
  13214. }
  13215.  
  13216. option = {
  13217. name = "leviathans.2101.b"
  13218. hidden_effect = { country_event = { id = leviathans.2160 days = 360 } }
  13219. }
  13220.  
  13221. }
  13222.  
  13223. # Entering System
  13224. ship_event = {
  13225. id = leviathans.2105
  13226. title = "leviathans.2105.name"
  13227. desc = "leviathans.2105.desc"
  13228. picture = GFX_evt_enigmatic_fortress
  13229. show_sound = event_ship_bridge
  13230. location = FROM
  13231.  
  13232. is_triggered_only = yes
  13233.  
  13234. trigger = {
  13235. FROM = {
  13236. has_star_flag = guardians_fortress_system
  13237. any_ship = {
  13238. AND = {
  13239. is_ship_size = station_xl
  13240. is_disabled = no
  13241. }
  13242. }
  13243. }
  13244. owner = {
  13245. NOT = { has_country_flag = encountered_fortress }
  13246. is_ai = no
  13247. }
  13248. }
  13249.  
  13250. immediate = {
  13251. FROM = { save_event_target_as = fortress_system }
  13252. owner = { set_country_flag = encountered_fortress }
  13253. }
  13254.  
  13255. option = {
  13256. name = "leviathans.2105.a"
  13257. }
  13258. }
  13259.  
  13260. # Entering the Fortress
  13261. country_event = {
  13262. id = leviathans.2111
  13263. title = "leviathans.2111.name"
  13264. desc = "leviathans.2111.desc"
  13265. picture = GFX_evt_enigmatic_fortress
  13266. show_sound = event_mystic_reveal
  13267. location = event_target:disabled_enigmatic_fortress
  13268. trackable = yes
  13269.  
  13270. is_triggered_only = yes
  13271.  
  13272. option = {
  13273. name = "leviathans.2111.a"
  13274. custom_tooltip = leviathans.2111.a.tooltip
  13275. hidden_effect = {
  13276. event_target:disabled_enigmatic_fortress = {
  13277. enable_special_project = {
  13278. name = "ENIGMATIC_FORTRESS_1A"
  13279. location = this
  13280. owner = ROOT
  13281. }
  13282. }
  13283. event_target:disabled_enigmatic_fortress = {
  13284. enable_special_project = {
  13285. name = "ENIGMATIC_FORTRESS_1B"
  13286. location = this
  13287. owner = ROOT
  13288. }
  13289. }
  13290. }
  13291. }
  13292. }
  13293.  
  13294. # Uncontrolled Demolition
  13295. ship_event = {
  13296. id = leviathans.2112
  13297. title = "leviathans.2112.name"
  13298. desc = "leviathans.2112.desc"
  13299. picture = GFX_evt_enigmatic_fortress
  13300. show_sound = event_ground_battle
  13301. location = fromfrom
  13302.  
  13303. is_triggered_only = yes
  13304.  
  13305. option = {
  13306. name = "leviathans.2112.a"
  13307. custom_tooltip = leviathans.2112.a.tooltip
  13308. hidden_effect = {
  13309. owner = { country_event = { id = leviathans.2131 days = 30 } }
  13310. fleet = { destroy_fleet = this }
  13311. }
  13312. }
  13313. }
  13314.  
  13315. # Adjusting Energy Supply
  13316. ship_event = {
  13317. id = leviathans.2113
  13318. title = "leviathans.2113.name"
  13319. desc = "leviathans.2113.desc"
  13320. picture = GFX_evt_enigmatic_fortress
  13321. show_sound = event_laboratory_sound
  13322. location = fromfrom
  13323.  
  13324. is_triggered_only = yes
  13325.  
  13326. option = {
  13327. name = "leviathans.2113.a"
  13328. trigger = { owner = { resource_stockpile_compare = { resource = energy value >= 500 } } }
  13329. owner = {
  13330. add_resource = { energy = -500 }
  13331. hidden_effect = { country_event = { id = leviathans.2114 } }
  13332. }
  13333. }
  13334. option = {
  13335. name = "leviathans.2113.b"
  13336. owner = {
  13337. add_resource = { energy = -50 }
  13338. hidden_effect = { country_event = { id = leviathans.2115 } }
  13339. }
  13340. }
  13341. }
  13342.  
  13343. # Fortress Repowers (Energy Surge)
  13344. country_event = {
  13345. id = leviathans.2114
  13346. title = "leviathans.2114.name"
  13347. desc = "leviathans.2114.desc"
  13348. picture = GFX_evt_enigmatic_fortress
  13349. show_sound = event_activating_unknown_technology
  13350. location = event_target:disabled_enigmatic_fortress
  13351.  
  13352. is_triggered_only = yes
  13353.  
  13354. option = {
  13355. name = "leviathans.2114.a"
  13356. hidden_effect = {
  13357. event_target:disabled_enigmatic_fortress = {
  13358. set_disabled = no
  13359. repair_ship = yes
  13360. }
  13361. }
  13362. end_event_chain = "enigmatic_fortress_chain"
  13363. }
  13364. }
  13365.  
  13366. # Airlock Opened
  13367. country_event = {
  13368. id = leviathans.2115
  13369. title = "leviathans.2115.name"
  13370. desc = "leviathans.2115.desc"
  13371. picture = GFX_evt_enigmatic_fortress
  13372. show_sound = event_airlock
  13373. location = event_target:disabled_enigmatic_fortress
  13374.  
  13375. is_triggered_only = yes
  13376.  
  13377. option = {
  13378. name = "leviathans.2115.a"
  13379. custom_tooltip = leviathans.2112.a.tooltip
  13380. hidden_effect = { country_event = { id = leviathans.2131 days = 30 } }
  13381. }
  13382. }
  13383.  
  13384. # The Tower
  13385. country_event = {
  13386. id = leviathans.2131
  13387. title = "leviathans.2131.name"
  13388. desc = "leviathans.2131.desc"
  13389. picture = GFX_evt_enigmatic_fortress
  13390. show_sound = event_mystic_reveal
  13391. location = event_target:disabled_enigmatic_fortress
  13392.  
  13393. is_triggered_only = yes
  13394.  
  13395. option = {
  13396. name = "leviathans.2131.a"
  13397. hidden_effect = { country_event = { id = leviathans.2132 } }
  13398. }
  13399. option = {
  13400. name = "leviathans.2131.b"
  13401. hidden_effect = { country_event = { id = leviathans.2132 } }
  13402. }
  13403. option = {
  13404. name = "leviathans.2131.c"
  13405. hidden_effect = { country_event = { id = leviathans.2133 } }
  13406. }
  13407. option = {
  13408. name = "leviathans.2131.d"
  13409. hidden_effect = { country_event = { id = leviathans.2132 } }
  13410. }
  13411. }
  13412.  
  13413. # Disturbing Noises
  13414. country_event = {
  13415. id = leviathans.2132
  13416. title = "leviathans.2132.name"
  13417. desc = "leviathans.2132.desc"
  13418. picture = GFX_evt_enigmatic_fortress
  13419. show_sound = event_activating_unknown_technology
  13420. location = event_target:disabled_enigmatic_fortress
  13421.  
  13422. is_triggered_only = yes
  13423.  
  13424. option = {
  13425. name = "leviathans.2132.a"
  13426. hidden_effect = {
  13427. event_target:disabled_enigmatic_fortress = {
  13428. set_disabled = no
  13429. repair_ship = yes
  13430. }
  13431. }
  13432. end_event_chain = "enigmatic_fortress_chain"
  13433. }
  13434. }
  13435.  
  13436. # Tower Rebuilt
  13437. country_event = {
  13438. id = leviathans.2133
  13439. title = "leviathans.2133.name"
  13440. desc = "leviathans.2133.desc"
  13441. picture = GFX_evt_enigmatic_fortress
  13442. show_sound = event_radio_chatter
  13443. location = event_target:disabled_enigmatic_fortress
  13444.  
  13445. is_triggered_only = yes
  13446.  
  13447. option = {
  13448. name = "leviathans.2133.a"
  13449. custom_tooltip = guardian.fortress.continue
  13450. hidden_effect = {
  13451. country_event = { id = leviathans.2150 days = 30 }
  13452. }
  13453. }
  13454. }
  13455.  
  13456. # The Pivot
  13457. country_event = {
  13458. id = leviathans.2150
  13459. title = "leviathans.2150.name"
  13460. desc = "leviathans.2150.desc"
  13461. picture = GFX_evt_enigmatic_fortress
  13462. show_sound = event_mystic_reveal
  13463. location = event_target:disabled_enigmatic_fortress
  13464. trackable = yes
  13465.  
  13466. is_triggered_only = yes
  13467.  
  13468. option = {
  13469. name = "leviathans.2150.a"
  13470. event_target:disabled_enigmatic_fortress = {
  13471. solar_system = {
  13472. random_system_planet = {
  13473. limit = { is_star = yes }
  13474. enable_special_project = {
  13475. name = "ENIGMATIC_FORTRESS_5B"
  13476. location = this
  13477. owner = ROOT
  13478. }
  13479. }
  13480. }
  13481. if = {
  13482. limit = {
  13483. ROOT = {
  13484. has_country_resource = {
  13485. type = sr_dark_matter
  13486. amount > 10
  13487. }
  13488. }
  13489. }
  13490. enable_special_project = {
  13491. name = "ENIGMATIC_FORTRESS_5C"
  13492. location = this
  13493. owner = ROOT
  13494. }
  13495. }
  13496. enable_special_project = {
  13497. name = "ENIGMATIC_FORTRESS_5D"
  13498. location = this
  13499. owner = ROOT
  13500. }
  13501. }
  13502. add_resource = { sr_dark_matter = -10 }
  13503. capital_scope = {
  13504. closest_system = {
  13505. limit = {
  13506. has_access_fleet = ROOT
  13507. has_planet_class = pc_black_hole
  13508. }
  13509. random_system_planet = {
  13510. limit = { is_planet_class = pc_black_hole }
  13511. enable_special_project = {
  13512. name = "ENIGMATIC_FORTRESS_5A"
  13513. location = this
  13514. owner = ROOT
  13515. }
  13516. }
  13517. }
  13518. }
  13519. }
  13520. }
  13521.  
  13522. # The Heart of Dark Matter
  13523. country_event = {
  13524. id = leviathans.2151
  13525. title = "leviathans.2151.name"
  13526. desc = "leviathans.2151.desc"
  13527. picture = GFX_evt_enigmatic_fortress
  13528. show_sound = event_laboratory_sound
  13529. location = from
  13530.  
  13531. is_triggered_only = yes
  13532.  
  13533. immediate = {
  13534. set_country_flag = fortress_solved
  13535. event_target:disabled_enigmatic_fortress = {
  13536. save_event_target_as = slain_guardian_system
  13537. }
  13538. every_country = {
  13539. limit = {
  13540. is_country_type = default
  13541. has_event_chain = curator_poi_chain
  13542. event_target:slain_guardian_system = {
  13543. is_point_of_interest = {
  13544. id = curator_poi_fortress
  13545. event_chain = curator_poi_chain
  13546. owner = prev
  13547. }
  13548. }
  13549. }
  13550. remove_point_of_interest = curator_poi_fortress
  13551. end_curator_chain = yes
  13552. }
  13553. event_target:disabled_enigmatic_fortress = {
  13554. solar_system = {
  13555. random_system_planet = {
  13556. limit = { is_star = yes }
  13557. create_ambient_object = {
  13558. type = "dead_enigmatic_fortress_object"
  13559. location = solar_system
  13560. }
  13561. last_created_ambient_object = {
  13562. save_global_event_target_as = fortress_ambient
  13563. set_location = {
  13564. target = PREV
  13565. distance = 110
  13566. angle = 110
  13567. }
  13568. }
  13569. }
  13570.  
  13571. }
  13572. fleet = {
  13573. delete_fleet = this
  13574. }
  13575. }
  13576. }
  13577.  
  13578. option = {
  13579. name = "leviathans.2151.a"
  13580. add_monthly_resource_mult = {
  13581. resource = engineering_research
  13582. value = 24
  13583. min = 1000
  13584. max = 5000
  13585. }
  13586. add_monthly_resource_mult = {
  13587. resource = physics_research
  13588. value = 24
  13589. min = 1000
  13590. max = 5000
  13591. }
  13592. add_monthly_resource_mult = {
  13593. resource = society_research
  13594. value = 24
  13595. min = 1000
  13596. max = 5000
  13597. }
  13598. add_research_option = tech_enigmatic_encoder
  13599. add_tech_progress = {
  13600. tech = tech_enigmatic_encoder
  13601. progress = 0.30
  13602. }
  13603. add_research_option = tech_enigmatic_decoder
  13604. add_tech_progress = {
  13605. tech = tech_enigmatic_decoder
  13606. progress = 0.30
  13607. }
  13608. end_event_chain = "enigmatic_fortress_chain"
  13609. }
  13610. }
  13611.  
  13612. # Our Star Witness
  13613. country_event = {
  13614. id = leviathans.2152
  13615. title = "leviathans.2152.name"
  13616. desc = "leviathans.2152.desc"
  13617. picture = GFX_evt_enigmatic_fortress
  13618. show_sound = event_alien_signal
  13619. location = event_target:disabled_enigmatic_fortress
  13620.  
  13621. is_triggered_only = yes
  13622.  
  13623. option = {
  13624. name = "leviathans.2152.a"
  13625. hidden_effect = { country_event = { id = leviathans.2153 } }
  13626. }
  13627. option = {
  13628. name = "leviathans.2152.b"
  13629. hidden_effect = { country_event = { id = leviathans.2154 } }
  13630. }
  13631. option = {
  13632. name = "leviathans.2152.c"
  13633. hidden_effect = { country_event = { id = leviathans.2155 } }
  13634. }
  13635. }
  13636.  
  13637. # Fruitless Beginnings
  13638. country_event = {
  13639. id = leviathans.2153
  13640. title = "leviathans.2153.name"
  13641. desc = "leviathans.2153.desc"
  13642. picture = GFX_evt_enigmatic_fortress
  13643. show_sound = event_activating_unknown_technology
  13644. location = event_target:disabled_enigmatic_fortress
  13645.  
  13646. is_triggered_only = yes
  13647.  
  13648. option = {
  13649. name = "leviathans.2153.a"
  13650. end_event_chain = "enigmatic_fortress_chain"
  13651. hidden_effect = {
  13652. event_target:disabled_enigmatic_fortress = {
  13653. set_disabled = no
  13654. repair_ship = yes
  13655. }
  13656. }
  13657. }
  13658. }
  13659.  
  13660. # The Middle Path
  13661. country_event = {
  13662. id = leviathans.2154
  13663. title = "leviathans.2154.name"
  13664. desc = "leviathans.2154.desc"
  13665. picture = GFX_evt_enigmatic_fortress
  13666. show_sound = event_laboratory_sound
  13667. location = event_target:disabled_enigmatic_fortress
  13668.  
  13669. is_triggered_only = yes
  13670.  
  13671. immediate = {
  13672. set_country_flag = fortress_solved
  13673. event_target:disabled_enigmatic_fortress = {
  13674. save_event_target_as = slain_guardian_system
  13675. }
  13676. every_country = {
  13677. limit = {
  13678. is_country_type = default
  13679. has_event_chain = curator_poi_chain
  13680. event_target:slain_guardian_system = {
  13681. is_point_of_interest = {
  13682. id = curator_poi_fortress
  13683. event_chain = curator_poi_chain
  13684. owner = prev
  13685. }
  13686. }
  13687. }
  13688. remove_point_of_interest = curator_poi_fortress
  13689. end_curator_chain = yes
  13690. }
  13691. event_target:disabled_enigmatic_fortress = {
  13692. solar_system = {
  13693. random_system_planet = {
  13694. limit = { is_star = yes }
  13695. create_ambient_object = {
  13696. type = "dead_enigmatic_fortress_object"
  13697. location = solar_system
  13698. }
  13699. last_created_ambient_object = {
  13700. save_global_event_target_as = fortress_ambient
  13701. set_location = {
  13702. target = PREV
  13703. distance = 110
  13704. angle = 110
  13705. }
  13706. }
  13707. #create_ambient_object = {
  13708. # type = explosion_particle_object
  13709. # location = this
  13710. # use_3d_location = yes
  13711. # duration = 10
  13712. # scale = 20
  13713. #}
  13714. #last_created_ambient_object = {
  13715. # set_location = {
  13716. # target = PREV
  13717. # distance = 110
  13718. # angle = 110
  13719. # }
  13720. #}
  13721. }
  13722. }
  13723. fleet = {
  13724. delete_fleet = this
  13725. }
  13726. }
  13727. }
  13728.  
  13729. option = {
  13730. name = "leviathans.2154.a"
  13731. add_monthly_resource_mult = {
  13732. resource = engineering_research
  13733. value = 24
  13734. min = 1000
  13735. max = 5000
  13736. }
  13737. add_monthly_resource_mult = {
  13738. resource = physics_research
  13739. value = 24
  13740. min = 1000
  13741. max = 5000
  13742. }
  13743. add_monthly_resource_mult = {
  13744. resource = society_research
  13745. value = 24
  13746. min = 1000
  13747. max = 5000
  13748. }
  13749. add_research_option = tech_enigmatic_encoder
  13750. add_tech_progress = {
  13751. tech = tech_enigmatic_encoder
  13752. progress = 0.30
  13753. }
  13754. add_research_option = tech_enigmatic_decoder
  13755. add_tech_progress = {
  13756. tech = tech_enigmatic_decoder
  13757. progress = 0.30
  13758. }
  13759. end_event_chain = "enigmatic_fortress_chain"
  13760. }
  13761. }
  13762.  
  13763. # The End
  13764. country_event = {
  13765. id = leviathans.2155
  13766. title = "leviathans.2155.name"
  13767. desc = "leviathans.2155.desc"
  13768. picture = GFX_evt_enigmatic_fortress
  13769. show_sound = event_activating_unknown_technology
  13770. location = event_target:disabled_enigmatic_fortress
  13771.  
  13772. is_triggered_only = yes
  13773.  
  13774. option = {
  13775. name = "leviathans.2155.a"
  13776. end_event_chain = "enigmatic_fortress_chain"
  13777. hidden_effect = {
  13778. event_target:disabled_enigmatic_fortress = {
  13779. set_disabled = no
  13780. repair_ship = yes
  13781. }
  13782. }
  13783. }
  13784. }
  13785.  
  13786. # Dark Matter Gambit
  13787. country_event = {
  13788. id = leviathans.2156
  13789. title = "leviathans.2156.name"
  13790. desc = "leviathans.2156.desc"
  13791. picture = GFX_evt_enigmatic_fortress
  13792. show_sound = event_laboratory_sound
  13793. location = event_target:disabled_enigmatic_fortress
  13794.  
  13795. is_triggered_only = yes
  13796.  
  13797. immediate = {
  13798. set_country_flag = fortress_solved
  13799. event_target:disabled_enigmatic_fortress = {
  13800. save_event_target_as = slain_guardian_system
  13801. }
  13802. every_country = {
  13803. limit = {
  13804. is_country_type = default
  13805. has_event_chain = curator_poi_chain
  13806. event_target:slain_guardian_system = {
  13807. is_point_of_interest = {
  13808. id = curator_poi_fortress
  13809. event_chain = curator_poi_chain
  13810. owner = prev
  13811. }
  13812. }
  13813. }
  13814. remove_point_of_interest = curator_poi_fortress
  13815. end_curator_chain = yes
  13816. }
  13817. event_target:disabled_enigmatic_fortress = {
  13818. solar_system = {
  13819. random_system_planet = {
  13820. limit = { is_star = yes }
  13821. create_ambient_object = {
  13822. type = "dead_enigmatic_fortress_object"
  13823. location = solar_system
  13824. }
  13825. last_created_ambient_object = {
  13826. save_global_event_target_as = fortress_ambient
  13827. set_location = {
  13828. target = PREV
  13829. distance = 110
  13830. angle = 110
  13831. }
  13832. }
  13833. }
  13834.  
  13835. }
  13836. fleet = {
  13837. delete_fleet = this
  13838. }
  13839. }
  13840. }
  13841.  
  13842. option = {
  13843. name = "leviathans.2156.a"
  13844. add_monthly_resource_mult = {
  13845. resource = engineering_research
  13846. value = 24
  13847. min = 1000
  13848. max = 5000
  13849. }
  13850. add_monthly_resource_mult = {
  13851. resource = physics_research
  13852. value = 24
  13853. min = 1000
  13854. max = 5000
  13855. }
  13856. add_monthly_resource_mult = {
  13857. resource = society_research
  13858. value = 24
  13859. min = 1000
  13860. max = 5000
  13861. }
  13862. add_research_option = tech_enigmatic_encoder
  13863. add_tech_progress = {
  13864. tech = tech_enigmatic_encoder
  13865. progress = 0.30
  13866. }
  13867. add_research_option = tech_enigmatic_decoder
  13868. add_tech_progress = {
  13869. tech = tech_enigmatic_decoder
  13870. progress = 0.30
  13871. }
  13872. end_event_chain = "enigmatic_fortress_chain"
  13873. }
  13874. }
  13875.  
  13876. # Shot Through the Heart
  13877. country_event = {
  13878. id = leviathans.2157
  13879. title = "leviathans.2157.name"
  13880. desc = "leviathans.2157.desc"
  13881. picture = GFX_evt_exploding_ship
  13882. show_sound = event_super_explosion
  13883. location = event_target:disabled_enigmatic_fortress
  13884.  
  13885. is_triggered_only = yes
  13886.  
  13887. immediate = {
  13888. event_target:disabled_enigmatic_fortress = {
  13889. save_event_target_as = slain_guardian_system
  13890. }
  13891. every_country = {
  13892. limit = {
  13893. is_country_type = default
  13894. has_event_chain = curator_poi_chain
  13895. event_target:slain_guardian_system = {
  13896. is_point_of_interest = {
  13897. id = curator_poi_fortress
  13898. event_chain = curator_poi_chain
  13899. owner = prev
  13900. }
  13901. }
  13902. }
  13903. remove_point_of_interest = curator_poi_fortress
  13904. end_curator_chain = yes
  13905. }
  13906. event_target:disabled_enigmatic_fortress = {
  13907. solar_system = {
  13908. random_system_planet = {
  13909. limit = { is_star = yes }
  13910. create_ambient_object = {
  13911. type = "large_debris_object" # Actually explosion
  13912. location = solar_system
  13913. }
  13914. last_created_ambient_object = {
  13915. save_global_event_target_as = fortress_ambient
  13916. set_location = {
  13917. target = PREV
  13918. distance = 110
  13919. angle = 110
  13920. }
  13921. }
  13922. }
  13923.  
  13924. }
  13925. create_ambient_object = {
  13926. type = explosion_particle_object
  13927. location = this
  13928. use_3d_location = yes
  13929. duration = 10
  13930. scale = 30
  13931. }
  13932. fleet = {
  13933. delete_fleet = this
  13934. }
  13935. }
  13936. }
  13937.  
  13938. option = {
  13939. name = "leviathans.2157.a"
  13940. custom_tooltip = leviathans.2157.a.tooltip
  13941. end_event_chain = "enigmatic_fortress_chain"
  13942. hidden_effect = {
  13943. event_target:disabled_enigmatic_fortress = {
  13944. solar_system = {
  13945. every_system_planet = {
  13946. limit = {
  13947. habitable_planet = yes
  13948. NOR = {
  13949. is_planet_class = pc_ringworld_habitable
  13950. is_planet_class = pc_habitat
  13951. }
  13952. }
  13953. create_ambient_object = {
  13954. type = explosion_particle_object
  13955. location = this
  13956. use_3d_location = yes
  13957. duration = 10
  13958. scale = 20
  13959. }
  13960. change_pc = pc_nuked
  13961. reset_planet = yes
  13962. }
  13963. every_system_planet = {
  13964. limit = {
  13965. habitable_planet = no
  13966. is_asteroid = no
  13967. is_star = no
  13968. NOT = { is_planet_class = pc_gas_giant }
  13969. }
  13970. create_ambient_object = {
  13971. type = explosion_particle_object
  13972. location = this
  13973. use_3d_location = yes
  13974. duration = 10
  13975. scale = 20
  13976. }
  13977. change_pc = pc_molten
  13978. reset_planet = yes
  13979. }
  13980. every_fleet_in_system = { destroy_fleet = this }
  13981. }
  13982. }
  13983. }
  13984. }
  13985. }
  13986.  
  13987. # Fortress Repowers (Generic)
  13988. country_event = {
  13989. id = leviathans.2160
  13990. title = "leviathans.2160.name"
  13991. desc = "leviathans.2160.desc"
  13992. picture = GFX_evt_enigmatic_fortress
  13993. show_sound = event_activating_unknown_technology
  13994. location = event_target:disabled_enigmatic_fortress
  13995.  
  13996. is_triggered_only = yes
  13997.  
  13998. option = {
  13999. name = "leviathans.2160.a"
  14000. end_event_chain = "enigmatic_fortress_chain"
  14001. hidden_effect = {
  14002. random_country = {
  14003. limit = { is_country_type = guardian_fortress }
  14004. random_owned_ship = {
  14005. limit = { has_ship_flag = fortress_vault }
  14006. save_event_target_as = disabled_enigmatic_fortress
  14007. }
  14008. }
  14009. event_target:disabled_enigmatic_fortress = {
  14010. set_disabled = no
  14011. repair_ship = yes
  14012. }
  14013. }
  14014. }
  14015. }
  14016.  
  14017. # 3000 DIMENSIONAL HORROR
  14018.  
  14019. # Entering System
  14020. ship_event = {
  14021. id = leviathans.3000
  14022. hide_window = yes
  14023.  
  14024. is_triggered_only = yes
  14025.  
  14026. trigger = {
  14027. owner = {
  14028. NOT = { has_country_flag = encountered_horror }
  14029. }
  14030. FROM = {
  14031. has_star_flag = guardians_horror_system
  14032. OR = {
  14033. NOT = { has_star_flag = horror_spawned }
  14034. any_ship = { is_ship_size = dimensional_horror }
  14035. }
  14036. }
  14037. }
  14038.  
  14039. immediate = {
  14040. if = {
  14041. limit = {
  14042. solar_system = {
  14043. NOT = { has_star_flag = horror_spawned }
  14044. }
  14045. }
  14046. solar_system = {
  14047. set_star_flag = horror_spawned
  14048. save_event_target_as = horror_system
  14049. random_system_planet = {
  14050. limit = { is_planet_class = pc_black_hole }
  14051. create_country = {
  14052. name = "NAME_Dimensional_Horror"
  14053. type = guardian_horror
  14054. flag = {
  14055. icon = {
  14056. category = "zoological"
  14057. file = "flag_zoological_3.dds"
  14058. }
  14059. background = {
  14060. category = "backgrounds"
  14061. file = "00_solid.dds"
  14062. }
  14063. colors={
  14064. "red"
  14065. "red"
  14066. "null"
  14067. "null"
  14068. }
  14069. }
  14070. }
  14071. last_created_country = {
  14072. save_global_event_target_as = dimensional_horror_country
  14073. set_country_flag = dimensional_horror_country
  14074. }
  14075. create_fleet = {
  14076. name = "NAME_Dimensional_Horror"
  14077. settings = {
  14078. spawn_debris = no
  14079. is_boss = yes
  14080. }
  14081. effect = {
  14082. set_owner = event_target:dimensional_horror_country
  14083. save_global_event_target_as = dimensional_horror
  14084. create_ship = {
  14085. name = "NAME_Dimensional_Horror"
  14086. design = "NAME_Dimensional_Horror"
  14087. effect = { set_disabled = yes }
  14088. }
  14089. set_location = {
  14090. target = PREV
  14091. distance = 100
  14092. angle = random
  14093. }
  14094. }
  14095. }
  14096. last_created_fleet = {
  14097. create_ambient_object = {
  14098. type = "horror_spawn_object"
  14099. location = THIS
  14100. use_3d_location = yes
  14101. duration = 10
  14102. }
  14103. fleet_event = { id = leviathans.3220 days = 8 }
  14104. }
  14105. }
  14106. }
  14107. }
  14108. solar_system = { save_event_target_as = horror_system }
  14109. owner = {
  14110. country_event = { id = story.8 days = 15 }
  14111. set_country_flag = encountered_horror
  14112. establish_communications_no_message = event_target:dimensional_horror_country
  14113. country_event = { id = leviathans.3001 }
  14114. }
  14115. }
  14116. }
  14117.  
  14118. # Entering System
  14119. country_event = {
  14120. id = leviathans.3001
  14121. title = "leviathans.3001"
  14122. desc = "leviathans.3001.desc"
  14123. picture = GFX_evt_dimensional_horror
  14124. show_sound = event_activating_unknown_technology
  14125. location = event_target:horror_system
  14126.  
  14127. is_triggered_only = yes
  14128.  
  14129. option = {
  14130. name = "leviathans.3001.a"
  14131. }
  14132. }
  14133.  
  14134. # Horror Destroyed (HIDDEN)
  14135. country_event = {
  14136. id = leviathans.3002
  14137. hide_window = yes
  14138.  
  14139. fire_only_once = yes
  14140. is_triggered_only = yes
  14141.  
  14142. trigger = {
  14143. is_country_type = guardian_horror
  14144. has_country_flag = dimensional_horror_country
  14145. FROMFROM = { is_ship_size = dimensional_horror }
  14146. }
  14147.  
  14148. immediate = {
  14149. FROMFROM = {
  14150. solar_system = { save_event_target_as = guardians_horror_system }
  14151. }
  14152. create_ambient_object = {
  14153. type = "horror_energy_object"
  14154. location = FROMFROM
  14155. }
  14156. last_created_ambient_object = {
  14157. save_event_target_as = horror_energy
  14158. set_ambient_object_flag = horror_energy
  14159. }
  14160. FROM = {
  14161. country_event = { id = leviathans.3003 days = 6 }
  14162. }
  14163. destroy_country = yes
  14164. every_country = {
  14165. limit = {
  14166. is_country_type = default
  14167. has_modifier = dimensional_horror_weak_points
  14168. }
  14169. remove_modifier = "dimensional_horror_weak_points"
  14170. }
  14171. every_country = {
  14172. limit = {
  14173. is_country_type = default
  14174. has_event_chain = curator_poi_chain
  14175. event_target:guardians_horror_system = {
  14176. is_point_of_interest = {
  14177. id = curator_poi_horror
  14178. event_chain = curator_poi_chain
  14179. owner = prev
  14180. }
  14181. }
  14182. }
  14183. remove_point_of_interest = curator_poi_horror
  14184. end_curator_chain = yes
  14185. }
  14186. }
  14187. }
  14188.  
  14189. # Horror Destroyed
  14190. country_event = {
  14191. id = leviathans.3003
  14192. title = "leviathans.3003"
  14193. desc = "leviathans.3003.desc"
  14194. picture = GFX_evt_dimensional_horror
  14195. show_sound = event_super_explosion
  14196. location = event_target:guardians_horror_system
  14197. trackable = yes
  14198.  
  14199. is_triggered_only = yes
  14200.  
  14201. immediate = { set_country_flag = horror_killed }
  14202.  
  14203. option = {
  14204. name = "leviathans.3003.a"
  14205. event_target:horror_energy = {
  14206. enable_special_project = {
  14207. name = "DIMENSIONAL_HORROR_PROJECT"
  14208. location = THIS
  14209. owner = ROOT
  14210. }
  14211. }
  14212. }
  14213. }
  14214.  
  14215. # Special Project Completed
  14216. ship_event = {
  14217. id = leviathans.3004
  14218. title = "PROJECT_COMPLETE"
  14219. picture = GFX_evt_dimensional_horror
  14220. show_sound = event_laboratory_sound
  14221.  
  14222. desc = {
  14223. text = "leviathans.3004a.desc"
  14224. trigger = {
  14225. owner = {
  14226. NOR = {
  14227. has_technology = tech_jump_drive_1
  14228. has_technology = tech_psi_jump_drive_1
  14229. }
  14230. }
  14231. }
  14232. }
  14233. desc = {
  14234. text = "leviathans.3004b.desc"
  14235. trigger = {
  14236. owner = {
  14237. OR = {
  14238. has_technology = tech_jump_drive_1
  14239. has_technology = tech_psi_jump_drive_1
  14240. }
  14241. }
  14242. }
  14243. }
  14244.  
  14245. is_triggered_only = yes
  14246.  
  14247. immediate = {
  14248. random_ambient_object = {
  14249. limit = { has_ambient_object_flag = horror_energy }
  14250. destroy_ambient_object = this
  14251. }
  14252. }
  14253.  
  14254. option = {
  14255. name = "EXCELLENT"
  14256. trigger = {
  14257. owner = {
  14258. NOR = {
  14259. has_technology = tech_jump_drive_1
  14260. has_technology = tech_psi_jump_drive_1
  14261. }
  14262. }
  14263. }
  14264. owner = {
  14265. add_research_option = tech_jump_drive_1
  14266. add_tech_progress = {
  14267. tech = tech_jump_drive_1
  14268. progress = 0.5
  14269. }
  14270. add_monthly_resource_mult = {
  14271. resource = physics_research
  14272. value = 24
  14273. min = 4000
  14274. max = 6000
  14275. }
  14276. add_monthly_resource_mult = {
  14277. resource = society_research
  14278. value = 24
  14279. min = 4000
  14280. max = 6000
  14281. }
  14282. }
  14283. }
  14284. option = {
  14285. name = "EXCELLENT"
  14286. trigger = {
  14287. owner = {
  14288. OR = {
  14289. has_technology = tech_jump_drive_1
  14290. has_technology = tech_psi_jump_drive_1
  14291. }
  14292. }
  14293. }
  14294. owner = {
  14295. add_monthly_resource_mult = {
  14296. resource = physics_research
  14297. value = 24
  14298. min = 4000
  14299. max = 6000
  14300. }
  14301. add_monthly_resource_mult = {
  14302. resource = society_research
  14303. value = 24
  14304. min = 4000
  14305. max = 6000
  14306. }
  14307. }
  14308. }
  14309. }
  14310.  
  14311. # 3100 AUTOMATED DREADNOUGHT
  14312.  
  14313. # Entering System
  14314. ship_event = {
  14315. id = leviathans.3100
  14316. title = "leviathans.3100"
  14317. desc = {
  14318. trigger = { owner = { NOT = { has_authority = auth_machine_intelligence } } }
  14319. text = leviathans.3100.desc
  14320. }
  14321. desc = {
  14322. trigger = { owner = { has_authority = auth_machine_intelligence } }
  14323. text = leviathans.3100.desc.mach
  14324. }
  14325. picture = GFX_evt_automated_dreadnought
  14326. show_sound = event_radio_chatter
  14327. location = FROM
  14328.  
  14329. is_triggered_only = yes
  14330.  
  14331. trigger = {
  14332. owner = {
  14333. NOT = { has_country_flag = encountered_dreadnought }
  14334. }
  14335. FROM = {
  14336. has_star_flag = guardians_dreadnought_system
  14337. any_ship = {
  14338. AND = {
  14339. is_ship_size = npc_warship_01
  14340. owner = { is_country_type = guardian_dreadnought }
  14341. }
  14342. }
  14343. }
  14344. }
  14345.  
  14346. immediate = {
  14347. FROM = { save_event_target_as = dreadnought_system }
  14348. owner = {
  14349. set_country_flag = encountered_dreadnought
  14350. }
  14351. }
  14352.  
  14353. option = {
  14354. name = "leviathans.3100.a"
  14355. }
  14356. }
  14357.  
  14358. # Dreadnought Disabled (HIDDEN)
  14359. country_event = {
  14360. id = leviathans.3101
  14361. hide_window = yes
  14362.  
  14363. fire_only_once = yes
  14364. is_triggered_only = yes
  14365.  
  14366. trigger = {
  14367. is_country_type = guardian_dreadnought
  14368. has_country_flag = automated_dreadnought_country
  14369. FROMFROM = { is_ship_size = npc_warship_01 }
  14370. FROM = { is_ai = no }
  14371. }
  14372.  
  14373. immediate = {
  14374. FROMFROM = {
  14375. solar_system = { save_event_target_as = guardians_dreadnought_system }
  14376. create_ambient_object = {
  14377. type = "dreadnought_object"
  14378. location = THIS
  14379. }
  14380. last_created_ambient_object = { save_global_event_target_as = disabled_dreadnought_object }
  14381. create_ambient_object = {
  14382. type = "large_debris_object"
  14383. location = THIS
  14384. }
  14385. last_created_ambient_object = { set_ambient_object_flag = dreadnought_debris }
  14386. }
  14387. FROM = {
  14388. country_event = { id = leviathans.3102 }
  14389. }
  14390. destroy_country = yes
  14391. every_country = {
  14392. limit = {
  14393. is_country_type = default
  14394. has_modifier = automated_dreadnought_weak_points
  14395. }
  14396. remove_modifier = "automated_dreadnought_weak_points"
  14397. }
  14398. every_country = {
  14399. limit = {
  14400. is_country_type = default
  14401. has_event_chain = curator_poi_chain
  14402. event_target:guardians_dreadnought_system = {
  14403. is_point_of_interest = {
  14404. id = curator_poi_dreadnought
  14405. event_chain = curator_poi_chain
  14406. owner = prev
  14407. }
  14408. }
  14409. }
  14410. remove_point_of_interest = curator_poi_dreadnought
  14411. end_curator_chain = yes
  14412. }
  14413. }
  14414. }
  14415.  
  14416. # Dreadnought Disabled
  14417. country_event = {
  14418. id = leviathans.3102
  14419. title = "leviathans.3102"
  14420. desc = "leviathans.3102.desc"
  14421. picture = GFX_evt_automated_dreadnought
  14422. show_sound = event_ship_bridge
  14423. location = event_target:guardians_dreadnought_system
  14424. trackable = yes
  14425.  
  14426. is_triggered_only = yes
  14427.  
  14428. option = {
  14429. name = "leviathans.3102.a"
  14430. event_target:disabled_dreadnought_object = {
  14431. enable_special_project = {
  14432. name = "DISABLED_DREADNOUGHT_PROJECT"
  14433. location = THIS
  14434. owner = ROOT
  14435. }
  14436. }
  14437. }
  14438. option = {
  14439. name = "leviathans.3102.b"
  14440. add_resource = {
  14441. minerals = 5000
  14442. energy = 5000
  14443. }
  14444. add_monthly_resource_mult = {
  14445. resource = engineering_research
  14446. value = 30
  14447. min = 1000
  14448. max = 5000
  14449. }
  14450. }
  14451. }
  14452.  
  14453. # Dreadnought Rebuilt
  14454. ship_event = {
  14455. id = leviathans.3103
  14456. title = "leviathans.3103"
  14457. desc = {
  14458. trigger = { owner = { NOT = { has_authority = auth_machine_intelligence } } }
  14459. text = leviathans.3103.desc
  14460. }
  14461. desc = {
  14462. trigger = { owner = { has_authority = auth_machine_intelligence } }
  14463. text = leviathans.3103.desc.mach
  14464. }
  14465. picture = GFX_evt_automated_dreadnought
  14466. show_sound = event_construction
  14467. location = event_target:guardians_dreadnought_system
  14468.  
  14469. is_triggered_only = yes
  14470.  
  14471. immediate = {
  14472. owner = {
  14473. save_event_target_as = project_owner
  14474. set_country_flag = restored_dreadnought
  14475. }
  14476. }
  14477.  
  14478. option = {
  14479. name = "leviathans.3103.a"
  14480.  
  14481. # Psi Jump Dreadnought if owner has it
  14482. if = {
  14483. limit = {
  14484. owner = { has_technology = "tech_psi_jump_drive_1" }
  14485. }
  14486. create_fleet = {
  14487. name = "NAME_Dreadnought"
  14488. effect = {
  14489. set_owner = event_target:project_owner
  14490. create_ship = {
  14491. name = random
  14492. design = "NAME_Type_37" # Psi Jump Dreadnought
  14493. graphical_culture = "npf_01"
  14494. upgradable = no
  14495. }
  14496. set_location = {
  14497. target = event_target:disabled_dreadnought_object
  14498. distance = 0
  14499. angle = random
  14500. }
  14501. }
  14502. }
  14503. hidden_effect = {
  14504. event_target:disabled_dreadnought_object = { destroy_ambient_object = this }
  14505. solar_system = {
  14506. random_system_ambient_object = {
  14507. limit = { has_ambient_object_flag = dreadnought_debris }
  14508. destroy_ambient_object = this
  14509. }
  14510. }
  14511. }
  14512. break = yes
  14513. }
  14514. # Jump Dreadnought if owner has it
  14515. create_fleet = {
  14516. name = "NAME_Dreadnought"
  14517. effect = {
  14518. set_owner = event_target:project_owner
  14519. create_ship = {
  14520. name = random
  14521. design = "NAME_Type_46" # Jump Dreadnought
  14522. graphical_culture = "npf_01"
  14523. upgradable = no
  14524. }
  14525. set_location = {
  14526. target = event_target:disabled_dreadnought_object
  14527. distance = 0
  14528. angle = random
  14529. }
  14530. }
  14531. }
  14532. hidden_effect = {
  14533. event_target:disabled_dreadnought_object = { destroy_ambient_object = this }
  14534. solar_system = {
  14535. random_system_ambient_object = {
  14536. limit = { has_ambient_object_flag = dreadnought_debris }
  14537. destroy_ambient_object = this
  14538. }
  14539. }
  14540. }
  14541. break = yes
  14542. }
  14543. }
  14544.  
  14545. # 3200 HIVE ASTEROID
  14546.  
  14547. # Built Hive Mine (HIDDEN)
  14548. ship_event = {
  14549. id = leviathans.3200
  14550. hide_window = yes
  14551.  
  14552. is_triggered_only = yes
  14553.  
  14554. trigger = {
  14555. FROM = {
  14556. is_planet_class = pc_crystal_asteroid
  14557. }
  14558. }
  14559.  
  14560. immediate = {
  14561. owner = {
  14562. set_country_flag = built_hiver_mine
  14563. }
  14564. }
  14565. }
  14566.  
  14567. # Hivers Appear (HIDDEN)
  14568. country_event = {
  14569. id = leviathans.3210
  14570. hide_window = yes
  14571.  
  14572. fire_only_once = yes
  14573.  
  14574. trigger = {
  14575. is_country_type = default
  14576. has_country_flag = built_hiver_mine
  14577. any_planet_within_border = {
  14578. OR = {
  14579. has_planet_flag = hiver_asteroid_1
  14580. has_planet_flag = hiver_asteroid_2
  14581. has_planet_flag = hiver_asteroid_3
  14582. has_planet_flag = hiver_asteroid_4
  14583. has_planet_flag = hiver_asteroid_5
  14584. }
  14585. has_mining_station = yes
  14586. }
  14587. }
  14588.  
  14589. mean_time_to_happen = {
  14590. years = 100
  14591.  
  14592. modifier = {
  14593. factor = 0.3
  14594. any_planet_within_border = {
  14595. has_mining_station = yes
  14596. has_planet_flag = hiver_asteroid_1
  14597. }
  14598. }
  14599. modifier = {
  14600. factor = 0.3
  14601. any_planet_within_border = {
  14602. has_mining_station = yes
  14603. has_planet_flag = hiver_asteroid_2
  14604. }
  14605. }
  14606. modifier = {
  14607. factor = 0.3
  14608. any_planet_within_border = {
  14609. has_mining_station = yes
  14610. has_planet_flag = hiver_asteroid_3
  14611. }
  14612. }
  14613. modifier = {
  14614. factor = 0.3
  14615. any_planet_within_border = {
  14616. has_mining_station = yes
  14617. has_planet_flag = hiver_asteroid_4
  14618. }
  14619. }
  14620. modifier = {
  14621. factor = 0.3
  14622. any_planet_within_border = {
  14623. has_mining_station = yes
  14624. has_planet_flag = hiver_asteroid_5
  14625. }
  14626. }
  14627. }
  14628.  
  14629. immediate = {
  14630. random_system = {
  14631. limit = { has_star_flag = guardians_hive_system }
  14632. save_event_target_as = hiver_system
  14633. }
  14634. country_event = { id = leviathans.3201 }
  14635. set_global_flag = hivers_appeared
  14636. }
  14637. }
  14638.  
  14639. # Hivers Appear
  14640. country_event = {
  14641. id = leviathans.3201
  14642. title = "leviathans.3201"
  14643. desc = "leviathans.3201.desc"
  14644. picture = GFX_evt_hive
  14645. show_sound = event_red_alert
  14646. location = event_target:hiver_system
  14647.  
  14648. is_triggered_only = yes
  14649.  
  14650. immediate = {
  14651. event_target:hiver_system = {
  14652. random_system_ambient_object = {
  14653. limit = { has_ambient_object_flag = hive_asteroid_1 }
  14654. save_event_target_as = ambient_hive_1
  14655. }
  14656. random_system_ambient_object = {
  14657. limit = { has_ambient_object_flag = hive_asteroid_2 }
  14658. save_event_target_as = ambient_hive_2
  14659. }
  14660. random_system_ambient_object = {
  14661. limit = { has_ambient_object_flag = hive_asteroid_3 }
  14662. save_event_target_as = ambient_hive_3
  14663. }
  14664. random_system_ambient_object = {
  14665. limit = { has_ambient_object_flag = hive_asteroid_4 }
  14666. save_event_target_as = ambient_hive_4
  14667. }
  14668. random_system_ambient_object = {
  14669. limit = { has_ambient_object_flag = hive_asteroid_5 }
  14670. save_event_target_as = ambient_hive_5
  14671. }
  14672. random_system_ambient_object = {
  14673. limit = { has_ambient_object_flag = hive_asteroid_6 }
  14674. save_event_target_as = ambient_hive_6
  14675. }
  14676. }
  14677. create_country = {
  14678. name = "NAME_Alien_Hive"
  14679. type = guardian_hiver
  14680. flag = {
  14681. icon = {
  14682. category = "spherical"
  14683. file = "flag_spherical_6.dds"
  14684. }
  14685. background= {
  14686. category = "backgrounds"
  14687. file = "00_solid.dds"
  14688. }
  14689. colors={
  14690. "red"
  14691. "red"
  14692. "null"
  14693. "null"
  14694. }
  14695. }
  14696. }
  14697. last_created_country = {
  14698. save_global_event_target_as = hive_country
  14699. set_country_flag = hive_country
  14700. }
  14701. every_playable_country = {
  14702. establish_communications_no_message = event_target:hive_country
  14703. }
  14704. create_fleet = {
  14705. name = "NAME_Hiver_Nest"
  14706. settings = { spawn_debris = no }
  14707. effect = {
  14708. set_owner = event_target:hive_country
  14709. create_ship = {
  14710. name = "NAME_Hiver_Nest"
  14711. design = "NAME_Hive_Asteroid"
  14712. }
  14713. set_location = event_target:ambient_hive_1
  14714. }
  14715. }
  14716. event_target:ambient_hive_1 = { destroy_ambient_object = this }
  14717. create_fleet = {
  14718. name = "NAME_Hiver_Nest"
  14719. settings = { spawn_debris = no }
  14720. effect = {
  14721. set_owner = event_target:hive_country
  14722. create_ship = {
  14723. name = "NAME_Hiver_Nest"
  14724. design = "NAME_Hive_Asteroid"
  14725. }
  14726. set_location = event_target:ambient_hive_2
  14727. }
  14728. }
  14729. event_target:ambient_hive_2 = { destroy_ambient_object = this }
  14730. create_fleet = {
  14731. name = "NAME_Hiver_Nest"
  14732. settings = { spawn_debris = no }
  14733. effect = {
  14734. set_owner = event_target:hive_country
  14735. create_ship = {
  14736. name = "NAME_Hiver_Nest"
  14737. design = "NAME_Hive_Asteroid"
  14738. }
  14739. set_location = event_target:ambient_hive_3
  14740. }
  14741. }
  14742. event_target:ambient_hive_3 = { destroy_ambient_object = this }
  14743. create_fleet = {
  14744. name = "NAME_Hiver_Nest"
  14745. settings = { spawn_debris = no }
  14746. effect = {
  14747. set_owner = event_target:hive_country
  14748. create_ship = {
  14749. name = "NAME_Hiver_Nest"
  14750. design = "NAME_Hive_Asteroid"
  14751. }
  14752. set_location = event_target:ambient_hive_4
  14753. }
  14754. }
  14755. event_target:ambient_hive_4 = { destroy_ambient_object = this }
  14756. create_fleet = {
  14757. name = "NAME_Hiver_Nest"
  14758. settings = { spawn_debris = no }
  14759. effect = {
  14760. set_owner = event_target:hive_country
  14761. create_ship = {
  14762. name = "NAME_Hiver_Nest"
  14763. design = "NAME_Hive_Asteroid"
  14764. }
  14765. set_location = event_target:ambient_hive_5
  14766. }
  14767. }
  14768. event_target:ambient_hive_5 = { destroy_ambient_object = this }
  14769. create_fleet = {
  14770. name = "NAME_Hiver_Nest"
  14771. settings = { spawn_debris = no }
  14772. effect = {
  14773. set_owner = event_target:hive_country
  14774. create_ship = {
  14775. name = "NAME_Hiver_Nest"
  14776. design = "NAME_Hive_Asteroid"
  14777. }
  14778. set_location = event_target:ambient_hive_6
  14779. }
  14780. }
  14781. event_target:ambient_hive_6 = { destroy_ambient_object = this }
  14782. set_country_flag = provoked_hivers
  14783. }
  14784.  
  14785. option = {
  14786. name = "leviathans.3201.a"
  14787. }
  14788. }
  14789.  
  14790. # Entering System
  14791. ship_event = {
  14792. id = leviathans.3202
  14793. title = "leviathans.3202"
  14794. desc = "leviathans.3202.desc"
  14795. picture = GFX_evt_hive
  14796. show_sound = event_ship_bridge
  14797. location = FROM
  14798.  
  14799. is_triggered_only = yes
  14800.  
  14801. trigger = {
  14802. NOT = { has_global_flag = hivers_appeared }
  14803. owner = {
  14804. NOT = { has_country_flag = encountered_hivers }
  14805. is_ai = no
  14806. }
  14807. FROM = {
  14808. has_star_flag = guardians_hive_system
  14809. NOT = { has_star_flag = hivers_defeated }
  14810. }
  14811. }
  14812.  
  14813. immediate = {
  14814. FROM = { save_event_target_as = hiver_system }
  14815. owner = {
  14816. set_country_flag = encountered_hivers
  14817. }
  14818. }
  14819.  
  14820. option = {
  14821. name = "leviathans.3202.a"
  14822. }
  14823. }
  14824.  
  14825. # Hivers Destroyed (HIDDEN)
  14826. country_event = {
  14827. id = leviathans.3203
  14828. hide_window = yes
  14829.  
  14830. fire_only_once = yes
  14831. is_triggered_only = yes
  14832.  
  14833. trigger = {
  14834. is_country_type = guardian_hiver
  14835. has_country_flag = hive_country
  14836. count_owned_ships = {
  14837. limit = { is_ship_size = hive_asteroid }
  14838. count < 1 # count_owned_ships no longer counts dead ships
  14839. }
  14840. FROM = {
  14841. has_country_flag = provoked_hivers
  14842. is_ai = no
  14843. }
  14844. }
  14845.  
  14846. immediate = {
  14847. random_system = {
  14848. limit = { has_star_flag = guardians_hive_system }
  14849. save_event_target_as = hive_system
  14850. set_star_flag = hivers_defeated
  14851. }
  14852. create_ambient_object = {
  14853. type = "dormant_hive_base_2_object"
  14854. }
  14855. last_created_ambient_object = {
  14856. set_location = FROMFROM
  14857. set_ambient_object_flag = boardable_hive_asteroid
  14858. save_event_target_as = boardable_hive_asteroid
  14859. }
  14860. FROM = {
  14861. country_event = { id = leviathans.3204 }
  14862. }
  14863. every_country = {
  14864. limit = {
  14865. is_country_type = default
  14866. has_modifier = asteroid_hive_weak_points
  14867. }
  14868. remove_modifier = "asteroid_hive_weak_points"
  14869. }
  14870. every_country = {
  14871. limit = {
  14872. is_country_type = default
  14873. has_event_chain = curator_poi_chain
  14874. event_target:hive_system = {
  14875. is_point_of_interest = {
  14876. id = curator_poi_hiver
  14877. event_chain = curator_poi_chain
  14878. owner = prev
  14879. }
  14880. }
  14881. }
  14882. remove_point_of_interest = curator_poi_hiver
  14883. end_curator_chain = yes
  14884. }
  14885. }
  14886. }
  14887.  
  14888. # Hivers Destroyed
  14889. country_event = {
  14890. id = leviathans.3204
  14891. title = "leviathans.3204"
  14892. desc = "leviathans.3204.desc"
  14893. picture = GFX_evt_hive
  14894. show_sound = event_scanner
  14895. location = event_target:hive_system
  14896. trackable = yes
  14897.  
  14898. is_triggered_only = yes
  14899.  
  14900. option = {
  14901. name = "leviathans.3204.a"
  14902. event_target:boardable_hive_asteroid = {
  14903. enable_special_project = {
  14904. name = "HIVE_ASTEROID_PROJECT"
  14905. location = THIS
  14906. owner = ROOT
  14907. }
  14908. }
  14909. }
  14910. }
  14911.  
  14912. # Special Project Completed
  14913. ship_event = {
  14914. id = leviathans.3205
  14915. title = "PROJECT_COMPLETE"
  14916. desc = "leviathans.3205.desc"
  14917. picture = GFX_evt_hive
  14918. show_sound = event_airlock
  14919. location = event_target:boardable_hive_asteroid
  14920.  
  14921. is_triggered_only = yes
  14922.  
  14923. option = {
  14924. name = "EXCELLENT"
  14925. owner = {
  14926. add_resource = {
  14927. society_research = 2000
  14928. energy = 500
  14929. }
  14930. }
  14931. hidden_effect = {
  14932. random_ambient_object = {
  14933. limit = { has_ambient_object_flag = boardable_hive_asteroid }
  14934. destroy_ambient_object = this
  14935. }
  14936. }
  14937. }
  14938. }
  14939.  
  14940. # Undisable Horror
  14941. fleet_event = {
  14942. id = leviathans.3220
  14943. hide_window = yes
  14944.  
  14945. is_triggered_only = yes
  14946.  
  14947. immediate = {
  14948. owner = {
  14949. random_owned_ship = {
  14950. set_disabled = no
  14951. }
  14952. }
  14953. }
  14954. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement