Advertisement
AltanIV

dragon_decision.txt

Sep 8th, 2022
318
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 33.55 KB | Gaming | 0 0
  1. decisions = {
  2. field_of_fire_dec = { #same conditions as event dragon.3199
  3. is_high_prio = yes
  4. ai = no #ai decides via event
  5. potential = {
  6. can_use_dragon_abilities_trigger = yes
  7. OR = {
  8. NOT = { has_character_flag = dragonduel }
  9. had_character_flag = { flag = dragonduel days = 10 }
  10. }
  11. OR = {
  12. had_character_flag = { flag = dragon_used_battle days = 15 }
  13. NOT = { has_character_flag = dragon_used_battle }
  14. }
  15. in_battle = yes
  16. in_command = yes
  17. NOT = {
  18. dragon_rider = {
  19. at_location = ROOT
  20. is_alive = yes
  21. prisoner = no
  22. in_command = yes
  23. NOT = { character = ROOT }
  24. OR = {
  25. war_with = ROOT
  26. any_liege = { war_with = ROOT }
  27. AND = {
  28. ROOT = { war = no }
  29. OR = {
  30. ROOT = { any_liege = { war_with = PREVPREV } }
  31. any_liege = { ROOT = { any_liege = { war_with = PREVPREV } } }
  32. }
  33. }
  34. }
  35. }
  36. }
  37. NOT = {
  38. dragon = {
  39. can_use_dragon_abilities_trigger = yes
  40. at_location = ROOT
  41. is_alive = yes
  42. prisoner = no
  43. in_command = yes
  44. NOT = { character = ROOT }
  45. OR = {
  46. war_with = ROOT
  47. any_liege = { war_with = ROOT }
  48. AND = {
  49. ROOT = { war = no }
  50. OR = {
  51. ROOT = { any_liege = { war_with = PREVPREV } }
  52. any_liege = { ROOT = { any_liege = { war_with = PREVPREV } } }
  53. }
  54. }
  55. }
  56. }
  57. }
  58. NOT = { has_game_rule = { name = dragon_hatching_taming value = off } }
  59. }
  60. allow = {
  61. trigger_if = {
  62. limit = { can_use_dragon_abilities_trigger = yes }
  63. any_friend = {
  64. trait = dragon
  65. is_alive = yes
  66. age = 2
  67. NOT = { trait = maimed_dragon }
  68. }
  69. }
  70. custom_tooltip = {
  71. text = TOOLTIPfield_of_fire_decTERRAIN
  72. hidden_tooltip = {
  73. NOT = {
  74. location = {
  75. OR = {
  76. terrain = mountain
  77. terrain = desert
  78. }
  79. }
  80. }
  81. }
  82. }
  83. custom_tooltip = {
  84. text = TOOLTIPfield_of_fire_dec
  85. hidden_tooltip = {
  86. # location = {
  87. # any_province_character = {
  88. # at_location = ROOT
  89. # prisoner = no
  90. # in_command = yes
  91. # OR = {
  92. # war_with = ROOT
  93. # any_liege = { war_with = ROOT }
  94. # ROOT = { any_liege = { war_with = PREVPREV } }
  95. # any_liege = { ROOT = { any_liege = { war_with = PREVPREV } } }
  96. # }
  97. # }
  98. # }
  99. OR = {
  100. AND = {
  101. is_ruler = yes
  102. war = yes
  103. any_current_enemy = {
  104. #war_with = ROOT
  105. OR = {
  106. AND = {
  107. at_location = ROOT
  108. prisoner = no
  109. in_command = yes
  110. }
  111. any_realm_lord = {
  112. at_location = ROOT
  113. prisoner = no
  114. in_command = yes
  115. }
  116. any_courtier = {
  117. at_location = ROOT
  118. prisoner = no
  119. in_command = yes
  120. }
  121. }
  122. }
  123. }
  124. AND = {
  125. #war = no # Your liege's wars still count
  126. any_liege = {
  127. any_current_enemy = {
  128. #war_with = PREV
  129. OR = {
  130. AND = {
  131. at_location = ROOT
  132. prisoner = no
  133. in_command = yes
  134. }
  135. any_realm_lord = {
  136. at_location = ROOT
  137. prisoner = no
  138. in_command = yes
  139. }
  140. any_courtier = {
  141. at_location = ROOT
  142. prisoner = no
  143. in_command = yes
  144. }
  145. }
  146. }
  147. }
  148. }
  149. any_independent_ruler = {
  150. mercenary = yes
  151. at_location = ROOT
  152. in_command = yes
  153. prisoner = no
  154. }
  155. }
  156. }
  157. }
  158. }
  159. effect = {
  160. set_character_flag = dragon_used_battle
  161. character_event = { id = dragon.31 tooltip = "EVTTOOLTIPdragon.31" }
  162.  
  163. }
  164. ai_will_do = {
  165. factor = 0
  166. }
  167. }
  168. siege_of_fire_dec = {
  169. is_high_prio = yes
  170. potential = {
  171. can_use_dragon_abilities_trigger = yes
  172. OR = {
  173. NOT = {has_character_flag = dragonduel}
  174. had_character_flag = { flag = dragonduel days = 10 }
  175. }
  176. OR = {
  177. had_character_flag = { flag = dragon_used days = 30}
  178. NOT = { has_character_flag = dragon_used}
  179. }
  180. #OR = {
  181. siege = {
  182. is_attacker = yes
  183. }
  184. # siege = {
  185. # is_attacker = no
  186. # }
  187. #}
  188. NOT = {
  189. location = { has_province_modifier = ruined_province }
  190. }
  191. NOT = { has_game_rule = { name = dragon_hatching_taming value = off } }
  192. }
  193. allow = {
  194. NOT = { in_battle = yes }
  195. trigger_if = {
  196. limit = { can_use_dragon_abilities_trigger = yes }
  197. any_friend = {
  198. trait = dragon
  199. age = 2
  200. NOT = { trait = maimed_dragon }
  201. }
  202. }
  203. }
  204. effect = {
  205. set_character_flag = dragon_used
  206. hidden_tooltip = { #find leader/target
  207. siege = {
  208. enemy = {
  209. leader = {
  210. save_event_target_as = siege_of_fire_target
  211. #set_character_flag = siege_leader
  212. ROOT = { set_character_flag = siege_of_fire_target_found }
  213. }
  214. }
  215. if = { #if no leader default to province owner (capital only)
  216. limit = { ROOT = { NOT = { has_character_flag = siege_of_fire_target_found } } }
  217. location = {
  218. owner = {
  219. if = {
  220. limit = {
  221. capital_holding = { controller = { character = PREVPREV } }
  222. capital_scope = { ROOT = { at_location = PREV } }
  223. }
  224. save_event_target_as = siege_of_fire_target
  225. }
  226. }
  227. }
  228. }
  229. }
  230. clr_character_flag = siege_of_fire_target_found
  231. }
  232. character_event = {id = dragon.38 tooltip = "EVTTOOLTIPdragon.31"}
  233. }
  234. ai_will_do = {
  235. factor = 1000
  236. modifier = { #AI never use a young dragon in siege
  237. factor = 0
  238. NOR = {
  239. any_friend = {
  240. trait = dragon
  241. is_alive = yes
  242. age = 2
  243. martial = 20
  244. }
  245. AND = {
  246. graphical_culture = dragongfx
  247. martial = 20
  248. OR = {
  249. has_alternate_start_parameter = { key = special_culture value = animal_kingdoms }
  250. has_alternate_start_parameter = { key = special_culture value = animal_world }
  251. has_alternate_start_parameter = { key = special_culture value = all }
  252. }
  253. }
  254. }
  255. }
  256. }
  257. }
  258. hatch_dragon_dec = {
  259. is_high_prio = yes
  260. potential = {
  261. #ai = no
  262. has_artifact = dragon_egg
  263. NOT = { can_use_dragon_abilities_trigger = yes }
  264. NOT = { trait = dragon }
  265. NOT = { any_friend = { is_alive = yes trait = dragon } }
  266. OR = {
  267. NOT = { has_character_flag = tried_hatch }
  268. had_character_flag = { flag = tried_hatch days = 500 }
  269. }
  270. NOT = { has_game_rule = { name = dragon_hatching_taming value = off } }
  271. }
  272. allow = {
  273. age = 12
  274. conditional_tooltip = {
  275. trigger = { has_game_rule = { name = dragon_hatching_taming value = valyrian_only } }
  276. OR = {
  277. culture_group = valyrian
  278. is_divine_blood_dynasty_trigger = yes
  279. any_artifact = { has_artifact_flag = dragonhorn }
  280. }
  281. }
  282. prisoner = no
  283. in_command = no
  284. NOT = { trait = incapable }
  285. has_epidemic = no
  286. OR = {
  287. AND = {
  288. government = valyrian_imperial_government
  289. is_ruler = no
  290. employer = {
  291. crownlaw_title = {
  292. OR = {
  293. has_law = dragon_tamer_0
  294. AND = {
  295. has_law = dragon_tamer_1
  296. ROOT = {
  297. OR = {
  298. has_minor_title = title_dragon_tamer
  299. higher_real_tier_than = BARON
  300. }
  301. }
  302. }
  303. AND = {
  304. has_law = dragon_tamer_2
  305. holder_scope = {
  306. OR = {
  307. character = ROOT
  308. dynasty = ROOT
  309. }
  310. }
  311. }
  312. }
  313. }
  314. }
  315. }
  316. crownlaw_title = {
  317. government = valyrian_imperial_government
  318. OR = {
  319. has_law = dragon_tamer_0
  320. AND = {
  321. has_law = dragon_tamer_1
  322. ROOT = {
  323. OR = {
  324. has_minor_title = title_dragon_tamer
  325. higher_real_tier_than = BARON
  326. }
  327. }
  328. }
  329. AND = {
  330. has_law = dragon_tamer_2
  331. holder_scope = {
  332. OR = {
  333. character = ROOT
  334. dynasty = ROOT
  335. }
  336. }
  337. }
  338. }
  339. }
  340. OR = {
  341. independent = yes
  342. tier = KING
  343. AND = {
  344. lower_tier_than = KING
  345. NOT = { has_any_opinion_modifier = opinion_de_facto_liege }
  346. }
  347. }
  348. }
  349. custom_tooltip = {
  350. text = TOOLTIPDRAGONINTEL
  351. hidden_tooltip = {
  352. OR = {
  353. has_character_flag = dragon_intel_harrenhal
  354. has_character_flag = dragon_intel_dragonpit
  355. has_character_flag = dragon_intel_dragonstone
  356. has_character_flag = dragon_intel_citadel
  357. has_character_flag = dragon_intel_fof
  358. has_character_flag = dragon_intel_summerhall
  359. has_character_flag = dragon_intel_eggs
  360. has_character_flag = dragon_intel_old_ghis
  361. has_character_flag = dragon_intel_volantis
  362. has_character_flag = dragon_intel_smoking_sea
  363. has_character_flag = dragon_intel_asshai
  364. has_character_flag = dragon_intel_dynamic
  365. has_character_flag = dragon_intel_rebirth
  366. }
  367. }
  368. }
  369. }
  370. effect = {
  371. set_character_flag = tried_hatch
  372. character_event = { id = dragon.3 }
  373. }
  374. ai_check_interval = 3
  375. ai_will_do = {
  376. factor = 1000
  377. }
  378. }
  379. tame_dragon_dec = {
  380. is_high_prio = yes
  381. potential = {
  382. #ai = no
  383. any_friend = {
  384. trait = dragon
  385. is_alive = yes
  386. }
  387. NOT = { can_use_dragon_abilities_trigger = yes }
  388. NOT = { trait = dragon }
  389. OR = {
  390. NOT = { has_character_flag = choose_wild_dragon_action }
  391. had_character_flag = { flag = choose_wild_dragon_action days = 500 }
  392. }
  393. NOT = { has_character_flag = dany_no_tame_dragon }
  394. NOT = { has_game_rule = { name = dragon_hatching_taming value = off } }
  395. }
  396. allow = {
  397. conditional_tooltip = {
  398. trigger = { has_game_rule = { name = dragon_hatching_taming value = valyrian_only } }
  399. OR = {
  400. culture_group = valyrian
  401. is_divine_blood_dynasty_trigger = yes
  402. any_artifact = { has_artifact_flag = dragonhorn }
  403. }
  404. }
  405. any_friend = {
  406. trait = dragon
  407. is_alive = yes
  408. age = 2
  409. }
  410. age = 14
  411. prisoner = no
  412. NOT = { in_battle = yes }
  413. NOT = { has_severe_disability_trigger = yes }
  414. has_epidemic = no
  415. OR = {
  416. AND = {
  417. government = valyrian_imperial_government
  418. is_ruler = no
  419. employer = {
  420. crownlaw_title = {
  421. OR = {
  422. has_law = dragon_tamer_0
  423. AND = {
  424. has_law = dragon_tamer_1
  425. ROOT = {
  426. OR = {
  427. has_minor_title = title_dragon_tamer
  428. higher_real_tier_than = BARON
  429. }
  430. }
  431. }
  432. AND = {
  433. has_law = dragon_tamer_2
  434. holder_scope = {
  435. OR = {
  436. character = ROOT
  437. dynasty = ROOT
  438. }
  439. }
  440. }
  441. }
  442. }
  443. }
  444. }
  445. crownlaw_title = {
  446. government = valyrian_imperial_government
  447. OR = {
  448. has_law = dragon_tamer_0
  449. AND = {
  450. has_law = dragon_tamer_1
  451. ROOT = {
  452. OR = {
  453. has_minor_title = title_dragon_tamer
  454. higher_real_tier_than = BARON
  455. }
  456. }
  457. }
  458. AND = {
  459. has_law = dragon_tamer_2
  460. holder_scope = {
  461. OR = {
  462. character = ROOT
  463. dynasty = ROOT
  464. }
  465. }
  466. }
  467. }
  468. }
  469. OR = {
  470. independent = yes
  471. tier = KING
  472. AND = {
  473. lower_tier_than = KING
  474. NOT = { has_any_opinion_modifier = opinion_de_facto_liege }
  475. }
  476. }
  477. }
  478. }
  479. effect = {
  480. set_character_flag = choose_wild_dragon_action
  481. character_event = { id = dragon.12 days = 1}
  482. }
  483. ai_check_interval = 3
  484. ai_will_do = {
  485. factor = 1000
  486. }
  487. }
  488. face_dragon_dec = {
  489. is_high_prio = yes
  490. potential = {
  491. age = 14
  492. dragon = {
  493. is_alive = yes
  494. OR = {
  495. at_location = ROOT
  496. location = {
  497. owner = {
  498. is_liege_of = ROOT
  499. has_character_modifier = calling_for_dragon_riders
  500. }
  501. }
  502. }
  503. OR = {
  504. NOT = { educator = { always = yes } }
  505. location = { any_province_lord = { is_liege_of = PREVPREV } }
  506. }
  507. NOT = { num_of_friends = 1 }
  508. NOT = { has_character_flag = dany_dragon }
  509. OR = {
  510. ROOT = { ai = no }
  511. AND = {
  512. NOT = { trait = shy_dragon }
  513. NOT = { has_character_flag = shadow_lands_dragon }
  514. }
  515. has_character_modifier = locked_in_dragonpit
  516. }
  517. OR = {
  518. NOT = { has_character_flag = found_wild_dragon }
  519. had_character_flag = { flag = found_wild_dragon days = 30 }
  520. }
  521. is_ruler = no
  522. NOT = { liege = { graphical_culture = dragongfx } }
  523. }
  524. NOT = { trait = dragon }
  525. NOT = { graphical_culture = dragongfx }
  526. OR = { #Must not be about to be culled
  527. NOT = { culture = high_valyrian }
  528. has_dynasty_flag = high_valyrian
  529. has_character_flag = high_valyrian
  530. has_game_rule = { name = high_valyrian_cull value = off }
  531. }
  532. NOT = { has_game_rule = { name = dragon_hatching_taming value = off } }
  533. }
  534. allow = {
  535. show_only_failed_conditions = yes
  536. conditional_tooltip = {
  537. trigger = { has_game_rule = { name = dragon_hatching_taming value = valyrian_only } }
  538. OR = {
  539. culture_group = valyrian
  540. is_divine_blood_dynasty_trigger = yes
  541. any_artifact = { has_artifact_flag = dragonhorn }
  542. }
  543. }
  544. OR = {
  545. location = {
  546. owner = {
  547. OR = {
  548. character = ROOT
  549. custom_tooltip = {
  550. text = TOOLTIPface_dragon_decOWNER
  551. hidden_tooltip = {
  552. NOR = {
  553. can_use_dragon_abilities_trigger = yes
  554. has_dynasty_flag = dragon_riding_dynasty
  555. }
  556. }
  557. }
  558. dynasty = ROOT
  559. is_close_relative = ROOT
  560. is_liege_or_above = ROOT
  561. }
  562. }
  563. }
  564. liege = {
  565. has_character_modifier = calling_for_dragon_riders
  566. ROOT = { NOT = { tier = KING } }
  567. opinion = { who = ROOT value = -24 }
  568. reverse_opinion = { who = ROOT value = -24 }
  569. }
  570. }
  571. custom_tooltip = {
  572. text = TOOLTIPface_dragon_dec_A
  573. NOT = { any_friend = { trait = dragon is_alive = yes } }
  574. NOT = { can_use_dragon_abilities_trigger = yes }
  575. }
  576. custom_tooltip = {
  577. text = TOOLTIPface_dragon_dec_B
  578. OR = {
  579. NOT = { has_character_flag = found_wild_dragon }
  580. had_character_flag = { flag = found_wild_dragon days = 60 }
  581. }
  582. }
  583. custom_tooltip = {
  584. text = TOOLTIPface_dragon_dec_C
  585. OR = {
  586. NOT = { has_character_flag = ran_from_dragon }
  587. had_character_flag = { flag = ran_from_dragon days = 365 }
  588. }
  589. }
  590. prisoner = no
  591. NOT = { in_battle = yes }
  592. NOT = { has_severe_disability_trigger = yes }
  593. NOT = { is_inaccessible_trigger = yes }
  594. has_epidemic = no
  595. }
  596. effect = {
  597. character_event = { id = dragon.2699 }
  598. }
  599. ai_check_interval = 3
  600. ai_will_do = {
  601. factor = 1
  602.  
  603. modifier = {
  604. factor = 0.05
  605. }
  606. modifier = {
  607. factor = 100
  608. has_ambition = obj_tame_a_dragon
  609. }
  610. #better stand a chance
  611. modifier = {
  612. factor = 0
  613. NOT = { trait = dragon_slayer }
  614. NOT = { trait = brave }
  615. NOT = { trait = genius }
  616. NOT = { trait = lunatic }
  617. NOT = { trait = ambitious }
  618. NOT = { trait = chosen_by_rhllor }
  619. NOT = { has_ambition = obj_tame_a_dragon }
  620. NOR = {
  621. culture = high_valyrian
  622. graphical_culture = valyriangfx
  623. }
  624. NOT = { any_owned_bloodline = { has_bloodline_flag = blood_of_the_dragon } }
  625. NOT = { has_character_flag = demon_child_non_pagan }
  626. NOT = {
  627. AND = {
  628. OR = {
  629. culture_group = valyrian
  630. has_silver_hair_ethnicity_trigger = yes
  631. }
  632. OR = {
  633. religion_group = valyrian_rel_group
  634. has_character_modifier = abomination_of_incest
  635. location = { owner = { can_use_dragon_abilities_trigger = yes is_close_relative = ROOT } }
  636. }
  637. }
  638. }
  639. NOT = { any_artifact = { has_artifact_flag = dragonhorn } }
  640. }
  641. modifier = {
  642. factor = 0
  643. NOT = { has_ambition = obj_tame_a_dragon }
  644. OR = {
  645. trait = craven
  646. trait = depressed
  647. trait = content
  648. trait = timid
  649. }
  650. }
  651. modifier = {
  652. factor = 0
  653. NOT = { can_press_claims_trigger = yes }
  654. NOR = {
  655. trait = ruthless
  656. trait = ambitious
  657. trait = arbitrary
  658. }
  659. NOT = { has_ambition = obj_tame_a_dragon }
  660. }
  661. modifier = {
  662. factor = 0.2
  663. NOR = {
  664. trait = chosen_by_rhllor
  665. any_owned_bloodline = { has_bloodline_flag = blood_of_the_dragon }
  666. has_character_flag = demon_child_non_pagan
  667. any_artifact = { has_artifact_flag = dragonhorn }
  668. }
  669. NOT = {
  670. calc_true_if = {
  671. amount = 2
  672. trait = wroth
  673. trait = ambitious
  674. trait = brave
  675. trait = authoritative
  676. trait = greedy
  677. is_strong_trigger = yes
  678. is_smart_incl_genius_trigger = yes
  679. religion_group = valyrian_rel_group
  680. has_character_flag = dragon_intel_citadel
  681. trait = favored_by_rhllor
  682. }
  683. }
  684. }
  685. modifier = {
  686. factor = 4
  687. OR = {
  688. culture = high_valyrian
  689. graphical_culture = valyriangfx
  690. }
  691. }
  692. modifier = {
  693. factor = 5
  694. OR = {
  695. trait = chosen_by_rhllor
  696. any_owned_bloodline = { has_bloodline_flag = blood_of_the_dragon }
  697. has_character_flag = demon_child_non_pagan
  698. any_artifact = { has_artifact_flag = dragonhorn }
  699. }
  700. }
  701. modifier = {
  702. factor = 4
  703. trait = ambitious
  704. }
  705. }
  706. }
  707. #Dany spare dragon decisions
  708. dany_give_spouse_dragon = {
  709. only_playable = yes
  710. potential = {
  711. has_character_flag = daenerys_targaryen
  712. any_child = {
  713. NOT = { any_friend = { is_alive = yes } }
  714. trait = dragon
  715. is_alive = yes
  716. }
  717. spouse = {
  718. is_alive = yes
  719. NOT = {
  720. any_friend = {
  721. trait = dragon
  722. is_alive = yes
  723. }
  724. }
  725. NOT = { war_with = ROOT }
  726. }
  727. }
  728. allow = {
  729. conditional_tooltip = {
  730. trigger = { has_game_rule = { name = dragon_hatching_taming value = valyrian_only } }
  731. spouse = {
  732. OR = {
  733. culture_group = valyrian
  734. is_divine_blood_dynasty_trigger = yes
  735. any_artifact = { has_artifact_flag = dragonhorn }
  736. }
  737. }
  738. }
  739. }
  740. effect = {
  741. spouse = {
  742. ROOT = {
  743. random_child = {
  744. limit = {
  745. NOT = { any_friend = { is_alive = yes } }
  746. trait = dragon
  747. is_alive = yes
  748. }
  749. add_friend = PREVPREV
  750. #hidden_tooltip = { set_mother = 0 }
  751. }
  752. }
  753. hidden_tooltip = { character_event = { id = dragon.400 } }
  754. }
  755. }
  756.  
  757. ai_check_interval = 3
  758. ai_will_do = {
  759. factor = 1
  760. modifier = {
  761. factor = 0.25 # Slow it down a bit
  762. }
  763. modifier = {
  764. factor = 0
  765. spouse = {
  766. OR = {
  767. trait = craven
  768. is_weak_trigger = yes
  769. is_dumb_trigger = yes
  770. trait = imbecile
  771. trait = infirm
  772. has_severe_disability_trigger = yes
  773. NOT = { reverse_opinion = { who = ROOT value = 50 } }
  774. }
  775. }
  776. }
  777. modifier = {
  778. factor = 2
  779. spouse = {
  780. OR = {
  781. trait = brave
  782. is_strong_trigger = yes
  783. is_smart_incl_genius_trigger = yes
  784. reverse_opinion = { who = ROOT value = 99 }
  785. }
  786. }
  787. }
  788. }
  789. }
  790.  
  791. dany_give_child_dragon = {
  792. only_playable = yes
  793. potential = {
  794. has_character_flag = daenerys_targaryen
  795. any_child = {
  796. NOT = { any_friend = { is_alive = yes } }
  797. trait = dragon
  798. is_alive = yes
  799. }
  800. any_child = {
  801. is_alive = yes
  802. NOT = {
  803. any_friend = {
  804. trait = dragon
  805. is_alive = yes
  806. }
  807. }
  808. NOT = { war_with = ROOT }
  809. NOT = { trait = dragon }
  810. conditional_tooltip = {
  811. trigger = { has_game_rule = { name = dragon_hatching_taming value = valyrian_only } }
  812. OR = {
  813. culture_group = valyrian
  814. is_divine_blood_dynasty_trigger = yes
  815. any_artifact = { has_artifact_flag = dragonhorn }
  816. }
  817. }
  818. }
  819. }
  820. allow = {
  821. }
  822. effect = {
  823. random_child = {
  824. limit = {
  825. is_alive = yes
  826. NOT = {
  827. any_friend = {
  828. trait = dragon
  829. is_alive = yes
  830. }
  831. }
  832. NOT = { war_with = ROOT }
  833. NOT = { trait = dragon }
  834. OR = {
  835. ROOT = { ai = no }
  836. AND = {
  837. age = 14
  838. NOT = {
  839. OR = {
  840. trait = craven
  841. is_weak_trigger = yes
  842. is_dumb_trigger = yes
  843. trait = imbecile
  844. trait = infirm
  845. has_severe_disability_trigger = yes
  846. NOT = { reverse_opinion = { who = ROOT value = 25 } }
  847. }
  848. }
  849. }
  850. }
  851. conditional_tooltip = {
  852. trigger = { has_game_rule = { name = dragon_hatching_taming value = valyrian_only } }
  853. OR = {
  854. culture_group = valyrian
  855. is_divine_blood_dynasty_trigger = yes
  856. any_artifact = { has_artifact_flag = dragonhorn }
  857. }
  858. }
  859. }
  860. ROOT = {
  861. random_child = {
  862. limit = {
  863. NOT = { any_friend = { is_alive = yes } }
  864. trait = dragon
  865. is_alive = yes
  866. }
  867. add_friend = PREVPREV
  868. #hidden_tooltip = { set_mother = 0 }
  869. }
  870. }
  871. hidden_tooltip = { character_event = { id = dragon.400 } }
  872. }
  873. }
  874.  
  875. ai_check_interval = 3
  876. ai_will_do = {
  877. factor = 1
  878. modifier = {
  879. factor = 0.5 # Slow it down a bit
  880. }
  881. modifier = {
  882. factor = 0
  883. NOT = {
  884. any_child = {
  885. age = 14
  886. NOT = {
  887. OR = {
  888. trait = craven
  889. is_weak_trigger = yes
  890. is_dumb_trigger = yes
  891. trait = imbecile
  892. trait = infirm
  893. has_severe_disability_trigger = yes
  894. NOT = { reverse_opinion = { who = ROOT value = 25 } }
  895. }
  896. }
  897. }
  898. }
  899. }
  900. }
  901. }
  902. call_for_dragon_riders = {
  903. is_high_prio = yes
  904. only_playable = yes
  905. potential = {
  906. war = yes
  907. NOT = { tier = BARON }
  908. dragon = {
  909. is_alive = yes
  910. NOT = { any_friend = { always = yes } }
  911. NOT = { num_of_friends = 1 }
  912. location = { owner = { character = ROOT } }
  913. OR = {
  914. NOT = { educator = { always = yes } }
  915. liege = { character = ROOT }
  916. }
  917. NOT = { trait = shy_dragon }
  918. NOT = { has_character_flag = dany_dragon }
  919. NOT = { has_character_flag = shadow_lands_dragon }
  920. }
  921. NOT = { graphical_culture = dragongfx }
  922. had_global_flag = { flag = scenario_initialised days = 5 } #needs a few days for the dragons to be added as friends due to add_friend not being instant
  923. NOT = { has_game_rule = { name = dragon_hatching_taming value = off } }
  924. }
  925. allow = {
  926. war = yes
  927. NOT = { has_character_modifier = calling_for_dragon_riders }
  928. }
  929. effect = {
  930. add_character_modifier = {
  931. name = calling_for_dragon_riders
  932. duration = 1825
  933. }
  934. character_event = { id = dragon.170 tooltip = TOOLTIPdragon.170 }
  935. }
  936. ai_check_interval = 3
  937. ai_will_do = {
  938. factor = 1
  939. modifier = {
  940. factor = 0.15
  941. }
  942. modifier = { #No powerful enemies
  943. factor = 0
  944. NOT = {
  945. any_current_enemy = {
  946. OR = {
  947. relative_power = { who = ROOT power = 0.8 }
  948. AND = {
  949. can_use_dragon_abilities_trigger = yes
  950. OR = {
  951. any_friend = {
  952. trait = dragon
  953. NOT = { trait = maimed_dragon }
  954. martial = 20
  955. ROOT = {
  956. OR = {
  957. NOT = { can_use_dragon_abilities_trigger = yes }
  958. NOT = {
  959. any_friend = {
  960. trait = dragon
  961. NOT = { trait = maimed_dragon }
  962. attribute_diff = { character = PREVPREV attribute = martial value = -20 }
  963. }
  964. }
  965. }
  966. }
  967. }
  968. AND = {
  969. martial = 20
  970. graphical_culture = dragongfx
  971. ROOT = {
  972. OR = {
  973. NOT = { can_use_dragon_abilities_trigger = yes }
  974. NOT = {
  975. any_friend = {
  976. trait = dragon
  977. NOT = { trait = maimed_dragon }
  978. attribute_diff = { character = PREVPREV attribute = martial value = -20 }
  979. }
  980. }
  981. }
  982. }
  983. }
  984. }
  985. }
  986. }
  987. }
  988. }
  989. }
  990. modifier = {
  991. factor = 0
  992. OR = {
  993. trait = greedy
  994. trait = familyperson
  995. }
  996. }
  997. modifier = {
  998. factor = 3
  999. any_current_enemy = {
  1000. OR = {
  1001. can_use_dragon_abilities_trigger = yes
  1002. relative_power = { who = ROOT power = 1.5 }
  1003. }
  1004. }
  1005. }
  1006. modifier = {
  1007. factor = 3
  1008. NOT = { can_use_dragon_abilities_trigger = yes }
  1009. }
  1010. modifier = {
  1011. factor = 3
  1012. trait = charitable
  1013. }
  1014. modifier = {
  1015. factor = 3
  1016. trait = humble
  1017. }
  1018. modifier = {
  1019. factor = 0.33
  1020. trait = proud
  1021. }
  1022. }
  1023. }
  1024. }
  1025. targetted_decisions = {
  1026. face_the_dragon_pi = {
  1027. ai_target_filter = self
  1028. filter = all
  1029. ai = no
  1030. only_playable = yes
  1031. diplomacy_icon = GFX_face_the_dragon_pi
  1032.  
  1033. from_potential = {
  1034. ai = no
  1035. NOT = { graphical_culture = dragongfx }
  1036. NOT = { any_friend = { trait = dragon is_alive = yes } }
  1037. NOT = { has_game_rule = { name = dragon_hatching_taming value = off } }
  1038. }
  1039. potential = {
  1040. trait = dragon
  1041. NOT = { any_friend = { always = yes is_alive = yes } }
  1042. is_ruler = no
  1043. NOT = { liege = { graphical_culture = dragongfx } }
  1044. }
  1045. allow = {
  1046. show_only_failed_conditions = yes
  1047. OR = {
  1048. at_location = FROM
  1049. location = {
  1050. owner = {
  1051. is_liege_of = FROM
  1052. has_character_modifier = calling_for_dragon_riders
  1053. }
  1054. }
  1055. }
  1056. custom_tooltip = {
  1057. text = TOOLTIPface_dragonGUARDIAN
  1058. hidden_tooltip = {
  1059. OR = {
  1060. NOT = { educator = { always = yes } }
  1061. location = { any_province_lord = { is_liege_of = ROOT } }
  1062. }
  1063. }
  1064. }
  1065. custom_tooltip = {
  1066. text = TOOLTIPface_dragonFOUND
  1067. hidden_tooltip = {
  1068. OR = {
  1069. NOT = { has_character_flag = found_wild_dragon }
  1070. had_character_flag = { flag = found_wild_dragon days = 30 }
  1071. }
  1072. }
  1073. }
  1074. custom_tooltip = {
  1075. text = TOOLTIPface_dragonDANY
  1076. hidden_tooltip = {
  1077. NOT = { has_character_flag = dany_dragon }
  1078. }
  1079. }
  1080. location = {
  1081. owner = {
  1082. OR = {
  1083. character = FROM
  1084. custom_tooltip = {
  1085. text = TOOLTIPface_dragon_decOWNER
  1086. hidden_tooltip = {
  1087. NOR = {
  1088. can_use_dragon_abilities_trigger = yes
  1089. has_dynasty_flag = dragon_riding_dynasty
  1090. }
  1091. }
  1092. }
  1093. dynasty = FROM
  1094. is_close_relative = FROM
  1095. is_liege_or_above = FROM
  1096. AND = {
  1097. has_character_modifier = calling_for_dragon_riders
  1098. is_liege_of = FROM
  1099. FROM = { NOT = { tier = KING } }
  1100. opinion = { who = FROM value = -24 }
  1101. reverse_opinion = { who = FROM value = -24 }
  1102. }
  1103. }
  1104. }
  1105. }
  1106. FROM = {
  1107. conditional_tooltip = {
  1108. trigger = { has_game_rule = { name = dragon_hatching_taming value = valyrian_only } }
  1109. OR = {
  1110. culture_group = valyrian
  1111. is_divine_blood_dynasty_trigger = yes
  1112. any_artifact = { has_artifact_flag = dragonhorn }
  1113. }
  1114. }
  1115. age = 14
  1116. OR = {
  1117. is_female = no
  1118. female_get_masculine_event_trigger = yes
  1119. trait = brave
  1120. martial = 18
  1121. culture_group = valyrian
  1122. has_silver_hair_ethnicity_trigger = yes
  1123. trait = chosen_by_rhllor
  1124. }
  1125. prisoner = no
  1126. NOT = { in_battle = yes }
  1127. custom_tooltip = {
  1128. text = TOOLTIPface_dragonILL
  1129. hidden_tooltip = {
  1130. NOT = { has_severe_disability_trigger = yes }
  1131. has_epidemic = no
  1132. }
  1133. }
  1134. custom_tooltip = {
  1135. text = TOOLTIPface_dragonFOUNDWILDDRAGON
  1136. hidden_tooltip = {
  1137. OR = {
  1138. NOT = { has_character_flag = found_wild_dragon }
  1139. had_character_flag = { flag = found_wild_dragon days = 60 }
  1140. }
  1141. }
  1142. }
  1143. custom_tooltip = {
  1144. text = TOOLTIPface_dragonRAN
  1145. hidden_tooltip = {
  1146. OR = {
  1147. NOT = {has_character_flag = ran_from_dragon}
  1148. had_character_flag = { flag = ran_from_dragon days = 500}
  1149. }
  1150. }
  1151. }
  1152. NOT = { is_inaccessible_trigger = yes }
  1153. }
  1154. }
  1155. effect = {
  1156. FROM = { set_character_flag = found_wild_dragon }
  1157. set_character_flag = found_wild_dragon
  1158. character_event = { id = dragon.2698 tooltip = TOOLTIPdragon.2698 days = 2 random = 1 }
  1159. }
  1160. ai_will_do = {
  1161. factor = 0
  1162. }
  1163. }
  1164. bestow_dragon_egg = {
  1165. ai_target_filter = close_relatives
  1166. filter = all
  1167. third_party_filter = artifacts
  1168. ai_third_party_filter = artifacts
  1169. third_party = FROM
  1170. diplomacy_icon = GFX_bestow_dragon_egg
  1171. #only_rulers = yes
  1172.  
  1173. from_potential = {
  1174. has_artifact = dragon_egg
  1175. NOT = { trait = dragon }
  1176.  
  1177. #Ai Logic
  1178. OR = {
  1179. ai = no
  1180. any_friend = { is_alive = yes trait = dragon }
  1181. }
  1182. }
  1183. potential = {
  1184. OR = {
  1185. dynasty = FROM
  1186. is_close_relative = FROM
  1187. same_realm = FROM
  1188. }
  1189. NOT_mythical_creature_trigger = yes
  1190. NOT = { character = FROM }
  1191.  
  1192. #Ai Logic
  1193. OR = {
  1194. FROM = { ai = no }
  1195. AND = {
  1196. reverse_opinion = { who = FROM value = -49 }
  1197. NOT = { any_friend = { is_alive = yes trait = dragon } }
  1198. NOT = { trait = nightswatch }
  1199. NOT = { has_artifact = dragon_egg }
  1200. }
  1201. }
  1202. }
  1203. third_party_potential = {
  1204. FROMFROM = {
  1205. artifact_type = dragon_egg
  1206. }
  1207. }
  1208. third_party_allow = {
  1209.  
  1210. }
  1211. allow = {
  1212. FROM = {
  1213. OR = {
  1214. hidden_tooltip = { is_ruler = no }
  1215. has_regent = no
  1216. regent = { opinion = { who = ROOT value = 0 } }
  1217. }
  1218. }
  1219. NOT = { war_with = FROM }
  1220. }
  1221. effect = {
  1222. FROM = {
  1223. #hidden_tooltip = { add_trait = held_important_artifact }
  1224. ROOT_FROMFROM = {
  1225. #set_artifact_flag = previous_holder_@PREV
  1226. save_event_target_as = dragon_egg_to_transfer
  1227. tooltip = { transfer_artifact = { from = PREV to = ROOT } }
  1228. }
  1229. }
  1230. hidden_tooltip = {
  1231. letter_event = { id = dragon.401 }
  1232. }
  1233. if = { #child egg hatching bonus
  1234. limit = {
  1235. NOT = { age = 14 }
  1236. prisoner = no
  1237. is_incapable = no
  1238. OR = {
  1239. is_child_of = FROM
  1240. dynasty = FROM
  1241. }
  1242. }
  1243. custom_tooltip = {
  1244. text = TOOLTIPbestow_dragon_eggCHILD
  1245. hidden_tooltip = {
  1246. FROM = {
  1247. character_event = { id = dragon.160 }
  1248. }
  1249. }
  1250. }
  1251. }
  1252. prestige = 50
  1253. if = {
  1254. limit = { dynasty = FROM }
  1255. opinion = {
  1256. who = FROM
  1257. modifier = bestowed_dragon_egg
  1258. years = 10
  1259. }
  1260. }
  1261. if = {
  1262. limit = { NOT = { dynasty = FROM } }
  1263. opinion = {
  1264. who = FROM
  1265. modifier = bestowed_dragon_egg
  1266. years = 10
  1267. multiplier = 3
  1268. }
  1269. FROM = {
  1270. prestige = -200
  1271. any_dynasty_member = {
  1272. limit = {
  1273. is_alive = yes
  1274. is_close_relative = FROM
  1275. NOT = { character = FROM }
  1276. NOT = { character = ROOT }
  1277. }
  1278. opinion = {
  1279. who = FROM
  1280. modifier = opinion_angry
  1281. months = 60
  1282. }
  1283. }
  1284. }
  1285. }
  1286. if = {
  1287. limit = { ai = no }
  1288. chronicle = {
  1289. entry = CHRONICLE_GIVEN_EGG
  1290. picture = "GFX_targaryen_eggs"
  1291. }
  1292. }
  1293. }
  1294. ai_check_interval = 4
  1295. ai_will_do = {
  1296. factor = 1
  1297. modifier = {
  1298. factor = 0.08 # Slow it down a bit
  1299. }
  1300. modifier = {
  1301. factor = 0.1
  1302. FROM = { NOT = { age = 25 } }
  1303. }
  1304. modifier = {
  1305. factor = 0.2
  1306. NOT = { dynasty = FROM }
  1307. }
  1308. modifier = {
  1309. factor = 0.75
  1310. is_primary_heir = yes
  1311. }
  1312. modifier = {
  1313. factor = 1.66
  1314. is_female = no
  1315. FROM = {
  1316. primary_title = {
  1317. OR = {
  1318. has_law = agnatic_succession
  1319. has_law = cognatic_succession
  1320. }
  1321. }
  1322. }
  1323. }
  1324. modifier = {
  1325. factor = 1.66
  1326. is_female = yes
  1327. FROM = {
  1328. primary_title = {
  1329. OR = {
  1330. has_law = enatic_succession
  1331. has_law = enatic_cognatic_succession
  1332. }
  1333. }
  1334. }
  1335. }
  1336. modifier = {
  1337. factor = 2
  1338. sibling = FROM
  1339. }
  1340. modifier = {
  1341. factor = 5
  1342. is_child_of = FROM
  1343. }
  1344. modifier = {
  1345. factor = 0.2
  1346. can_inherit_titles_trigger = no
  1347. }
  1348. }
  1349. }
  1350. rename_dragon = {
  1351. filter = all
  1352. ai_target_filter = none
  1353. ai = no
  1354. only_rulers = yes
  1355. is_high_prio = yes
  1356. diplomacy_icon = GFX_face_the_dragon_pi
  1357.  
  1358. from_potential = {
  1359. ai = no
  1360. any_friend = { trait = dragon }
  1361. NOT = { graphical_culture = dragongfx }
  1362. }
  1363. potential = {
  1364. trait = dragon
  1365. OR = {
  1366. liege = { character = FROM }
  1367. is_friend = FROM
  1368. any_friend = {
  1369. dynasty = FROM
  1370. is_liege_or_above = FROM
  1371. ai = yes
  1372. }
  1373. }
  1374. }
  1375. allow = {
  1376. NOT = { age = 20 }
  1377. #FROM = { NOT = { has_character_flag = renaming_dragon } }
  1378. }
  1379. effect = {
  1380. prompt_name = {
  1381. player = FROM
  1382. type = NAME_DRAGON_MESSAGE
  1383. culture = dragon_culture
  1384. }
  1385. # FROM = {
  1386. # set_character_flag = renaming_dragon
  1387. # character_event = { id = dragon.499 tooltip = TOOLTIPdragon.499 }
  1388. # }
  1389. }
  1390. ai_will_do = {
  1391. factor = 0
  1392. }
  1393. }
  1394. release_from_dragonpit = {
  1395. filter = home_court
  1396. ai_target_filter = home_court
  1397. ai = no
  1398. only_rulers = yes
  1399. diplomacy_icon = GFX_face_the_dragon_pi
  1400.  
  1401. from_potential = {
  1402. ai = no
  1403. }
  1404. potential = {
  1405. trait = dragon
  1406. OR = {
  1407. is_friend = FROM
  1408. liege = { character = FROM }
  1409. }
  1410. has_character_modifier = locked_in_dragonpit
  1411. }
  1412. allow = {
  1413. FROM = {
  1414. age = 8
  1415. is_incapable = no
  1416. prisoner = no
  1417. }
  1418. has_character_modifier = locked_in_dragonpit
  1419. }
  1420. effect = {
  1421. remove_character_modifier = locked_in_dragonpit
  1422. hidden_tooltip = { FROM = { character_event = { id = dragon.150 } } }
  1423. }
  1424. ai_will_do = {
  1425. factor = 0
  1426. }
  1427. }
  1428. }
Tags: ckck2 agot
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement