Advertisement
Guest User

Untitled

a guest
Jun 7th, 2023
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 108.05 KB | None | 0 0
  1. offer_concubine_concubine_harem = {
  2. category = interaction_category_diplomacy
  3.  
  4. desc = offer_concubine_desc
  5.  
  6. ai_targets = {
  7. ai_recipients = neighboring_rulers
  8. }
  9. ai_target_quick_trigger = {
  10. adult = yes
  11. }
  12. ai_frequency = 144
  13.  
  14. greeting = positive
  15. notification_text = OFFER_CONCUBINE_NOTIFICATION
  16.  
  17. #interface = concubine_list
  18.  
  19. needs_recipient_to_open = yes
  20.  
  21. populate_actor_list = {
  22. scope:actor = {
  23. every_courtier = {
  24. limit = {
  25. can_be_offered_as_concubine_to_character_trigger = {
  26. GIVER = scope:actor
  27. CHARACTER = scope:recipient
  28. }
  29. }
  30. add_to_list = characters
  31. }
  32. every_prisoner = {
  33. limit = {
  34. NOT = { is_in_list = characters }
  35. can_be_offered_as_concubine_to_character_trigger = {
  36. GIVER = scope:actor
  37. CHARACTER = scope:recipient
  38. }
  39. }
  40. add_to_list = characters
  41. }
  42. }
  43. }
  44.  
  45. is_shown = {
  46. NOT = { scope:actor = scope:recipient }
  47. scope:actor = {
  48. faith = { has_doctrine = doctrine_concubine_harem }
  49. }
  50. scope:recipient = {
  51. allowed_concubines = yes
  52. is_adult = yes
  53. }
  54. }
  55.  
  56. is_valid_showing_failures_only = {
  57. custom_description = {
  58. text = take_concubine_available_character_opp
  59. object = scope:recipient
  60. scope:actor = {
  61. OR = {
  62. any_courtier = {
  63. can_be_offered_as_concubine_to_character_trigger = {
  64. GIVER = scope:actor
  65. CHARACTER = scope:recipient
  66. }
  67. }
  68. any_prisoner = {
  69. can_be_offered_as_concubine_to_character_trigger = {
  70. GIVER = scope:actor
  71. CHARACTER = scope:recipient
  72. }
  73. }
  74. }
  75. }
  76. }
  77. custom_description = {
  78. text = take_concubine_allowed_more
  79. object = scope:recipient
  80. scope:recipient = {
  81. allowed_more_concubines = yes
  82. }
  83. }
  84. }
  85.  
  86. can_be_picked = {
  87. is_adult = yes
  88. }
  89.  
  90. can_send = {
  91. custom_description = {
  92. text = character_unavailable_to_be_offered_as_concubine
  93. object = scope:secondary_actor
  94. scope:secondary_actor = {
  95. can_be_offered_as_concubine_to_character_trigger = {
  96. GIVER = scope:actor
  97. CHARACTER = scope:recipient
  98. }
  99. }
  100. }
  101. }
  102.  
  103. auto_accept = no
  104.  
  105. ai_accept = {
  106. base = 50
  107.  
  108. modifier = {
  109. add = {
  110. value = 50
  111. multiply = scope:secondary_actor.num_of_good_genetic_traits
  112. }
  113. scope:secondary_actor = {
  114. num_of_good_genetic_traits > 0
  115. trigger_if = {
  116. limit = {
  117. is_female = yes
  118. }
  119. age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
  120. }
  121. }
  122. desc = AI_POSITIVE_TRAIT_REASON
  123. }
  124.  
  125. modifier = {
  126. add = {
  127. value = 50
  128. }
  129. scope:secondary_actor = {
  130. is_lowborn = no
  131. trigger_if = {
  132. limit = {
  133. is_female = yes
  134. }
  135. age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
  136. }
  137. }
  138. desc = AI_DYNASTY_PRESTIGE_REASON_NOBLE
  139. }
  140.  
  141. modifier = {
  142. add = {
  143. value = -50
  144. multiply = scope:secondary_actor.num_of_bad_genetic_traits
  145. }
  146. scope:secondary_actor = {
  147. OR = {
  148. num_of_bad_genetic_traits > 0
  149. }
  150. trigger_if = {
  151. limit = {
  152. is_female = yes
  153. }
  154. age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
  155. }
  156. }
  157. desc = AI_NEGATIVE_TRAIT_REASON
  158. }
  159.  
  160. modifier = {
  161. add = {
  162. value = -50
  163. }
  164. scope:secondary_actor = {
  165. is_lowborn = yes
  166. num_of_good_genetic_traits = 0
  167. trigger_if = {
  168. limit = {
  169. is_female = yes
  170. }
  171. age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
  172. }
  173. }
  174. desc = AI_DYNASTY_PRESTIGE_REASON_LOWBORN_NO_POSITIVE_TRAIT
  175. }
  176.  
  177. opinion_modifier = { # Opinion of you
  178. who = scope:recipient
  179. opinion_target = scope:actor
  180. multiplier = 1.0
  181. desc = AI_OPINION_REASON
  182. }
  183.  
  184. opinion_modifier = { # Opinion of concubine
  185. who = scope:recipient
  186. opinion_target = scope:secondary_actor
  187. multiplier = 0.25
  188. desc = AI_OPINION_REASON
  189. }
  190.  
  191. compare_modifier = { # Recipient is reluctant to marry old women (procreation is a key factor)
  192. trigger = {
  193. scope:secondary_actor = {
  194. age > 29
  195. is_female = yes
  196. }
  197. }
  198. target = scope:secondary_actor
  199. value = age
  200. multiplier = -5.0
  201. step = 1
  202. offset = -29
  203. desc = MARRY_AGE
  204. }
  205.  
  206. modifier = { # A Recipient is unwilling to take a same-sex concubine if their faith doesn't support it
  207. add = -1000
  208.  
  209. scope:recipient = {
  210. allowed_to_marry_same_sex_trigger = no
  211. sex_same_as = scope:secondary_actor
  212. }
  213. desc = SAME_SEX_MARRIAGE_FAITH_REASON_RECIPIENT
  214. }
  215.  
  216. modifier = { # Unwilling if they don't have a batch of kids and opposite sex consorts to handle that situation
  217. add = -200
  218. scope:recipient = {
  219. allowed_to_marry_same_sex_trigger = yes
  220. sex_same_as = scope:secondary_actor
  221. trigger_if = {
  222. limit = {
  223. NOT = {
  224. any_consort = {
  225. can_have_children_with = { CHARACTER = scope:recipient }
  226. fertility > 0.1
  227. }
  228. }
  229. }
  230. any_child = {
  231. is_player_heir_of_trigger = { CHARACTER = root }
  232. }
  233. }
  234. trigger_else = {
  235. always = no
  236. }
  237. }
  238. desc = AI_NO_FERTILITY_REASON
  239. }
  240.  
  241. modifier = {
  242. add = 50
  243. scope:recipient = {
  244. is_attracted_to_gender_of = scope:secondary_actor
  245. }
  246. desc = AI_ATTRACTION_REASON
  247. }
  248.  
  249. modifier = { # A Recipient is more likely to agree if you're their liege
  250. add = 40
  251.  
  252. scope:recipient = {
  253. target_is_liege_or_above = scope:actor
  254. }
  255. desc = LIEGE_REASON
  256. }
  257.  
  258. #More/Less likely based on difference in rank between actor and recipient
  259. modifier = {
  260. add = 20
  261. scope:actor = {
  262. tier_difference = {
  263. target = scope:recipient
  264. value = 1
  265. }
  266. }
  267. desc = AI_RANK_DIFF
  268. }
  269. modifier = {
  270. add = 30
  271. scope:actor = {
  272. tier_difference = {
  273. target = scope:recipient
  274. value = 2
  275. }
  276. }
  277. desc = AI_RANK_DIFF
  278. }
  279. modifier = {
  280. add = 40
  281. scope:actor = {
  282. tier_difference = {
  283. target = scope:recipient
  284. value = 3
  285. }
  286. }
  287. desc = AI_RANK_DIFF
  288. }
  289. modifier = {
  290. add = 50
  291. scope:actor = {
  292. tier_difference = {
  293. target = scope:recipient
  294. value = 4
  295. }
  296. }
  297. desc = AI_RANK_DIFF
  298. }
  299. modifier = {
  300. add = 60
  301. scope:actor = {
  302. tier_difference = {
  303. target = scope:recipient
  304. value = 5
  305. }
  306. }
  307. desc = AI_RANK_DIFF
  308. }
  309. modifier = {
  310. add = -20
  311. scope:actor = {
  312. tier_difference = {
  313. target = scope:recipient
  314. value = -1
  315. }
  316. }
  317. desc = AI_RANK_DIFF
  318. }
  319. modifier = {
  320. add = -30
  321. scope:actor = {
  322. tier_difference = {
  323. target = scope:recipient
  324. value = -2
  325. }
  326. }
  327. desc = AI_RANK_DIFF
  328. }
  329. modifier = {
  330. add = -40
  331. scope:actor = {
  332. tier_difference = {
  333. target = scope:recipient
  334. value = -3
  335. }
  336. }
  337. desc = AI_RANK_DIFF
  338. }
  339. modifier = {
  340. add = -50
  341. scope:actor = {
  342. tier_difference = {
  343. target = scope:recipient
  344. value = -4
  345. }
  346. }
  347. desc = AI_RANK_DIFF
  348. }
  349. modifier = {
  350. add = -60
  351. scope:actor = {
  352. tier_difference = {
  353. target = scope:recipient
  354. value = -5
  355. }
  356. }
  357. desc = AI_RANK_DIFF
  358. }
  359.  
  360. modifier = {
  361. add = intimidated_reason_value
  362. scope:recipient = {
  363. target_is_liege_or_above = scope:actor
  364. has_dread_level_towards = {
  365. target = scope:actor
  366. level = 1
  367. }
  368. }
  369. desc = INTIMIDATED_REASON
  370. }
  371. modifier = {
  372. add = cowed_reason_value
  373. scope:recipient = {
  374. target_is_liege_or_above = scope:actor
  375. has_dread_level_towards = {
  376. target = scope:actor
  377. level = 2
  378. }
  379. }
  380. desc = COWED_REASON
  381. }
  382.  
  383. modifier = {
  384. add = intimidated_external_reason_value
  385. scope:recipient = {
  386. NOT = { target_is_liege_or_above = scope:actor }
  387. has_dread_level_towards = {
  388. target = scope:actor
  389. level = 1
  390. }
  391. }
  392. desc = INTIMIDATED_REASON
  393. }
  394. modifier = {
  395. add = cowed_external_reason_value
  396. scope:recipient = {
  397. NOT = { target_is_liege_or_above = scope:actor }
  398. has_dread_level_towards = {
  399. target = scope:actor
  400. level = 2
  401. }
  402. }
  403. desc = COWED_REASON
  404. }
  405. modifier = {
  406. add = -250
  407. scope:secondary_actor = {
  408. has_std_trigger = yes
  409. }
  410. desc = AI_STD_REASON
  411. }
  412. modifier = {
  413. add = -250
  414. scope:secondary_actor = {
  415. has_epidemic_disease_trigger = yes
  416. }
  417. desc = AI_CONTAGIOUS_REASON
  418. }
  419. modifier = {
  420. add = -5000
  421. scope:secondary_actor = {
  422. fertility <= 0
  423. }
  424. desc = AI_FERTILITY_REASON
  425. }
  426. modifier = {
  427. scope:hook = yes
  428. add = 500
  429. scope:actor = { NOT = { has_strong_hook = scope:recipient } }
  430. desc = SCHEME_WEAK_HOOK_USED
  431. }
  432. modifier = {
  433. scope:hook = yes
  434. add = 1000
  435. scope:actor = { has_strong_hook = scope:recipient }
  436. desc = SCHEME_STRONG_HOOK_USED
  437. }
  438. }
  439.  
  440. ai_potential = {
  441. is_adult = yes
  442. NOT = { has_trait = incapable }
  443. is_at_war = no
  444. NOR = {
  445. has_trait = greedy
  446. ai_greed > very_high_positive_ai_value
  447. }
  448. faith = { has_doctrine = doctrine_concubine_harem }
  449. }
  450.  
  451. ai_will_do = {
  452. base = 0
  453.  
  454. modifier = { # Basic Filtering
  455. add = 100
  456. scope:recipient = {
  457. number_of_concubines < number_of_desired_concubines
  458. }
  459. scope:secondary_actor = {
  460. trigger_if = {
  461. limit = {
  462. allowed_to_marry_same_sex_trigger = no
  463. }
  464. sex_opposite_of = scope:recipient
  465. }
  466. fertility > 0.2
  467. age < 36
  468. NOR = {
  469. is_councillor_of = scope:actor
  470. is_of_major_interest_trigger = {
  471. CHARACTER = scope:actor
  472. }
  473. is_concubine_of = scope:actor
  474. }
  475. }
  476. }
  477.  
  478. modifier = { # If secondary_actor is close to actor, a good character, or if actor should take them as concubine
  479. add = -100
  480. scope:secondary_actor = {
  481. is_of_minor_interest_trigger = {
  482. CHARACTER = scope:actor
  483. }
  484. AND = {
  485. can_become_concubine_of_character_trigger = { CHARACTER = scope:actor }
  486. scope:actor = { number_of_concubines < number_of_desired_concubines }
  487. }
  488. }
  489. }
  490.  
  491. modifier = { # If secondary_actor could be an agent...
  492. add = 25
  493. any_scheme = {
  494. scheme_target = scope:recipient
  495. save_temporary_scope_as = scheme_check
  496. }
  497. scope:secondary_actor = {
  498. is_valid_as_agent_in_scheme = scope:scheme_check
  499. }
  500. }
  501.  
  502. modifier = { # More likely if it's a neighboring ruler that you want to like you
  503. add = 50
  504. scope:recipient = {
  505. any_neighboring_top_liege_realm_owner = { this = scope:actor }
  506. max_military_strength > scope:actor.max_military_strength
  507. }
  508. }
  509.  
  510. modifier = { # More likely if its your friend and it's a nice concubine
  511. add = 50
  512. scope:recipient = {
  513. OR = {
  514. has_relation_friend = scope:actor
  515. has_relation_best_friend = scope:actor
  516. }
  517. }
  518. scope:secondary_actor = {
  519. fertility > 0.2
  520. age < 36
  521. OR = {
  522. has_trait = lustful
  523. num_of_good_genetic_traits > 0
  524. }
  525. }
  526. }
  527.  
  528. modifier = { #Even if they're allowed to take same-sex concubines we don't want the AI to suggest it without a good reason if they're not attracted to the person
  529. add = -200
  530. scope:recipient = {
  531. allowed_to_marry_same_sex_trigger = yes
  532. sex_same_as = scope:secondary_actor
  533. NOT = { is_attracted_to_gender_of = scope:secondary_actor }
  534. }
  535. }
  536.  
  537. modifier = { # No if it's a same-sex concubinage and actor isn't accepting of it
  538. factor = 0
  539. scope:actor = {
  540. allowed_to_marry_same_sex_trigger = no
  541. scope:recipient = { sex_same_as = scope:secondary_actor }
  542. }
  543. }
  544.  
  545. modifier = { # No if it's a same-sex concubinage and recipient isn't accepting of it
  546. factor = 0
  547. scope:recipient = {
  548. allowed_to_marry_same_sex_trigger = no
  549. sex_same_as = scope:secondary_actor
  550. }
  551. }
  552.  
  553. modifier = { # Incest Filtering: Hard NO!
  554. factor = 0
  555. scope:recipient = {
  556. relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:secondary_actor }
  557. NOR = {
  558. accepts_incest_with_trigger = { CHARACTER = scope:secondary_actor }
  559. sexually_liberal_trigger = yes
  560. }
  561. }
  562. }
  563.  
  564. modifier = { # Incest Filtering: Not likely, but keep the door open...
  565. factor = 0.2
  566. scope:recipient = {
  567. relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:secondary_actor }
  568. OR = {
  569. accepts_incest_with_trigger = { CHARACTER = scope:secondary_actor }
  570. sexually_liberal_trigger = yes
  571. }
  572. }
  573. }
  574.  
  575. modifier = { # Faith considerations
  576. factor = 0
  577. scope:recipient = {
  578. faith = {
  579. faith_hostility_level = {
  580. target = scope:actor.faith
  581. value >= faith_hostile_level
  582. }
  583. }
  584. NOR = {
  585. has_relation_friend = scope:actor
  586. has_relation_best_friend = scope:actor
  587. }
  588. }
  589. }
  590. }
  591.  
  592. on_send = {
  593. scope:secondary_actor = { # to block the same character from being offered twice
  594. add_character_flag = {
  595. flag = has_been_offered_as_concubine
  596. days = 5
  597. }
  598. }
  599. }
  600.  
  601. on_accept = {
  602. concubine_offer_on_accept_effect = yes
  603. }
  604.  
  605. on_decline = {
  606. scope:actor = {
  607. send_interface_toast = {
  608. type = event_generic_neutral
  609. title = msg_concubine_offer_rejected_title
  610. right_icon = scope:recipient
  611. left_icon = scope:secondary_actor
  612. custom_tooltip = msg_concubine_offer_rejected
  613. }
  614. }
  615. }
  616.  
  617. send_options_exclusive = no
  618. send_option = {
  619. is_valid = {
  620. scope:actor = {
  621. has_usable_hook = scope:recipient
  622. }
  623. }
  624. flag = hook
  625. localization = SCHEME_HOOK
  626. }
  627. should_use_extra_icon = {
  628. scope:actor = { has_usable_hook = scope:recipient }
  629. }
  630. extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds"
  631. }
  632. offer_concubine_concubine_l = {
  633. category = interaction_category_diplomacy
  634.  
  635. desc = offer_concubine_desc
  636.  
  637. ai_targets = {
  638. ai_recipients = neighboring_rulers
  639. }
  640. ai_target_quick_trigger = {
  641. adult = yes
  642. }
  643. ai_frequency = 144
  644.  
  645. greeting = positive
  646. notification_text = OFFER_CONCUBINE_NOTIFICATION
  647.  
  648. #interface = concubine_list
  649.  
  650. needs_recipient_to_open = yes
  651.  
  652. populate_actor_list = {
  653. scope:actor = {
  654. every_courtier = {
  655. limit = {
  656. can_be_offered_as_concubine_to_character_trigger = {
  657. GIVER = scope:actor
  658. CHARACTER = scope:recipient
  659. }
  660. }
  661. add_to_list = characters
  662. }
  663. every_prisoner = {
  664. limit = {
  665. NOT = { is_in_list = characters }
  666. can_be_offered_as_concubine_to_character_trigger = {
  667. GIVER = scope:actor
  668. CHARACTER = scope:recipient
  669. }
  670. }
  671. add_to_list = characters
  672. }
  673. }
  674. }
  675.  
  676. is_shown = {
  677. NOT = { scope:actor = scope:recipient }
  678. scope:actor = {
  679. faith = { has_doctrine = doctrine_concubine_l }
  680. }
  681. scope:recipient = {
  682. allowed_concubines = yes
  683. is_adult = yes
  684. }
  685. }
  686.  
  687. is_valid_showing_failures_only = {
  688. custom_description = {
  689. text = take_concubine_available_character_opp
  690. object = scope:recipient
  691. scope:actor = {
  692. OR = {
  693. any_courtier = {
  694. can_be_offered_as_concubine_to_character_trigger = {
  695. GIVER = scope:actor
  696. CHARACTER = scope:recipient
  697. }
  698. }
  699. any_prisoner = {
  700. can_be_offered_as_concubine_to_character_trigger = {
  701. GIVER = scope:actor
  702. CHARACTER = scope:recipient
  703. }
  704. }
  705. }
  706. }
  707. }
  708. custom_description = {
  709. text = take_concubine_allowed_more
  710. object = scope:recipient
  711. scope:recipient = {
  712. allowed_more_concubines = yes
  713. }
  714. }
  715. }
  716.  
  717. can_be_picked = {
  718. is_adult = yes
  719. }
  720.  
  721. can_send = {
  722. custom_description = {
  723. text = character_unavailable_to_be_offered_as_concubine
  724. object = scope:secondary_actor
  725. scope:secondary_actor = {
  726. can_be_offered_as_concubine_to_character_trigger = {
  727. GIVER = scope:actor
  728. CHARACTER = scope:recipient
  729. }
  730. }
  731. }
  732. }
  733.  
  734. auto_accept = no
  735.  
  736. ai_accept = {
  737. base = 50
  738.  
  739. modifier = {
  740. add = {
  741. value = 50
  742. multiply = scope:secondary_actor.num_of_good_genetic_traits
  743. }
  744. scope:secondary_actor = {
  745. num_of_good_genetic_traits > 0
  746. trigger_if = {
  747. limit = {
  748. is_female = yes
  749. }
  750. age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
  751. }
  752. }
  753. desc = AI_POSITIVE_TRAIT_REASON
  754. }
  755.  
  756. modifier = {
  757. add = {
  758. value = 50
  759. }
  760. scope:secondary_actor = {
  761. is_lowborn = no
  762. trigger_if = {
  763. limit = {
  764. is_female = yes
  765. }
  766. age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
  767. }
  768. }
  769. desc = AI_DYNASTY_PRESTIGE_REASON_NOBLE
  770. }
  771.  
  772. modifier = {
  773. add = {
  774. value = -50
  775. multiply = scope:secondary_actor.num_of_bad_genetic_traits
  776. }
  777. scope:secondary_actor = {
  778. OR = {
  779. num_of_bad_genetic_traits > 0
  780. }
  781. trigger_if = {
  782. limit = {
  783. is_female = yes
  784. }
  785. age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
  786. }
  787. }
  788. desc = AI_NEGATIVE_TRAIT_REASON
  789. }
  790.  
  791. modifier = {
  792. add = {
  793. value = -50
  794. }
  795. scope:secondary_actor = {
  796. is_lowborn = yes
  797. num_of_good_genetic_traits = 0
  798. trigger_if = {
  799. limit = {
  800. is_female = yes
  801. }
  802. age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
  803. }
  804. }
  805. desc = AI_DYNASTY_PRESTIGE_REASON_LOWBORN_NO_POSITIVE_TRAIT
  806. }
  807.  
  808. opinion_modifier = { # Opinion of you
  809. who = scope:recipient
  810. opinion_target = scope:actor
  811. multiplier = 1.0
  812. desc = AI_OPINION_REASON
  813. }
  814.  
  815. opinion_modifier = { # Opinion of concubine
  816. who = scope:recipient
  817. opinion_target = scope:secondary_actor
  818. multiplier = 0.25
  819. desc = AI_OPINION_REASON
  820. }
  821.  
  822. compare_modifier = { # Recipient is reluctant to marry old women (procreation is a key factor)
  823. trigger = {
  824. scope:secondary_actor = {
  825. age > 29
  826. is_female = yes
  827. }
  828. }
  829. target = scope:secondary_actor
  830. value = age
  831. multiplier = -5.0
  832. step = 1
  833. offset = -29
  834. desc = MARRY_AGE
  835. }
  836.  
  837. modifier = { # A Recipient is unwilling to take a same-sex concubine if their faith doesn't support it
  838. add = -1000
  839.  
  840. scope:recipient = {
  841. allowed_to_marry_same_sex_trigger = no
  842. sex_same_as = scope:secondary_actor
  843. }
  844. desc = SAME_SEX_MARRIAGE_FAITH_REASON_RECIPIENT
  845. }
  846.  
  847. modifier = { # Unwilling if they don't have a batch of kids and opposite sex consorts to handle that situation
  848. add = -200
  849. scope:recipient = {
  850. allowed_to_marry_same_sex_trigger = yes
  851. sex_same_as = scope:secondary_actor
  852. trigger_if = {
  853. limit = {
  854. NOT = {
  855. any_consort = {
  856. can_have_children_with = { CHARACTER = scope:recipient }
  857. fertility > 0.1
  858. }
  859. }
  860. }
  861. any_child = {
  862. is_player_heir_of_trigger = { CHARACTER = root }
  863. }
  864. }
  865. trigger_else = {
  866. always = no
  867. }
  868. }
  869. desc = AI_NO_FERTILITY_REASON
  870. }
  871.  
  872. modifier = {
  873. add = 50
  874. scope:recipient = {
  875. is_attracted_to_gender_of = scope:secondary_actor
  876. }
  877. desc = AI_ATTRACTION_REASON
  878. }
  879.  
  880. modifier = { # A Recipient is more likely to agree if you're their liege
  881. add = 40
  882.  
  883. scope:recipient = {
  884. target_is_liege_or_above = scope:actor
  885. }
  886. desc = LIEGE_REASON
  887. }
  888.  
  889. #More/Less likely based on difference in rank between actor and recipient
  890. modifier = {
  891. add = 20
  892. scope:actor = {
  893. tier_difference = {
  894. target = scope:recipient
  895. value = 1
  896. }
  897. }
  898. desc = AI_RANK_DIFF
  899. }
  900. modifier = {
  901. add = 30
  902. scope:actor = {
  903. tier_difference = {
  904. target = scope:recipient
  905. value = 2
  906. }
  907. }
  908. desc = AI_RANK_DIFF
  909. }
  910. modifier = {
  911. add = 40
  912. scope:actor = {
  913. tier_difference = {
  914. target = scope:recipient
  915. value = 3
  916. }
  917. }
  918. desc = AI_RANK_DIFF
  919. }
  920. modifier = {
  921. add = 50
  922. scope:actor = {
  923. tier_difference = {
  924. target = scope:recipient
  925. value = 4
  926. }
  927. }
  928. desc = AI_RANK_DIFF
  929. }
  930. modifier = {
  931. add = 60
  932. scope:actor = {
  933. tier_difference = {
  934. target = scope:recipient
  935. value = 5
  936. }
  937. }
  938. desc = AI_RANK_DIFF
  939. }
  940. modifier = {
  941. add = -20
  942. scope:actor = {
  943. tier_difference = {
  944. target = scope:recipient
  945. value = -1
  946. }
  947. }
  948. desc = AI_RANK_DIFF
  949. }
  950. modifier = {
  951. add = -30
  952. scope:actor = {
  953. tier_difference = {
  954. target = scope:recipient
  955. value = -2
  956. }
  957. }
  958. desc = AI_RANK_DIFF
  959. }
  960. modifier = {
  961. add = -40
  962. scope:actor = {
  963. tier_difference = {
  964. target = scope:recipient
  965. value = -3
  966. }
  967. }
  968. desc = AI_RANK_DIFF
  969. }
  970. modifier = {
  971. add = -50
  972. scope:actor = {
  973. tier_difference = {
  974. target = scope:recipient
  975. value = -4
  976. }
  977. }
  978. desc = AI_RANK_DIFF
  979. }
  980. modifier = {
  981. add = -60
  982. scope:actor = {
  983. tier_difference = {
  984. target = scope:recipient
  985. value = -5
  986. }
  987. }
  988. desc = AI_RANK_DIFF
  989. }
  990.  
  991. modifier = {
  992. add = intimidated_reason_value
  993. scope:recipient = {
  994. target_is_liege_or_above = scope:actor
  995. has_dread_level_towards = {
  996. target = scope:actor
  997. level = 1
  998. }
  999. }
  1000. desc = INTIMIDATED_REASON
  1001. }
  1002. modifier = {
  1003. add = cowed_reason_value
  1004. scope:recipient = {
  1005. target_is_liege_or_above = scope:actor
  1006. has_dread_level_towards = {
  1007. target = scope:actor
  1008. level = 2
  1009. }
  1010. }
  1011. desc = COWED_REASON
  1012. }
  1013.  
  1014. modifier = {
  1015. add = intimidated_external_reason_value
  1016. scope:recipient = {
  1017. NOT = { target_is_liege_or_above = scope:actor }
  1018. has_dread_level_towards = {
  1019. target = scope:actor
  1020. level = 1
  1021. }
  1022. }
  1023. desc = INTIMIDATED_REASON
  1024. }
  1025. modifier = {
  1026. add = cowed_external_reason_value
  1027. scope:recipient = {
  1028. NOT = { target_is_liege_or_above = scope:actor }
  1029. has_dread_level_towards = {
  1030. target = scope:actor
  1031. level = 2
  1032. }
  1033. }
  1034. desc = COWED_REASON
  1035. }
  1036. modifier = {
  1037. add = -250
  1038. scope:secondary_actor = {
  1039. has_std_trigger = yes
  1040. }
  1041. desc = AI_STD_REASON
  1042. }
  1043. modifier = {
  1044. add = -250
  1045. scope:secondary_actor = {
  1046. has_epidemic_disease_trigger = yes
  1047. }
  1048. desc = AI_CONTAGIOUS_REASON
  1049. }
  1050. modifier = {
  1051. add = -5000
  1052. scope:secondary_actor = {
  1053. fertility <= 0
  1054. }
  1055. desc = AI_FERTILITY_REASON
  1056. }
  1057. modifier = {
  1058. scope:hook = yes
  1059. add = 500
  1060. scope:actor = { NOT = { has_strong_hook = scope:recipient } }
  1061. desc = SCHEME_WEAK_HOOK_USED
  1062. }
  1063. modifier = {
  1064. scope:hook = yes
  1065. add = 1000
  1066. scope:actor = { has_strong_hook = scope:recipient }
  1067. desc = SCHEME_STRONG_HOOK_USED
  1068. }
  1069. }
  1070.  
  1071. ai_potential = {
  1072. is_adult = yes
  1073. NOT = { has_trait = incapable }
  1074. is_at_war = no
  1075. NOR = {
  1076. has_trait = greedy
  1077. ai_greed > very_high_positive_ai_value
  1078. }
  1079. faith = { has_doctrine = doctrine_concubine_l }
  1080. }
  1081.  
  1082. ai_will_do = {
  1083. base = 0
  1084.  
  1085. modifier = { # Basic Filtering
  1086. add = 100
  1087. scope:recipient = {
  1088. number_of_concubines < number_of_desired_concubines
  1089. }
  1090. scope:secondary_actor = {
  1091. trigger_if = {
  1092. limit = {
  1093. allowed_to_marry_same_sex_trigger = no
  1094. }
  1095. sex_opposite_of = scope:recipient
  1096. }
  1097. fertility > 0.2
  1098. age < 36
  1099. NOR = {
  1100. is_councillor_of = scope:actor
  1101. is_of_major_interest_trigger = {
  1102. CHARACTER = scope:actor
  1103. }
  1104. is_concubine_of = scope:actor
  1105. }
  1106. }
  1107. }
  1108.  
  1109. modifier = { # If secondary_actor is close to actor, a good character, or if actor should take them as concubine
  1110. add = -100
  1111. scope:secondary_actor = {
  1112. is_of_minor_interest_trigger = {
  1113. CHARACTER = scope:actor
  1114. }
  1115. AND = {
  1116. can_become_concubine_of_character_trigger = { CHARACTER = scope:actor }
  1117. scope:actor = { number_of_concubines < number_of_desired_concubines }
  1118. }
  1119. }
  1120. }
  1121.  
  1122. modifier = { # If secondary_actor could be an agent...
  1123. add = 25
  1124. any_scheme = {
  1125. scheme_target = scope:recipient
  1126. save_temporary_scope_as = scheme_check
  1127. }
  1128. scope:secondary_actor = {
  1129. is_valid_as_agent_in_scheme = scope:scheme_check
  1130. }
  1131. }
  1132.  
  1133. modifier = { # More likely if it's a neighboring ruler that you want to like you
  1134. add = 50
  1135. scope:recipient = {
  1136. any_neighboring_top_liege_realm_owner = { this = scope:actor }
  1137. max_military_strength > scope:actor.max_military_strength
  1138. }
  1139. }
  1140.  
  1141. modifier = { # More likely if its your friend and it's a nice concubine
  1142. add = 50
  1143. scope:recipient = {
  1144. OR = {
  1145. has_relation_friend = scope:actor
  1146. has_relation_best_friend = scope:actor
  1147. }
  1148. }
  1149. scope:secondary_actor = {
  1150. fertility > 0.2
  1151. age < 36
  1152. OR = {
  1153. has_trait = lustful
  1154. num_of_good_genetic_traits > 0
  1155. }
  1156. }
  1157. }
  1158.  
  1159. modifier = { #Even if they're allowed to take same-sex concubines we don't want the AI to suggest it without a good reason if they're not attracted to the person
  1160. add = -200
  1161. scope:recipient = {
  1162. allowed_to_marry_same_sex_trigger = yes
  1163. sex_same_as = scope:secondary_actor
  1164. NOT = { is_attracted_to_gender_of = scope:secondary_actor }
  1165. }
  1166. }
  1167.  
  1168. modifier = { # No if it's a same-sex concubinage and actor isn't accepting of it
  1169. factor = 0
  1170. scope:actor = {
  1171. allowed_to_marry_same_sex_trigger = no
  1172. scope:recipient = { sex_same_as = scope:secondary_actor }
  1173. }
  1174. }
  1175.  
  1176. modifier = { # No if it's a same-sex concubinage and recipient isn't accepting of it
  1177. factor = 0
  1178. scope:recipient = {
  1179. allowed_to_marry_same_sex_trigger = no
  1180. sex_same_as = scope:secondary_actor
  1181. }
  1182. }
  1183.  
  1184. modifier = { # Incest Filtering: Hard NO!
  1185. factor = 0
  1186. scope:recipient = {
  1187. relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:secondary_actor }
  1188. NOR = {
  1189. accepts_incest_with_trigger = { CHARACTER = scope:secondary_actor }
  1190. sexually_liberal_trigger = yes
  1191. }
  1192. }
  1193. }
  1194.  
  1195. modifier = { # Incest Filtering: Not likely, but keep the door open...
  1196. factor = 0.2
  1197. scope:recipient = {
  1198. relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:secondary_actor }
  1199. OR = {
  1200. accepts_incest_with_trigger = { CHARACTER = scope:secondary_actor }
  1201. sexually_liberal_trigger = yes
  1202. }
  1203. }
  1204. }
  1205.  
  1206. modifier = { # Faith considerations
  1207. factor = 0
  1208. scope:recipient = {
  1209. faith = {
  1210. faith_hostility_level = {
  1211. target = scope:actor.faith
  1212. value >= faith_hostile_level
  1213. }
  1214. }
  1215. NOR = {
  1216. has_relation_friend = scope:actor
  1217. has_relation_best_friend = scope:actor
  1218. }
  1219. }
  1220. }
  1221. }
  1222.  
  1223. on_send = {
  1224. scope:secondary_actor = { # to block the same character from being offered twice
  1225. add_character_flag = {
  1226. flag = has_been_offered_as_concubine
  1227. days = 5
  1228. }
  1229. }
  1230. }
  1231.  
  1232. on_accept = {
  1233. concubine_offer_on_accept_effect = yes
  1234. }
  1235.  
  1236. on_decline = {
  1237. scope:actor = {
  1238. send_interface_toast = {
  1239. type = event_generic_neutral
  1240. title = msg_concubine_offer_rejected_title
  1241. right_icon = scope:recipient
  1242. left_icon = scope:secondary_actor
  1243. custom_tooltip = msg_concubine_offer_rejected
  1244. }
  1245. }
  1246. }
  1247.  
  1248. send_options_exclusive = no
  1249. send_option = {
  1250. is_valid = {
  1251. scope:actor = {
  1252. has_usable_hook = scope:recipient
  1253. }
  1254. }
  1255. flag = hook
  1256. localization = SCHEME_HOOK
  1257. }
  1258. should_use_extra_icon = {
  1259. scope:actor = { has_usable_hook = scope:recipient }
  1260. }
  1261. extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds"
  1262. }
  1263. offer_concubine_concubine_m = {
  1264. category = interaction_category_diplomacy
  1265.  
  1266. desc = offer_concubine_desc
  1267.  
  1268. ai_targets = {
  1269. ai_recipients = neighboring_rulers
  1270. }
  1271. ai_target_quick_trigger = {
  1272. adult = yes
  1273. }
  1274. ai_frequency = 144
  1275.  
  1276. greeting = positive
  1277. notification_text = OFFER_CONCUBINE_NOTIFICATION
  1278.  
  1279. #interface = concubine_list
  1280.  
  1281. needs_recipient_to_open = yes
  1282.  
  1283. populate_actor_list = {
  1284. scope:actor = {
  1285. every_courtier = {
  1286. limit = {
  1287. can_be_offered_as_concubine_to_character_trigger = {
  1288. GIVER = scope:actor
  1289. CHARACTER = scope:recipient
  1290. }
  1291. }
  1292. add_to_list = characters
  1293. }
  1294. every_prisoner = {
  1295. limit = {
  1296. NOT = { is_in_list = characters }
  1297. can_be_offered_as_concubine_to_character_trigger = {
  1298. GIVER = scope:actor
  1299. CHARACTER = scope:recipient
  1300. }
  1301. }
  1302. add_to_list = characters
  1303. }
  1304. }
  1305. }
  1306.  
  1307. is_shown = {
  1308. NOT = { scope:actor = scope:recipient }
  1309. scope:actor = {
  1310. faith = { has_doctrine = doctrine_concubine_m }
  1311. }
  1312. scope:recipient = {
  1313. allowed_concubines = yes
  1314. is_adult = yes
  1315. }
  1316. }
  1317.  
  1318. is_valid_showing_failures_only = {
  1319. custom_description = {
  1320. text = take_concubine_available_character_opp
  1321. object = scope:recipient
  1322. scope:actor = {
  1323. OR = {
  1324. any_courtier = {
  1325. can_be_offered_as_concubine_to_character_trigger = {
  1326. GIVER = scope:actor
  1327. CHARACTER = scope:recipient
  1328. }
  1329. }
  1330. any_prisoner = {
  1331. can_be_offered_as_concubine_to_character_trigger = {
  1332. GIVER = scope:actor
  1333. CHARACTER = scope:recipient
  1334. }
  1335. }
  1336. }
  1337. }
  1338. }
  1339. custom_description = {
  1340. text = take_concubine_allowed_more
  1341. object = scope:recipient
  1342. scope:recipient = {
  1343. allowed_more_concubines = yes
  1344. }
  1345. }
  1346. }
  1347.  
  1348. can_be_picked = {
  1349. is_adult = yes
  1350. }
  1351.  
  1352. can_send = {
  1353. custom_description = {
  1354. text = character_unavailable_to_be_offered_as_concubine
  1355. object = scope:secondary_actor
  1356. scope:secondary_actor = {
  1357. can_be_offered_as_concubine_to_character_trigger = {
  1358. GIVER = scope:actor
  1359. CHARACTER = scope:recipient
  1360. }
  1361. }
  1362. }
  1363. }
  1364.  
  1365. auto_accept = no
  1366.  
  1367. ai_accept = {
  1368. base = 50
  1369.  
  1370. modifier = {
  1371. add = {
  1372. value = 50
  1373. multiply = scope:secondary_actor.num_of_good_genetic_traits
  1374. }
  1375. scope:secondary_actor = {
  1376. num_of_good_genetic_traits > 0
  1377. trigger_if = {
  1378. limit = {
  1379. is_female = yes
  1380. }
  1381. age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
  1382. }
  1383. }
  1384. desc = AI_POSITIVE_TRAIT_REASON
  1385. }
  1386.  
  1387. modifier = {
  1388. add = {
  1389. value = 50
  1390. }
  1391. scope:secondary_actor = {
  1392. is_lowborn = no
  1393. trigger_if = {
  1394. limit = {
  1395. is_female = yes
  1396. }
  1397. age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
  1398. }
  1399. }
  1400. desc = AI_DYNASTY_PRESTIGE_REASON_NOBLE
  1401. }
  1402.  
  1403. modifier = {
  1404. add = {
  1405. value = -50
  1406. multiply = scope:secondary_actor.num_of_bad_genetic_traits
  1407. }
  1408. scope:secondary_actor = {
  1409. OR = {
  1410. num_of_bad_genetic_traits > 0
  1411. }
  1412. trigger_if = {
  1413. limit = {
  1414. is_female = yes
  1415. }
  1416. age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
  1417. }
  1418. }
  1419. desc = AI_NEGATIVE_TRAIT_REASON
  1420. }
  1421.  
  1422. modifier = {
  1423. add = {
  1424. value = -50
  1425. }
  1426. scope:secondary_actor = {
  1427. is_lowborn = yes
  1428. num_of_good_genetic_traits = 0
  1429. trigger_if = {
  1430. limit = {
  1431. is_female = yes
  1432. }
  1433. age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
  1434. }
  1435. }
  1436. desc = AI_DYNASTY_PRESTIGE_REASON_LOWBORN_NO_POSITIVE_TRAIT
  1437. }
  1438.  
  1439. opinion_modifier = { # Opinion of you
  1440. who = scope:recipient
  1441. opinion_target = scope:actor
  1442. multiplier = 1.0
  1443. desc = AI_OPINION_REASON
  1444. }
  1445.  
  1446. opinion_modifier = { # Opinion of concubine
  1447. who = scope:recipient
  1448. opinion_target = scope:secondary_actor
  1449. multiplier = 0.25
  1450. desc = AI_OPINION_REASON
  1451. }
  1452.  
  1453. compare_modifier = { # Recipient is reluctant to marry old women (procreation is a key factor)
  1454. trigger = {
  1455. scope:secondary_actor = {
  1456. age > 29
  1457. is_female = yes
  1458. }
  1459. }
  1460. target = scope:secondary_actor
  1461. value = age
  1462. multiplier = -5.0
  1463. step = 1
  1464. offset = -29
  1465. desc = MARRY_AGE
  1466. }
  1467.  
  1468. modifier = { # A Recipient is unwilling to take a same-sex concubine if their faith doesn't support it
  1469. add = -1000
  1470.  
  1471. scope:recipient = {
  1472. allowed_to_marry_same_sex_trigger = no
  1473. sex_same_as = scope:secondary_actor
  1474. }
  1475. desc = SAME_SEX_MARRIAGE_FAITH_REASON_RECIPIENT
  1476. }
  1477.  
  1478. modifier = { # Unwilling if they don't have a batch of kids and opposite sex consorts to handle that situation
  1479. add = -200
  1480. scope:recipient = {
  1481. allowed_to_marry_same_sex_trigger = yes
  1482. sex_same_as = scope:secondary_actor
  1483. trigger_if = {
  1484. limit = {
  1485. NOT = {
  1486. any_consort = {
  1487. can_have_children_with = { CHARACTER = scope:recipient }
  1488. fertility > 0.1
  1489. }
  1490. }
  1491. }
  1492. any_child = {
  1493. is_player_heir_of_trigger = { CHARACTER = root }
  1494. }
  1495. }
  1496. trigger_else = {
  1497. always = no
  1498. }
  1499. }
  1500. desc = AI_NO_FERTILITY_REASON
  1501. }
  1502.  
  1503. modifier = {
  1504. add = 50
  1505. scope:recipient = {
  1506. is_attracted_to_gender_of = scope:secondary_actor
  1507. }
  1508. desc = AI_ATTRACTION_REASON
  1509. }
  1510.  
  1511. modifier = { # A Recipient is more likely to agree if you're their liege
  1512. add = 40
  1513.  
  1514. scope:recipient = {
  1515. target_is_liege_or_above = scope:actor
  1516. }
  1517. desc = LIEGE_REASON
  1518. }
  1519.  
  1520. #More/Less likely based on difference in rank between actor and recipient
  1521. modifier = {
  1522. add = 20
  1523. scope:actor = {
  1524. tier_difference = {
  1525. target = scope:recipient
  1526. value = 1
  1527. }
  1528. }
  1529. desc = AI_RANK_DIFF
  1530. }
  1531. modifier = {
  1532. add = 30
  1533. scope:actor = {
  1534. tier_difference = {
  1535. target = scope:recipient
  1536. value = 2
  1537. }
  1538. }
  1539. desc = AI_RANK_DIFF
  1540. }
  1541. modifier = {
  1542. add = 40
  1543. scope:actor = {
  1544. tier_difference = {
  1545. target = scope:recipient
  1546. value = 3
  1547. }
  1548. }
  1549. desc = AI_RANK_DIFF
  1550. }
  1551. modifier = {
  1552. add = 50
  1553. scope:actor = {
  1554. tier_difference = {
  1555. target = scope:recipient
  1556. value = 4
  1557. }
  1558. }
  1559. desc = AI_RANK_DIFF
  1560. }
  1561. modifier = {
  1562. add = 60
  1563. scope:actor = {
  1564. tier_difference = {
  1565. target = scope:recipient
  1566. value = 5
  1567. }
  1568. }
  1569. desc = AI_RANK_DIFF
  1570. }
  1571. modifier = {
  1572. add = -20
  1573. scope:actor = {
  1574. tier_difference = {
  1575. target = scope:recipient
  1576. value = -1
  1577. }
  1578. }
  1579. desc = AI_RANK_DIFF
  1580. }
  1581. modifier = {
  1582. add = -30
  1583. scope:actor = {
  1584. tier_difference = {
  1585. target = scope:recipient
  1586. value = -2
  1587. }
  1588. }
  1589. desc = AI_RANK_DIFF
  1590. }
  1591. modifier = {
  1592. add = -40
  1593. scope:actor = {
  1594. tier_difference = {
  1595. target = scope:recipient
  1596. value = -3
  1597. }
  1598. }
  1599. desc = AI_RANK_DIFF
  1600. }
  1601. modifier = {
  1602. add = -50
  1603. scope:actor = {
  1604. tier_difference = {
  1605. target = scope:recipient
  1606. value = -4
  1607. }
  1608. }
  1609. desc = AI_RANK_DIFF
  1610. }
  1611. modifier = {
  1612. add = -60
  1613. scope:actor = {
  1614. tier_difference = {
  1615. target = scope:recipient
  1616. value = -5
  1617. }
  1618. }
  1619. desc = AI_RANK_DIFF
  1620. }
  1621.  
  1622. modifier = {
  1623. add = intimidated_reason_value
  1624. scope:recipient = {
  1625. target_is_liege_or_above = scope:actor
  1626. has_dread_level_towards = {
  1627. target = scope:actor
  1628. level = 1
  1629. }
  1630. }
  1631. desc = INTIMIDATED_REASON
  1632. }
  1633. modifier = {
  1634. add = cowed_reason_value
  1635. scope:recipient = {
  1636. target_is_liege_or_above = scope:actor
  1637. has_dread_level_towards = {
  1638. target = scope:actor
  1639. level = 2
  1640. }
  1641. }
  1642. desc = COWED_REASON
  1643. }
  1644.  
  1645. modifier = {
  1646. add = intimidated_external_reason_value
  1647. scope:recipient = {
  1648. NOT = { target_is_liege_or_above = scope:actor }
  1649. has_dread_level_towards = {
  1650. target = scope:actor
  1651. level = 1
  1652. }
  1653. }
  1654. desc = INTIMIDATED_REASON
  1655. }
  1656. modifier = {
  1657. add = cowed_external_reason_value
  1658. scope:recipient = {
  1659. NOT = { target_is_liege_or_above = scope:actor }
  1660. has_dread_level_towards = {
  1661. target = scope:actor
  1662. level = 2
  1663. }
  1664. }
  1665. desc = COWED_REASON
  1666. }
  1667. modifier = {
  1668. add = -250
  1669. scope:secondary_actor = {
  1670. has_std_trigger = yes
  1671. }
  1672. desc = AI_STD_REASON
  1673. }
  1674. modifier = {
  1675. add = -250
  1676. scope:secondary_actor = {
  1677. has_epidemic_disease_trigger = yes
  1678. }
  1679. desc = AI_CONTAGIOUS_REASON
  1680. }
  1681. modifier = {
  1682. add = -5000
  1683. scope:secondary_actor = {
  1684. fertility <= 0
  1685. }
  1686. desc = AI_FERTILITY_REASON
  1687. }
  1688. modifier = {
  1689. scope:hook = yes
  1690. add = 500
  1691. scope:actor = { NOT = { has_strong_hook = scope:recipient } }
  1692. desc = SCHEME_WEAK_HOOK_USED
  1693. }
  1694. modifier = {
  1695. scope:hook = yes
  1696. add = 1000
  1697. scope:actor = { has_strong_hook = scope:recipient }
  1698. desc = SCHEME_STRONG_HOOK_USED
  1699. }
  1700. }
  1701.  
  1702. ai_potential = {
  1703. is_adult = yes
  1704. NOT = { has_trait = incapable }
  1705. is_at_war = no
  1706. NOR = {
  1707. has_trait = greedy
  1708. ai_greed > very_high_positive_ai_value
  1709. }
  1710. faith = { has_doctrine = doctrine_concubine_m }
  1711. }
  1712.  
  1713. ai_will_do = {
  1714. base = 0
  1715.  
  1716. modifier = { # Basic Filtering
  1717. add = 100
  1718. scope:recipient = {
  1719. number_of_concubines < number_of_desired_concubines
  1720. }
  1721. scope:secondary_actor = {
  1722. trigger_if = {
  1723. limit = {
  1724. allowed_to_marry_same_sex_trigger = no
  1725. }
  1726. sex_opposite_of = scope:recipient
  1727. }
  1728. fertility > 0.2
  1729. age < 36
  1730. NOR = {
  1731. is_councillor_of = scope:actor
  1732. is_of_major_interest_trigger = {
  1733. CHARACTER = scope:actor
  1734. }
  1735. is_concubine_of = scope:actor
  1736. }
  1737. }
  1738. }
  1739.  
  1740. modifier = { # If secondary_actor is close to actor, a good character, or if actor should take them as concubine
  1741. add = -100
  1742. scope:secondary_actor = {
  1743. is_of_minor_interest_trigger = {
  1744. CHARACTER = scope:actor
  1745. }
  1746. AND = {
  1747. can_become_concubine_of_character_trigger = { CHARACTER = scope:actor }
  1748. scope:actor = { number_of_concubines < number_of_desired_concubines }
  1749. }
  1750. }
  1751. }
  1752.  
  1753. modifier = { # If secondary_actor could be an agent...
  1754. add = 25
  1755. any_scheme = {
  1756. scheme_target = scope:recipient
  1757. save_temporary_scope_as = scheme_check
  1758. }
  1759. scope:secondary_actor = {
  1760. is_valid_as_agent_in_scheme = scope:scheme_check
  1761. }
  1762. }
  1763.  
  1764. modifier = { # More likely if it's a neighboring ruler that you want to like you
  1765. add = 50
  1766. scope:recipient = {
  1767. any_neighboring_top_liege_realm_owner = { this = scope:actor }
  1768. max_military_strength > scope:actor.max_military_strength
  1769. }
  1770. }
  1771.  
  1772. modifier = { # More likely if its your friend and it's a nice concubine
  1773. add = 50
  1774. scope:recipient = {
  1775. OR = {
  1776. has_relation_friend = scope:actor
  1777. has_relation_best_friend = scope:actor
  1778. }
  1779. }
  1780. scope:secondary_actor = {
  1781. fertility > 0.2
  1782. age < 36
  1783. OR = {
  1784. has_trait = lustful
  1785. num_of_good_genetic_traits > 0
  1786. }
  1787. }
  1788. }
  1789.  
  1790. modifier = { #Even if they're allowed to take same-sex concubines we don't want the AI to suggest it without a good reason if they're not attracted to the person
  1791. add = -200
  1792. scope:recipient = {
  1793. allowed_to_marry_same_sex_trigger = yes
  1794. sex_same_as = scope:secondary_actor
  1795. NOT = { is_attracted_to_gender_of = scope:secondary_actor }
  1796. }
  1797. }
  1798.  
  1799. modifier = { # No if it's a same-sex concubinage and actor isn't accepting of it
  1800. factor = 0
  1801. scope:actor = {
  1802. allowed_to_marry_same_sex_trigger = no
  1803. scope:recipient = { sex_same_as = scope:secondary_actor }
  1804. }
  1805. }
  1806.  
  1807. modifier = { # No if it's a same-sex concubinage and recipient isn't accepting of it
  1808. factor = 0
  1809. scope:recipient = {
  1810. allowed_to_marry_same_sex_trigger = no
  1811. sex_same_as = scope:secondary_actor
  1812. }
  1813. }
  1814.  
  1815. modifier = { # Incest Filtering: Hard NO!
  1816. factor = 0
  1817. scope:recipient = {
  1818. relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:secondary_actor }
  1819. NOR = {
  1820. accepts_incest_with_trigger = { CHARACTER = scope:secondary_actor }
  1821. sexually_liberal_trigger = yes
  1822. }
  1823. }
  1824. }
  1825.  
  1826. modifier = { # Incest Filtering: Not likely, but keep the door open...
  1827. factor = 0.2
  1828. scope:recipient = {
  1829. relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:secondary_actor }
  1830. OR = {
  1831. accepts_incest_with_trigger = { CHARACTER = scope:secondary_actor }
  1832. sexually_liberal_trigger = yes
  1833. }
  1834. }
  1835. }
  1836.  
  1837. modifier = { # Faith considerations
  1838. factor = 0
  1839. scope:recipient = {
  1840. faith = {
  1841. faith_hostility_level = {
  1842. target = scope:actor.faith
  1843. value >= faith_hostile_level
  1844. }
  1845. }
  1846. NOR = {
  1847. has_relation_friend = scope:actor
  1848. has_relation_best_friend = scope:actor
  1849. }
  1850. }
  1851. }
  1852. }
  1853.  
  1854. on_send = {
  1855. scope:secondary_actor = { # to block the same character from being offered twice
  1856. add_character_flag = {
  1857. flag = has_been_offered_as_concubine
  1858. days = 5
  1859. }
  1860. }
  1861. }
  1862.  
  1863. on_accept = {
  1864. concubine_offer_on_accept_effect = yes
  1865. }
  1866.  
  1867. on_decline = {
  1868. scope:actor = {
  1869. send_interface_toast = {
  1870. type = event_generic_neutral
  1871. title = msg_concubine_offer_rejected_title
  1872. right_icon = scope:recipient
  1873. left_icon = scope:secondary_actor
  1874. custom_tooltip = msg_concubine_offer_rejected
  1875. }
  1876. }
  1877. }
  1878.  
  1879. send_options_exclusive = no
  1880. send_option = {
  1881. is_valid = {
  1882. scope:actor = {
  1883. has_usable_hook = scope:recipient
  1884. }
  1885. }
  1886. flag = hook
  1887. localization = SCHEME_HOOK
  1888. }
  1889. should_use_extra_icon = {
  1890. scope:actor = { has_usable_hook = scope:recipient }
  1891. }
  1892. extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds"
  1893. }
  1894. offer_concubine_concubine_s = {
  1895. category = interaction_category_diplomacy
  1896.  
  1897. desc = offer_concubine_desc
  1898.  
  1899. ai_targets = {
  1900. ai_recipients = neighboring_rulers
  1901. }
  1902. ai_target_quick_trigger = {
  1903. adult = yes
  1904. }
  1905. ai_frequency = 144
  1906.  
  1907. greeting = positive
  1908. notification_text = OFFER_CONCUBINE_NOTIFICATION
  1909.  
  1910. #interface = concubine_list
  1911.  
  1912. needs_recipient_to_open = yes
  1913.  
  1914. populate_actor_list = {
  1915. scope:actor = {
  1916. every_courtier = {
  1917. limit = {
  1918. can_be_offered_as_concubine_to_character_trigger = {
  1919. GIVER = scope:actor
  1920. CHARACTER = scope:recipient
  1921. }
  1922. }
  1923. add_to_list = characters
  1924. }
  1925. every_prisoner = {
  1926. limit = {
  1927. NOT = { is_in_list = characters }
  1928. can_be_offered_as_concubine_to_character_trigger = {
  1929. GIVER = scope:actor
  1930. CHARACTER = scope:recipient
  1931. }
  1932. }
  1933. add_to_list = characters
  1934. }
  1935. }
  1936. }
  1937.  
  1938. is_shown = {
  1939. NOT = { scope:actor = scope:recipient }
  1940. scope:actor = {
  1941. faith = { has_doctrine = doctrine_concubine_s }
  1942. }
  1943. scope:recipient = {
  1944. allowed_concubines = yes
  1945. is_adult = yes
  1946. }
  1947. }
  1948.  
  1949. is_valid_showing_failures_only = {
  1950. custom_description = {
  1951. text = take_concubine_available_character_opp
  1952. object = scope:recipient
  1953. scope:actor = {
  1954. OR = {
  1955. any_courtier = {
  1956. can_be_offered_as_concubine_to_character_trigger = {
  1957. GIVER = scope:actor
  1958. CHARACTER = scope:recipient
  1959. }
  1960. }
  1961. any_prisoner = {
  1962. can_be_offered_as_concubine_to_character_trigger = {
  1963. GIVER = scope:actor
  1964. CHARACTER = scope:recipient
  1965. }
  1966. }
  1967. }
  1968. }
  1969. }
  1970. custom_description = {
  1971. text = take_concubine_allowed_more
  1972. object = scope:recipient
  1973. scope:recipient = {
  1974. allowed_more_concubines = yes
  1975. }
  1976. }
  1977. }
  1978.  
  1979. can_be_picked = {
  1980. is_adult = yes
  1981. }
  1982.  
  1983. can_send = {
  1984. custom_description = {
  1985. text = character_unavailable_to_be_offered_as_concubine
  1986. object = scope:secondary_actor
  1987. scope:secondary_actor = {
  1988. can_be_offered_as_concubine_to_character_trigger = {
  1989. GIVER = scope:actor
  1990. CHARACTER = scope:recipient
  1991. }
  1992. }
  1993. }
  1994. }
  1995.  
  1996. auto_accept = no
  1997.  
  1998. ai_accept = {
  1999. base = 50
  2000.  
  2001. modifier = {
  2002. add = {
  2003. value = 50
  2004. multiply = scope:secondary_actor.num_of_good_genetic_traits
  2005. }
  2006. scope:secondary_actor = {
  2007. num_of_good_genetic_traits > 0
  2008. trigger_if = {
  2009. limit = {
  2010. is_female = yes
  2011. }
  2012. age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
  2013. }
  2014. }
  2015. desc = AI_POSITIVE_TRAIT_REASON
  2016. }
  2017.  
  2018. modifier = {
  2019. add = {
  2020. value = 50
  2021. }
  2022. scope:secondary_actor = {
  2023. is_lowborn = no
  2024. trigger_if = {
  2025. limit = {
  2026. is_female = yes
  2027. }
  2028. age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
  2029. }
  2030. }
  2031. desc = AI_DYNASTY_PRESTIGE_REASON_NOBLE
  2032. }
  2033.  
  2034. modifier = {
  2035. add = {
  2036. value = -50
  2037. multiply = scope:secondary_actor.num_of_bad_genetic_traits
  2038. }
  2039. scope:secondary_actor = {
  2040. OR = {
  2041. num_of_bad_genetic_traits > 0
  2042. }
  2043. trigger_if = {
  2044. limit = {
  2045. is_female = yes
  2046. }
  2047. age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
  2048. }
  2049. }
  2050. desc = AI_NEGATIVE_TRAIT_REASON
  2051. }
  2052.  
  2053. modifier = {
  2054. add = {
  2055. value = -50
  2056. }
  2057. scope:secondary_actor = {
  2058. is_lowborn = yes
  2059. num_of_good_genetic_traits = 0
  2060. trigger_if = {
  2061. limit = {
  2062. is_female = yes
  2063. }
  2064. age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
  2065. }
  2066. }
  2067. desc = AI_DYNASTY_PRESTIGE_REASON_LOWBORN_NO_POSITIVE_TRAIT
  2068. }
  2069.  
  2070. opinion_modifier = { # Opinion of you
  2071. who = scope:recipient
  2072. opinion_target = scope:actor
  2073. multiplier = 1.0
  2074. desc = AI_OPINION_REASON
  2075. }
  2076.  
  2077. opinion_modifier = { # Opinion of concubine
  2078. who = scope:recipient
  2079. opinion_target = scope:secondary_actor
  2080. multiplier = 0.25
  2081. desc = AI_OPINION_REASON
  2082. }
  2083.  
  2084. compare_modifier = { # Recipient is reluctant to marry old women (procreation is a key factor)
  2085. trigger = {
  2086. scope:secondary_actor = {
  2087. age > 29
  2088. is_female = yes
  2089. }
  2090. }
  2091. target = scope:secondary_actor
  2092. value = age
  2093. multiplier = -5.0
  2094. step = 1
  2095. offset = -29
  2096. desc = MARRY_AGE
  2097. }
  2098.  
  2099. modifier = { # A Recipient is unwilling to take a same-sex concubine if their faith doesn't support it
  2100. add = -1000
  2101.  
  2102. scope:recipient = {
  2103. allowed_to_marry_same_sex_trigger = no
  2104. sex_same_as = scope:secondary_actor
  2105. }
  2106. desc = SAME_SEX_MARRIAGE_FAITH_REASON_RECIPIENT
  2107. }
  2108.  
  2109. modifier = { # Unwilling if they don't have a batch of kids and opposite sex consorts to handle that situation
  2110. add = -200
  2111. scope:recipient = {
  2112. allowed_to_marry_same_sex_trigger = yes
  2113. sex_same_as = scope:secondary_actor
  2114. trigger_if = {
  2115. limit = {
  2116. NOT = {
  2117. any_consort = {
  2118. can_have_children_with = { CHARACTER = scope:recipient }
  2119. fertility > 0.1
  2120. }
  2121. }
  2122. }
  2123. any_child = {
  2124. is_player_heir_of_trigger = { CHARACTER = root }
  2125. }
  2126. }
  2127. trigger_else = {
  2128. always = no
  2129. }
  2130. }
  2131. desc = AI_NO_FERTILITY_REASON
  2132. }
  2133.  
  2134. modifier = {
  2135. add = 50
  2136. scope:recipient = {
  2137. is_attracted_to_gender_of = scope:secondary_actor
  2138. }
  2139. desc = AI_ATTRACTION_REASON
  2140. }
  2141.  
  2142. modifier = { # A Recipient is more likely to agree if you're their liege
  2143. add = 40
  2144.  
  2145. scope:recipient = {
  2146. target_is_liege_or_above = scope:actor
  2147. }
  2148. desc = LIEGE_REASON
  2149. }
  2150.  
  2151. #More/Less likely based on difference in rank between actor and recipient
  2152. modifier = {
  2153. add = 20
  2154. scope:actor = {
  2155. tier_difference = {
  2156. target = scope:recipient
  2157. value = 1
  2158. }
  2159. }
  2160. desc = AI_RANK_DIFF
  2161. }
  2162. modifier = {
  2163. add = 30
  2164. scope:actor = {
  2165. tier_difference = {
  2166. target = scope:recipient
  2167. value = 2
  2168. }
  2169. }
  2170. desc = AI_RANK_DIFF
  2171. }
  2172. modifier = {
  2173. add = 40
  2174. scope:actor = {
  2175. tier_difference = {
  2176. target = scope:recipient
  2177. value = 3
  2178. }
  2179. }
  2180. desc = AI_RANK_DIFF
  2181. }
  2182. modifier = {
  2183. add = 50
  2184. scope:actor = {
  2185. tier_difference = {
  2186. target = scope:recipient
  2187. value = 4
  2188. }
  2189. }
  2190. desc = AI_RANK_DIFF
  2191. }
  2192. modifier = {
  2193. add = 60
  2194. scope:actor = {
  2195. tier_difference = {
  2196. target = scope:recipient
  2197. value = 5
  2198. }
  2199. }
  2200. desc = AI_RANK_DIFF
  2201. }
  2202. modifier = {
  2203. add = -20
  2204. scope:actor = {
  2205. tier_difference = {
  2206. target = scope:recipient
  2207. value = -1
  2208. }
  2209. }
  2210. desc = AI_RANK_DIFF
  2211. }
  2212. modifier = {
  2213. add = -30
  2214. scope:actor = {
  2215. tier_difference = {
  2216. target = scope:recipient
  2217. value = -2
  2218. }
  2219. }
  2220. desc = AI_RANK_DIFF
  2221. }
  2222. modifier = {
  2223. add = -40
  2224. scope:actor = {
  2225. tier_difference = {
  2226. target = scope:recipient
  2227. value = -3
  2228. }
  2229. }
  2230. desc = AI_RANK_DIFF
  2231. }
  2232. modifier = {
  2233. add = -50
  2234. scope:actor = {
  2235. tier_difference = {
  2236. target = scope:recipient
  2237. value = -4
  2238. }
  2239. }
  2240. desc = AI_RANK_DIFF
  2241. }
  2242. modifier = {
  2243. add = -60
  2244. scope:actor = {
  2245. tier_difference = {
  2246. target = scope:recipient
  2247. value = -5
  2248. }
  2249. }
  2250. desc = AI_RANK_DIFF
  2251. }
  2252.  
  2253. modifier = {
  2254. add = intimidated_reason_value
  2255. scope:recipient = {
  2256. target_is_liege_or_above = scope:actor
  2257. has_dread_level_towards = {
  2258. target = scope:actor
  2259. level = 1
  2260. }
  2261. }
  2262. desc = INTIMIDATED_REASON
  2263. }
  2264. modifier = {
  2265. add = cowed_reason_value
  2266. scope:recipient = {
  2267. target_is_liege_or_above = scope:actor
  2268. has_dread_level_towards = {
  2269. target = scope:actor
  2270. level = 2
  2271. }
  2272. }
  2273. desc = COWED_REASON
  2274. }
  2275.  
  2276. modifier = {
  2277. add = intimidated_external_reason_value
  2278. scope:recipient = {
  2279. NOT = { target_is_liege_or_above = scope:actor }
  2280. has_dread_level_towards = {
  2281. target = scope:actor
  2282. level = 1
  2283. }
  2284. }
  2285. desc = INTIMIDATED_REASON
  2286. }
  2287. modifier = {
  2288. add = cowed_external_reason_value
  2289. scope:recipient = {
  2290. NOT = { target_is_liege_or_above = scope:actor }
  2291. has_dread_level_towards = {
  2292. target = scope:actor
  2293. level = 2
  2294. }
  2295. }
  2296. desc = COWED_REASON
  2297. }
  2298. modifier = {
  2299. add = -250
  2300. scope:secondary_actor = {
  2301. has_std_trigger = yes
  2302. }
  2303. desc = AI_STD_REASON
  2304. }
  2305. modifier = {
  2306. add = -250
  2307. scope:secondary_actor = {
  2308. has_epidemic_disease_trigger = yes
  2309. }
  2310. desc = AI_CONTAGIOUS_REASON
  2311. }
  2312. modifier = {
  2313. add = -5000
  2314. scope:secondary_actor = {
  2315. fertility <= 0
  2316. }
  2317. desc = AI_FERTILITY_REASON
  2318. }
  2319. modifier = {
  2320. scope:hook = yes
  2321. add = 500
  2322. scope:actor = { NOT = { has_strong_hook = scope:recipient } }
  2323. desc = SCHEME_WEAK_HOOK_USED
  2324. }
  2325. modifier = {
  2326. scope:hook = yes
  2327. add = 1000
  2328. scope:actor = { has_strong_hook = scope:recipient }
  2329. desc = SCHEME_STRONG_HOOK_USED
  2330. }
  2331. }
  2332.  
  2333. ai_potential = {
  2334. is_adult = yes
  2335. NOT = { has_trait = incapable }
  2336. is_at_war = no
  2337. NOR = {
  2338. has_trait = greedy
  2339. ai_greed > very_high_positive_ai_value
  2340. }
  2341. faith = { has_doctrine = doctrine_concubine_s }
  2342. }
  2343.  
  2344. ai_will_do = {
  2345. base = 0
  2346.  
  2347. modifier = { # Basic Filtering
  2348. add = 100
  2349. scope:recipient = {
  2350. number_of_concubines < number_of_desired_concubines
  2351. }
  2352. scope:secondary_actor = {
  2353. trigger_if = {
  2354. limit = {
  2355. allowed_to_marry_same_sex_trigger = no
  2356. }
  2357. sex_opposite_of = scope:recipient
  2358. }
  2359. fertility > 0.2
  2360. age < 36
  2361. NOR = {
  2362. is_councillor_of = scope:actor
  2363. is_of_major_interest_trigger = {
  2364. CHARACTER = scope:actor
  2365. }
  2366. is_concubine_of = scope:actor
  2367. }
  2368. }
  2369. }
  2370.  
  2371. modifier = { # If secondary_actor is close to actor, a good character, or if actor should take them as concubine
  2372. add = -100
  2373. scope:secondary_actor = {
  2374. is_of_minor_interest_trigger = {
  2375. CHARACTER = scope:actor
  2376. }
  2377. AND = {
  2378. can_become_concubine_of_character_trigger = { CHARACTER = scope:actor }
  2379. scope:actor = { number_of_concubines < number_of_desired_concubines }
  2380. }
  2381. }
  2382. }
  2383.  
  2384. modifier = { # If secondary_actor could be an agent...
  2385. add = 25
  2386. any_scheme = {
  2387. scheme_target = scope:recipient
  2388. save_temporary_scope_as = scheme_check
  2389. }
  2390. scope:secondary_actor = {
  2391. is_valid_as_agent_in_scheme = scope:scheme_check
  2392. }
  2393. }
  2394.  
  2395. modifier = { # More likely if it's a neighboring ruler that you want to like you
  2396. add = 50
  2397. scope:recipient = {
  2398. any_neighboring_top_liege_realm_owner = { this = scope:actor }
  2399. max_military_strength > scope:actor.max_military_strength
  2400. }
  2401. }
  2402.  
  2403. modifier = { # More likely if its your friend and it's a nice concubine
  2404. add = 50
  2405. scope:recipient = {
  2406. OR = {
  2407. has_relation_friend = scope:actor
  2408. has_relation_best_friend = scope:actor
  2409. }
  2410. }
  2411. scope:secondary_actor = {
  2412. fertility > 0.2
  2413. age < 36
  2414. OR = {
  2415. has_trait = lustful
  2416. num_of_good_genetic_traits > 0
  2417. }
  2418. }
  2419. }
  2420.  
  2421. modifier = { #Even if they're allowed to take same-sex concubines we don't want the AI to suggest it without a good reason if they're not attracted to the person
  2422. add = -200
  2423. scope:recipient = {
  2424. allowed_to_marry_same_sex_trigger = yes
  2425. sex_same_as = scope:secondary_actor
  2426. NOT = { is_attracted_to_gender_of = scope:secondary_actor }
  2427. }
  2428. }
  2429.  
  2430. modifier = { # No if it's a same-sex concubinage and actor isn't accepting of it
  2431. factor = 0
  2432. scope:actor = {
  2433. allowed_to_marry_same_sex_trigger = no
  2434. scope:recipient = { sex_same_as = scope:secondary_actor }
  2435. }
  2436. }
  2437.  
  2438. modifier = { # No if it's a same-sex concubinage and recipient isn't accepting of it
  2439. factor = 0
  2440. scope:recipient = {
  2441. allowed_to_marry_same_sex_trigger = no
  2442. sex_same_as = scope:secondary_actor
  2443. }
  2444. }
  2445.  
  2446. modifier = { # Incest Filtering: Hard NO!
  2447. factor = 0
  2448. scope:recipient = {
  2449. relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:secondary_actor }
  2450. NOR = {
  2451. accepts_incest_with_trigger = { CHARACTER = scope:secondary_actor }
  2452. sexually_liberal_trigger = yes
  2453. }
  2454. }
  2455. }
  2456.  
  2457. modifier = { # Incest Filtering: Not likely, but keep the door open...
  2458. factor = 0.2
  2459. scope:recipient = {
  2460. relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:secondary_actor }
  2461. OR = {
  2462. accepts_incest_with_trigger = { CHARACTER = scope:secondary_actor }
  2463. sexually_liberal_trigger = yes
  2464. }
  2465. }
  2466. }
  2467.  
  2468. modifier = { # Faith considerations
  2469. factor = 0
  2470. scope:recipient = {
  2471. faith = {
  2472. faith_hostility_level = {
  2473. target = scope:actor.faith
  2474. value >= faith_hostile_level
  2475. }
  2476. }
  2477. NOR = {
  2478. has_relation_friend = scope:actor
  2479. has_relation_best_friend = scope:actor
  2480. }
  2481. }
  2482. }
  2483. }
  2484.  
  2485. on_send = {
  2486. scope:secondary_actor = { # to block the same character from being offered twice
  2487. add_character_flag = {
  2488. flag = has_been_offered_as_concubine
  2489. days = 5
  2490. }
  2491. }
  2492. }
  2493.  
  2494. on_accept = {
  2495. concubine_offer_on_accept_effect = yes
  2496. }
  2497.  
  2498. on_decline = {
  2499. scope:actor = {
  2500. send_interface_toast = {
  2501. type = event_generic_neutral
  2502. title = msg_concubine_offer_rejected_title
  2503. right_icon = scope:recipient
  2504. left_icon = scope:secondary_actor
  2505. custom_tooltip = msg_concubine_offer_rejected
  2506. }
  2507. }
  2508. }
  2509.  
  2510. send_options_exclusive = no
  2511. send_option = {
  2512. is_valid = {
  2513. scope:actor = {
  2514. has_usable_hook = scope:recipient
  2515. }
  2516. }
  2517. flag = hook
  2518. localization = SCHEME_HOOK
  2519. }
  2520. should_use_extra_icon = {
  2521. scope:actor = { has_usable_hook = scope:recipient }
  2522. }
  2523. extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds"
  2524. }
  2525. offer_concubine_managed_harem = {
  2526. category = interaction_category_diplomacy
  2527.  
  2528. desc = offer_concubine_desc
  2529.  
  2530. ai_targets = {
  2531. ai_recipients = neighboring_rulers
  2532. }
  2533. ai_target_quick_trigger = {
  2534. adult = yes
  2535. }
  2536. ai_frequency = 144
  2537.  
  2538. greeting = positive
  2539. notification_text = OFFER_CONCUBINE_NOTIFICATION
  2540.  
  2541. #interface = concubine_list
  2542.  
  2543. needs_recipient_to_open = yes
  2544.  
  2545. populate_actor_list = {
  2546. scope:actor = {
  2547. every_courtier = {
  2548. limit = {
  2549. can_be_offered_as_concubine_to_character_trigger = {
  2550. GIVER = scope:actor
  2551. CHARACTER = scope:recipient
  2552. }
  2553. }
  2554. add_to_list = characters
  2555. }
  2556. every_prisoner = {
  2557. limit = {
  2558. NOT = { is_in_list = characters }
  2559. can_be_offered_as_concubine_to_character_trigger = {
  2560. GIVER = scope:actor
  2561. CHARACTER = scope:recipient
  2562. }
  2563. }
  2564. add_to_list = characters
  2565. }
  2566. }
  2567. }
  2568.  
  2569. is_shown = {
  2570. NOT = { scope:actor = scope:recipient }
  2571. scope:actor = {
  2572. faith = { has_doctrine = doctrine_concubine_managed_harem }
  2573. }
  2574. scope:recipient = {
  2575. allowed_concubines = yes
  2576. is_adult = yes
  2577. }
  2578. }
  2579.  
  2580. is_valid_showing_failures_only = {
  2581. custom_description = {
  2582. text = take_concubine_available_character_opp
  2583. object = scope:recipient
  2584. scope:actor = {
  2585. OR = {
  2586. any_courtier = {
  2587. can_be_offered_as_concubine_to_character_trigger = {
  2588. GIVER = scope:actor
  2589. CHARACTER = scope:recipient
  2590. }
  2591. }
  2592. any_prisoner = {
  2593. can_be_offered_as_concubine_to_character_trigger = {
  2594. GIVER = scope:actor
  2595. CHARACTER = scope:recipient
  2596. }
  2597. }
  2598. }
  2599. }
  2600. }
  2601. custom_description = {
  2602. text = take_concubine_allowed_more
  2603. object = scope:recipient
  2604. scope:recipient = {
  2605. allowed_more_concubines = yes
  2606. }
  2607. }
  2608. }
  2609.  
  2610. can_be_picked = {
  2611. is_adult = yes
  2612. }
  2613.  
  2614. can_send = {
  2615. custom_description = {
  2616. text = character_unavailable_to_be_offered_as_concubine
  2617. object = scope:secondary_actor
  2618. scope:secondary_actor = {
  2619. can_be_offered_as_concubine_to_character_trigger = {
  2620. GIVER = scope:actor
  2621. CHARACTER = scope:recipient
  2622. }
  2623. }
  2624. }
  2625. }
  2626.  
  2627. auto_accept = no
  2628.  
  2629. ai_accept = {
  2630. base = 50
  2631.  
  2632. modifier = {
  2633. add = {
  2634. value = 50
  2635. multiply = scope:secondary_actor.num_of_good_genetic_traits
  2636. }
  2637. scope:secondary_actor = {
  2638. num_of_good_genetic_traits > 0
  2639. trigger_if = {
  2640. limit = {
  2641. is_female = yes
  2642. }
  2643. age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
  2644. }
  2645. }
  2646. desc = AI_POSITIVE_TRAIT_REASON
  2647. }
  2648.  
  2649. modifier = {
  2650. add = {
  2651. value = 50
  2652. }
  2653. scope:secondary_actor = {
  2654. is_lowborn = no
  2655. trigger_if = {
  2656. limit = {
  2657. is_female = yes
  2658. }
  2659. age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
  2660. }
  2661. }
  2662. desc = AI_DYNASTY_PRESTIGE_REASON_NOBLE
  2663. }
  2664.  
  2665. modifier = {
  2666. add = {
  2667. value = -50
  2668. multiply = scope:secondary_actor.num_of_bad_genetic_traits
  2669. }
  2670. scope:secondary_actor = {
  2671. OR = {
  2672. num_of_bad_genetic_traits > 0
  2673. }
  2674. trigger_if = {
  2675. limit = {
  2676. is_female = yes
  2677. }
  2678. age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
  2679. }
  2680. }
  2681. desc = AI_NEGATIVE_TRAIT_REASON
  2682. }
  2683.  
  2684. modifier = {
  2685. add = {
  2686. value = -50
  2687. }
  2688. scope:secondary_actor = {
  2689. is_lowborn = yes
  2690. num_of_good_genetic_traits = 0
  2691. trigger_if = {
  2692. limit = {
  2693. is_female = yes
  2694. }
  2695. age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
  2696. }
  2697. }
  2698. desc = AI_DYNASTY_PRESTIGE_REASON_LOWBORN_NO_POSITIVE_TRAIT
  2699. }
  2700.  
  2701. opinion_modifier = { # Opinion of you
  2702. who = scope:recipient
  2703. opinion_target = scope:actor
  2704. multiplier = 1.0
  2705. desc = AI_OPINION_REASON
  2706. }
  2707.  
  2708. opinion_modifier = { # Opinion of concubine
  2709. who = scope:recipient
  2710. opinion_target = scope:secondary_actor
  2711. multiplier = 0.25
  2712. desc = AI_OPINION_REASON
  2713. }
  2714.  
  2715. compare_modifier = { # Recipient is reluctant to marry old women (procreation is a key factor)
  2716. trigger = {
  2717. scope:secondary_actor = {
  2718. age > 29
  2719. is_female = yes
  2720. }
  2721. }
  2722. target = scope:secondary_actor
  2723. value = age
  2724. multiplier = -5.0
  2725. step = 1
  2726. offset = -29
  2727. desc = MARRY_AGE
  2728. }
  2729.  
  2730. modifier = { # A Recipient is unwilling to take a same-sex concubine if their faith doesn't support it
  2731. add = -1000
  2732.  
  2733. scope:recipient = {
  2734. allowed_to_marry_same_sex_trigger = no
  2735. sex_same_as = scope:secondary_actor
  2736. }
  2737. desc = SAME_SEX_MARRIAGE_FAITH_REASON_RECIPIENT
  2738. }
  2739.  
  2740. modifier = { # Unwilling if they don't have a batch of kids and opposite sex consorts to handle that situation
  2741. add = -200
  2742. scope:recipient = {
  2743. allowed_to_marry_same_sex_trigger = yes
  2744. sex_same_as = scope:secondary_actor
  2745. trigger_if = {
  2746. limit = {
  2747. NOT = {
  2748. any_consort = {
  2749. can_have_children_with = { CHARACTER = scope:recipient }
  2750. fertility > 0.1
  2751. }
  2752. }
  2753. }
  2754. any_child = {
  2755. is_player_heir_of_trigger = { CHARACTER = root }
  2756. }
  2757. }
  2758. trigger_else = {
  2759. always = no
  2760. }
  2761. }
  2762. desc = AI_NO_FERTILITY_REASON
  2763. }
  2764.  
  2765. modifier = {
  2766. add = 50
  2767. scope:recipient = {
  2768. is_attracted_to_gender_of = scope:secondary_actor
  2769. }
  2770. desc = AI_ATTRACTION_REASON
  2771. }
  2772.  
  2773. modifier = { # A Recipient is more likely to agree if you're their liege
  2774. add = 40
  2775.  
  2776. scope:recipient = {
  2777. target_is_liege_or_above = scope:actor
  2778. }
  2779. desc = LIEGE_REASON
  2780. }
  2781.  
  2782. #More/Less likely based on difference in rank between actor and recipient
  2783. modifier = {
  2784. add = 20
  2785. scope:actor = {
  2786. tier_difference = {
  2787. target = scope:recipient
  2788. value = 1
  2789. }
  2790. }
  2791. desc = AI_RANK_DIFF
  2792. }
  2793. modifier = {
  2794. add = 30
  2795. scope:actor = {
  2796. tier_difference = {
  2797. target = scope:recipient
  2798. value = 2
  2799. }
  2800. }
  2801. desc = AI_RANK_DIFF
  2802. }
  2803. modifier = {
  2804. add = 40
  2805. scope:actor = {
  2806. tier_difference = {
  2807. target = scope:recipient
  2808. value = 3
  2809. }
  2810. }
  2811. desc = AI_RANK_DIFF
  2812. }
  2813. modifier = {
  2814. add = 50
  2815. scope:actor = {
  2816. tier_difference = {
  2817. target = scope:recipient
  2818. value = 4
  2819. }
  2820. }
  2821. desc = AI_RANK_DIFF
  2822. }
  2823. modifier = {
  2824. add = 60
  2825. scope:actor = {
  2826. tier_difference = {
  2827. target = scope:recipient
  2828. value = 5
  2829. }
  2830. }
  2831. desc = AI_RANK_DIFF
  2832. }
  2833. modifier = {
  2834. add = -20
  2835. scope:actor = {
  2836. tier_difference = {
  2837. target = scope:recipient
  2838. value = -1
  2839. }
  2840. }
  2841. desc = AI_RANK_DIFF
  2842. }
  2843. modifier = {
  2844. add = -30
  2845. scope:actor = {
  2846. tier_difference = {
  2847. target = scope:recipient
  2848. value = -2
  2849. }
  2850. }
  2851. desc = AI_RANK_DIFF
  2852. }
  2853. modifier = {
  2854. add = -40
  2855. scope:actor = {
  2856. tier_difference = {
  2857. target = scope:recipient
  2858. value = -3
  2859. }
  2860. }
  2861. desc = AI_RANK_DIFF
  2862. }
  2863. modifier = {
  2864. add = -50
  2865. scope:actor = {
  2866. tier_difference = {
  2867. target = scope:recipient
  2868. value = -4
  2869. }
  2870. }
  2871. desc = AI_RANK_DIFF
  2872. }
  2873. modifier = {
  2874. add = -60
  2875. scope:actor = {
  2876. tier_difference = {
  2877. target = scope:recipient
  2878. value = -5
  2879. }
  2880. }
  2881. desc = AI_RANK_DIFF
  2882. }
  2883.  
  2884. modifier = {
  2885. add = intimidated_reason_value
  2886. scope:recipient = {
  2887. target_is_liege_or_above = scope:actor
  2888. has_dread_level_towards = {
  2889. target = scope:actor
  2890. level = 1
  2891. }
  2892. }
  2893. desc = INTIMIDATED_REASON
  2894. }
  2895. modifier = {
  2896. add = cowed_reason_value
  2897. scope:recipient = {
  2898. target_is_liege_or_above = scope:actor
  2899. has_dread_level_towards = {
  2900. target = scope:actor
  2901. level = 2
  2902. }
  2903. }
  2904. desc = COWED_REASON
  2905. }
  2906.  
  2907. modifier = {
  2908. add = intimidated_external_reason_value
  2909. scope:recipient = {
  2910. NOT = { target_is_liege_or_above = scope:actor }
  2911. has_dread_level_towards = {
  2912. target = scope:actor
  2913. level = 1
  2914. }
  2915. }
  2916. desc = INTIMIDATED_REASON
  2917. }
  2918. modifier = {
  2919. add = cowed_external_reason_value
  2920. scope:recipient = {
  2921. NOT = { target_is_liege_or_above = scope:actor }
  2922. has_dread_level_towards = {
  2923. target = scope:actor
  2924. level = 2
  2925. }
  2926. }
  2927. desc = COWED_REASON
  2928. }
  2929. modifier = {
  2930. add = -250
  2931. scope:secondary_actor = {
  2932. has_std_trigger = yes
  2933. }
  2934. desc = AI_STD_REASON
  2935. }
  2936. modifier = {
  2937. add = -250
  2938. scope:secondary_actor = {
  2939. has_epidemic_disease_trigger = yes
  2940. }
  2941. desc = AI_CONTAGIOUS_REASON
  2942. }
  2943. modifier = {
  2944. add = -5000
  2945. scope:secondary_actor = {
  2946. fertility <= 0
  2947. }
  2948. desc = AI_FERTILITY_REASON
  2949. }
  2950. modifier = {
  2951. scope:hook = yes
  2952. add = 500
  2953. scope:actor = { NOT = { has_strong_hook = scope:recipient } }
  2954. desc = SCHEME_WEAK_HOOK_USED
  2955. }
  2956. modifier = {
  2957. scope:hook = yes
  2958. add = 1000
  2959. scope:actor = { has_strong_hook = scope:recipient }
  2960. desc = SCHEME_STRONG_HOOK_USED
  2961. }
  2962. }
  2963.  
  2964. ai_potential = {
  2965. is_adult = yes
  2966. NOT = { has_trait = incapable }
  2967. is_at_war = no
  2968. NOR = {
  2969. has_trait = greedy
  2970. ai_greed > very_high_positive_ai_value
  2971. }
  2972. faith = { has_doctrine = doctrine_concubine_managed_harem }
  2973. }
  2974.  
  2975. ai_will_do = {
  2976. base = 0
  2977.  
  2978. modifier = { # Basic Filtering
  2979. add = 100
  2980. scope:recipient = {
  2981. number_of_concubines < number_of_desired_concubines
  2982. }
  2983. scope:secondary_actor = {
  2984. trigger_if = {
  2985. limit = {
  2986. allowed_to_marry_same_sex_trigger = no
  2987. }
  2988. sex_opposite_of = scope:recipient
  2989. }
  2990. fertility > 0.2
  2991. age < 36
  2992. NOR = {
  2993. is_councillor_of = scope:actor
  2994. is_of_major_interest_trigger = {
  2995. CHARACTER = scope:actor
  2996. }
  2997. is_concubine_of = scope:actor
  2998. }
  2999. }
  3000. }
  3001.  
  3002. modifier = { # If secondary_actor is close to actor, a good character, or if actor should take them as concubine
  3003. add = -100
  3004. scope:secondary_actor = {
  3005. is_of_minor_interest_trigger = {
  3006. CHARACTER = scope:actor
  3007. }
  3008. AND = {
  3009. can_become_concubine_of_character_trigger = { CHARACTER = scope:actor }
  3010. scope:actor = { number_of_concubines < number_of_desired_concubines }
  3011. }
  3012. }
  3013. }
  3014.  
  3015. modifier = { # If secondary_actor could be an agent...
  3016. add = 25
  3017. any_scheme = {
  3018. scheme_target = scope:recipient
  3019. save_temporary_scope_as = scheme_check
  3020. }
  3021. scope:secondary_actor = {
  3022. is_valid_as_agent_in_scheme = scope:scheme_check
  3023. }
  3024. }
  3025.  
  3026. modifier = { # More likely if it's a neighboring ruler that you want to like you
  3027. add = 50
  3028. scope:recipient = {
  3029. any_neighboring_top_liege_realm_owner = { this = scope:actor }
  3030. max_military_strength > scope:actor.max_military_strength
  3031. }
  3032. }
  3033.  
  3034. modifier = { # More likely if its your friend and it's a nice concubine
  3035. add = 50
  3036. scope:recipient = {
  3037. OR = {
  3038. has_relation_friend = scope:actor
  3039. has_relation_best_friend = scope:actor
  3040. }
  3041. }
  3042. scope:secondary_actor = {
  3043. fertility > 0.2
  3044. age < 36
  3045. OR = {
  3046. has_trait = lustful
  3047. num_of_good_genetic_traits > 0
  3048. }
  3049. }
  3050. }
  3051.  
  3052. modifier = { #Even if they're allowed to take same-sex concubines we don't want the AI to suggest it without a good reason if they're not attracted to the person
  3053. add = -200
  3054. scope:recipient = {
  3055. allowed_to_marry_same_sex_trigger = yes
  3056. sex_same_as = scope:secondary_actor
  3057. NOT = { is_attracted_to_gender_of = scope:secondary_actor }
  3058. }
  3059. }
  3060.  
  3061. modifier = { # No if it's a same-sex concubinage and actor isn't accepting of it
  3062. factor = 0
  3063. scope:actor = {
  3064. allowed_to_marry_same_sex_trigger = no
  3065. scope:recipient = { sex_same_as = scope:secondary_actor }
  3066. }
  3067. }
  3068.  
  3069. modifier = { # No if it's a same-sex concubinage and recipient isn't accepting of it
  3070. factor = 0
  3071. scope:recipient = {
  3072. allowed_to_marry_same_sex_trigger = no
  3073. sex_same_as = scope:secondary_actor
  3074. }
  3075. }
  3076.  
  3077. modifier = { # Incest Filtering: Hard NO!
  3078. factor = 0
  3079. scope:recipient = {
  3080. relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:secondary_actor }
  3081. NOR = {
  3082. accepts_incest_with_trigger = { CHARACTER = scope:secondary_actor }
  3083. sexually_liberal_trigger = yes
  3084. }
  3085. }
  3086. }
  3087.  
  3088. modifier = { # Incest Filtering: Not likely, but keep the door open...
  3089. factor = 0.2
  3090. scope:recipient = {
  3091. relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:secondary_actor }
  3092. OR = {
  3093. accepts_incest_with_trigger = { CHARACTER = scope:secondary_actor }
  3094. sexually_liberal_trigger = yes
  3095. }
  3096. }
  3097. }
  3098.  
  3099. modifier = { # Faith considerations
  3100. factor = 0
  3101. scope:recipient = {
  3102. faith = {
  3103. faith_hostility_level = {
  3104. target = scope:actor.faith
  3105. value >= faith_hostile_level
  3106. }
  3107. }
  3108. NOR = {
  3109. has_relation_friend = scope:actor
  3110. has_relation_best_friend = scope:actor
  3111. }
  3112. }
  3113. }
  3114. }
  3115.  
  3116. on_send = {
  3117. scope:secondary_actor = { # to block the same character from being offered twice
  3118. add_character_flag = {
  3119. flag = has_been_offered_as_concubine
  3120. days = 5
  3121. }
  3122. }
  3123. }
  3124.  
  3125. on_accept = {
  3126. concubine_offer_on_accept_effect = yes
  3127. }
  3128.  
  3129. on_decline = {
  3130. scope:actor = {
  3131. send_interface_toast = {
  3132. type = event_generic_neutral
  3133. title = msg_concubine_offer_rejected_title
  3134. right_icon = scope:recipient
  3135. left_icon = scope:secondary_actor
  3136. custom_tooltip = msg_concubine_offer_rejected
  3137. }
  3138. }
  3139. }
  3140.  
  3141. send_options_exclusive = no
  3142. send_option = {
  3143. is_valid = {
  3144. scope:actor = {
  3145. has_usable_hook = scope:recipient
  3146. }
  3147. }
  3148. flag = hook
  3149. localization = SCHEME_HOOK
  3150. }
  3151. should_use_extra_icon = {
  3152. scope:actor = { has_usable_hook = scope:recipient }
  3153. }
  3154. extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds"
  3155. }
  3156. offer_concubine_managed_l = {
  3157. category = interaction_category_diplomacy
  3158.  
  3159. desc = offer_concubine_desc
  3160.  
  3161. ai_targets = {
  3162. ai_recipients = neighboring_rulers
  3163. }
  3164. ai_target_quick_trigger = {
  3165. adult = yes
  3166. }
  3167. ai_frequency = 144
  3168.  
  3169. greeting = positive
  3170. notification_text = OFFER_CONCUBINE_NOTIFICATION
  3171.  
  3172. #interface = concubine_list
  3173.  
  3174. needs_recipient_to_open = yes
  3175.  
  3176. populate_actor_list = {
  3177. scope:actor = {
  3178. every_courtier = {
  3179. limit = {
  3180. can_be_offered_as_concubine_to_character_trigger = {
  3181. GIVER = scope:actor
  3182. CHARACTER = scope:recipient
  3183. }
  3184. }
  3185. add_to_list = characters
  3186. }
  3187. every_prisoner = {
  3188. limit = {
  3189. NOT = { is_in_list = characters }
  3190. can_be_offered_as_concubine_to_character_trigger = {
  3191. GIVER = scope:actor
  3192. CHARACTER = scope:recipient
  3193. }
  3194. }
  3195. add_to_list = characters
  3196. }
  3197. }
  3198. }
  3199.  
  3200. is_shown = {
  3201. NOT = { scope:actor = scope:recipient }
  3202. scope:actor = {
  3203. faith = { has_doctrine = doctrine_concubine_managed_l }
  3204. }
  3205. scope:recipient = {
  3206. allowed_concubines = yes
  3207. is_adult = yes
  3208. }
  3209. }
  3210.  
  3211. is_valid_showing_failures_only = {
  3212. custom_description = {
  3213. text = take_concubine_available_character_opp
  3214. object = scope:recipient
  3215. scope:actor = {
  3216. OR = {
  3217. any_courtier = {
  3218. can_be_offered_as_concubine_to_character_trigger = {
  3219. GIVER = scope:actor
  3220. CHARACTER = scope:recipient
  3221. }
  3222. }
  3223. any_prisoner = {
  3224. can_be_offered_as_concubine_to_character_trigger = {
  3225. GIVER = scope:actor
  3226. CHARACTER = scope:recipient
  3227. }
  3228. }
  3229. }
  3230. }
  3231. }
  3232. custom_description = {
  3233. text = take_concubine_allowed_more
  3234. object = scope:recipient
  3235. scope:recipient = {
  3236. allowed_more_concubines = yes
  3237. }
  3238. }
  3239. }
  3240.  
  3241. can_be_picked = {
  3242. is_adult = yes
  3243. }
  3244.  
  3245. can_send = {
  3246. custom_description = {
  3247. text = character_unavailable_to_be_offered_as_concubine
  3248. object = scope:secondary_actor
  3249. scope:secondary_actor = {
  3250. can_be_offered_as_concubine_to_character_trigger = {
  3251. GIVER = scope:actor
  3252. CHARACTER = scope:recipient
  3253. }
  3254. }
  3255. }
  3256. }
  3257.  
  3258. auto_accept = no
  3259.  
  3260. ai_accept = {
  3261. base = 50
  3262.  
  3263. modifier = {
  3264. add = {
  3265. value = 50
  3266. multiply = scope:secondary_actor.num_of_good_genetic_traits
  3267. }
  3268. scope:secondary_actor = {
  3269. num_of_good_genetic_traits > 0
  3270. trigger_if = {
  3271. limit = {
  3272. is_female = yes
  3273. }
  3274. age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
  3275. }
  3276. }
  3277. desc = AI_POSITIVE_TRAIT_REASON
  3278. }
  3279.  
  3280. modifier = {
  3281. add = {
  3282. value = 50
  3283. }
  3284. scope:secondary_actor = {
  3285. is_lowborn = no
  3286. trigger_if = {
  3287. limit = {
  3288. is_female = yes
  3289. }
  3290. age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
  3291. }
  3292. }
  3293. desc = AI_DYNASTY_PRESTIGE_REASON_NOBLE
  3294. }
  3295.  
  3296. modifier = {
  3297. add = {
  3298. value = -50
  3299. multiply = scope:secondary_actor.num_of_bad_genetic_traits
  3300. }
  3301. scope:secondary_actor = {
  3302. OR = {
  3303. num_of_bad_genetic_traits > 0
  3304. }
  3305. trigger_if = {
  3306. limit = {
  3307. is_female = yes
  3308. }
  3309. age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
  3310. }
  3311. }
  3312. desc = AI_NEGATIVE_TRAIT_REASON
  3313. }
  3314.  
  3315. modifier = {
  3316. add = {
  3317. value = -50
  3318. }
  3319. scope:secondary_actor = {
  3320. is_lowborn = yes
  3321. num_of_good_genetic_traits = 0
  3322. trigger_if = {
  3323. limit = {
  3324. is_female = yes
  3325. }
  3326. age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
  3327. }
  3328. }
  3329. desc = AI_DYNASTY_PRESTIGE_REASON_LOWBORN_NO_POSITIVE_TRAIT
  3330. }
  3331.  
  3332. opinion_modifier = { # Opinion of you
  3333. who = scope:recipient
  3334. opinion_target = scope:actor
  3335. multiplier = 1.0
  3336. desc = AI_OPINION_REASON
  3337. }
  3338.  
  3339. opinion_modifier = { # Opinion of concubine
  3340. who = scope:recipient
  3341. opinion_target = scope:secondary_actor
  3342. multiplier = 0.25
  3343. desc = AI_OPINION_REASON
  3344. }
  3345.  
  3346. compare_modifier = { # Recipient is reluctant to marry old women (procreation is a key factor)
  3347. trigger = {
  3348. scope:secondary_actor = {
  3349. age > 29
  3350. is_female = yes
  3351. }
  3352. }
  3353. target = scope:secondary_actor
  3354. value = age
  3355. multiplier = -5.0
  3356. step = 1
  3357. offset = -29
  3358. desc = MARRY_AGE
  3359. }
  3360.  
  3361. modifier = { # A Recipient is unwilling to take a same-sex concubine if their faith doesn't support it
  3362. add = -1000
  3363.  
  3364. scope:recipient = {
  3365. allowed_to_marry_same_sex_trigger = no
  3366. sex_same_as = scope:secondary_actor
  3367. }
  3368. desc = SAME_SEX_MARRIAGE_FAITH_REASON_RECIPIENT
  3369. }
  3370.  
  3371. modifier = { # Unwilling if they don't have a batch of kids and opposite sex consorts to handle that situation
  3372. add = -200
  3373. scope:recipient = {
  3374. allowed_to_marry_same_sex_trigger = yes
  3375. sex_same_as = scope:secondary_actor
  3376. trigger_if = {
  3377. limit = {
  3378. NOT = {
  3379. any_consort = {
  3380. can_have_children_with = { CHARACTER = scope:recipient }
  3381. fertility > 0.1
  3382. }
  3383. }
  3384. }
  3385. any_child = {
  3386. is_player_heir_of_trigger = { CHARACTER = root }
  3387. }
  3388. }
  3389. trigger_else = {
  3390. always = no
  3391. }
  3392. }
  3393. desc = AI_NO_FERTILITY_REASON
  3394. }
  3395.  
  3396. modifier = {
  3397. add = 50
  3398. scope:recipient = {
  3399. is_attracted_to_gender_of = scope:secondary_actor
  3400. }
  3401. desc = AI_ATTRACTION_REASON
  3402. }
  3403.  
  3404. modifier = { # A Recipient is more likely to agree if you're their liege
  3405. add = 40
  3406.  
  3407. scope:recipient = {
  3408. target_is_liege_or_above = scope:actor
  3409. }
  3410. desc = LIEGE_REASON
  3411. }
  3412.  
  3413. #More/Less likely based on difference in rank between actor and recipient
  3414. modifier = {
  3415. add = 20
  3416. scope:actor = {
  3417. tier_difference = {
  3418. target = scope:recipient
  3419. value = 1
  3420. }
  3421. }
  3422. desc = AI_RANK_DIFF
  3423. }
  3424. modifier = {
  3425. add = 30
  3426. scope:actor = {
  3427. tier_difference = {
  3428. target = scope:recipient
  3429. value = 2
  3430. }
  3431. }
  3432. desc = AI_RANK_DIFF
  3433. }
  3434. modifier = {
  3435. add = 40
  3436. scope:actor = {
  3437. tier_difference = {
  3438. target = scope:recipient
  3439. value = 3
  3440. }
  3441. }
  3442. desc = AI_RANK_DIFF
  3443. }
  3444. modifier = {
  3445. add = 50
  3446. scope:actor = {
  3447. tier_difference = {
  3448. target = scope:recipient
  3449. value = 4
  3450. }
  3451. }
  3452. desc = AI_RANK_DIFF
  3453. }
  3454. modifier = {
  3455. add = 60
  3456. scope:actor = {
  3457. tier_difference = {
  3458. target = scope:recipient
  3459. value = 5
  3460. }
  3461. }
  3462. desc = AI_RANK_DIFF
  3463. }
  3464. modifier = {
  3465. add = -20
  3466. scope:actor = {
  3467. tier_difference = {
  3468. target = scope:recipient
  3469. value = -1
  3470. }
  3471. }
  3472. desc = AI_RANK_DIFF
  3473. }
  3474. modifier = {
  3475. add = -30
  3476. scope:actor = {
  3477. tier_difference = {
  3478. target = scope:recipient
  3479. value = -2
  3480. }
  3481. }
  3482. desc = AI_RANK_DIFF
  3483. }
  3484. modifier = {
  3485. add = -40
  3486. scope:actor = {
  3487. tier_difference = {
  3488. target = scope:recipient
  3489. value = -3
  3490. }
  3491. }
  3492. desc = AI_RANK_DIFF
  3493. }
  3494. modifier = {
  3495. add = -50
  3496. scope:actor = {
  3497. tier_difference = {
  3498. target = scope:recipient
  3499. value = -4
  3500. }
  3501. }
  3502. desc = AI_RANK_DIFF
  3503. }
  3504. modifier = {
  3505. add = -60
  3506. scope:actor = {
  3507. tier_difference = {
  3508. target = scope:recipient
  3509. value = -5
  3510. }
  3511. }
  3512. desc = AI_RANK_DIFF
  3513. }
  3514.  
  3515. modifier = {
  3516. add = intimidated_reason_value
  3517. scope:recipient = {
  3518. target_is_liege_or_above = scope:actor
  3519. has_dread_level_towards = {
  3520. target = scope:actor
  3521. level = 1
  3522. }
  3523. }
  3524. desc = INTIMIDATED_REASON
  3525. }
  3526. modifier = {
  3527. add = cowed_reason_value
  3528. scope:recipient = {
  3529. target_is_liege_or_above = scope:actor
  3530. has_dread_level_towards = {
  3531. target = scope:actor
  3532. level = 2
  3533. }
  3534. }
  3535. desc = COWED_REASON
  3536. }
  3537.  
  3538. modifier = {
  3539. add = intimidated_external_reason_value
  3540. scope:recipient = {
  3541. NOT = { target_is_liege_or_above = scope:actor }
  3542. has_dread_level_towards = {
  3543. target = scope:actor
  3544. level = 1
  3545. }
  3546. }
  3547. desc = INTIMIDATED_REASON
  3548. }
  3549. modifier = {
  3550. add = cowed_external_reason_value
  3551. scope:recipient = {
  3552. NOT = { target_is_liege_or_above = scope:actor }
  3553. has_dread_level_towards = {
  3554. target = scope:actor
  3555. level = 2
  3556. }
  3557. }
  3558. desc = COWED_REASON
  3559. }
  3560. modifier = {
  3561. add = -250
  3562. scope:secondary_actor = {
  3563. has_std_trigger = yes
  3564. }
  3565. desc = AI_STD_REASON
  3566. }
  3567. modifier = {
  3568. add = -250
  3569. scope:secondary_actor = {
  3570. has_epidemic_disease_trigger = yes
  3571. }
  3572. desc = AI_CONTAGIOUS_REASON
  3573. }
  3574. modifier = {
  3575. add = -5000
  3576. scope:secondary_actor = {
  3577. fertility <= 0
  3578. }
  3579. desc = AI_FERTILITY_REASON
  3580. }
  3581. modifier = {
  3582. scope:hook = yes
  3583. add = 500
  3584. scope:actor = { NOT = { has_strong_hook = scope:recipient } }
  3585. desc = SCHEME_WEAK_HOOK_USED
  3586. }
  3587. modifier = {
  3588. scope:hook = yes
  3589. add = 1000
  3590. scope:actor = { has_strong_hook = scope:recipient }
  3591. desc = SCHEME_STRONG_HOOK_USED
  3592. }
  3593. }
  3594.  
  3595. ai_potential = {
  3596. is_adult = yes
  3597. NOT = { has_trait = incapable }
  3598. is_at_war = no
  3599. NOR = {
  3600. has_trait = greedy
  3601. ai_greed > very_high_positive_ai_value
  3602. }
  3603. faith = { has_doctrine = doctrine_concubine_managed_l }
  3604. }
  3605.  
  3606. ai_will_do = {
  3607. base = 0
  3608.  
  3609. modifier = { # Basic Filtering
  3610. add = 100
  3611. scope:recipient = {
  3612. number_of_concubines < number_of_desired_concubines
  3613. }
  3614. scope:secondary_actor = {
  3615. trigger_if = {
  3616. limit = {
  3617. allowed_to_marry_same_sex_trigger = no
  3618. }
  3619. sex_opposite_of = scope:recipient
  3620. }
  3621. fertility > 0.2
  3622. age < 36
  3623. NOR = {
  3624. is_councillor_of = scope:actor
  3625. is_of_major_interest_trigger = {
  3626. CHARACTER = scope:actor
  3627. }
  3628. is_concubine_of = scope:actor
  3629. }
  3630. }
  3631. }
  3632.  
  3633. modifier = { # If secondary_actor is close to actor, a good character, or if actor should take them as concubine
  3634. add = -100
  3635. scope:secondary_actor = {
  3636. is_of_minor_interest_trigger = {
  3637. CHARACTER = scope:actor
  3638. }
  3639. AND = {
  3640. can_become_concubine_of_character_trigger = { CHARACTER = scope:actor }
  3641. scope:actor = { number_of_concubines < number_of_desired_concubines }
  3642. }
  3643. }
  3644. }
  3645.  
  3646. modifier = { # If secondary_actor could be an agent...
  3647. add = 25
  3648. any_scheme = {
  3649. scheme_target = scope:recipient
  3650. save_temporary_scope_as = scheme_check
  3651. }
  3652. scope:secondary_actor = {
  3653. is_valid_as_agent_in_scheme = scope:scheme_check
  3654. }
  3655. }
  3656.  
  3657. modifier = { # More likely if it's a neighboring ruler that you want to like you
  3658. add = 50
  3659. scope:recipient = {
  3660. any_neighboring_top_liege_realm_owner = { this = scope:actor }
  3661. max_military_strength > scope:actor.max_military_strength
  3662. }
  3663. }
  3664.  
  3665. modifier = { # More likely if its your friend and it's a nice concubine
  3666. add = 50
  3667. scope:recipient = {
  3668. OR = {
  3669. has_relation_friend = scope:actor
  3670. has_relation_best_friend = scope:actor
  3671. }
  3672. }
  3673. scope:secondary_actor = {
  3674. fertility > 0.2
  3675. age < 36
  3676. OR = {
  3677. has_trait = lustful
  3678. num_of_good_genetic_traits > 0
  3679. }
  3680. }
  3681. }
  3682.  
  3683. modifier = { #Even if they're allowed to take same-sex concubines we don't want the AI to suggest it without a good reason if they're not attracted to the person
  3684. add = -200
  3685. scope:recipient = {
  3686. allowed_to_marry_same_sex_trigger = yes
  3687. sex_same_as = scope:secondary_actor
  3688. NOT = { is_attracted_to_gender_of = scope:secondary_actor }
  3689. }
  3690. }
  3691.  
  3692. modifier = { # No if it's a same-sex concubinage and actor isn't accepting of it
  3693. factor = 0
  3694. scope:actor = {
  3695. allowed_to_marry_same_sex_trigger = no
  3696. scope:recipient = { sex_same_as = scope:secondary_actor }
  3697. }
  3698. }
  3699.  
  3700. modifier = { # No if it's a same-sex concubinage and recipient isn't accepting of it
  3701. factor = 0
  3702. scope:recipient = {
  3703. allowed_to_marry_same_sex_trigger = no
  3704. sex_same_as = scope:secondary_actor
  3705. }
  3706. }
  3707.  
  3708. modifier = { # Incest Filtering: Hard NO!
  3709. factor = 0
  3710. scope:recipient = {
  3711. relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:secondary_actor }
  3712. NOR = {
  3713. accepts_incest_with_trigger = { CHARACTER = scope:secondary_actor }
  3714. sexually_liberal_trigger = yes
  3715. }
  3716. }
  3717. }
  3718.  
  3719. modifier = { # Incest Filtering: Not likely, but keep the door open...
  3720. factor = 0.2
  3721. scope:recipient = {
  3722. relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:secondary_actor }
  3723. OR = {
  3724. accepts_incest_with_trigger = { CHARACTER = scope:secondary_actor }
  3725. sexually_liberal_trigger = yes
  3726. }
  3727. }
  3728. }
  3729.  
  3730. modifier = { # Faith considerations
  3731. factor = 0
  3732. scope:recipient = {
  3733. faith = {
  3734. faith_hostility_level = {
  3735. target = scope:actor.faith
  3736. value >= faith_hostile_level
  3737. }
  3738. }
  3739. NOR = {
  3740. has_relation_friend = scope:actor
  3741. has_relation_best_friend = scope:actor
  3742. }
  3743. }
  3744. }
  3745. }
  3746.  
  3747. on_send = {
  3748. scope:secondary_actor = { # to block the same character from being offered twice
  3749. add_character_flag = {
  3750. flag = has_been_offered_as_concubine
  3751. days = 5
  3752. }
  3753. }
  3754. }
  3755.  
  3756. on_accept = {
  3757. concubine_offer_on_accept_effect = yes
  3758. }
  3759.  
  3760. on_decline = {
  3761. scope:actor = {
  3762. send_interface_toast = {
  3763. type = event_generic_neutral
  3764. title = msg_concubine_offer_rejected_title
  3765. right_icon = scope:recipient
  3766. left_icon = scope:secondary_actor
  3767. custom_tooltip = msg_concubine_offer_rejected
  3768. }
  3769. }
  3770. }
  3771.  
  3772. send_options_exclusive = no
  3773. send_option = {
  3774. is_valid = {
  3775. scope:actor = {
  3776. has_usable_hook = scope:recipient
  3777. }
  3778. }
  3779. flag = hook
  3780. localization = SCHEME_HOOK
  3781. }
  3782. should_use_extra_icon = {
  3783. scope:actor = { has_usable_hook = scope:recipient }
  3784. }
  3785. extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds"
  3786. }
  3787. offer_concubine_managed_m = {
  3788. category = interaction_category_diplomacy
  3789.  
  3790. desc = offer_concubine_desc
  3791.  
  3792. ai_targets = {
  3793. ai_recipients = neighboring_rulers
  3794. }
  3795. ai_target_quick_trigger = {
  3796. adult = yes
  3797. }
  3798. ai_frequency = 144
  3799.  
  3800. greeting = positive
  3801. notification_text = OFFER_CONCUBINE_NOTIFICATION
  3802.  
  3803. #interface = concubine_list
  3804.  
  3805. needs_recipient_to_open = yes
  3806.  
  3807. populate_actor_list = {
  3808. scope:actor = {
  3809. every_courtier = {
  3810. limit = {
  3811. can_be_offered_as_concubine_to_character_trigger = {
  3812. GIVER = scope:actor
  3813. CHARACTER = scope:recipient
  3814. }
  3815. }
  3816. add_to_list = characters
  3817. }
  3818. every_prisoner = {
  3819. limit = {
  3820. NOT = { is_in_list = characters }
  3821. can_be_offered_as_concubine_to_character_trigger = {
  3822. GIVER = scope:actor
  3823. CHARACTER = scope:recipient
  3824. }
  3825. }
  3826. add_to_list = characters
  3827. }
  3828. }
  3829. }
  3830.  
  3831. is_shown = {
  3832. NOT = { scope:actor = scope:recipient }
  3833. scope:actor = {
  3834. faith = { has_doctrine = doctrine_concubine_managed_m }
  3835. }
  3836. scope:recipient = {
  3837. allowed_concubines = yes
  3838. is_adult = yes
  3839. }
  3840. }
  3841.  
  3842. is_valid_showing_failures_only = {
  3843. custom_description = {
  3844. text = take_concubine_available_character_opp
  3845. object = scope:recipient
  3846. scope:actor = {
  3847. OR = {
  3848. any_courtier = {
  3849. can_be_offered_as_concubine_to_character_trigger = {
  3850. GIVER = scope:actor
  3851. CHARACTER = scope:recipient
  3852. }
  3853. }
  3854. any_prisoner = {
  3855. can_be_offered_as_concubine_to_character_trigger = {
  3856. GIVER = scope:actor
  3857. CHARACTER = scope:recipient
  3858. }
  3859. }
  3860. }
  3861. }
  3862. }
  3863. custom_description = {
  3864. text = take_concubine_allowed_more
  3865. object = scope:recipient
  3866. scope:recipient = {
  3867. allowed_more_concubines = yes
  3868. }
  3869. }
  3870. }
  3871.  
  3872. can_be_picked = {
  3873. is_adult = yes
  3874. }
  3875.  
  3876. can_send = {
  3877. custom_description = {
  3878. text = character_unavailable_to_be_offered_as_concubine
  3879. object = scope:secondary_actor
  3880. scope:secondary_actor = {
  3881. can_be_offered_as_concubine_to_character_trigger = {
  3882. GIVER = scope:actor
  3883. CHARACTER = scope:recipient
  3884. }
  3885. }
  3886. }
  3887. }
  3888.  
  3889. auto_accept = no
  3890.  
  3891. ai_accept = {
  3892. base = 50
  3893.  
  3894. modifier = {
  3895. add = {
  3896. value = 50
  3897. multiply = scope:secondary_actor.num_of_good_genetic_traits
  3898. }
  3899. scope:secondary_actor = {
  3900. num_of_good_genetic_traits > 0
  3901. trigger_if = {
  3902. limit = {
  3903. is_female = yes
  3904. }
  3905. age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
  3906. }
  3907. }
  3908. desc = AI_POSITIVE_TRAIT_REASON
  3909. }
  3910.  
  3911. modifier = {
  3912. add = {
  3913. value = 50
  3914. }
  3915. scope:secondary_actor = {
  3916. is_lowborn = no
  3917. trigger_if = {
  3918. limit = {
  3919. is_female = yes
  3920. }
  3921. age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
  3922. }
  3923. }
  3924. desc = AI_DYNASTY_PRESTIGE_REASON_NOBLE
  3925. }
  3926.  
  3927. modifier = {
  3928. add = {
  3929. value = -50
  3930. multiply = scope:secondary_actor.num_of_bad_genetic_traits
  3931. }
  3932. scope:secondary_actor = {
  3933. OR = {
  3934. num_of_bad_genetic_traits > 0
  3935. }
  3936. trigger_if = {
  3937. limit = {
  3938. is_female = yes
  3939. }
  3940. age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
  3941. }
  3942. }
  3943. desc = AI_NEGATIVE_TRAIT_REASON
  3944. }
  3945.  
  3946. modifier = {
  3947. add = {
  3948. value = -50
  3949. }
  3950. scope:secondary_actor = {
  3951. is_lowborn = yes
  3952. num_of_good_genetic_traits = 0
  3953. trigger_if = {
  3954. limit = {
  3955. is_female = yes
  3956. }
  3957. age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
  3958. }
  3959. }
  3960. desc = AI_DYNASTY_PRESTIGE_REASON_LOWBORN_NO_POSITIVE_TRAIT
  3961. }
  3962.  
  3963. opinion_modifier = { # Opinion of you
  3964. who = scope:recipient
  3965. opinion_target = scope:actor
  3966. multiplier = 1.0
  3967. desc = AI_OPINION_REASON
  3968. }
  3969.  
  3970. opinion_modifier = { # Opinion of concubine
  3971. who = scope:recipient
  3972. opinion_target = scope:secondary_actor
  3973. multiplier = 0.25
  3974. desc = AI_OPINION_REASON
  3975. }
  3976.  
  3977. compare_modifier = { # Recipient is reluctant to marry old women (procreation is a key factor)
  3978. trigger = {
  3979. scope:secondary_actor = {
  3980. age > 29
  3981. is_female = yes
  3982. }
  3983. }
  3984. target = scope:secondary_actor
  3985. value = age
  3986. multiplier = -5.0
  3987. step = 1
  3988. offset = -29
  3989. desc = MARRY_AGE
  3990. }
  3991.  
  3992. modifier = { # A Recipient is unwilling to take a same-sex concubine if their faith doesn't support it
  3993. add = -1000
  3994.  
  3995. scope:recipient = {
  3996. allowed_to_marry_same_sex_trigger = no
  3997. sex_same_as = scope:secondary_actor
  3998. }
  3999. desc = SAME_SEX_MARRIAGE_FAITH_REASON_RECIPIENT
  4000. }
  4001.  
  4002. modifier = { # Unwilling if they don't have a batch of kids and opposite sex consorts to handle that situation
  4003. add = -200
  4004. scope:recipient = {
  4005. allowed_to_marry_same_sex_trigger = yes
  4006. sex_same_as = scope:secondary_actor
  4007. trigger_if = {
  4008. limit = {
  4009. NOT = {
  4010. any_consort = {
  4011. can_have_children_with = { CHARACTER = scope:recipient }
  4012. fertility > 0.1
  4013. }
  4014. }
  4015. }
  4016. any_child = {
  4017. is_player_heir_of_trigger = { CHARACTER = root }
  4018. }
  4019. }
  4020. trigger_else = {
  4021. always = no
  4022. }
  4023. }
  4024. desc = AI_NO_FERTILITY_REASON
  4025. }
  4026.  
  4027. modifier = {
  4028. add = 50
  4029. scope:recipient = {
  4030. is_attracted_to_gender_of = scope:secondary_actor
  4031. }
  4032. desc = AI_ATTRACTION_REASON
  4033. }
  4034.  
  4035. modifier = { # A Recipient is more likely to agree if you're their liege
  4036. add = 40
  4037.  
  4038. scope:recipient = {
  4039. target_is_liege_or_above = scope:actor
  4040. }
  4041. desc = LIEGE_REASON
  4042. }
  4043.  
  4044. #More/Less likely based on difference in rank between actor and recipient
  4045. modifier = {
  4046. add = 20
  4047. scope:actor = {
  4048. tier_difference = {
  4049. target = scope:recipient
  4050. value = 1
  4051. }
  4052. }
  4053. desc = AI_RANK_DIFF
  4054. }
  4055. modifier = {
  4056. add = 30
  4057. scope:actor = {
  4058. tier_difference = {
  4059. target = scope:recipient
  4060. value = 2
  4061. }
  4062. }
  4063. desc = AI_RANK_DIFF
  4064. }
  4065. modifier = {
  4066. add = 40
  4067. scope:actor = {
  4068. tier_difference = {
  4069. target = scope:recipient
  4070. value = 3
  4071. }
  4072. }
  4073. desc = AI_RANK_DIFF
  4074. }
  4075. modifier = {
  4076. add = 50
  4077. scope:actor = {
  4078. tier_difference = {
  4079. target = scope:recipient
  4080. value = 4
  4081. }
  4082. }
  4083. desc = AI_RANK_DIFF
  4084. }
  4085. modifier = {
  4086. add = 60
  4087. scope:actor = {
  4088. tier_difference = {
  4089. target = scope:recipient
  4090. value = 5
  4091. }
  4092. }
  4093. desc = AI_RANK_DIFF
  4094. }
  4095. modifier = {
  4096. add = -20
  4097. scope:actor = {
  4098. tier_difference = {
  4099. target = scope:recipient
  4100. value = -1
  4101. }
  4102. }
  4103. desc = AI_RANK_DIFF
  4104. }
  4105. modifier = {
  4106. add = -30
  4107. scope:actor = {
  4108. tier_difference = {
  4109. target = scope:recipient
  4110. value = -2
  4111. }
  4112. }
  4113. desc = AI_RANK_DIFF
  4114. }
  4115. modifier = {
  4116. add = -40
  4117. scope:actor = {
  4118. tier_difference = {
  4119. target = scope:recipient
  4120. value = -3
  4121. }
  4122. }
  4123. desc = AI_RANK_DIFF
  4124. }
  4125. modifier = {
  4126. add = -50
  4127. scope:actor = {
  4128. tier_difference = {
  4129. target = scope:recipient
  4130. value = -4
  4131. }
  4132. }
  4133. desc = AI_RANK_DIFF
  4134. }
  4135. modifier = {
  4136. add = -60
  4137. scope:actor = {
  4138. tier_difference = {
  4139. target = scope:recipient
  4140. value = -5
  4141. }
  4142. }
  4143. desc = AI_RANK_DIFF
  4144. }
  4145.  
  4146. modifier = {
  4147. add = intimidated_reason_value
  4148. scope:recipient = {
  4149. target_is_liege_or_above = scope:actor
  4150. has_dread_level_towards = {
  4151. target = scope:actor
  4152. level = 1
  4153. }
  4154. }
  4155. desc = INTIMIDATED_REASON
  4156. }
  4157. modifier = {
  4158. add = cowed_reason_value
  4159. scope:recipient = {
  4160. target_is_liege_or_above = scope:actor
  4161. has_dread_level_towards = {
  4162. target = scope:actor
  4163. level = 2
  4164. }
  4165. }
  4166. desc = COWED_REASON
  4167. }
  4168.  
  4169. modifier = {
  4170. add = intimidated_external_reason_value
  4171. scope:recipient = {
  4172. NOT = { target_is_liege_or_above = scope:actor }
  4173. has_dread_level_towards = {
  4174. target = scope:actor
  4175. level = 1
  4176. }
  4177. }
  4178. desc = INTIMIDATED_REASON
  4179. }
  4180. modifier = {
  4181. add = cowed_external_reason_value
  4182. scope:recipient = {
  4183. NOT = { target_is_liege_or_above = scope:actor }
  4184. has_dread_level_towards = {
  4185. target = scope:actor
  4186. level = 2
  4187. }
  4188. }
  4189. desc = COWED_REASON
  4190. }
  4191. modifier = {
  4192. add = -250
  4193. scope:secondary_actor = {
  4194. has_std_trigger = yes
  4195. }
  4196. desc = AI_STD_REASON
  4197. }
  4198. modifier = {
  4199. add = -250
  4200. scope:secondary_actor = {
  4201. has_epidemic_disease_trigger = yes
  4202. }
  4203. desc = AI_CONTAGIOUS_REASON
  4204. }
  4205. modifier = {
  4206. add = -5000
  4207. scope:secondary_actor = {
  4208. fertility <= 0
  4209. }
  4210. desc = AI_FERTILITY_REASON
  4211. }
  4212. modifier = {
  4213. scope:hook = yes
  4214. add = 500
  4215. scope:actor = { NOT = { has_strong_hook = scope:recipient } }
  4216. desc = SCHEME_WEAK_HOOK_USED
  4217. }
  4218. modifier = {
  4219. scope:hook = yes
  4220. add = 1000
  4221. scope:actor = { has_strong_hook = scope:recipient }
  4222. desc = SCHEME_STRONG_HOOK_USED
  4223. }
  4224. }
  4225.  
  4226. ai_potential = {
  4227. is_adult = yes
  4228. NOT = { has_trait = incapable }
  4229. is_at_war = no
  4230. NOR = {
  4231. has_trait = greedy
  4232. ai_greed > very_high_positive_ai_value
  4233. }
  4234. faith = { has_doctrine = doctrine_concubine_managed_m }
  4235. }
  4236.  
  4237. ai_will_do = {
  4238. base = 0
  4239.  
  4240. modifier = { # Basic Filtering
  4241. add = 100
  4242. scope:recipient = {
  4243. number_of_concubines < number_of_desired_concubines
  4244. }
  4245. scope:secondary_actor = {
  4246. trigger_if = {
  4247. limit = {
  4248. allowed_to_marry_same_sex_trigger = no
  4249. }
  4250. sex_opposite_of = scope:recipient
  4251. }
  4252. fertility > 0.2
  4253. age < 36
  4254. NOR = {
  4255. is_councillor_of = scope:actor
  4256. is_of_major_interest_trigger = {
  4257. CHARACTER = scope:actor
  4258. }
  4259. is_concubine_of = scope:actor
  4260. }
  4261. }
  4262. }
  4263.  
  4264. modifier = { # If secondary_actor is close to actor, a good character, or if actor should take them as concubine
  4265. add = -100
  4266. scope:secondary_actor = {
  4267. is_of_minor_interest_trigger = {
  4268. CHARACTER = scope:actor
  4269. }
  4270. AND = {
  4271. can_become_concubine_of_character_trigger = { CHARACTER = scope:actor }
  4272. scope:actor = { number_of_concubines < number_of_desired_concubines }
  4273. }
  4274. }
  4275. }
  4276.  
  4277. modifier = { # If secondary_actor could be an agent...
  4278. add = 25
  4279. any_scheme = {
  4280. scheme_target = scope:recipient
  4281. save_temporary_scope_as = scheme_check
  4282. }
  4283. scope:secondary_actor = {
  4284. is_valid_as_agent_in_scheme = scope:scheme_check
  4285. }
  4286. }
  4287.  
  4288. modifier = { # More likely if it's a neighboring ruler that you want to like you
  4289. add = 50
  4290. scope:recipient = {
  4291. any_neighboring_top_liege_realm_owner = { this = scope:actor }
  4292. max_military_strength > scope:actor.max_military_strength
  4293. }
  4294. }
  4295.  
  4296. modifier = { # More likely if its your friend and it's a nice concubine
  4297. add = 50
  4298. scope:recipient = {
  4299. OR = {
  4300. has_relation_friend = scope:actor
  4301. has_relation_best_friend = scope:actor
  4302. }
  4303. }
  4304. scope:secondary_actor = {
  4305. fertility > 0.2
  4306. age < 36
  4307. OR = {
  4308. has_trait = lustful
  4309. num_of_good_genetic_traits > 0
  4310. }
  4311. }
  4312. }
  4313.  
  4314. modifier = { #Even if they're allowed to take same-sex concubines we don't want the AI to suggest it without a good reason if they're not attracted to the person
  4315. add = -200
  4316. scope:recipient = {
  4317. allowed_to_marry_same_sex_trigger = yes
  4318. sex_same_as = scope:secondary_actor
  4319. NOT = { is_attracted_to_gender_of = scope:secondary_actor }
  4320. }
  4321. }
  4322.  
  4323. modifier = { # No if it's a same-sex concubinage and actor isn't accepting of it
  4324. factor = 0
  4325. scope:actor = {
  4326. allowed_to_marry_same_sex_trigger = no
  4327. scope:recipient = { sex_same_as = scope:secondary_actor }
  4328. }
  4329. }
  4330.  
  4331. modifier = { # No if it's a same-sex concubinage and recipient isn't accepting of it
  4332. factor = 0
  4333. scope:recipient = {
  4334. allowed_to_marry_same_sex_trigger = no
  4335. sex_same_as = scope:secondary_actor
  4336. }
  4337. }
  4338.  
  4339. modifier = { # Incest Filtering: Hard NO!
  4340. factor = 0
  4341. scope:recipient = {
  4342. relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:secondary_actor }
  4343. NOR = {
  4344. accepts_incest_with_trigger = { CHARACTER = scope:secondary_actor }
  4345. sexually_liberal_trigger = yes
  4346. }
  4347. }
  4348. }
  4349.  
  4350. modifier = { # Incest Filtering: Not likely, but keep the door open...
  4351. factor = 0.2
  4352. scope:recipient = {
  4353. relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:secondary_actor }
  4354. OR = {
  4355. accepts_incest_with_trigger = { CHARACTER = scope:secondary_actor }
  4356. sexually_liberal_trigger = yes
  4357. }
  4358. }
  4359. }
  4360.  
  4361. modifier = { # Faith considerations
  4362. factor = 0
  4363. scope:recipient = {
  4364. faith = {
  4365. faith_hostility_level = {
  4366. target = scope:actor.faith
  4367. value >= faith_hostile_level
  4368. }
  4369. }
  4370. NOR = {
  4371. has_relation_friend = scope:actor
  4372. has_relation_best_friend = scope:actor
  4373. }
  4374. }
  4375. }
  4376. }
  4377.  
  4378. on_send = {
  4379. scope:secondary_actor = { # to block the same character from being offered twice
  4380. add_character_flag = {
  4381. flag = has_been_offered_as_concubine
  4382. days = 5
  4383. }
  4384. }
  4385. }
  4386.  
  4387. on_accept = {
  4388. concubine_offer_on_accept_effect = yes
  4389. }
  4390.  
  4391. on_decline = {
  4392. scope:actor = {
  4393. send_interface_toast = {
  4394. type = event_generic_neutral
  4395. title = msg_concubine_offer_rejected_title
  4396. right_icon = scope:recipient
  4397. left_icon = scope:secondary_actor
  4398. custom_tooltip = msg_concubine_offer_rejected
  4399. }
  4400. }
  4401. }
  4402.  
  4403. send_options_exclusive = no
  4404. send_option = {
  4405. is_valid = {
  4406. scope:actor = {
  4407. has_usable_hook = scope:recipient
  4408. }
  4409. }
  4410. flag = hook
  4411. localization = SCHEME_HOOK
  4412. }
  4413. should_use_extra_icon = {
  4414. scope:actor = { has_usable_hook = scope:recipient }
  4415. }
  4416. extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds"
  4417. }
  4418. offer_concubine_managed_s = {
  4419. category = interaction_category_diplomacy
  4420.  
  4421. desc = offer_concubine_desc
  4422.  
  4423. ai_targets = {
  4424. ai_recipients = neighboring_rulers
  4425. }
  4426. ai_target_quick_trigger = {
  4427. adult = yes
  4428. }
  4429. ai_frequency = 144
  4430.  
  4431. greeting = positive
  4432. notification_text = OFFER_CONCUBINE_NOTIFICATION
  4433.  
  4434. #interface = concubine_list
  4435.  
  4436. needs_recipient_to_open = yes
  4437.  
  4438. populate_actor_list = {
  4439. scope:actor = {
  4440. every_courtier = {
  4441. limit = {
  4442. can_be_offered_as_concubine_to_character_trigger = {
  4443. GIVER = scope:actor
  4444. CHARACTER = scope:recipient
  4445. }
  4446. }
  4447. add_to_list = characters
  4448. }
  4449. every_prisoner = {
  4450. limit = {
  4451. NOT = { is_in_list = characters }
  4452. can_be_offered_as_concubine_to_character_trigger = {
  4453. GIVER = scope:actor
  4454. CHARACTER = scope:recipient
  4455. }
  4456. }
  4457. add_to_list = characters
  4458. }
  4459. }
  4460. }
  4461.  
  4462. is_shown = {
  4463. NOT = { scope:actor = scope:recipient }
  4464. scope:actor = {
  4465. faith = { has_doctrine = doctrine_concubine_managed_s }
  4466. }
  4467. scope:recipient = {
  4468. allowed_concubines = yes
  4469. is_adult = yes
  4470. }
  4471. }
  4472.  
  4473. is_valid_showing_failures_only = {
  4474. custom_description = {
  4475. text = take_concubine_available_character_opp
  4476. object = scope:recipient
  4477. scope:actor = {
  4478. OR = {
  4479. any_courtier = {
  4480. can_be_offered_as_concubine_to_character_trigger = {
  4481. GIVER = scope:actor
  4482. CHARACTER = scope:recipient
  4483. }
  4484. }
  4485. any_prisoner = {
  4486. can_be_offered_as_concubine_to_character_trigger = {
  4487. GIVER = scope:actor
  4488. CHARACTER = scope:recipient
  4489. }
  4490. }
  4491. }
  4492. }
  4493. }
  4494. custom_description = {
  4495. text = take_concubine_allowed_more
  4496. object = scope:recipient
  4497. scope:recipient = {
  4498. allowed_more_concubines = yes
  4499. }
  4500. }
  4501. }
  4502.  
  4503. can_be_picked = {
  4504. is_adult = yes
  4505. }
  4506.  
  4507. can_send = {
  4508. custom_description = {
  4509. text = character_unavailable_to_be_offered_as_concubine
  4510. object = scope:secondary_actor
  4511. scope:secondary_actor = {
  4512. can_be_offered_as_concubine_to_character_trigger = {
  4513. GIVER = scope:actor
  4514. CHARACTER = scope:recipient
  4515. }
  4516. }
  4517. }
  4518. }
  4519.  
  4520. auto_accept = no
  4521.  
  4522. ai_accept = {
  4523. base = 50
  4524.  
  4525. modifier = {
  4526. add = {
  4527. value = 50
  4528. multiply = scope:secondary_actor.num_of_good_genetic_traits
  4529. }
  4530. scope:secondary_actor = {
  4531. num_of_good_genetic_traits > 0
  4532. trigger_if = {
  4533. limit = {
  4534. is_female = yes
  4535. }
  4536. age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
  4537. }
  4538. }
  4539. desc = AI_POSITIVE_TRAIT_REASON
  4540. }
  4541.  
  4542. modifier = {
  4543. add = {
  4544. value = 50
  4545. }
  4546. scope:secondary_actor = {
  4547. is_lowborn = no
  4548. trigger_if = {
  4549. limit = {
  4550. is_female = yes
  4551. }
  4552. age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
  4553. }
  4554. }
  4555. desc = AI_DYNASTY_PRESTIGE_REASON_NOBLE
  4556. }
  4557.  
  4558. modifier = {
  4559. add = {
  4560. value = -50
  4561. multiply = scope:secondary_actor.num_of_bad_genetic_traits
  4562. }
  4563. scope:secondary_actor = {
  4564. OR = {
  4565. num_of_bad_genetic_traits > 0
  4566. }
  4567. trigger_if = {
  4568. limit = {
  4569. is_female = yes
  4570. }
  4571. age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
  4572. }
  4573. }
  4574. desc = AI_NEGATIVE_TRAIT_REASON
  4575. }
  4576.  
  4577. modifier = {
  4578. add = {
  4579. value = -50
  4580. }
  4581. scope:secondary_actor = {
  4582. is_lowborn = yes
  4583. num_of_good_genetic_traits = 0
  4584. trigger_if = {
  4585. limit = {
  4586. is_female = yes
  4587. }
  4588. age < define:NChildbirth|MAX_FEMALE_REPRODUCTION_AGE
  4589. }
  4590. }
  4591. desc = AI_DYNASTY_PRESTIGE_REASON_LOWBORN_NO_POSITIVE_TRAIT
  4592. }
  4593.  
  4594. opinion_modifier = { # Opinion of you
  4595. who = scope:recipient
  4596. opinion_target = scope:actor
  4597. multiplier = 1.0
  4598. desc = AI_OPINION_REASON
  4599. }
  4600.  
  4601. opinion_modifier = { # Opinion of concubine
  4602. who = scope:recipient
  4603. opinion_target = scope:secondary_actor
  4604. multiplier = 0.25
  4605. desc = AI_OPINION_REASON
  4606. }
  4607.  
  4608. compare_modifier = { # Recipient is reluctant to marry old women (procreation is a key factor)
  4609. trigger = {
  4610. scope:secondary_actor = {
  4611. age > 29
  4612. is_female = yes
  4613. }
  4614. }
  4615. target = scope:secondary_actor
  4616. value = age
  4617. multiplier = -5.0
  4618. step = 1
  4619. offset = -29
  4620. desc = MARRY_AGE
  4621. }
  4622.  
  4623. modifier = { # A Recipient is unwilling to take a same-sex concubine if their faith doesn't support it
  4624. add = -1000
  4625.  
  4626. scope:recipient = {
  4627. allowed_to_marry_same_sex_trigger = no
  4628. sex_same_as = scope:secondary_actor
  4629. }
  4630. desc = SAME_SEX_MARRIAGE_FAITH_REASON_RECIPIENT
  4631. }
  4632.  
  4633. modifier = { # Unwilling if they don't have a batch of kids and opposite sex consorts to handle that situation
  4634. add = -200
  4635. scope:recipient = {
  4636. allowed_to_marry_same_sex_trigger = yes
  4637. sex_same_as = scope:secondary_actor
  4638. trigger_if = {
  4639. limit = {
  4640. NOT = {
  4641. any_consort = {
  4642. can_have_children_with = { CHARACTER = scope:recipient }
  4643. fertility > 0.1
  4644. }
  4645. }
  4646. }
  4647. any_child = {
  4648. is_player_heir_of_trigger = { CHARACTER = root }
  4649. }
  4650. }
  4651. trigger_else = {
  4652. always = no
  4653. }
  4654. }
  4655. desc = AI_NO_FERTILITY_REASON
  4656. }
  4657.  
  4658. modifier = {
  4659. add = 50
  4660. scope:recipient = {
  4661. is_attracted_to_gender_of = scope:secondary_actor
  4662. }
  4663. desc = AI_ATTRACTION_REASON
  4664. }
  4665.  
  4666. modifier = { # A Recipient is more likely to agree if you're their liege
  4667. add = 40
  4668.  
  4669. scope:recipient = {
  4670. target_is_liege_or_above = scope:actor
  4671. }
  4672. desc = LIEGE_REASON
  4673. }
  4674.  
  4675. #More/Less likely based on difference in rank between actor and recipient
  4676. modifier = {
  4677. add = 20
  4678. scope:actor = {
  4679. tier_difference = {
  4680. target = scope:recipient
  4681. value = 1
  4682. }
  4683. }
  4684. desc = AI_RANK_DIFF
  4685. }
  4686. modifier = {
  4687. add = 30
  4688. scope:actor = {
  4689. tier_difference = {
  4690. target = scope:recipient
  4691. value = 2
  4692. }
  4693. }
  4694. desc = AI_RANK_DIFF
  4695. }
  4696. modifier = {
  4697. add = 40
  4698. scope:actor = {
  4699. tier_difference = {
  4700. target = scope:recipient
  4701. value = 3
  4702. }
  4703. }
  4704. desc = AI_RANK_DIFF
  4705. }
  4706. modifier = {
  4707. add = 50
  4708. scope:actor = {
  4709. tier_difference = {
  4710. target = scope:recipient
  4711. value = 4
  4712. }
  4713. }
  4714. desc = AI_RANK_DIFF
  4715. }
  4716. modifier = {
  4717. add = 60
  4718. scope:actor = {
  4719. tier_difference = {
  4720. target = scope:recipient
  4721. value = 5
  4722. }
  4723. }
  4724. desc = AI_RANK_DIFF
  4725. }
  4726. modifier = {
  4727. add = -20
  4728. scope:actor = {
  4729. tier_difference = {
  4730. target = scope:recipient
  4731. value = -1
  4732. }
  4733. }
  4734. desc = AI_RANK_DIFF
  4735. }
  4736. modifier = {
  4737. add = -30
  4738. scope:actor = {
  4739. tier_difference = {
  4740. target = scope:recipient
  4741. value = -2
  4742. }
  4743. }
  4744. desc = AI_RANK_DIFF
  4745. }
  4746. modifier = {
  4747. add = -40
  4748. scope:actor = {
  4749. tier_difference = {
  4750. target = scope:recipient
  4751. value = -3
  4752. }
  4753. }
  4754. desc = AI_RANK_DIFF
  4755. }
  4756. modifier = {
  4757. add = -50
  4758. scope:actor = {
  4759. tier_difference = {
  4760. target = scope:recipient
  4761. value = -4
  4762. }
  4763. }
  4764. desc = AI_RANK_DIFF
  4765. }
  4766. modifier = {
  4767. add = -60
  4768. scope:actor = {
  4769. tier_difference = {
  4770. target = scope:recipient
  4771. value = -5
  4772. }
  4773. }
  4774. desc = AI_RANK_DIFF
  4775. }
  4776.  
  4777. modifier = {
  4778. add = intimidated_reason_value
  4779. scope:recipient = {
  4780. target_is_liege_or_above = scope:actor
  4781. has_dread_level_towards = {
  4782. target = scope:actor
  4783. level = 1
  4784. }
  4785. }
  4786. desc = INTIMIDATED_REASON
  4787. }
  4788. modifier = {
  4789. add = cowed_reason_value
  4790. scope:recipient = {
  4791. target_is_liege_or_above = scope:actor
  4792. has_dread_level_towards = {
  4793. target = scope:actor
  4794. level = 2
  4795. }
  4796. }
  4797. desc = COWED_REASON
  4798. }
  4799.  
  4800. modifier = {
  4801. add = intimidated_external_reason_value
  4802. scope:recipient = {
  4803. NOT = { target_is_liege_or_above = scope:actor }
  4804. has_dread_level_towards = {
  4805. target = scope:actor
  4806. level = 1
  4807. }
  4808. }
  4809. desc = INTIMIDATED_REASON
  4810. }
  4811. modifier = {
  4812. add = cowed_external_reason_value
  4813. scope:recipient = {
  4814. NOT = { target_is_liege_or_above = scope:actor }
  4815. has_dread_level_towards = {
  4816. target = scope:actor
  4817. level = 2
  4818. }
  4819. }
  4820. desc = COWED_REASON
  4821. }
  4822. modifier = {
  4823. add = -250
  4824. scope:secondary_actor = {
  4825. has_std_trigger = yes
  4826. }
  4827. desc = AI_STD_REASON
  4828. }
  4829. modifier = {
  4830. add = -250
  4831. scope:secondary_actor = {
  4832. has_epidemic_disease_trigger = yes
  4833. }
  4834. desc = AI_CONTAGIOUS_REASON
  4835. }
  4836. modifier = {
  4837. add = -5000
  4838. scope:secondary_actor = {
  4839. fertility <= 0
  4840. }
  4841. desc = AI_FERTILITY_REASON
  4842. }
  4843. modifier = {
  4844. scope:hook = yes
  4845. add = 500
  4846. scope:actor = { NOT = { has_strong_hook = scope:recipient } }
  4847. desc = SCHEME_WEAK_HOOK_USED
  4848. }
  4849. modifier = {
  4850. scope:hook = yes
  4851. add = 1000
  4852. scope:actor = { has_strong_hook = scope:recipient }
  4853. desc = SCHEME_STRONG_HOOK_USED
  4854. }
  4855. }
  4856.  
  4857. ai_potential = {
  4858. is_adult = yes
  4859. NOT = { has_trait = incapable }
  4860. is_at_war = no
  4861. NOR = {
  4862. has_trait = greedy
  4863. ai_greed > very_high_positive_ai_value
  4864. }
  4865. faith = { has_doctrine = doctrine_concubine_managed_s }
  4866. }
  4867.  
  4868. ai_will_do = {
  4869. base = 0
  4870.  
  4871. modifier = { # Basic Filtering
  4872. add = 100
  4873. scope:recipient = {
  4874. number_of_concubines < number_of_desired_concubines
  4875. }
  4876. scope:secondary_actor = {
  4877. trigger_if = {
  4878. limit = {
  4879. allowed_to_marry_same_sex_trigger = no
  4880. }
  4881. sex_opposite_of = scope:recipient
  4882. }
  4883. fertility > 0.2
  4884. age < 36
  4885. NOR = {
  4886. is_councillor_of = scope:actor
  4887. is_of_major_interest_trigger = {
  4888. CHARACTER = scope:actor
  4889. }
  4890. is_concubine_of = scope:actor
  4891. }
  4892. }
  4893. }
  4894.  
  4895. modifier = { # If secondary_actor is close to actor, a good character, or if actor should take them as concubine
  4896. add = -100
  4897. scope:secondary_actor = {
  4898. is_of_minor_interest_trigger = {
  4899. CHARACTER = scope:actor
  4900. }
  4901. AND = {
  4902. can_become_concubine_of_character_trigger = { CHARACTER = scope:actor }
  4903. scope:actor = { number_of_concubines < number_of_desired_concubines }
  4904. }
  4905. }
  4906. }
  4907.  
  4908. modifier = { # If secondary_actor could be an agent...
  4909. add = 25
  4910. any_scheme = {
  4911. scheme_target = scope:recipient
  4912. save_temporary_scope_as = scheme_check
  4913. }
  4914. scope:secondary_actor = {
  4915. is_valid_as_agent_in_scheme = scope:scheme_check
  4916. }
  4917. }
  4918.  
  4919. modifier = { # More likely if it's a neighboring ruler that you want to like you
  4920. add = 50
  4921. scope:recipient = {
  4922. any_neighboring_top_liege_realm_owner = { this = scope:actor }
  4923. max_military_strength > scope:actor.max_military_strength
  4924. }
  4925. }
  4926.  
  4927. modifier = { # More likely if its your friend and it's a nice concubine
  4928. add = 50
  4929. scope:recipient = {
  4930. OR = {
  4931. has_relation_friend = scope:actor
  4932. has_relation_best_friend = scope:actor
  4933. }
  4934. }
  4935. scope:secondary_actor = {
  4936. fertility > 0.2
  4937. age < 36
  4938. OR = {
  4939. has_trait = lustful
  4940. num_of_good_genetic_traits > 0
  4941. }
  4942. }
  4943. }
  4944.  
  4945. modifier = { #Even if they're allowed to take same-sex concubines we don't want the AI to suggest it without a good reason if they're not attracted to the person
  4946. add = -200
  4947. scope:recipient = {
  4948. allowed_to_marry_same_sex_trigger = yes
  4949. sex_same_as = scope:secondary_actor
  4950. NOT = { is_attracted_to_gender_of = scope:secondary_actor }
  4951. }
  4952. }
  4953.  
  4954. modifier = { # No if it's a same-sex concubinage and actor isn't accepting of it
  4955. factor = 0
  4956. scope:actor = {
  4957. allowed_to_marry_same_sex_trigger = no
  4958. scope:recipient = { sex_same_as = scope:secondary_actor }
  4959. }
  4960. }
  4961.  
  4962. modifier = { # No if it's a same-sex concubinage and recipient isn't accepting of it
  4963. factor = 0
  4964. scope:recipient = {
  4965. allowed_to_marry_same_sex_trigger = no
  4966. sex_same_as = scope:secondary_actor
  4967. }
  4968. }
  4969.  
  4970. modifier = { # Incest Filtering: Hard NO!
  4971. factor = 0
  4972. scope:recipient = {
  4973. relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:secondary_actor }
  4974. NOR = {
  4975. accepts_incest_with_trigger = { CHARACTER = scope:secondary_actor }
  4976. sexually_liberal_trigger = yes
  4977. }
  4978. }
  4979. }
  4980.  
  4981. modifier = { # Incest Filtering: Not likely, but keep the door open...
  4982. factor = 0.2
  4983. scope:recipient = {
  4984. relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:secondary_actor }
  4985. OR = {
  4986. accepts_incest_with_trigger = { CHARACTER = scope:secondary_actor }
  4987. sexually_liberal_trigger = yes
  4988. }
  4989. }
  4990. }
  4991.  
  4992. modifier = { # Faith considerations
  4993. factor = 0
  4994. scope:recipient = {
  4995. faith = {
  4996. faith_hostility_level = {
  4997. target = scope:actor.faith
  4998. value >= faith_hostile_level
  4999. }
  5000. }
  5001. NOR = {
  5002. has_relation_friend = scope:actor
  5003. has_relation_best_friend = scope:actor
  5004. }
  5005. }
  5006. }
  5007. }
  5008.  
  5009. on_send = {
  5010. scope:secondary_actor = { # to block the same character from being offered twice
  5011. add_character_flag = {
  5012. flag = has_been_offered_as_concubine
  5013. days = 5
  5014. }
  5015. }
  5016. }
  5017.  
  5018. on_accept = {
  5019. concubine_offer_on_accept_effect = yes
  5020. }
  5021.  
  5022. on_decline = {
  5023. scope:actor = {
  5024. send_interface_toast = {
  5025. type = event_generic_neutral
  5026. title = msg_concubine_offer_rejected_title
  5027. right_icon = scope:recipient
  5028. left_icon = scope:secondary_actor
  5029. custom_tooltip = msg_concubine_offer_rejected
  5030. }
  5031. }
  5032. }
  5033.  
  5034. send_options_exclusive = no
  5035. send_option = {
  5036. is_valid = {
  5037. scope:actor = {
  5038. has_usable_hook = scope:recipient
  5039. }
  5040. }
  5041. flag = hook
  5042. localization = SCHEME_HOOK
  5043. }
  5044. should_use_extra_icon = {
  5045. scope:actor = { has_usable_hook = scope:recipient }
  5046. }
  5047. extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds"
  5048. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement