ZingFreelancer

Coetus Anima 1.1 with adjusted trait aninations

Jan 5th, 2022 (edited)
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 129.79 KB | None | 0 0
  1. ######################################################
  2. ################# CHARACTER WINDOW ###################
  3. ######################################################
  4.  
  5. window = {
  6.     name = "character_window"
  7.     datacontext = "[GetVariableSystem]"
  8.     datacontext = "[CharacterWindow.GetCharacter]"
  9.     movable = no
  10.     layer = middle
  11.  
  12.     using = Window_Size_Sidebar
  13.     using = Window_Background_Sidebar
  14.  
  15.     state = {
  16.         name = _show
  17.         using = Animation_FadeIn_Quick
  18.         using = Sound_WindowShow_Standard
  19.         position_x = 0
  20.  
  21.         on_start = "[GetVariableSystem.Set( 'hide_bottom_left_HUD', 'true' )]"
  22.     }
  23.  
  24.     state = {
  25.         name = _hide
  26.         using = Animation_FadeOut_Quick
  27.         using = Sound_WindowHide_Standard
  28.         position_x = -60
  29.  
  30.         on_start = "[GetVariableSystem.Clear( 'hide_bottom_left_HUD' )]"
  31.     }
  32.  
  33.     vbox = {
  34.         name = "main_content"
  35.         using = Window_Margins_Sidebar
  36.  
  37.         ###############
  38.         # Character box
  39.         widget = {
  40.             name = "main_characters"
  41.             datacontext = "[GetIllustration( 'character_view_bg' )]"
  42.             layoutpolicy_horizontal = expanding
  43.             size = { 0 305 }
  44.  
  45.  
  46.             widget = {
  47.                 size = { 100% 100% }
  48.                 using = Animation_Character_Window_Refresh
  49.  
  50.                 background = {
  51.                     texture = "[Illustration.GetTexture( Character.Self )]"
  52.                     fittype = centercrop
  53.                     margin_bottom = 5
  54.                     margin_left = 1
  55.  
  56.                     modify_texture = {
  57.                         texture = "gfx/interface/component_masks/mask_rough_edges_down_right.dds"
  58.                         spriteType = Corneredtiled
  59.                         spriteborder = { 20 20 }
  60.                         blend_mode = alphamultiply
  61.                         texture_density = 2
  62.                     }
  63.                 }
  64.             }
  65.  
  66.             buttons_window_control = {
  67.                 parentanchor = top|right
  68.  
  69.                 blockoverride "button_close"
  70.                 {
  71.                     onclick = "[CharacterWindow.Close]"
  72.                 }
  73.  
  74.                 blockoverride "button_back"
  75.                 {
  76.                     visible = "[HasViewHistory]"
  77.                     onclick = "[OpenFromViewHistory]"
  78.                     tooltip = "[GetViewHistoryTooltip]"
  79.                 }
  80.  
  81.                 blockoverride "button_me"
  82.                 {
  83.                     visible = "[Not(Character.IsLocalPlayer)]"
  84.                     onclick = "[DefaultOnCharacterClick(GetPlayer.GetID)]"
  85.                 }
  86.  
  87.                 blockoverride "button_pin" {}
  88.             }
  89.  
  90.             ### Primary Spouse
  91.             container = {
  92.                 visible = "[CharacterWindow.ShouldShowSpouses]"
  93.                 parentanchor = bottom|hcenter
  94.                 position = { 15 0 }
  95.  
  96.                 using = Animation_Character_Window_Refresh_Short
  97.  
  98.                 button = {
  99.                     name = "marry_off_button"
  100.                     visible = "[And(And( Not( ObjectsEqual( GetPlayer, Character.Self ) ), CharacterWindow.ShouldShowFindSpouse ), Not(Character.IsConcubine))]"
  101.                     parentanchor = center
  102.                     position = { 0 35 }
  103.  
  104.                     onclick = "[Character.OpenPlayerInteraction('marry_off_interaction')]"
  105.                     tooltip = "CHARACTER_WINDOW_FIND_SPOUSE"
  106.                     enabled = "[Character.IsPlayerInteractionValid('marry_off_interaction')]"
  107.                     gfxtype = framedbuttongfx
  108.                     effectname = "NoHighlight"
  109.                     texture = "gfx/portraits/unknown_portraits/unknown_spouse.dds"
  110.                     size = { 195 282 }
  111.                     framesize = { 554 780 }
  112.                     upframe = 1
  113.                     overframe = 2
  114.                     alpha = 0.8
  115.  
  116.                     button_icon = {
  117.                         parentanchor = center
  118.                         alwaystransparent = yes
  119.                         size = { 50 50 }
  120.                         position = { 0 45 }
  121.                         texture = "gfx/interface/icons/faith_doctrine_groups/doctrine_marriage_type.dds"
  122.                     }
  123.                 }
  124.  
  125.                 button = {
  126.                     name = "marry_off_button_player"
  127.                     visible = "[And( ObjectsEqual( GetPlayer, Character.Self ), CharacterWindow.ShouldShowFindSpouse)]"
  128.                     parentanchor = center
  129.                     position = { 0 35 }
  130.                     onclick = "[Character.OpenPlayerInteraction('marry_off_interaction')]"
  131.                     tooltip = "CHARACTER_WINDOW_FIND_SPOUSE_SELF"
  132.                     gfxtype = framedbuttongfx
  133.                     effectname = "NoHighlight"
  134.                     texture = "gfx/portraits/unknown_portraits/unknown_spouse.dds"
  135.                     size = { 195 282 }
  136.                     framesize = { 554 780 }
  137.                     upframe = 1
  138.                     overframe = 2
  139.                     alpha = 0.8
  140.  
  141.                     button_icon = {
  142.                         parentanchor = center
  143.                         alwaystransparent = yes
  144.                         size = { 50 50 }
  145.                         position = { 0 45 }
  146.                         texture = "gfx/interface/icons/faith_doctrine_groups/doctrine_marriage_type.dds"
  147.                     }
  148.                 }
  149.  
  150.                 portrait_character_view_spouse = {
  151.                     datacontext = "[CharacterWindow.GetSpouse]"
  152.                     visible = "[CharacterWindow.GetSpouse.IsValid]"
  153.  
  154.                     state = {
  155.                         name = cw_spouse_cycle
  156.                         using = Animation_Refresh_FadeOut
  157.                     }
  158.  
  159.                     state = {
  160.                         using = Animation_Refresh_FadeIn
  161.                     }
  162.                 }
  163.  
  164.                 widget = {
  165.                     parentanchor = bottom|hcenter
  166.                     size = { 145 40 }
  167.  
  168.                     flowcontainer = {
  169.                         parentanchor = bottom|hcenter
  170.                         widgetanchor = bottom|left
  171.                         position = { -20 -3 }
  172.                         ignoreinvisible = yes
  173.  
  174.                         text_label_center = {
  175.                             text = "[CharacterWindow.GetSpouseText]"
  176.                             align = nobaseline
  177.                         }
  178.  
  179.                         flowcontainer = {
  180.                             visible = "[CharacterWindow.ShouldShowSpouseButtons]"
  181.                             margin_top = 2
  182.                             spacing = -5
  183.  
  184.                             using = Animation_ShowHide_Standard
  185.  
  186.                             button_expand = {
  187.                                 enabled = "[CharacterWindow.IsShowPrevious]"
  188.                                 onclick = "[CharacterWindow.PreviousSpouse]"
  189.                                 onclick = "[PdxGuiTriggerAllAnimations('cw_spouse_cycle')]"
  190.                                 tooltip = "[CharacterWindow.GetPreviousSpouseTooltip]"
  191.                                 mirror = horizontal
  192.                             }
  193.  
  194.                             button_expand = {
  195.                                 enabled = "[CharacterWindow.IsShowNext]"
  196.                                 onclick = "[CharacterWindow.NextSpouse]"
  197.                                 onclick = "[PdxGuiTriggerAllAnimations('cw_spouse_cycle')]"
  198.                                 tooltip = "[CharacterWindow.GetNextSpouseTooltip]"
  199.                             }
  200.                         }
  201.                     }
  202.  
  203.                     icon = {
  204.                         name = "marriage_type_icon"
  205.                         visible = "[CharacterWindow.ShowMarriageIcon]"
  206.                         position = { 20 7 }
  207.  
  208.                         size = { 30 30 }
  209.                         framesize = { 60 60 }
  210.                         texture = "gfx/interface/icons/marriage_types.dds"
  211.                         frame = "[CharacterWindow.GetMarriageIcon]"
  212.                         tooltip = "[CharacterWindow.GetMarriageIconTooltip]"
  213.                     }
  214.                 }
  215.             }
  216.  
  217.             ### Main Character
  218.             portrait_character_view_main = {
  219.                 name = "tutorial_highlight_main_character_button"
  220.                 parentanchor = bottom|left
  221.                 position = { 0 0 }
  222.  
  223.                 using = Animation_Character_Window_Refresh_Short
  224.  
  225.                 # icon_button_small_round = {
  226.                 #   name = "interact_button"
  227.                 #   visible = "[Character.IsAlive]"
  228.                 #   parentanchor = bottom|right
  229.                 #   position = { -30 0 }
  230.                 #   size = { 35 35 }
  231.  
  232.                 #   onclick = "[DefaultOnCharacterRightClick(Character.GetID)]"
  233.  
  234.                 #   tooltip = "CV_TT_INTERACT"
  235.                 #   using = tooltip_ne
  236.  
  237.                 #   icon = {
  238.                 #       name = "icon"
  239.                 #       texture = "gfx/interface/prototype/interact_temp.png"
  240.                 #       size = {18 18}
  241.                 #       parentanchor = center
  242.                 #   }
  243.                 # }
  244.             }
  245.  
  246.             ### Jailor / Imprisoner / Imprisoned by
  247.             container = {
  248.                 name = "imprisoned_by"
  249.                 datacontext = "[CharacterWindow.GetCharacter.GetImprisonedBy]"
  250.                 visible = "[Character.IsValid]"
  251.                 parentanchor = bottom|right
  252.                 widgetanchor = top|left
  253.                 position = { -195 -250 }
  254.  
  255.                 using = Animation_Character_Window_Refresh
  256.  
  257.                 portrait_head_small = {
  258.                     blockoverride "portrait_transformation"
  259.                     {
  260.                         portrait_scale = { -1 1 }
  261.                         portrait_offset = { 1 0 }
  262.                     }
  263.                 }
  264.  
  265.                 text_label_center = {
  266.                     parentanchor = top|hcenter
  267.                     position = { 0 85 }
  268.                     text = "IMPRISONED_BY"
  269.                 }
  270.             }
  271.  
  272.             ### Liege
  273.             container = {
  274.                 name = "liege"
  275.                 datacontext = "[CharacterWindow.GetCharacter.GetLiegeEvenWhenDead]"
  276.                 visible = "[CharacterWindow.HasLiegeEvenWhenDead]"
  277.                 parentanchor = bottom|right
  278.                 widgetanchor = top|left
  279.                 position = { -105 -250 }
  280.                 allow_outside = yes
  281.  
  282.                 using = Animation_Character_Window_Refresh
  283.  
  284.                 portrait_head_small = {
  285.                     blockoverride "portrait_transformation"
  286.                     {
  287.                         portrait_scale = { -1 1 }
  288.                         portrait_offset = { 1 0 }
  289.                     }
  290.  
  291.                     blockoverride "coa" {
  292.                         coa_realm_tiny = {
  293.                             visible = "[And(CharacterWindow.GetCharacter.IsAlive, CharacterWindow.HasLiegeTitleEvenWhenDead)]"
  294.                             parentanchor = bottom|left
  295.                             position = { 3 -2 }
  296.                             scale = 0.85
  297.                         }
  298.  
  299.                         coa_title_tiny = {
  300.                             visible = "[And(Not(CharacterWindow.GetCharacter.IsAlive), CharacterWindow.HasLiegeTitleEvenWhenDead)]"
  301.                             datacontext = "[CharacterWindow.GetCharacter.GetLiegeTitleEvenWhenDead]"
  302.                             parentanchor = bottom|left
  303.                             position = { 3 -2 }
  304.                             scale = 0.85
  305.                         }
  306.                     }
  307.                 }
  308.  
  309.                 text_label_center = {
  310.                     parentanchor = top|hcenter
  311.                     position = { 0 85 }
  312.                     text = "[liege|E]"
  313.                     allow_outside = yes
  314.  
  315.                     icon = {
  316.                         name = "non_dejure_liege"
  317.                         datacontext = "[CharacterWindow.GetCharacter]"
  318.                         visible = "[Not( Character.GetVassalContract.IsRightfulLiege )]"
  319.                         position = { 3 0 }
  320.                         parentanchor = right
  321.                         widgetanchor = left
  322.                         size = { 30 30 }
  323.                         texture = "gfx/interface/icons/levy_tax_reduction.dds"
  324.  
  325.                         using = tooltip_ws
  326.                         tooltip = "MRW_TT_NOT_RIGHTFUL_LIEGE"
  327.                     }
  328.                 }
  329.  
  330.                 portrait_opinion = {
  331.                     name = "liege_opinion"
  332.                     parentanchor = top|hcenter
  333.                     position = { 0 110 }
  334.  
  335.                     datacontext = "[CharacterWindow.GetCharacter]"
  336.                     visible = "[And( Character.GetLiege.IsValid, And( Character.IsAlive, Not(Character.IsLocalPlayer ) ) )]"
  337.  
  338.                     blockoverride "dread_logic" {
  339.                         visible = "[Character.ShouldShowDreadEffectIconFor( Character.GetLiege )]"
  340.                         frame = "[Character.GetDreadEffectIconFrameFor( Character.GetLiege )]"
  341.                         tooltip = "[Character.GetDreadEffectTooltipFor( Character.GetLiege )]"
  342.                     }
  343.  
  344.                     blockoverride "opinion_text"
  345.                     {
  346.                         text = "[Character.GetOpinionOf( Character.GetLiege )|=]"
  347.                         fonttintcolor = "[Character.GetOpinionOfTint( CharacterWindow.GetCharacter.GetLiege )]"
  348.                     }
  349.                    
  350.                     blockoverride "male_player_attraction"
  351.                     {
  352.                         datacontext = "[GetScriptedGui( 'male_attraction_gui' )]"
  353.                         visible = "[ScriptedGui.IsShown( GuiScope.SetRoot( GetPlayer.MakeScope ).AddScope('attracting_character', Character.GetLiege.MakeScope ).End )]"
  354.                         tooltip = "male_attraction_liege_gui_tooltip"
  355.                         text = "[GuiScope.SetRoot( GetPlayer.MakeScope ).AddScope('attracting_character', Character.GetLiege.MakeScope ).ScriptValue('sexuality_adjusted_physical_attraction_gui_value')|0]"
  356.                     }
  357.                    
  358.                     blockoverride "female_player_attraction"
  359.                     {
  360.                         datacontext = "[GetScriptedGui( 'female_attraction_gui' )]"
  361.                         visible = "[ScriptedGui.IsShown( GuiScope.SetRoot( GetPlayer.MakeScope ).AddScope('attracting_character', Character.GetLiege.MakeScope ).End )]"
  362.                         tooltip = "female_player_attraction_liege_gui_tooltip"
  363.                         text = "[GuiScope.SetRoot( GetPlayer.MakeScope ).AddScope('attracting_character', Character.GetLiege.MakeScope ).ScriptValue('sexuality_adjusted_physical_attraction_gui_value')|0]"
  364.                     }
  365.  
  366.                     blockoverride "male_attraction"
  367.                     {
  368.                         datacontext = "[GetScriptedGui( 'male_attraction_gui' )]"
  369.                         visible = "[ScriptedGui.IsShown( GuiScope.SetRoot( Character.GetLiege.MakeScope ).AddScope('attracting_character', GetPlayer.MakeScope ).End )]"
  370.                         tooltip = "male_attraction_liege_gui_tooltip"
  371.                         text = "[GuiScope.SetRoot( Character.GetLiege.MakeScope ).AddScope('attracting_character', GetPlayer.MakeScope ).ScriptValue('sexuality_adjusted_physical_attraction_gui_value')|0]"
  372.                     }
  373.                    
  374.                     blockoverride "female_attraction"
  375.                     {
  376.                         datacontext = "[GetScriptedGui( 'female_attraction_gui' )]"
  377.                         visible = "[ScriptedGui.IsShown( GuiScope.SetRoot( Character.GetLiege.MakeScope ).AddScope('attracting_character', GetPlayer.MakeScope ).End )]"
  378.                         tooltip = "female_attraction_liege_gui_tooltip"
  379.                         text = "[GuiScope.SetRoot( Character.GetLiege.MakeScope ).AddScope('attracting_character', GetPlayer.MakeScope ).ScriptValue('sexuality_adjusted_physical_attraction_gui_value')|0]"
  380.                     }
  381.                    
  382.                     blockoverride "ott_heading_text"
  383.                     {
  384.                         text = "[Character.GetOpinionHeadingText( CharacterWindow.GetCharacter.GetLiege )]"
  385.                     }
  386.  
  387.                     blockoverride "ott_opinion_value_text"
  388.                     {
  389.                         text = "[Character.GetOpinionOf( Character.GetLiege )|=]"
  390.                         fonttintcolor = "[Character.GetOpinionOfTint( CharacterWindow.GetCharacter.GetLiege )]"
  391.                     }
  392.  
  393.                     blockoverride "ott_opinion_breakdown_text"
  394.                     {
  395.                         text = "[Character.GetOpinionBreakdownText( CharacterWindow.GetCharacter.GetLiege )]"
  396.                     }
  397.                 }
  398.             }
  399.  
  400.             ### Host
  401.             container = {
  402.                 name = "host"
  403.                 datacontext = "[CharacterWindow.GetCourtOwner]"
  404.                 visible = "[And( Not( CharacterWindow.HasLiegeEvenWhenDead ), And( CharacterWindow.GetCourtOwner.IsValid, Not( CharacterWindow.GetCharacter.IsRuler ) ) )]"
  405.                 parentanchor = bottom|right
  406.                 widgetanchor = top|left
  407.                 position = { -105 -250 }
  408.  
  409.                 using = Animation_Character_Window_Refresh
  410.  
  411.                 portrait_head_small = {
  412.                     blockoverride "portrait_transformation"
  413.                     {
  414.                         portrait_scale = { -1 1 }
  415.                         portrait_offset = { 1 0 }
  416.                     }
  417.                 }
  418.  
  419.                 text_label_center = {
  420.                     parentanchor = top|hcenter
  421.                     position = { 0 85 }
  422.                     text = "[host|E]"
  423.                 }
  424.  
  425.                
  426.                 portrait_opinion = {
  427.                     name = "liege_opinion"
  428.                     datacontext = "[CharacterWindow.GetCharacter]"
  429.                     visible = "[And(Character.IsAlive, Not(Character.IsLocalPlayer))]"
  430.                     parentanchor = top|hcenter
  431.                     position = { -10 110 }
  432.  
  433.                     blockoverride "dread_logic" {
  434.                         visible = "[Character.ShouldShowDreadEffectIconFor( CharacterWindow.GetCourtOwner )]"
  435.                         frame = "[Character.GetDreadEffectIconFrameFor( CharacterWindow.GetCourtOwner )]"
  436.                         tooltip = "[Character.GetDreadEffectTooltipFor( CharacterWindow.GetCourtOwner )]"
  437.                     }
  438.  
  439.                     blockoverride "opinion_text"
  440.                     {
  441.                         text = "[Character.GetOpinionOf( CharacterWindow.GetCourtOwner )|=]"
  442.                         fonttintcolor = "[Character.GetOpinionOfTint( CharacterWindow.GetCourtOwner )]"
  443.                     }
  444.  
  445.                     blockoverride "male_player_attraction"
  446.                     {
  447.                         datacontext = "[GetScriptedGui( 'male_attraction_gui' )]"
  448.                         visible = "[ScriptedGui.IsShown( GuiScope.SetRoot( GetPlayer.MakeScope ).AddScope('attracting_character', CharacterWindow.GetCourtOwner.MakeScope ).End )]"
  449.                         tooltip = "male_attraction_court_owner_gui_tooltip"
  450.                         text = "[GuiScope.SetRoot( GetPlayer.MakeScope ).AddScope('attracting_character', CharacterWindow.GetCourtOwner.MakeScope ).ScriptValue('sexuality_adjusted_physical_attraction_gui_value')|0]"
  451.                     }
  452.                    
  453.                     blockoverride "female_player_attraction"
  454.                     {
  455.                         datacontext = "[GetScriptedGui( 'female_attraction_gui' )]"
  456.                         visible = "[ScriptedGui.IsShown( GuiScope.SetRoot( GetPlayer.MakeScope ).AddScope('attracting_character', CharacterWindow.GetCourtOwner.MakeScope ).End )]"
  457.                         tooltip = "female_player_attraction_court_owner_gui_tooltip"
  458.                         text = "[GuiScope.SetRoot( GetPlayer.MakeScope ).AddScope('attracting_character', CharacterWindow.GetCourtOwner.MakeScope ).ScriptValue('sexuality_adjusted_physical_attraction_gui_value')|0]"
  459.                     }
  460.                    
  461.                     blockoverride "male_attraction"
  462.                     {
  463.                         datacontext = "[GetScriptedGui( 'male_attraction_gui' )]"
  464.                         visible = "[ScriptedGui.IsShown( GuiScope.SetRoot( CharacterWindow.GetCourtOwner.MakeScope ).AddScope('attracting_character', GetPlayer.MakeScope ).End )]"
  465.                         tooltip = "male_attraction_court_owner_gui_tooltip"
  466.                         text = "[GuiScope.SetRoot( CharacterWindow.GetCourtOwner.MakeScope ).AddScope('attracting_character', GetPlayer.MakeScope ).ScriptValue('sexuality_adjusted_physical_attraction_gui_value')|0]"
  467.                     }
  468.                    
  469.                     blockoverride "female_attraction"
  470.                     {
  471.                         datacontext = "[GetScriptedGui( 'female_attraction_gui' )]"
  472.                         visible = "[ScriptedGui.IsShown( GuiScope.SetRoot( CharacterWindow.GetCourtOwner.MakeScope ).AddScope('attracting_character', GetPlayer.MakeScope ).End )]"
  473.                         tooltip = "female_attraction_court_owner_gui_tooltip"
  474.                         text = "[GuiScope.SetRoot( CharacterWindow.GetCourtOwner.MakeScope ).AddScope('attracting_character', GetPlayer.MakeScope ).ScriptValue('sexuality_adjusted_physical_attraction_gui_value')|0]"
  475.                     }
  476.  
  477.                     blockoverride "ott_heading_text"
  478.                     {
  479.                         text = "[Character.GetOpinionHeadingText( CharacterWindow.GetCourtOwner )]"
  480.                     }
  481.  
  482.                     blockoverride "ott_opinion_value_text"
  483.                     {
  484.                         text = "[Character.GetOpinionOf( CharacterWindow.GetCourtOwner )|=]"
  485.                         fonttintcolor = "[Character.GetOpinionOfTint( CharacterWindow.GetCourtOwner )]"
  486.                     }
  487.  
  488.                     blockoverride "ott_opinion_breakdown_text"
  489.                     {
  490.                         text = "[Character.GetOpinionBreakdownText( CharacterWindow.GetCourtOwner )]"
  491.                     }
  492.                 }
  493.             }
  494.  
  495.             container = { # Player Heir for the local player
  496.                 name = "heir_player"
  497.                 datacontext = "[CharacterWindow.GetCharacter.GetPlayerHeir]"
  498.                 visible = "[And( Character.IsValid, CharacterWindow.GetCharacter.IsLocalPlayer )]"
  499.                 parentanchor = bottom|right
  500.                 position = { -20 -6 }
  501.  
  502.                 using = Animation_Character_Window_Refresh
  503.  
  504.                 portrait_head_small = {
  505.                     blockoverride "portrait_transformation"
  506.                     {
  507.                         portrait_scale = { -1 1 }
  508.                         portrait_offset = { 1 0 }
  509.                     }
  510.                 }
  511.  
  512.                 text_label_center = {
  513.                     parentanchor = top|hcenter
  514.                     position = { 0 85 }
  515.                     text = "[player_heir|E]"
  516.                     multiline = yes
  517.                     autoresize = yes
  518.                     max_width = 100
  519.                 }
  520.             }
  521.             container = { # Primary Heir for everyone else
  522.                 name = "heir_primary"
  523.                 datacontext = "[CharacterWindow.GetCharacter.GetPrimaryTitle.GetHeir]"
  524.                 visible = "[And( And( Character.IsValid, Not(CharacterWindow.GetCharacter.IsLocalPlayer) ), CharacterWindow.GetCharacter.IsAlive )]"
  525.                 parentanchor = bottom|right
  526.                 position = { -20 -6 }
  527.  
  528.                 using = Animation_Character_Window_Refresh
  529.  
  530.                 portrait_head_small = {
  531.                     blockoverride "portrait_transformation"
  532.                     {
  533.                         portrait_scale = { -1 1 }
  534.                         portrait_offset = { 1 0 }
  535.                     }
  536.                 }
  537.  
  538.                 text_label_center = {
  539.                     parentanchor = top|hcenter
  540.                     position = { 0 85 }
  541.                     text = "[primary_heir|E]"
  542.                 }
  543.             }
  544.  
  545.             ### DEBUG STUFF, please make sure those are visible and usable, especially the watch button, type "watch" into the console to show it
  546.             flowcontainer = {
  547.                 name = "debug_buttons"
  548.                 parentanchor = top|left
  549.                 position = { 200 20 }
  550.                 ignoreinvisible = yes
  551.  
  552.                 # Debug personality
  553.                 text_single = {
  554.                     visible = "[InDebugMode]"
  555.                     tooltip = "CHARACTER_AI_VALUES_DEBUG_TOOLTIP"
  556.                     text = "#D AIValue#!"
  557.                     align = nobaseline
  558.                 }
  559.  
  560.                 button = {
  561.                     using = editor_button
  562.                     name = "ai_watch_button"
  563.                     size = { 60 40 }
  564.                     text = "AI Watch"
  565.                     align = center|nobaseline
  566.                     onclick = "[CharacterWindow.OnAIWatch]"
  567.                     visible = "[AIWatchWindowsEnabled]"
  568.                     fontcolor = { 1.0 1.0 1.0 1.0 }
  569.                 }
  570.  
  571.                 watch_window_button = {
  572.                     size = { 60 40 }
  573.                     onclick = "[AddWatchWindow( CharacterWindow.GetCharacter.MakeScope )]"
  574.                 }
  575.  
  576.                 button = {
  577.                     using = editor_button
  578.                     name = "copy_portrait_button"
  579.                     parentanchor = right
  580.                     size = { 60 40 }
  581.                     text = "portrait"
  582.                     align = center|nobaseline
  583.                     onclick = "[CharacterWindow.OnCopyPortrait]"
  584.                     visible = "[IsGameViewOpen('portrait_editor')]"
  585.                     fontcolor = { 1.0 1.0 1.0 1.0 }
  586.                 }
  587.             }
  588.  
  589.             flowcontainer = {
  590.                 parentanchor = bottom|left
  591.                 position = { 5 -5 }
  592.                 spacing = 5
  593.                 ignoreinvisible = yes
  594.                 direction = vertical
  595.  
  596.                 button_normal = {
  597.                     name = "open_kill_list"
  598.                     visible = "[Character.HasKillsKnownTo( GetPlayer )]"
  599.  
  600.                     size = { 35 35 }
  601.  
  602.                     datacontext = "[Character]"
  603.                     tooltip = "OPEN_KILL_LIST_TOOLTIP"
  604.                     using = tooltip_es
  605.  
  606.  
  607.                     icon = {
  608.                         texture = "gfx/interface/buttons/button_lifestyles_base.dds"
  609.                         size = { 100% 100% }
  610.                     }
  611.  
  612.                     button_kill_list = {
  613.                         onclick = "[ToggleGameViewData( 'kill_list', Character.GetID  )]"
  614.                         size = { 25 25 }
  615.                         parentanchor = center
  616.                        
  617.                         modify_texture = {
  618.                             texture = "gfx/interface/icons/focuses/hud_icon_mask.dds"
  619.                             blend_mode = alphamultiply
  620.                         }
  621.                     }
  622.                 }
  623.  
  624.                 container = {
  625.                     visible = "[Character.IsPlayer]"
  626.                     tooltip = "PLAYER_STRESS_TOOLTIP"
  627.                     using = tooltip_es
  628.  
  629.                     widget = {
  630.                         visible = "[Not(GreaterThanOrEqualTo_int32(GetPlayer.GetStressLevel, '(int32)3'))]"
  631.                         size = { 100% 100%}
  632.  
  633.                         using = Animation_ShowHide_Standard
  634.  
  635.                         background = {
  636.                             texture = "gfx/interface/component_masks/mask_fade_circle.dds"
  637.                             color = { 0.15 0.15 0.15 1 }
  638.                             margin = { 12 12 }
  639.                         }
  640.                     }
  641.  
  642.                     widget = {
  643.                         visible = "[GreaterThanOrEqualTo_int32(GetPlayer.GetStressLevel, '(int32)3')]"
  644.                         parentanchor = center
  645.                         size = { 180% 180% }
  646.                         using = Animation_ShowHide_Standard
  647.  
  648.                         icon = {
  649.                             size = { 100% 100% }
  650.                             texture = "gfx/interface/component_masks/mask_fade_circle.dds"
  651.                             using = Color_Red
  652.                             alpha = 0
  653.  
  654.                             state = {
  655.                                 name = a
  656.                                 next = b
  657.                                 trigger_on_create = yes
  658.                                 alpha = 0.5
  659.                                 duration = 0.4
  660.                                 using = Animation_Curve_Default
  661.                             }
  662.  
  663.                             state = {
  664.                                 name = b
  665.                                 next = a
  666.                                 alpha = 0
  667.                                 duration = 1
  668.                                 using = Animation_Curve_Default
  669.                             }
  670.                         }
  671.                     }
  672.  
  673.  
  674.                     icon = {
  675.                         parentanchor = vcenter
  676.                         size = { 35 35 }
  677.                         texture = "gfx/interface/icons/stress/icon_stress_level.dds"
  678.                         framesize = { 70 70 }
  679.                         frame = "[IntToFrameIndex( GetPlayer.GetStressLevel )]"
  680.  
  681.  
  682.                         modify_texture = {
  683.                             visible = "[GreaterThanOrEqualTo_int32(GetPlayer.GetStressLevel, '(int32)2')]"
  684.                             name = "glow"
  685.                             texture = "gfx/interface/colors/gold.dds"
  686.                             blend_mode = colordodge
  687.                             alpha = 0
  688.                         }
  689.  
  690.                         state = {
  691.                             name = a
  692.                             next = b
  693.                             duration = 0.4
  694.                             trigger_on_create = yes
  695.                             using = Animation_Curve_Default
  696.  
  697.                             modify_texture = {
  698.                                 name = "glow"
  699.                                 alpha = 0.3
  700.                             }
  701.                         }
  702.  
  703.                         state = {
  704.                             name = b
  705.                             next = a
  706.                             duration = 1
  707.                             using = Animation_Curve_Default
  708.  
  709.                             modify_texture = {
  710.                                 name = "glow"
  711.                                 alpha = 0
  712.                             }
  713.                         }
  714.                     }
  715.                 }
  716.  
  717.                 button_normal = {
  718.                     name = "open_focus_button"
  719.  
  720.                     size = { 35 35 }
  721.  
  722.                     visible = "[Or( Character.GetFocus.IsValid, Character.PlayerCanManageFocus )]"
  723.                     tooltip = "PLAYER_LIFESTYLE_TOOLTIP"
  724.                     using = tooltip_ne
  725.  
  726.  
  727.                     icon = {
  728.                         texture = "gfx/interface/buttons/button_lifestyles_base.dds"
  729.                         size = { 100% 100% }
  730.                     }
  731.  
  732.                     highlight_icon_lifestyle_focus = {
  733.                         size = { 100% 100% }
  734.                         texture = "[CharacterWindow.GetCharacter.GetFocus.GetIcon]"
  735.                         onclick = "[CharacterWindow.OnClickFocusButton]"
  736.                         enabled = "[CharacterWindow.CanClickFocusButton]"
  737.                         tooltip = "[CharacterWindow.GetFocusButtonTooltip]"
  738.  
  739.                         modify_texture = {
  740.                             texture = "gfx/interface/icons/focuses/hud_icon_mask.dds"
  741.                             blend_mode = alphamultiply
  742.                         }
  743.                     }
  744.                 }
  745.             }
  746.         }
  747.  
  748.         ############################
  749.         ### Character internal info
  750.         hbox = {
  751.             name = "character_info"
  752.             layoutpolicy_horizontal = expanding
  753.             margin = { 0 5 }
  754.             margin_left = 5
  755.  
  756.             background = {
  757.                 using = Background_Area_Dark
  758.                 margin_left = 5
  759.             }
  760.  
  761.             vbox = {
  762.                 layoutpolicy_horizontal = expanding
  763.  
  764.                 vbox = {
  765.                     name = "name_and_traits"
  766.                     layoutpolicy_horizontal = expanding
  767.  
  768.                     using = Animation_Character_Window_Refresh
  769.  
  770.                     vbox = {
  771.                         name = "name_and_physical_traits"
  772.                         layoutpolicy_horizontal = expanding
  773.  
  774.                         vbox = {
  775.                             name = "name_etc"
  776.                             layoutpolicy_horizontal = expanding
  777.  
  778.                             ## Name
  779.                             hbox = {
  780.                                 layoutpolicy_horizontal = expanding
  781.                                 margin = { 3 0 }
  782.                                 margin_top = 1
  783.  
  784.                                 text_single = {
  785.                                     name = "character_name"
  786.                                     text = "[Character.GetUINameNotMeNoTooltip], "
  787.                                     margin_left = 2
  788.                                     max_width = 400
  789.                                     fontsize = 20
  790.                                     fontsize_min = 14
  791.                                     align = nobaseline
  792.                                     default_format = "#medium"
  793.                                     tooltip = "[Character.GetUINameNotMeNoTooltip]"
  794.                                 }
  795.  
  796.                                 text_single = {
  797.                                     name = "character_age"
  798.                                     text = " [Character.GetAge]"
  799.                                     default_format = "#low"
  800.                                     tooltip = "[Character.GetDeathOrBirthDateInfo]"
  801.                                     fontsize = 20
  802.                                     align = nobaseline
  803.                                 }
  804.  
  805.                                 hbox = {
  806.                                     margin_left = 4
  807.                                     spacing = -3
  808.  
  809.                                     icon = {
  810.                                         visible = "[Not(Character.IsDeadAndValid)]"
  811.                                         size = { 23 23 }
  812.                                         framesize = { 60 60 }
  813.                                         frame = "[Character.GetHealthIconFrame]"
  814.                                         texture = "gfx/interface/icons/character_status/icon_health.dds"
  815.                                         tooltip = "[Character.GetHealthInfo]"
  816.                                     }
  817.                                 }
  818.  
  819.                                 # Carnalitas: lactation UI
  820.                                 hbox = {
  821.  
  822.                                     icon = {
  823.                                         datacontext = "[GetScriptedGui( 'carn_lactation_gui' )]"
  824.                                         visible = "[ScriptedGui.IsShown( GuiScope.SetRoot( Character.MakeScope ).End )]"
  825.                                         size = { 23 23 }
  826.                                         texture = "gfx/interface/icons/icon_carn_lactation_gui.dds"
  827.                                         tooltip = "carn_lactation_gui_tooltip"
  828.                                     }
  829.                                 }
  830.  
  831.                             expand = {}
  832.                         }
  833.                                 hbox = {
  834.                                     layoutpolicy_horizontal = expanding
  835.                                     margin = { 3 0 }
  836.                                     margin_top = 1
  837.  
  838.                                         text_single = {
  839.                                             name = "us_height"
  840.                                             datacontext = "[GetScriptedGui( 'us_height_gui' )]"
  841.                                             visible = "[ScriptedGui.IsShown( GuiScope.SetRoot( Character.MakeScope ).End )]"
  842.                                             margin_left = 0
  843.                                             text = "Height: [Character.Custom('GetHeight')]"
  844.                                             default_format = "#medium"
  845.                                             fontsize = 14
  846.                                             align = nobaseline
  847.                                             fontsize_min = 12
  848.                                             tooltip = "height_gui_tooltip"
  849.                                         }
  850.  
  851.                                         text_single = {
  852.                                             name = "metric_height"
  853.                                             datacontext = "[GetScriptedGui( 'metric_height_gui' )]"
  854.                                             visible = "[ScriptedGui.IsShown( GuiScope.SetRoot( Character.MakeScope ).End )]"
  855.                                             margin_left = 0
  856.                                             text = "Height: [GuiScope.SetRoot( Character.MakeScope ).ScriptValue('metric_height')|0] cm"
  857.                                             default_format = "#medium"
  858.                                             fontsize = 14
  859.                                             align = nobaseline
  860.                                             fontsize_min = 12
  861.                                             tooltip = "height_gui_tooltip"
  862.                                         }
  863.  
  864.                                         text_single = {
  865.                                             name = "weight"
  866.                                             visible = "[Character.IsAdult]"
  867.                                             margin_left = 2
  868.                                             text = "Weight: [GuiScope.SetRoot( Character.MakeScope ).ScriptValue('weight_lbs')|0] [Character.Custom('GetWeight')]"
  869.                                             default_format = "#medium"
  870.                                             fontsize = 14
  871.                                             align = nobaseline
  872.                                             fontsize_min = 12
  873.                                             tooltip = "total_weight_gui_tooltip"
  874.                                         }
  875.  
  876.                                         text_single = {
  877.                                             name = "child_weight"
  878.                                             visible = "[Not(Character.IsAdult)]"
  879.                                             margin_left = 2
  880.                                             text = "Weight: [GuiScope.SetRoot( Character.MakeScope ).ScriptValue('weight_lbs')|0] [Character.Custom('GetWeight')]"
  881.                                             default_format = "#medium"
  882.                                             fontsize = 14
  883.                                             align = nobaseline
  884.                                             fontsize_min = 12
  885.                                             tooltip = "total_weight_child_gui_tooltip"
  886.                                         }
  887.  
  888.                                         icon = {
  889.                                             datacontext = "[GetScriptedGui( 'breast_size_gui' )]"
  890.                                             visible = "[ScriptedGui.IsShown( GuiScope.SetRoot( Character.MakeScope ).End )]"
  891.                                             size = { 20 20 }
  892.                                             texture = "gfx/interface/icons/tits_gui.dds"
  893.                                             tooltip = "breast_size_gui_tooltip"
  894.                                         }
  895.  
  896.                                         icon = {
  897.                                             datacontext = "[GetScriptedGui( 'penis_size_gui' )]"
  898.                                             visible = "[ScriptedGui.IsShown( GuiScope.SetRoot( Character.MakeScope ).End )]"
  899.                                             size = { 20 20 }
  900.                                             texture = "gfx/interface/icons/dick_gui.dds"
  901.                                             tooltip = "penis_size_gui_tooltip"
  902.                                         }
  903.  
  904.                                         icon = {
  905.                                             datacontext = "[GetScriptedGui( 'penis_size_metric_gui' )]"
  906.                                             visible = "[ScriptedGui.IsShown( GuiScope.SetRoot( Character.MakeScope ).End )]"
  907.                                             size = { 20 20 }
  908.                                             texture = "gfx/interface/icons/dick_gui.dds"
  909.                                             tooltip = "penis_size_metric_gui_tooltip"
  910.                                         }
  911.  
  912.                                         icon = {
  913.                                             datacontext = "[GetScriptedGui( 'sex_details_gui' )]"
  914.                                             visible = "[ScriptedGui.IsShown( GuiScope.SetRoot( Character.MakeScope ).End )]"
  915.                                             size = { 20 20 }
  916.                                             texture = "gfx/interface/icons/desire_gui.dds"
  917.                                             tooltip = "sex_details_gui_tooltip"
  918.                                         }
  919.  
  920.                                         icon = {
  921.                                             datacontext = "[GetScriptedGui( 'ideal_male_gui' )]"
  922.                                             visible = "[ScriptedGui.IsShown( GuiScope.SetRoot( Character.MakeScope ).End )]"
  923.                                             size = { 20 20 }
  924.                                             texture = "gfx/interface/icons/ideal_male_gui2.dds"
  925.                                             tooltip = "ideal_male_gui_tooltip"
  926.                                         }
  927.  
  928.                                         icon = {
  929.                                             datacontext = "[GetScriptedGui( 'ideal_female_gui' )]"
  930.                                             visible = "[ScriptedGui.IsShown( GuiScope.SetRoot( Character.MakeScope ).End )]"
  931.                                             size = { 20 20 }
  932.                                             texture = "gfx/interface/icons/ideal_female_gui2.dds"
  933.                                             tooltip = "ideal_female_gui_tooltip"
  934.                                         }
  935.  
  936.                                     }
  937.  
  938.                                     expand = {}
  939.                                 }
  940.  
  941.                         hbox = {
  942.                             name = "AI_personality"
  943.                             layoutpolicy_horizontal = expanding
  944.                             margin = { 3 0 }
  945.                             spacing = 2
  946.  
  947.                             text_single = {
  948.                                 name = "character_relation_to_you"
  949.                                 max_width = 432
  950.                                 text = "[Character.GetCharacterRelationCombine( GetPlayer )]"
  951.                                 fontsize_min = 13
  952.                                 align = nobaseline
  953.                             }
  954.  
  955.                             icon = {
  956.                                 visible = "[Not(Character.IsFemale)]"
  957.                                 size = { 20 20 }
  958.                                 framesize = { 40 40 }
  959.                                 frame = "[Character.GetSexualityFrame]"
  960.                                 texture = "gfx/interface/icons/character_status/sexuality_icons_male.dds"
  961.                                 tooltip = "SEXUALITY_TT"
  962.                             }
  963.  
  964.                             icon = {
  965.                                 visible = "[Character.IsFemale]"
  966.                                 size = { 20 20 }
  967.                                 framesize = { 40 40 }
  968.                                 frame = "[Character.GetSexualityFrame]"
  969.                                 texture = "gfx/interface/icons/character_status/sexuality_icons_female.dds"
  970.                                 tooltip = "SEXUALITY_TT"
  971.                             }
  972.  
  973.                             # Carnalitas fetishes
  974.                             # I would have preferred to do this with a gridbox, but I can't figure out how to pass a list of arguments to the GUI
  975.                             icon = {
  976.                                 datacontext = "[GetScriptedGui( 'carn_fetish_gui' )]"
  977.                                 visible = "[ScriptedGui.IsShown( GuiScope.SetRoot( Character.MakeScope ).AddScope( 'player', GetPlayer.MakeScope ).End )]"
  978.                                 size = { 20 20 }
  979.                                 texture = "gfx/interface/icons/icon_carn_fetish_gui.dds"
  980.                                 tooltipwidget = {
  981.                                     container = {
  982.                                         using = GeneralTooltipSetup
  983.                                         alwaystransparent = no
  984.                                         widget = {
  985.                                             name = "background"
  986.                                             using = DefaultTooltipBackground
  987.                                             size = { 100% 100% }
  988.                                             alwaystransparent = no
  989.                                         }
  990.                                         vbox = {
  991.                                             margin = { 20 20 }
  992.                                             margin_top = 10
  993.                                             layoutpolicy_horizontal = expanding
  994.                                             alwaystransparent = no
  995.  
  996.                                             text_single = {
  997.                                                 layoutpolicy_horizontal = growing
  998.                                                 fonttintcolor = "[TooltipInfo.GetTintColor]"
  999.                                                 using = DefaultTooltipText
  1000.                                                 alwaystransparent = no
  1001.                                                 text = "carn_fetish_gui_title"
  1002.                                             }
  1003.  
  1004.                                             text_single = {
  1005.                                                 layoutpolicy_horizontal = growing
  1006.                                                 fonttintcolor = "[TooltipInfo.GetTintColor]"
  1007.                                                 using = DefaultTooltipText
  1008.                                                 alwaystransparent = no
  1009.                                                 datacontext = "[GetScriptedGui( 'carn_fetish_gui_list' )]"
  1010.                                                 visible = "[ScriptedGui.IsShown( GuiScope.SetRoot( Character.MakeScope ).End )]"
  1011.                                                 text = "[ScriptedGui.BuildTooltip( GuiScope.SetRoot( Character.MakeScope ).End ) ]"
  1012.                                             }
  1013.                                         }
  1014.                                     }
  1015.                                 }
  1016.                             }
  1017.                            
  1018.                             expand = {}
  1019.                         }
  1020.                     }
  1021.  
  1022.                     ## Traits
  1023.                     hbox = {
  1024.                         name = "tutorial_highlight_traits"
  1025.                         layoutpolicy_horizontal = expanding
  1026.                         margin_bottom = 2
  1027.  
  1028.                         widget = {
  1029.                             layoutpolicy_horizontal = expanding
  1030.                             size = { 0 55 }
  1031.  
  1032.                             hbox = {
  1033.                                 name = "3_personality_traits"
  1034.                                 visible = "[LessThanOrEqualTo_int32(GetDataModelSize(CharacterWindow.GetPersonalityTraits), '(int32)3')]"
  1035.  
  1036.                                 fixedgridbox = {
  1037.                                     name = "personality_traits"
  1038.                                     datamodel = "[CharacterWindow.GetPersonalityTraits]"
  1039.                                     flipdirection = yes
  1040.                                     addcolumn = 54
  1041.                                     addrow = 55
  1042.                                     maxhorizontalslots = 3
  1043.  
  1044.                                     item = {
  1045.                                         icon_trait = {
  1046.                                             blockoverride "icon_size"
  1047.                                             {
  1048.                                                 size = { 55 55 }
  1049.                                             }
  1050.                                         }
  1051.                                     }
  1052.                                 }
  1053.                                 #### Changed by Zing ####
  1054.                                 # margin from 5 to 2
  1055.                                 #################
  1056.                                 hbox = {
  1057.                                     visible = "[Not(IsDataModelEmpty( CharacterWindow.GetTraits ))]"
  1058.                                     layoutpolicy_vertical = expanding
  1059.                                     margin = { 2 10 }
  1060.  
  1061.                                     divider_light = {
  1062.                                         layoutpolicy_vertical = expanding
  1063.                                     }
  1064.                                 }
  1065.  
  1066.                                 #### Changed by Zing ####
  1067.                                 # Adjusted to fit 6 icons comfortably
  1068.                                 #################
  1069.                                 fixedgridbox = {
  1070.                                     name = "traits_big"
  1071.                                     datamodel = "[CharacterWindow.GetTraits]"
  1072.                                     visible = "[LessThanOrEqualTo_int32(GetDataModelSize(CharacterWindow.GetTraits), '(int32)6')]"
  1073.                                     flipdirection = yes
  1074.                                     addcolumn = 48
  1075.                                     addrow = 55
  1076.                                     maxhorizontalslots = 6
  1077.                                     maxverticalslots = 1
  1078.  
  1079.                                     item = {
  1080.                                         icon_trait = {
  1081.                                             blockoverride "icon_size"
  1082.                                             {
  1083.                                                 size = { 55 55 }
  1084.                                             }
  1085.                                         }
  1086.                                     }
  1087.                                 }
  1088.                                 #### Changed by Zing ####
  1089.                                 # Slightly increased size of the icons to reduce wasted space
  1090.                                 #################
  1091.                                 fixedgridbox = {
  1092.                                     name = "traits_medium"
  1093.                                     datamodel = "[CharacterWindow.GetTraits]"
  1094.                                     visible = "[And(GreaterThan_int32(GetDataModelSize(CharacterWindow.GetTraits), '(int32)6'), LessThanOrEqualTo_int32(GetDataModelSize(CharacterWindow.GetTraits), '(int32)7'))]"
  1095.                                     flipdirection = yes
  1096.                                     addcolumn = 41.2
  1097.                                     addrow = 54
  1098.                                     maxhorizontalslots = 7
  1099.                                     maxverticalslots = 1
  1100.  
  1101.                                     item = {
  1102.                                         icon_trait = {
  1103.                                             blockoverride "icon_size"
  1104.                                             {
  1105.                                                 size = { 50 50 }
  1106.                                             }
  1107.  
  1108.                                             blockoverride "glow_radius"
  1109.                                             {
  1110.                                                 glow_radius = 4
  1111.                                             }
  1112.                                         }
  1113.                                     }
  1114.                                 }
  1115.  
  1116.                                 #### NEW by Zing ####
  1117.                                 # 1 row 8 icons, smaller size to make transition to 10 icons more gradual
  1118.                                 #############
  1119.                                 fixedgridbox = {
  1120.                                     name = "traits_medium_8_icons_step"
  1121.                                     datamodel = "[CharacterWindow.GetTraits]"
  1122.                                     visible = "[And(GreaterThan_int32(GetDataModelSize(CharacterWindow.GetTraits), '(int32)7'), LessThanOrEqualTo_int32(GetDataModelSize(CharacterWindow.GetTraits), '(int32)8'))]"
  1123.                                     flipdirection = yes
  1124.                                     addcolumn = 36.1
  1125.                                     addrow = 54
  1126.                                     maxhorizontalslots = 8
  1127.                                     maxverticalslots = 1
  1128.  
  1129.                                     item = {
  1130.                                         icon_trait = {
  1131.                                             blockoverride "icon_size"
  1132.                                             {
  1133.                                                 size = { 44 44 }
  1134.                                             }
  1135.                                            
  1136.                                             blockoverride "glow_radius"
  1137.                                             {
  1138.                                                 glow_radius = 4
  1139.                                             }
  1140.                                         }
  1141.                                     }
  1142.                                 }
  1143.  
  1144.                                 #### NEW by Zing ####
  1145.                                 # 1 row 9 icons, smaller size to make transition to 10 icons more gradual
  1146.                                 #############
  1147.                                 fixedgridbox = {
  1148.                                     name = "traits_medium_9_icons_step"
  1149.                                     datamodel = "[CharacterWindow.GetTraits]"
  1150.                                     visible = "[And(GreaterThan_int32(GetDataModelSize(CharacterWindow.GetTraits), '(int32)8'), LessThanOrEqualTo_int32(GetDataModelSize(CharacterWindow.GetTraits), '(int32)9'))]"
  1151.                                     flipdirection = yes
  1152.                                     addcolumn = 32.2
  1153.                                     addrow = 54
  1154.                                     maxhorizontalslots = 9
  1155.                                     maxverticalslots = 1
  1156.  
  1157.                                     item = {
  1158.                                         icon_trait = {
  1159.                                             blockoverride "icon_size"
  1160.                                             {
  1161.                                                 size = { 39 39 }
  1162.                                             }
  1163.                                            
  1164.                                             blockoverride "glow_radius"
  1165.                                             {
  1166.                                                 glow_radius = 3
  1167.                                             }
  1168.                                         }
  1169.                                     }
  1170.                                 }
  1171.  
  1172.                                 #### Changed by Zing ####
  1173.                                 # 1 row 10 icons, made size of icons slightly bigger for better visibility and reduced space between them
  1174.                                 #################
  1175.                                 fixedgridbox = {
  1176.                                     name = "traits_small"
  1177.                                     datamodel = "[CharacterWindow.GetTraits]"
  1178.                                     visible = "[And(GreaterThan_int32(GetDataModelSize(CharacterWindow.GetTraits), '(int32)9'), LessThanOrEqualTo_int32(GetDataModelSize(CharacterWindow.GetTraits), '(int32)10'))]"
  1179.                                     flipdirection = yes
  1180.                                     addcolumn = 29
  1181.                                     addrow = 54
  1182.                                     maxhorizontalslots = 10
  1183.                                     maxverticalslots = 1
  1184.  
  1185.                                     item = {
  1186.                                         icon_trait = {
  1187.                                             blockoverride "icon_size"
  1188.                                             {
  1189.                                                 size = { 35 35 }
  1190.                                             }
  1191.  
  1192.                                             blockoverride "glow_radius"
  1193.                                             {
  1194.                                                 glow_radius = 2
  1195.                                             }
  1196.                                         }
  1197.                                     }
  1198.                                 }
  1199.  
  1200.                                 #### Changed by Zing ####
  1201.                                 # 1 row 11 icons, made size of icons slightly bigger for better visibility and reduced space between them
  1202.                                 #################
  1203.                                 fixedgridbox = {
  1204.                                     name = "traits_small_last_step"
  1205.                                     datamodel = "[CharacterWindow.GetTraits]"
  1206.                                     visible = "[And(GreaterThan_int32(GetDataModelSize(CharacterWindow.GetTraits), '(int32)10'), LessThanOrEqualTo_int32(GetDataModelSize(CharacterWindow.GetTraits), '(int32)11'))]"
  1207.                                     flipdirection = yes
  1208.                                     addcolumn = 26.3
  1209.                                     addrow = 54
  1210.                                     maxhorizontalslots = 11
  1211.                                     maxverticalslots = 1
  1212.  
  1213.                                     item = {
  1214.                                         icon_trait = {
  1215.                                             blockoverride "icon_size"
  1216.                                             {
  1217.                                                 size = { 32 32 }
  1218.                                             }
  1219.  
  1220.                                             blockoverride "glow_radius"
  1221.                                             {
  1222.                                                 glow_radius = 2
  1223.                                             }
  1224.                                         }
  1225.                                     }
  1226.                                 }
  1227.  
  1228.                                 #### Changed by Zing ####
  1229.                                 # added extra traits to fill out some of the blank spacethe space
  1230.                                 # changed visibility condition to display this preset between 10 and 24 traits
  1231.                                 # Now traits_tiny will display up to 24 traits at once
  1232.                                 #################
  1233.                                 fixedgridbox = {
  1234.                                     name = "traits_tiny"
  1235.                                     datamodel = "[CharacterWindow.GetTraits]"
  1236.                                     #visible = "[GreaterThan_int32(GetDataModelSize(CharacterWindow.GetTraits), '(int32)10')]"
  1237.                                     visible = "[And(GreaterThan_int32(GetDataModelSize(CharacterWindow.GetTraits), '(int32)11'), LessThanOrEqualTo_int32(GetDataModelSize(CharacterWindow.GetTraits), '(int32)22'))]"
  1238.                                     flipdirection = yes
  1239.                                     addcolumn = 26.5
  1240.                                     addrow = 27
  1241.                                     maxhorizontalslots = 11
  1242.                                     datamodel_wrap = 11
  1243.                                     maxverticalslots = 2
  1244.                                    
  1245.                                     item = {
  1246.                                         icon_trait = {
  1247.                                             blockoverride "icon_size"
  1248.                                             {
  1249.                                                 size = { 31 31 }
  1250.                                             }
  1251.  
  1252.                                             blockoverride "glow_radius"
  1253.                                             {
  1254.                                                 glow_radius = 2
  1255.                                             }
  1256.                                         }
  1257.                                     }
  1258.                                 }
  1259.  
  1260.                                 #### Changed by Zing ####
  1261.                                 # Adjusted scrollbox to fit 11 icons per row
  1262.                                 # Fixed misaligned spaces and made it look overall nicer.
  1263.                                 #################
  1264.                                 scrollbox = {
  1265.                                     name = "traits_scroller_smoll"
  1266.                                     visible = "[GreaterThan_int32(GetDataModelSize(CharacterWindow.GetTraits), '(int32)22')]"
  1267.                                     size = { 0 54 }
  1268.                                     layoutpolicy_vertical = fixed
  1269.                                     layoutpolicy_horizontal = expanding
  1270.                                     scrollbarpolicy_vertical = as_needed
  1271.                                     blockoverride "scrollbox_margins"
  1272.                                     {
  1273.                                         margin = { 0 0 }
  1274.                                         margin_right = 25
  1275.                                     }
  1276.                                    
  1277.                                     using = Animation_Tab_Switch
  1278.                                     blockoverride "scrollbox_content"
  1279.                                     {
  1280.                                         spacing = 2
  1281.                                         fixedgridbox = {
  1282.                                             name = "traits_tiny_showmoretraits_smoll"
  1283.                                             datamodel = "[CharacterWindow.GetTraits]"
  1284.                                             visible = "[GreaterThan_int32(GetDataModelSize(CharacterWindow.GetTraits), '(int32)22')]"
  1285.                                             flipdirection = yes
  1286.                                             addcolumn = 25.5
  1287.                                             addrow = 27
  1288.                                             maxhorizontalslots = 11
  1289.                                             datamodel_wrap = 11
  1290.  
  1291.                                             item = {
  1292.                                                 icon_trait = {
  1293.                                                     blockoverride "icon_size"
  1294.                                                     {
  1295.                                                         size = { 30 30 }
  1296.                                                     }
  1297.  
  1298.                                                     blockoverride "glow_radius"
  1299.                                                     {
  1300.                                                         glow_radius = 2
  1301.                                                     }
  1302.                                                 }
  1303.                                             }
  1304.                                         }
  1305.                                     }
  1306.                                 }
  1307.  
  1308.                                 expand = {}
  1309.                             }
  1310.  
  1311.                             hbox = {
  1312.                                 name = "4_personality_traits"
  1313.                                 visible = "[GreaterThan_int32(GetDataModelSize(CharacterWindow.GetPersonalityTraits), '(int32)3')]"
  1314.  
  1315.                                 fixedgridbox = {
  1316.                                     name = "personality_traits"
  1317.                                     datamodel = "[CharacterWindow.GetPersonalityTraits]"
  1318.                                     flipdirection = yes
  1319.                                     addcolumn = 54
  1320.                                     addrow = 55
  1321.                                     maxhorizontalslots = 4
  1322.  
  1323.                                     item = {
  1324.                                             icon_trait = {
  1325.                                                 blockoverride "icon_size"
  1326.                                                 {
  1327.                                                     size = { 55 55 }
  1328.                                                 }
  1329.                                         }
  1330.                                     }
  1331.                                 }
  1332.                                
  1333.                                 #### Changed by Zing ####
  1334.                                 # margin from 5 to 2
  1335.                                 #################
  1336.                                 hbox = {
  1337.                                     visible = "[Not(IsDataModelEmpty( CharacterWindow.GetTraits ))]"
  1338.                                     layoutpolicy_vertical = expanding
  1339.                                     margin = { 2 10 }
  1340.  
  1341.                                     divider_light = {
  1342.                                         layoutpolicy_vertical = expanding
  1343.                                     }
  1344.                                 }
  1345.  
  1346.                                 #### Changed by Zing ####
  1347.                                 # maxhorizontalslots from 5 to 4, the extra slot did not appear to serve any purpose anyway
  1348.                                 #################
  1349.                                 fixedgridbox = {
  1350.                                     name = "traits_big"
  1351.                                     datamodel = "[CharacterWindow.GetTraits]"
  1352.                                     visible = "[LessThanOrEqualTo_int32(GetDataModelSize(CharacterWindow.GetTraits), '(int32)5')]"
  1353.                                     flipdirection = yes
  1354.                                     addcolumn = 46
  1355.                                     addrow = 54
  1356.                                     maxhorizontalslots = 5
  1357.                                     maxverticalslots = 1
  1358.  
  1359.                                     item = {
  1360.                                         icon_trait = {
  1361.                                             blockoverride "icon_size"
  1362.                                             {
  1363.                                                 size = { 55 55 }
  1364.                                             }
  1365.                                         }
  1366.                                     }
  1367.                                 }
  1368.  
  1369.                                 #### Changed by Zing ####
  1370.                                 # REduced to fit 6 icons perfectly
  1371.                                 #################
  1372.                                 fixedgridbox = {
  1373.                                     name = "traits_medium"
  1374.                                     datamodel = "[CharacterWindow.GetTraits]"
  1375.                                     visible = "[And(GreaterThan_int32(GetDataModelSize(CharacterWindow.GetTraits), '(int32)5'), LessThanOrEqualTo_int32(GetDataModelSize(CharacterWindow.GetTraits), '(int32)6'))]"
  1376.                                     flipdirection = yes
  1377.                                     addcolumn = 39
  1378.                                     addrow = 54
  1379.                                     maxhorizontalslots = 6
  1380.                                     maxverticalslots = 1
  1381.  
  1382.                                     item = {
  1383.                                         icon_trait = {
  1384.                                             blockoverride "icon_size"
  1385.                                             {
  1386.                                                 size = { 48 48 }
  1387.                                             }
  1388.  
  1389.                                                 blockoverride "glow_radius"
  1390.                                                 {
  1391.                                                     glow_radius = 4
  1392.                                             }
  1393.                                         }
  1394.                                     }
  1395.                                 }
  1396.  
  1397.                                 ### NEW ####
  1398.                                 # 1 row 8 icons, smaller size to make transition to 10 icons more gradual
  1399.                                 ###########
  1400.                                 fixedgridbox = {
  1401.                                     name = "traits_medium_8_icons_step"
  1402.                                     datamodel = "[CharacterWindow.GetTraits]"
  1403.                                     visible = "[And(GreaterThan_int32(GetDataModelSize(CharacterWindow.GetTraits), '(int32)6'), LessThanOrEqualTo_int32(GetDataModelSize(CharacterWindow.GetTraits), '(int32)8'))]"
  1404.                                     flipdirection = yes
  1405.                                     addcolumn = 29.4
  1406.                                     addrow = 52
  1407.                                     maxhorizontalslots = 8
  1408.                                     maxverticalslots = 1
  1409.  
  1410.                                     item = {
  1411.                                         icon_trait = {
  1412.                                             blockoverride "icon_size"
  1413.                                             {
  1414.                                                 size = { 37 37 }
  1415.                                             }
  1416.  
  1417.                                             blockoverride "glow_radius"
  1418.                                             {
  1419.                                                 glow_radius = 3
  1420.                                             }
  1421.                                         }
  1422.                                     }
  1423.                                 }
  1424.  
  1425.                                 #### Changed by Zing ####
  1426.                                 # Changed to fit 10 slightly smaller icons in one row
  1427.                                 #################
  1428.                                 fixedgridbox = {
  1429.                                     name = "traits_small"
  1430.                                     datamodel = "[CharacterWindow.GetTraits]"
  1431.                                     visible = "[And(GreaterThan_int32(GetDataModelSize(CharacterWindow.GetTraits), '(int32)8'), LessThanOrEqualTo_int32(GetDataModelSize(CharacterWindow.GetTraits), '(int32)10'))]"
  1432.                                     flipdirection = yes
  1433.                                     addcolumn = 23.8
  1434.                                     addrow = 52
  1435.                                     maxhorizontalslots = 10
  1436.                                     maxverticalslots = 1
  1437.  
  1438.                                     item = {
  1439.                                         icon_trait = {
  1440.                                             blockoverride "icon_size"
  1441.                                             {
  1442.                                                 size = { 28 28 }
  1443.                                             }
  1444.  
  1445.                                                 blockoverride "glow_radius"
  1446.                                                 {
  1447.                                                     glow_radius = 2
  1448.                                             }
  1449.                                         }
  1450.                                     }
  1451.                                 }
  1452.  
  1453.                                 #### Changed by Zing ####
  1454.                                 # added extra traits to make the row more compact, both rows row will display 10 traits each
  1455.                                 # For a total of 20 traits at once
  1456.                                 #################
  1457.                                 fixedgridbox = {
  1458.                                     name = "traits_tiny"
  1459.                                     datamodel = "[CharacterWindow.GetTraits]"
  1460.                                     #visible = "[GreaterThan_int32(GetDataModelSize(CharacterWindow.GetTraits), '(int32)8')]"
  1461.                                     visible = "[And(GreaterThan_int32(GetDataModelSize(CharacterWindow.GetTraits), '(int32)10'), LessThanOrEqualTo_int32(GetDataModelSize(CharacterWindow.GetTraits), '(int32)20'))]"
  1462.                                     flipdirection = yes
  1463.                                     addcolumn = 23.8
  1464.                                     addrow = 26
  1465.                                     maxhorizontalslots = 10
  1466.                                     datamodel_wrap = 10
  1467.                                     maxverticalslots = 2
  1468.  
  1469.                                     item = {
  1470.                                         icon_trait = {
  1471.                                             blockoverride "icon_size"
  1472.                                             {
  1473.                                                 size = { 28 28 }
  1474.                                             }
  1475.  
  1476.                                             blockoverride "glow_radius"
  1477.                                             {
  1478.                                                 glow_radius = 2
  1479.                                             }
  1480.                                         }
  1481.                                     }
  1482.                                 }
  1483.  
  1484.                                 #### Changed by Zing ####
  1485.                                 # Fixed up scrollbox to be pretier
  1486.                                 #################
  1487.                                 scrollbox = {
  1488.                                     name = "traits_scroller"
  1489.                                     visible = "[GreaterThan_int32(GetDataModelSize(CharacterWindow.GetTraits), '(int32)20')]"
  1490.                                     size = { 0 55 }
  1491.                                     layoutpolicy_vertical = fixed
  1492.                                     layoutpolicy_horizontal = expanding
  1493.                                     scrollbarpolicy_vertical = as_needed
  1494.                                     blockoverride "scrollbox_margins"
  1495.                                     {
  1496.                                         margin = { 0 0 }
  1497.                                         margin_right = 25
  1498.                                     }
  1499.                                     using = Animation_Tab_Switch
  1500.                                     blockoverride "scrollbox_content"
  1501.                                     {
  1502.                                         spacing = 2
  1503.                                         fixedgridbox = {
  1504.                                             name = "traits_tiny_showmoretraits"
  1505.                                             datamodel = "[CharacterWindow.GetTraits]"
  1506.                                             visible = "[GreaterThan_int32(GetDataModelSize(CharacterWindow.GetTraits), '(int32)20')]"
  1507.                                             flipdirection = yes
  1508.                                             addcolumn = 25
  1509.                                             addrow = 26
  1510.                                             maxhorizontalslots = 9
  1511.                                             datamodel_wrap = 9
  1512.  
  1513.                                             item = {
  1514.                                                 icon_trait = {
  1515.                                                     blockoverride "icon_size"
  1516.                                                     {
  1517.                                                         size = { 30 30 }
  1518.                                                     }
  1519.  
  1520.                                                     blockoverride "glow_radius"
  1521.                                                     {
  1522.                                                     glow_radius = 2
  1523.                                                     }
  1524.                                                 }
  1525.                                             }
  1526.                                         }
  1527.                                     }
  1528.                                 }
  1529.  
  1530.                                 expand = {}
  1531.                             }
  1532.                         }
  1533.  
  1534.                         expand = {}
  1535.                     }
  1536.                 }
  1537.  
  1538.                 divider_light = {
  1539.                     layoutpolicy_horizontal = expanding
  1540.                 }
  1541.  
  1542.                 ## Skills, Culture, Religion
  1543.                 hbox = {
  1544.                     name = "skills_culture_religion"
  1545.                     layoutpolicy_horizontal = expanding
  1546.  
  1547.                     background = {
  1548.                         using = Background_Area
  1549.                     }
  1550.  
  1551.                     hbox = {
  1552.                         name = "tutorial_highlight_skills"
  1553.  
  1554.                         hbox = {
  1555.                             name = "skills_grid"
  1556.                             datamodel = "[CharacterWindow.GetSkills]"
  1557.                             margin = { 2 0 }
  1558.  
  1559.                             using = Animation_Character_Window_Refresh
  1560.  
  1561.                             item = {
  1562.                                 vbox = {
  1563.                                     tooltip = "SKILL_ITEM_TOOLTIP"
  1564.                                     using = tooltip_ne
  1565.                                     spacing = -3
  1566.  
  1567.                                     icon = {
  1568.                                         name = "skill_icon"
  1569.                                         size = { 32 32 }
  1570.                                         framesize = { 60 60 }
  1571.                                         frame = "[SkillItem.GetFrame]"
  1572.                                         texture = "gfx/interface/icons/icon_skills.dds"
  1573.                                     }
  1574.  
  1575.                                     text_single = {
  1576.                                         name = "skill_value"
  1577.                                         text = "[SkillItem.GetValue]"
  1578.                                         default_format = "#high"
  1579.                                         align = nobaseline
  1580.  
  1581.                                         background = {
  1582.                                             name = "skill_icon_bg"
  1583.                                             texture = "gfx/interface/window_character/character_view_skills_bg.dds"
  1584.                                             frame = "[SkillItem.GetFrame]"
  1585.                                             framesize = { 70 26 }
  1586.                                             margin = { 10 0 }
  1587.                                         }
  1588.                                     }
  1589.                                 }
  1590.                             }
  1591.                         }
  1592.  
  1593.                         spacer = {
  1594.                             size = { 10 0 }
  1595.                         }
  1596.  
  1597.                         vbox = {
  1598.                             tooltip = "[CharacterWindow.GetCharacter.GetProwessBreakdown]"
  1599.                             spacing = -3
  1600.  
  1601.                             using = Animation_Character_Window_Refresh
  1602.  
  1603.                             icon = {
  1604.                                 name = "prowess_icon"
  1605.                                 size = { 32 32 }
  1606.                                 texture = "gfx/interface/icons/icon_prowess.dds"
  1607.                             }
  1608.  
  1609.                             text_single = {
  1610.                                 name = "prowess_value"
  1611.                                 text = "[CharacterWindow.GetCharacter.GetProwess|0]"
  1612.                                 align = nobaseline
  1613.                             }
  1614.                         }
  1615.  
  1616.                         divider_light = {
  1617.                             layoutpolicy_vertical = expanding
  1618.                         }
  1619.  
  1620.                         spacer = {
  1621.                             size = { 5 5 }
  1622.                         }
  1623.                     }
  1624.  
  1625.                     hbox = {
  1626.                         name = "faith_and_culture"
  1627.                         layoutpolicy_horizontal = expanding
  1628.  
  1629.                         using = Animation_Character_Window_Refresh
  1630.  
  1631.                         button_religion_icon = {
  1632.                             name = "faith_button"
  1633.                             datacontext = "[Character.GetFaith]"
  1634.                             size = { 45 45 }
  1635.                         }
  1636.  
  1637.                         vbox = {
  1638.                             layoutpolicy_horizontal = expanding
  1639.  
  1640.                             button_standard_hover  = {
  1641.                                 datacontext = "[Character.GetFaith]"
  1642.                                 layoutpolicy_horizontal = expanding
  1643.                                 size = { 0 25 }
  1644.                                 onclick = "[DefaultOnFaithClick(Faith.GetID)]"
  1645.                                 text = "FAITH_CHARACTER_WINDOW"
  1646.                                 default_format = "#clickable;italic"
  1647.                                 align = left|nobaseline
  1648.                                 margin_left = 5
  1649.  
  1650.                                 tooltipwidget = { faith_tooltip_click = {} }
  1651.                             }
  1652.  
  1653.                             button_standard_hover = {
  1654.                                 datacontext = "[Character.GetCulture]"
  1655.                                 layoutpolicy_horizontal = expanding
  1656.                                 size = { 0 25 }
  1657.                                 onclick = "[DefaultOnCultureClick(Culture.GetID)]"
  1658.                                 text = "CULTURE_CHARACTER_WINDOW"
  1659.                                 default_format = "#clickable;italic"
  1660.                                 align = left|nobaseline
  1661.                                 margin_left = 5
  1662.  
  1663.                                 tooltipwidget = {
  1664.                                     culture_tooltip_click = {}
  1665.                                 }
  1666.                             }
  1667.                         }
  1668.                     }
  1669.  
  1670.                     vbox = {
  1671.                         layoutpolicy_vertical = expanding
  1672.                         margin = { 0 2 }
  1673.  
  1674.                         using = Animation_Character_Window_Refresh
  1675.  
  1676.                         fixedgridbox = {
  1677.                             name = "modifiers_grid"
  1678.                             datamodel = "[CharacterWindow.GetTimedModifiers]"
  1679.                             addcolumn = 25
  1680.                             addrow = 23
  1681.                             datamodel_wrap = 2
  1682.                             maxhorizontalslots = 5
  1683.  
  1684.                             item = {
  1685.                                 icon = {
  1686.                                     size = { 22 22 }
  1687.                                     alwaystransparent = no
  1688.                                     texture = "[ModifierItem.GetIcon]"
  1689.                                     tooltip = "[ModifierItem.GetTooltip]"
  1690.                                 }
  1691.                             }
  1692.                         }
  1693.  
  1694.                         expand = {}
  1695.                     }
  1696.  
  1697.                     expand = {}
  1698.                 }
  1699.             }
  1700.  
  1701.             divider_light = {
  1702.                 layoutpolicy_vertical = expanding
  1703.             }
  1704.  
  1705.             ## House
  1706.             widget = {
  1707.                 name = "house"
  1708.                 datacontext = "[Character.GetHouse]"
  1709.                 layoutpolicy_vertical = expanding
  1710.                 size = { 125 0 }
  1711.  
  1712.                 using = Animation_Character_Window_Refresh
  1713.  
  1714.                 vbox = {
  1715.                     expand = {
  1716.                         maximumsize = { 0 5 }
  1717.                     }
  1718.  
  1719.                     coa_house_big = {
  1720.                         flowcontainer = {
  1721.                             name = "characters_status_in_house"
  1722.                             parentanchor = bottom|right
  1723.                             position = { -10 0 }
  1724.                             ignoreinvisible = yes
  1725.  
  1726.                             icon = {
  1727.                                 name = "bastard"
  1728.                                 visible = "[Not(Character.IsLegitimateMemberOfHouse)]"
  1729.                                 framesize = { 40 40 }
  1730.                                 frame = 4
  1731.                                 size = { 20 20 }
  1732.                                 texture = "gfx/interface/icons/portraits/relation.dds"
  1733.                                 tooltip = "CV_TT_BASTARD"
  1734.                             }
  1735.  
  1736.                             icon = {
  1737.                                 name = "head_icon"
  1738.                                 visible = "[LessThan_int32(Character.GetDynastyHeadRelationFrame('(bool)no'), '(int32)9')]"
  1739.                                 size = { 20 20 }
  1740.  
  1741.                                 texture = "gfx/interface/icons/portraits/relation.dds"
  1742.                                 framesize = { 40 40 }
  1743.                                 frame = "[Character.GetDynastyHeadRelationFrame('(bool)no')]"
  1744.                                 tooltip = "[Character.GetDynastyHeadTooltip]"
  1745.                             }
  1746.                         }
  1747.                     }
  1748.  
  1749.                     text_multi = {
  1750.                         autoresize = yes
  1751.                         maximumsize = { 118 50 }
  1752.                         text = "[DynastyHouse.GetBaseNameNoTooltip]"
  1753.                         default_format = "#high"
  1754.                         align = top|hcenter
  1755.                     }
  1756.  
  1757.                     text_multi = {
  1758.                         autoresize = yes
  1759.                         maximumsize = { 118 50 }
  1760.                         visible = "[Not(DynastyHouse.IsValid)]"
  1761.                         text = "[lowborn|E]"
  1762.                         default_format = "#high"
  1763.                         align = top|hcenter
  1764.                     }
  1765.  
  1766.                     expand = {}
  1767.                 }
  1768.             }
  1769.         }
  1770.  
  1771.         #########################
  1772.         ### Realm, external info
  1773.  
  1774.         widget = {
  1775.             datacontext = "[GetIllustration( 'character_location_exterior' )]"
  1776.             layoutpolicy_horizontal = expanding
  1777.             size = { 0 232 }
  1778.  
  1779.             background = {
  1780.                 using = Background_Bottom_Fade
  1781.                 margin_bottom = 3
  1782.                 alpha = 0.75
  1783.             }
  1784.  
  1785.             widget = {
  1786.                 size = { 100% 100% }
  1787.  
  1788.                 using = Animation_Character_Window_Refresh
  1789.  
  1790.                 background = {
  1791.                     texture = "[Illustration.GetTexture( Character.Self )]"
  1792.                     alpha = 0.35
  1793.                     fittype = centercrop
  1794.  
  1795.                     modify_texture = {
  1796.                         texture = "gfx/interface/component_masks/mask_fade_vertical_up.dds"
  1797.                         blend_mode = alphamultiply
  1798.                     }
  1799.  
  1800.                     using = Mask_Rough_Edges
  1801.                 }
  1802.             }
  1803.  
  1804.             hbox = {
  1805.                 name = "realm_info"
  1806.                 layoutpolicy_horizontal = expanding
  1807.  
  1808.                 vbox = {
  1809.                     #name = "realm_shield"
  1810.                     visible = "[Character.HasLandedTitles]"
  1811.                     layoutpolicy_vertical = expanding
  1812.                     spacing = 7
  1813.                     margin_bottom = 5
  1814.  
  1815.                     using = Animation_Character_Window_Refresh
  1816.  
  1817.                     coa_realm_medium_crown = {
  1818.                         datacontext = "[Character]"
  1819.  
  1820.                         blockoverride "coa_button"
  1821.                         {
  1822.                             name = "realm_shield"
  1823.                             tooltip = "[Character.GetDefaultRealmFlagTooltipPrimaryTitleClickInfo]"
  1824.                             onclick = "[DefaultOnCoatOfArmsClick(Character.GetPrimaryTitle.GetID)]"
  1825.                         }
  1826.                     }
  1827.  
  1828.                     vbox = {
  1829.                         datacontext = "[CharacterWindow.GetCharacter]"
  1830.                         visible = "[And( Not( Character.GetPrimaryTitle.HasFaction ), And( Character.HasLandedTitles, Character.IsAlive ) )]"
  1831.                         tooltip = "[Character.GetDomainLimitTooltip]"
  1832.                         spacing = -2
  1833.  
  1834.                         background = {
  1835.                             visible = "[GreaterThan_int32( Character.GetDomainSize, Character.GetDomainLimit )]"
  1836.                             using = Status_Bad
  1837.                         }
  1838.  
  1839.                         icon = {
  1840.                             name = "domain_icon"
  1841.                             size = { 30 30 }
  1842.                             texture = "gfx/interface/icons/icon_domain.dds"
  1843.                         }
  1844.  
  1845.                         text_single = {
  1846.                             name = "domain_limit"
  1847.                             text = "[Character.GetDomainSize]/[Character.GetDomainLimit]"
  1848.                             default_format = "#high"
  1849.                             align = center|nobaseline
  1850.                         }
  1851.                     }
  1852.  
  1853.                     expand = {}
  1854.  
  1855.                     flowcontainer = {
  1856.                         margin = { 3 2 }
  1857.                         ignoreinvisible = yes
  1858.  
  1859.                         background = {
  1860.                             using = Background_Area_Dark
  1861.                         }
  1862.  
  1863.                         flowcontainer = {
  1864.                             visible = "[Character.IsTheocraticLessee]"
  1865.                             tooltip = "CV_THEOCRACY_LESSEE_TOOLTIP"
  1866.                             spacing = -2
  1867.                             direction = vertical
  1868.  
  1869.                             icon = {
  1870.                                 name = "theocracy_lessee_info"
  1871.                                 texture = "gfx/interface/icons/icon_holding_church.dds"
  1872.                                 size = { 30 30 }
  1873.                             }
  1874.  
  1875.                             text_single = {
  1876.                                 name = "domain_limit"
  1877.                                 parentanchor = hcenter
  1878.                                 text = "[Character.GetNumTitlesFromTheocraticLease]"
  1879.                                 default_format = "#high"
  1880.                                 align = center|nobaseline
  1881.                             }
  1882.                         }
  1883.  
  1884.                         icon = {
  1885.                             name = "religious_head_info"
  1886.                             visible = "[Character.IsReligiousHead]"
  1887.                             size = { 30 30 }
  1888.                             texture = "gfx/interface/icons/icon_head_of_faith_income.dds"
  1889.                             tooltip = "CV_THEOCRACY_RELIGIOUS_HEAD_TOOLTIP"
  1890.                         }
  1891.                     }
  1892.                 }
  1893.  
  1894.                 vbox = {
  1895.                     layoutpolicy_horizontal = expanding
  1896.                     layoutpolicy_vertical = expanding
  1897.                     margin_left = 5
  1898.  
  1899.                     ## Realm name and stats
  1900.                     hbox = {
  1901.                         name = "name_and_stats"
  1902.                         layoutpolicy_horizontal = expanding
  1903.                         margin_right = 10
  1904.  
  1905.                         using = Animation_Character_Window_Refresh
  1906.  
  1907.                         vbox = {
  1908.                             visible = "[Not(Character.HasLandedTitles)]"
  1909.                             layoutpolicy_horizontal = expanding
  1910.                             margin = { 10 0 }
  1911.  
  1912.                             text_single = {
  1913.                                 name = "character_title"
  1914.                                 layoutpolicy_horizontal = expanding
  1915.                                 text = "CV_UNLANDED"
  1916.                                 using = Font_Size_Medium
  1917.                                 align = nobaseline
  1918.                             }
  1919.  
  1920.                             text_single = {
  1921.                                 name = "government_type"
  1922.                                 layoutpolicy_horizontal = expanding
  1923.                                 text = "[Character.GetLocationDesc]"
  1924.                                 default_format = "#low"
  1925.                                 format_override = { high medium }
  1926.                                 format_override = { V medium }
  1927.                                 align = nobaseline
  1928.                                 autoresize = no
  1929.                             }
  1930.                         }
  1931.  
  1932.                         vbox = {
  1933.                             visible = "[Character.HasLandedTitles]"
  1934.                             datacontext = "[Character.GetPrimaryTitle]"
  1935.                                 layoutpolicy_horizontal = expanding
  1936.                                
  1937.                             text_single = {
  1938.                                 name = "character_title"
  1939.                                 layoutpolicy_horizontal = expanding
  1940.                                 text = "[Title.GetNameNoTooltip|U]"
  1941.                                     autoresize = no
  1942.                                 max_width = 280
  1943.                                     default_format = "#low"
  1944.                                 using = Font_Size_Medium
  1945.                                 align = nobaseline
  1946.                                 fontsize_min = 14
  1947.                             }
  1948.  
  1949.                             text_single = {
  1950.                                 name = "faction"
  1951.                                 visible = "[Title.HasFaction]"
  1952.                                 layoutpolicy_horizontal = expanding
  1953.                                     autoresize = no
  1954.                                 text = "CV_CIVIL_WAR_FACTION"
  1955.                                 default_format = "#low"
  1956.                                 align = nobaseline
  1957.                                     fontsize_min = 14
  1958.                             }
  1959.  
  1960.                             text_single = {
  1961.                                 name = "government_type"
  1962.                                 visible = "[Not( Title.HasFaction )]"
  1963.                                 layoutpolicy_horizontal = expanding
  1964.                                 autoresize = no
  1965.                                 text = "CV_REALM_TYPE"
  1966.                                 default_format = "#low"
  1967.                                 align = nobaseline
  1968.                                 fontsize_min = 14
  1969.                             }
  1970.                         }
  1971.  
  1972.                         expand = {}
  1973.  
  1974.                         hbox = {
  1975.                             name = "stats"
  1976.                             spacing = 8
  1977.                             margin_bottom = 6
  1978.                             margin_top = 3
  1979.                             visible = "[Character.IsAlive]"
  1980.  
  1981.                             vbox = {
  1982.                                 visible = "[Character.HasLandedTitles]"
  1983.                                 spacing = -2
  1984.                                 min_width = 40
  1985.                                 tooltip = "[Character.GetDreadBreakdown]"
  1986.  
  1987.                                 icon = {
  1988.                                     name = "dread_icon"
  1989.                                     size = { 30 30 }
  1990.                                     texture = "gfx/interface/icons/icon_dread.dds"
  1991.                                 }
  1992.  
  1993.                                 text_single = {
  1994.                                     name = "total_dread"
  1995.                                     text = "[Character.GetDread|0]"
  1996.                                     default_format = "#high"
  1997.                                     align = center|nobaseline
  1998.                                     fontsize_min = 12
  1999.                                     max_width = 50
  2000.                                 }
  2001.                             }
  2002.  
  2003.                             vbox = {
  2004.                                 tooltip = "[Character.GetGoldTooltipWithBalance]"
  2005.                                 min_width = 40
  2006.                                 spacing = -2
  2007.  
  2008.                                 icon = {
  2009.                                     name = "icon_gold"
  2010.                                     size = { 30 30 }
  2011.                                     texture = "gfx/interface/icons/icon_gold.dds"
  2012.                                 }
  2013.  
  2014.                                 text_single = {
  2015.                                     name = "total_gold"
  2016.                                     text = "[Character.GetGold|0]"
  2017.                                     default_format = "#high"
  2018.                                     align = center|nobaseline
  2019.                                     fontsize_min = 12
  2020.                                     max_width = 50
  2021.                                 }
  2022.                             }
  2023.  
  2024.                             vbox = {
  2025.                                 tooltip = "[Character.GetPrestigeTooltipWithBalance]"
  2026.                                 min_width = 40
  2027.                                 spacing = -2
  2028.  
  2029.                                 icon = {
  2030.                                     name = "icon_prestige"
  2031.                                     size = { 30 30 }
  2032.                                     texture = "[Character.GetPrestigeLevelTexture]"
  2033.                                 }
  2034.  
  2035.                                 text_single = {
  2036.                                     name = "prestige"
  2037.                                     text = "[Character.GetPrestige|0]"
  2038.                                     default_format = "#high"
  2039.                                     align = center|nobaseline
  2040.                                     fontsize_min = 12
  2041.                                     max_width = 50
  2042.                                 }
  2043.                             }
  2044.  
  2045.                             vbox = {
  2046.                                 tooltip = "[Character.GetPietyTooltipWithBalance]"
  2047.                                 min_width = 40
  2048.                                 spacing = -2
  2049.  
  2050.                                 icon = {
  2051.                                     name = "icon_piety"
  2052.                                     size = { 30 30 }
  2053.                                     texture = "[Character.GetPietyLevelTexture]"
  2054.                                 }
  2055.  
  2056.                                 text_single = {
  2057.                                     name = "piety"
  2058.                                     text = "[Character.GetPiety|0]"
  2059.                                     default_format = "#high"
  2060.                                     align = center|nobaseline
  2061.                                     fontsize_min = 12
  2062.                                     max_width = 50
  2063.                                 }
  2064.                             }
  2065.  
  2066.                             spacer = {
  2067.                                 size = { 0 3 }
  2068.                             }
  2069.  
  2070.                             vbox = {
  2071.                                 visible = "[Character.HasLandedTitles]"
  2072.                                 tooltip = "[CharacterWindow.GetMilitaryStrengthTooltip]"
  2073.                                 spacing = -2
  2074.                                 min_width = 40
  2075.  
  2076.                                 background = {
  2077.                                     using = Background_Frame
  2078.                                     margin = { 10 5 }
  2079.                                     margin_bottom = 7
  2080.                                     alpha = 0.7
  2081.                                 }
  2082.  
  2083.                                 icon = {
  2084.                                     name = "icon_combat_strength"
  2085.                                     size = { 30 30 }
  2086.                                     texture = "gfx/interface/icons/icon_soldier.dds"
  2087.                                 }
  2088.  
  2089.                                 text_single = {
  2090.                                     name = "military_total_strength"
  2091.                                     text = "[CharacterWindow.GetCachedMilitaryStrengthText]"
  2092.                                     default_format = "#high"
  2093.                                     align = center|nobaseline
  2094.                                     fontsize_min = 12
  2095.                                     max_width = 80
  2096.  
  2097.                                     progressbar_standard = {
  2098.                                         name = "soldiers_max"
  2099.                                         parentanchor = bottom|hcenter
  2100.                                         position = { 0 5 }
  2101.                                         size = { 33 8 }
  2102.                                         min = 0
  2103.                                         max = "[IntToFloat(CharacterWindow.GetMaxSoldiers)]"
  2104.                                         value = "[IntToFloat(CharacterWindow.GetCurrentSoldiers)]"
  2105.                                     }
  2106.                                 }
  2107.                             }
  2108.                         }
  2109.                     }
  2110.  
  2111.                     divider = {
  2112.                         layoutpolicy_horizontal = expanding
  2113.                     }
  2114.  
  2115.                     vbox_titles_claims_box = {
  2116.                         visible = "[Not( Or( Character.GetPrimaryTitle.HasFaction, DataModelHasItems( CharacterWindow.GetDiplomacyItems )))]"
  2117.                         layoutpolicy_horizontal = expanding
  2118.                         layoutpolicy_vertical = expanding
  2119.                         margin_right = 3
  2120.  
  2121.                         using = Animation_Character_Window_Refresh
  2122.  
  2123.                         blockoverride "titles_extra_items"
  2124.                         {
  2125.                             visible = "[GreaterThan_int32(GetDataModelSize(CharacterWindow.GetTitles), '(int32)13' )]"
  2126.                             text = "[GetNumberAbove_int32( GetDataModelSize(CharacterWindow.GetTitles), '(int32)13' )|=]"
  2127.                         }
  2128.  
  2129.                         blockoverride "titles_max_slots"
  2130.                         {
  2131.                             datamodel_wrap = 13
  2132.                         }
  2133.  
  2134.                         blockoverride "claims_extra_items"
  2135.                         {
  2136.                             visible = "[GreaterThan_int32( GetDataModelSize(CharacterWindow.GetClaims), '(int32)13' )]"
  2137.                             text = "[GetNumberAbove_int32(GetDataModelSize(CharacterWindow.GetClaims), '(int32)13' )|=]"
  2138.                         }
  2139.  
  2140.                         blockoverride "claims_max_slots"
  2141.                         {
  2142.                             datamodel_wrap = 13
  2143.                         }
  2144.                     }
  2145.  
  2146.                     hbox = {
  2147.                         visible = "[DataModelHasItems( CharacterWindow.GetDiplomacyItems )]"
  2148.                         layoutpolicy_horizontal = expanding
  2149.                         layoutpolicy_vertical = expanding
  2150.                         margin_right = 2
  2151.  
  2152.                         vbox_titles_claims_box = {
  2153.                             visible = "[And( Not( Character.GetPrimaryTitle.HasFaction ), LessThanOrEqualTo_int32(GetDataModelSize(CharacterWindow.GetDiplomacyItems), '(int32)4'))]"
  2154.                             layoutpolicy_horizontal = expanding
  2155.                             layoutpolicy_vertical = expanding
  2156.  
  2157.                             using = Animation_Character_Window_Refresh
  2158.  
  2159.                             blockoverride "titles_extra_items"
  2160.                             {
  2161.                                 visible = "[GreaterThan_int32( GetDataModelSize(CharacterWindow.GetTitles), '(int32)10' )]"
  2162.                                 text = "[GetNumberAbove_int32( GetDataModelSize(CharacterWindow.GetTitles), '(int32)10' )|=]"
  2163.                             }
  2164.  
  2165.                             blockoverride "titles_max_slots"
  2166.                             {
  2167.                                 datamodel_wrap = 10
  2168.                             }
  2169.  
  2170.                             blockoverride "claims_extra_items"
  2171.                             {
  2172.                                 visible = "[GreaterThan_int32( GetDataModelSize(CharacterWindow.GetClaims), '(int32)10' )]"
  2173.                                 text = "[GetNumberAbove_int32(GetDataModelSize(CharacterWindow.GetClaims), '(int32)10' )|=]"
  2174.                             }
  2175.  
  2176.  
  2177.                             blockoverride "claims_max_slots"
  2178.                             {
  2179.                                 datamodel_wrap = 10
  2180.                             }
  2181.                         }
  2182.  
  2183.                         vbox_titles_claims_box = {
  2184.                             visible = "[And( Not( Character.GetPrimaryTitle.HasFaction ), And(GreaterThan_int32(GetDataModelSize(CharacterWindow.GetDiplomacyItems), '(int32)4'), LessThanOrEqualTo_int32(GetDataModelSize(CharacterWindow.GetDiplomacyItems), '(int32)6')))]"
  2185.                             layoutpolicy_horizontal = expanding
  2186.                             layoutpolicy_vertical = expanding
  2187.  
  2188.                             using = Animation_Character_Window_Refresh
  2189.  
  2190.                             blockoverride "titles_extra_items"
  2191.                             {
  2192.                                 visible = "[GreaterThan_int32( GetDataModelSize(CharacterWindow.GetTitles), '(int32)9' )]"
  2193.                                 text = "[GetNumberAbove_int32( GetDataModelSize(CharacterWindow.GetTitles), '(int32)9' )|=]"
  2194.                             }
  2195.  
  2196.                             blockoverride "titles_max_slots"
  2197.                             {
  2198.                                 datamodel_wrap = 9
  2199.                             }
  2200.  
  2201.                             blockoverride "claims_extra_items"
  2202.                             {
  2203.                                 visible = "[GreaterThan_int32( GetDataModelSize(CharacterWindow.GetClaims), '(int32)9' )]"
  2204.                                 text = "[GetNumberAbove_int32(GetDataModelSize(CharacterWindow.GetClaims), '(int32)9' )|=]"
  2205.                             }
  2206.  
  2207.                             blockoverride "claims_max_slots"
  2208.                             {
  2209.                                 datamodel_wrap = 9
  2210.                             }
  2211.                         }
  2212.  
  2213.                         vbox_titles_claims_box = {
  2214.                             visible = "[And( Not( Character.GetPrimaryTitle.HasFaction ), And(GreaterThan_int32(GetDataModelSize(CharacterWindow.GetDiplomacyItems), '(int32)6'), LessThanOrEqualTo_int32(GetDataModelSize(CharacterWindow.GetDiplomacyItems), '(int32)8')))]"
  2215.                             layoutpolicy_horizontal = expanding
  2216.                             layoutpolicy_vertical = expanding
  2217.  
  2218.                             using = Animation_Character_Window_Refresh
  2219.  
  2220.                             blockoverride "titles_extra_items"
  2221.                             {
  2222.                                 visible = "[GreaterThan_int32( GetDataModelSize(CharacterWindow.GetTitles), '(int32)8' )]"
  2223.                                 text = "[GetNumberAbove_int32( GetDataModelSize(CharacterWindow.GetTitles), '(int32)8' )|=]"
  2224.                             }
  2225.  
  2226.                             blockoverride "titles_max_slots"
  2227.                             {
  2228.                                 datamodel_wrap = 8
  2229.                             }
  2230.  
  2231.                             blockoverride "claims_extra_items"
  2232.                             {
  2233.                                 visible = "[GreaterThan_int32( GetDataModelSize(CharacterWindow.GetClaims), '(int32)8' )]"
  2234.                                 text = "[GetNumberAbove_int32(GetDataModelSize(CharacterWindow.GetClaims), '(int32)8' )|=]"
  2235.                             }
  2236.  
  2237.                             blockoverride "claims_max_slots"
  2238.                             {
  2239.                                 datamodel_wrap = 8
  2240.                             }
  2241.                         }
  2242.  
  2243.                         vbox_titles_claims_box = {
  2244.                             visible = "[And( Not( Character.GetPrimaryTitle.HasFaction ), GreaterThan_int32(GetDataModelSize(CharacterWindow.GetDiplomacyItems), '(int32)8'))]"
  2245.                             layoutpolicy_horizontal = expanding
  2246.                             layoutpolicy_vertical = expanding
  2247.  
  2248.                             using = Animation_Character_Window_Refresh
  2249.  
  2250.                             blockoverride "titles_extra_items"
  2251.                             {
  2252.                                 visible = "[GreaterThan_int32( GetDataModelSize(CharacterWindow.GetTitles), '(int32)7' )]"
  2253.                                 text = "[GetNumberAbove_int32( GetDataModelSize(CharacterWindow.GetTitles), '(int32)7' )|=]"
  2254.                             }
  2255.  
  2256.                             blockoverride "titles_max_slots"
  2257.                             {
  2258.                                 datamodel_wrap = 7
  2259.                             }
  2260.  
  2261.                             blockoverride "claims_extra_items"
  2262.                             {
  2263.                                 visible = "[GreaterThan_int32( GetDataModelSize(CharacterWindow.GetClaims), '(int32)7' )]"
  2264.                                 text = "[GetNumberAbove_int32(GetDataModelSize(CharacterWindow.GetClaims), '(int32)7' )|=]"
  2265.                             }
  2266.  
  2267.                             blockoverride "claims_max_slots"
  2268.                             {
  2269.                                 datamodel_wrap = 7
  2270.                             }
  2271.                         }
  2272.  
  2273.                         expand = {
  2274.                             layoutpolicy_horizontal = expanding
  2275.                             visible = "[Character.GetPrimaryTitle.HasFaction]"
  2276.                         }
  2277.  
  2278.                         divider = {
  2279.                             layoutpolicy_vertical = expanding
  2280.                         }
  2281.  
  2282.                         vbox_diplomacy_box = {
  2283.                             visible = "[And(Not(IsDataModelEmpty(CharacterWindow.GetDiplomacyItems)), LessThanOrEqualTo_int32(GetDataModelSize(CharacterWindow.GetDiplomacyItems), '(int32)4'))]"
  2284.                             layoutpolicy_vertical = expanding
  2285.  
  2286.                             using = Animation_Character_Window_Refresh
  2287.  
  2288.                             blockoverride "diplomacy_slots"
  2289.                             {
  2290.                                 maxverticalslots = 2
  2291.                                 maxhorizontalslots = 2
  2292.                                 datamodel_wrap = 2
  2293.                             }
  2294.                         }
  2295.  
  2296.                         vbox_diplomacy_box = {
  2297.                             visible = "[And(GreaterThan_int32(GetDataModelSize(CharacterWindow.GetDiplomacyItems), '(int32)4'), LessThanOrEqualTo_int32(GetDataModelSize(CharacterWindow.GetDiplomacyItems), '(int32)6'))]"
  2298.                             layoutpolicy_vertical = expanding
  2299.  
  2300.                             using = Animation_Character_Window_Refresh
  2301.  
  2302.                             blockoverride "diplomacy_slots"
  2303.                             {
  2304.                                 maxverticalslots = 2
  2305.                                 maxhorizontalslots = 3
  2306.                                 datamodel_wrap = 3
  2307.                             }
  2308.                         }
  2309.  
  2310.                         vbox_diplomacy_box = {
  2311.                             visible = "[And(GreaterThan_int32(GetDataModelSize(CharacterWindow.GetDiplomacyItems), '(int32)6'), LessThanOrEqualTo_int32(GetDataModelSize(CharacterWindow.GetDiplomacyItems), '(int32)8'))]"
  2312.                             layoutpolicy_vertical = expanding
  2313.  
  2314.                             using = Animation_Character_Window_Refresh
  2315.  
  2316.                             blockoverride "diplomacy_slots"
  2317.                             {
  2318.                                 maxverticalslots = 2
  2319.                                 maxhorizontalslots = 4
  2320.                                 datamodel_wrap = 4
  2321.                             }
  2322.                         }
  2323.  
  2324.                         vbox_diplomacy_box = {
  2325.                             visible = "[GreaterThan_int32(GetDataModelSize(CharacterWindow.GetDiplomacyItems), '(int32)8')]"
  2326.                             layoutpolicy_vertical = expanding
  2327.  
  2328.                             using = Animation_Character_Window_Refresh
  2329.  
  2330.                             blockoverride "diplomacy_extra_items"
  2331.                             {
  2332.                                 visible = "[GreaterThan_int32( GetDataModelSize(CharacterWindow.GetDiplomacyItems), '(int32)10' )]"
  2333.                                 text = "[GetNumberAbove_int32( GetDataModelSize(CharacterWindow.GetDiplomacyItems), '(int32)10' )|=]"
  2334.                             }
  2335.  
  2336.                             blockoverride "diplomacy_slots"
  2337.                             {
  2338.                                 maxverticalslots = 2
  2339.                                 maxhorizontalslots = 5
  2340.                                 datamodel_wrap = 5
  2341.                             }
  2342.                         }
  2343.  
  2344.                         expand = {}
  2345.                     }
  2346.  
  2347.                     expand = {}
  2348.                 }
  2349.             }
  2350.         }
  2351.  
  2352.         ######################################################
  2353.         ################### BOTTOM AREA ######################
  2354.         ######################################################
  2355.  
  2356.         ### TABS
  2357.         hbox = {
  2358.             name = "tabs"
  2359.             visible = "[CharacterWindow.AreNoneExpanded]"
  2360.             layoutpolicy_horizontal = expanding
  2361.  
  2362.             button_tab = {
  2363.                 name = "family_button"
  2364.                 datacontext = "[CharacterWindow.GetCharacter]"
  2365.                 layoutpolicy_horizontal = expanding
  2366.  
  2367.                 onclick = "[CharacterWindow.SetTab('family')]"
  2368.                 down = "[CharacterWindow.IsTabShown('family')]"
  2369.  
  2370.                 using = tooltip_above
  2371.  
  2372.                 hbox = {
  2373.                     text_single = {
  2374.                         layoutpolicy_horizontal = expanding
  2375.                         align = center
  2376.                         text = "CV_TAB_FAMILY"
  2377.                         default_format = "#low"
  2378.                     }
  2379.  
  2380.                     text_single = {
  2381.                         align = center
  2382.                         text = "[CharacterWindow.GetTabItemsCount('family')]"
  2383.                         default_format = "#low"
  2384.                         margin_right = 15
  2385.                         min_width = 30
  2386.  
  2387.                         using = Animation_Character_Window_Refresh
  2388.                     }
  2389.                 }
  2390.             }
  2391.  
  2392.             button_tab = {
  2393.                 name = "relations_button"
  2394.                 datacontext = "[CharacterWindow.GetCharacter]"
  2395.                 layoutpolicy_horizontal = expanding
  2396.  
  2397.                 onclick = "[CharacterWindow.SetTab('relations')]"
  2398.                 down = "[CharacterWindow.IsTabShown('relations')]"
  2399.  
  2400.                 using = tooltip_above
  2401.  
  2402.                 hbox = {
  2403.                     text_single = {
  2404.                         layoutpolicy_horizontal = expanding
  2405.                         align = center
  2406.                         text = "CV_TAB_RELATIONS"
  2407.                         default_format = "#low"
  2408.                     }
  2409.  
  2410.                     text_single = {
  2411.                         align = center
  2412.                         text = "[CharacterWindow.GetTabItemsCount('relations')]"
  2413.                         default_format = "#low"
  2414.                         margin_right = 15
  2415.                         min_width = 30
  2416.  
  2417.                         using = Animation_Character_Window_Refresh
  2418.                     }
  2419.                 }
  2420.             }
  2421.  
  2422.             button_tab = {
  2423.                 name = "court_button"
  2424.                 datacontext = "[CharacterWindow.GetCharacter]"
  2425.                 #   visible = "[Not(Character.IsPlayer)]"
  2426.                 layoutpolicy_horizontal = expanding
  2427.  
  2428.                 onclick = "[CharacterWindow.SetTab('court')]"
  2429.                 down = "[CharacterWindow.IsTabShown('court')]"
  2430.  
  2431.                 using = tooltip_above
  2432.  
  2433.                 hbox = {
  2434.                     text_single = {
  2435.                         layoutpolicy_horizontal = expanding
  2436.                         align = center
  2437.                         text = "CV_TAB_COURT"
  2438.                         default_format = "#low"
  2439.                     }
  2440.  
  2441.                     text_single = {
  2442.                         align = center
  2443.                         text = "[CharacterWindow.GetTabItemsCount('court')]"
  2444.                         default_format = "#low"
  2445.                         margin_right = 15
  2446.                         min_width = 30
  2447.  
  2448.                         using = Animation_Character_Window_Refresh
  2449.                     }
  2450.                 }
  2451.             }
  2452.  
  2453.             button_tab = {
  2454.                 name = "vassals_button"
  2455.                 datacontext = "[CharacterWindow.GetCharacter]"
  2456.                 visible = "[Character.IsRuler]"
  2457.                 #   visible = "[And(Character.IsRuler, Not(Character.IsPlayer))]"
  2458.                 layoutpolicy_horizontal = expanding
  2459.  
  2460.                 onclick = "[CharacterWindow.SetTab('vassals')]"
  2461.                 down = "[CharacterWindow.IsTabShown('vassals')]"
  2462.  
  2463.                 using = tooltip_above
  2464.  
  2465.                 hbox = {
  2466.                     text_single = {
  2467.                         layoutpolicy_horizontal = expanding
  2468.                         align = center
  2469.                         text = "CV_TAB_VASSALS"
  2470.                         default_format = "#low"
  2471.                     }
  2472.  
  2473.                     text_single = {
  2474.                         align = center
  2475.                         text = "[CharacterWindow.GetTabItemsCount('vassals')]"
  2476.                         default_format = "#low"
  2477.                         margin_right = 15
  2478.                         min_width = 30
  2479.  
  2480.                         using = Animation_Character_Window_Refresh
  2481.                     }
  2482.                 }
  2483.             }
  2484.         }
  2485.  
  2486.         spacer = { size = { 0 2 } }
  2487.  
  2488.         widget = {
  2489.             visible = "[CharacterWindow.AreNoneExpanded]"
  2490.             layoutpolicy_vertical = preferred
  2491.             layoutpolicy_horizontal = expanding
  2492.             size = { 0 350 }
  2493.  
  2494.             using = Animation_Tab_Switch
  2495.  
  2496.             ####################################
  2497.             ########### FAMILY TAB #############
  2498.             ####################################
  2499.  
  2500.             # modded by carnalitas to have a scrollbox + separated-out spouses and consorts
  2501.  
  2502.             widget = {
  2503.                 name = "family"
  2504.                 visible = "[CharacterWindow.IsTabShown('family')]"
  2505.                 size = { 100% 100% }
  2506.  
  2507.                 using = Animation_Tab_Switch
  2508.  
  2509.                 vbox = {
  2510.                     name = "family_main_view"
  2511.                     visible = "[Not( Or( Or( Or( CharacterWindow.IsRelationExpanded( 'children' ), CharacterWindow.IsRelationExpanded( 'siblings' ) ), CharacterWindow.IsRelationExpanded( 'spouses' ) ), CharacterWindow.IsRelationExpanded( 'concubines' ) ) )]"
  2512.  
  2513.                     scrollbox = {
  2514.                         layoutpolicy_vertical = expanding
  2515.                         layoutpolicy_horizontal = expanding
  2516.  
  2517.                         blockoverride "scrollbox_margins" {}
  2518.  
  2519.                         blockoverride "scrollbox_content" {
  2520.                             widget = {
  2521.                                 name = "parents_grandparents_spouses"
  2522.                                 layoutpolicy_horizontal = expanding
  2523.                                 layoutpolicy_vertical = expanding
  2524.                                 minimumsize = { -1 110 }
  2525.                                 maximumsize = { -1 110 }
  2526.                                 scissor = yes
  2527.  
  2528.                                 hbox = {
  2529.                                     vbox_character_row_item = {
  2530.                                         name = "children" # actually parents
  2531.                                         layoutpolicy_vertical = expanding
  2532.  
  2533.                                         blockoverride "portrait_datamodel" {
  2534.                                             datamodel = "[CharacterWindow.GetParents]"
  2535.                                         }
  2536.  
  2537.                                         blockoverride "header_text"
  2538.                                         {
  2539.                                             text = "PARENTS"
  2540.                                         }
  2541.  
  2542.                                         blockoverride "expand_button" {}
  2543.                                     }
  2544.  
  2545.                                     vbox_character_row_item = {
  2546.                                         name = "grandparents"
  2547.                                         # show if no secondary spouse/consorts, or
  2548.                                         # more than 3 spouses/consorts, or
  2549.                                         # character has both secondary spouses and consorts
  2550.                                         visible = "[Or( Or( And( LessThanOrEqualTo_int32( Character.GetMaxSpouses, '(int32)1' ), LessThanOrEqualTo_int32( Character.GetMaxConsorts, '(int32)0' ) ), Or( GreaterThan_int32( Character.GetMaxSpouses, '(int32)4' ), GreaterThan_int32( Character.GetMaxConsorts, '(int32)3' ) ) ), And( GreaterThan_int32( Character.GetMaxSpouses, '(int32)1' ), GreaterThan_int32( Character.GetMaxConsorts, '(int32)0' ) ) )]"
  2551.                                         layoutpolicy_vertical = expanding
  2552.  
  2553.                                         blockoverride "portrait_datamodel" {
  2554.                                             datamodel = "[CharacterWindow.GetGrandparents]"
  2555.                                         }
  2556.  
  2557.                                         blockoverride "header_text"
  2558.                                         {
  2559.                                             text = "GRANDPARENTS"
  2560.                                         }
  2561.  
  2562.                                         blockoverride "expand_button" {}
  2563.                                     }
  2564.  
  2565.                                     vbox_character_row_item = {
  2566.                                         name = "grandparents_contracted"
  2567.                                         # show if not the above condition
  2568.                                         visible = "[Not( Or( Or( And( LessThanOrEqualTo_int32( Character.GetMaxSpouses, '(int32)1' ), LessThanOrEqualTo_int32( Character.GetMaxConsorts, '(int32)0' ) ), Or( GreaterThan_int32( Character.GetMaxSpouses, '(int32)4' ), GreaterThan_int32( Character.GetMaxConsorts, '(int32)3' ) ) ), And( GreaterThan_int32( Character.GetMaxSpouses, '(int32)1' ), GreaterThan_int32( Character.GetMaxConsorts, '(int32)0' ) ) ) )]"
  2569.                                         layoutpolicy_vertical = expanding
  2570.  
  2571.                                         blockoverride "portrait_datamodel" {
  2572.                                             datamodel = "[CharacterWindow.GetGrandparents]"
  2573.                                         }
  2574.  
  2575.                                         blockoverride "header_text"
  2576.                                         {
  2577.                                             text = "GRANDPARENTS"
  2578.                                         }
  2579.  
  2580.                                         blockoverride "expand_button" {}
  2581.  
  2582.                                         blockoverride "gridbox"
  2583.                                         {
  2584.                                             overlappingitembox = {
  2585.                                                 size = { 170 90 }
  2586.  
  2587.                                                 block "portrait_datamodel" {
  2588.                                                     datamodel = "[CharacterWindow.GetParents]"
  2589.                                                 }
  2590.  
  2591.                                                 item = {
  2592.                                                     portrait_head_small = {
  2593.                                                         blockoverride "portrait_button"
  2594.                                                         {
  2595.                                                             using = tooltip_ne
  2596.                                                         }
  2597.  
  2598.                                                     }
  2599.                                                 }
  2600.                                             }
  2601.                                         }
  2602.                                     }
  2603.  
  2604.                                     vbox_character_row_item = {
  2605.                                         name = "secondary_spouses"
  2606.                                         # show if there are 2-4 spouses
  2607.                                         visible = "[And( GreaterThan_int32( Character.GetMaxSpouses, '(int32)1' ), LessThanOrEqualTo_int32( Character.GetMaxSpouses, '(int32)4' ))]"
  2608.                                         layoutpolicy_vertical = expanding
  2609.  
  2610.                                         blockoverride "portrait_datamodel" {
  2611.                                             datamodel = "[CharacterWindow.GetSecondarySpouses]"
  2612.                                         }
  2613.  
  2614.                                         blockoverride "header_text"
  2615.                                         {
  2616.                                             text = "SECONDARY_SPOUSES"
  2617.                                         }
  2618.  
  2619.                                         blockoverride "expand_button" {}
  2620.  
  2621.                                         blockoverride "find_partner"
  2622.                                         {
  2623.                                             fixedgridbox = {
  2624.                                                 name = "potential"
  2625.                                                 datamodel = "[GetNullCharacterDataModel( Character.CalcUnusedSecondarySpouseSlots )]"
  2626.                                                 visible = "[Character.IsPlayerInteractionShown('marry_off_interaction')]"
  2627.  
  2628.                                                 flipdirection = yes
  2629.                                                 addcolumn = 85
  2630.                                                 addrow = 90
  2631.  
  2632.                                                 item = {
  2633.                                                     container = {
  2634.                                                         portrait_head_small = {
  2635.                                                             visible = "[Not( ObjectsEqual( GetPlayer, CharacterWindow.GetCharacter ) )]"
  2636.                                                             blockoverride "portrait_button_template_onclick"
  2637.                                                             {
  2638.                                                                 onclick = "[CharacterWindow.GetCharacter.OpenPlayerInteraction('marry_off_interaction')]"
  2639.                                                             }
  2640.                                                             blockoverride "portrait_button_template_tooltip"
  2641.                                                             {
  2642.                                                                 tooltip = "CHARACTER_WINDOW_FIND_SPOUSE"
  2643.                                                             }
  2644.                                                             blockoverride "onclick"
  2645.                                                             {
  2646.                                                                 onclick = "[CharacterWindow.GetCharacter.OpenPlayerInteraction('marry_off_interaction')]"
  2647.  
  2648.                                                                 button_icon = {
  2649.                                                                     parentanchor = center
  2650.                                                                     alwaystransparent = yes
  2651.                                                                     size = { 20 20 }
  2652.                                                                     position = {-5 -5}
  2653.                                                                     texture = "gfx/interface/icons/flat_icons/plus.dds"
  2654.                                                                 }
  2655.                                                             }
  2656.                                                         }
  2657.  
  2658.                                                         portrait_head_small = {
  2659.                                                             visible = "[ObjectsEqual( GetPlayer, CharacterWindow.GetCharacter )]"
  2660.                                                             blockoverride "portrait_button_template_onclick"
  2661.                                                             {
  2662.                                                                 onclick = "[CharacterWindow.GetCharacter.OpenPlayerInteraction('marry_off_interaction')]"
  2663.                                                             }
  2664.                                                             blockoverride "portrait_button_template_tooltip"
  2665.                                                             {
  2666.                                                                 tooltip = "CHARACTER_WINDOW_FIND_SPOUSE_SELF"
  2667.                                                             }
  2668.                                                             blockoverride "onclick"
  2669.                                                             {
  2670.                                                                 onclick = "[CharacterWindow.GetCharacter.OpenPlayerInteraction('marry_off_interaction')]"
  2671.  
  2672.                                                                 button_icon = {
  2673.                                                                     parentanchor = center
  2674.                                                                     alwaystransparent = yes
  2675.                                                                     size = { 26 26 }
  2676.                                                                     position = {-5 0}
  2677.                                                                     texture = "gfx/interface/icons/flat_icons/plus.dds"
  2678.                                                                 }
  2679.                                                             }
  2680.                                                         }
  2681.                                                     }
  2682.                                                 }
  2683.                                             }
  2684.                                         }
  2685.                                     }
  2686.  
  2687.                                     vbox_character_row_item = {
  2688.                                         name = "consorts"
  2689.                                         # show if there are 1-3 consorts
  2690.                                         visible = "[And( GreaterThan_int32( Character.GetMaxConsorts, '(int32)1' ), LessThanOrEqualTo_int32( Character.GetMaxConsorts, '(int32)3' ))]"
  2691.                                         layoutpolicy_vertical = expanding
  2692.  
  2693.  
  2694.                                         blockoverride "portrait_datamodel" {
  2695.                                             datamodel = "[CharacterWindow.GetConcubines]"
  2696.                                         }
  2697.  
  2698.                                         blockoverride "header_text"
  2699.                                         {
  2700.                                             text = "doctrine_concubines_name" # edited to be gender neutral.
  2701.                                         }
  2702.  
  2703.                                         blockoverride "expand_button" {}
  2704.  
  2705.                                         blockoverride "find_partner"
  2706.                                         {
  2707.                                             fixedgridbox = {
  2708.                                                 name = "potential"
  2709.                                                 datamodel = "[GetNullCharacterDataModel( Character.CalcUnusedConsortSlots )]"
  2710.                                                 visible = "[Character.IsPlayerInteractionShown('find_concubine')]"
  2711.  
  2712.                                                 flipdirection = yes
  2713.                                                 addcolumn = 85
  2714.                                                 addrow = 90
  2715.                                                 maxverticalslots = 1
  2716.  
  2717.                                                 item = {
  2718.                                                     container = {
  2719.                                                         portrait_head_small = {
  2720.                                                             blockoverride "portrait_button_template_onclick"
  2721.                                                             {
  2722.                                                                 onclick = "[CharacterWindow.GetCharacter.OpenPlayerInteraction('find_concubine')]"
  2723.                                                                 enabled = "[CharacterWindow.GetCharacter.IsPlayerInteractionValid('find_concubine')]"
  2724.  
  2725.                                                                 button_plus = {
  2726.                                                                     parentanchor = center
  2727.                                                                     alwaystransparent = yes
  2728.                                                                 }
  2729.                                                             }
  2730.                                                             blockoverride "portrait_button_template_tooltip"
  2731.                                                             {
  2732.                                                                 tooltip = "[CharacterWindow.GetCharacter.GetPlayerInteractionTooltip('find_concubine')]"
  2733.                                                             }
  2734.                                                         }
  2735.                                                     }
  2736.                                                 }
  2737.  
  2738.                                                 expand = {}
  2739.                                             }
  2740.                                         }
  2741.                                     }
  2742.  
  2743.                                     expand = {}
  2744.                                 }
  2745.                             }
  2746.  
  2747.                             widget = {
  2748.                                 name = "secondary_spouses_extended"
  2749.                                 # show if there are more than 4 spouses
  2750.                                 visible = "[GreaterThan_int32( Character.GetMaxSpouses, '(int32)4' )]"
  2751.                                 layoutpolicy_horizontal = expanding
  2752.                                 layoutpolicy_vertical = expanding
  2753.                                 minimumsize = { -1 110 }
  2754.                                 maximumsize = { -1 110 }
  2755.                                 scissor = yes
  2756.  
  2757.                                 hbox = {
  2758.                                     vbox_character_row_item = {
  2759.                                         name = "secondary_spouses"
  2760.                                         layoutpolicy_horizontal = expanding
  2761.                                         layoutpolicy_vertical = expanding
  2762.  
  2763.                                         blockoverride "portrait_datamodel" {
  2764.                                             datamodel = "[CharacterWindow.GetSecondarySpouses]"
  2765.                                         }
  2766.  
  2767.                                         blockoverride "header_text"
  2768.                                         {
  2769.                                             text = "SECONDARY_SPOUSES"
  2770.                                         }
  2771.                                        
  2772.                                         blockoverride "remaining_items" {
  2773.                                                 visible = "[GreaterThan_int32( GetDataModelSize(CharacterWindow.GetSecondarySpouses), '(int32)7' )]"
  2774.                                                 text = "[GetNumberAbove_int32( GetDataModelSize(CharacterWindow.GetSecondarySpouses), '(int32)7' )|=]"
  2775.                                         }
  2776.  
  2777.                                         blockoverride "expand_button_inside" {
  2778.                                             visible = "[GreaterThan_int32( GetDataModelSize(CharacterWindow.GetSecondarySpouses), '(int32)7' )]"
  2779.                                             onclick = "[CharacterWindow.ToggleExpandedRelation( 'spouses' )]"
  2780.                                         }
  2781.  
  2782.                                         blockoverride "find_partner"
  2783.                                         {
  2784.                                             fixedgridbox = {
  2785.                                                 name = "potential"
  2786.                                                 datamodel = "[GetNullCharacterDataModel( Character.CalcUnusedSecondarySpouseSlots )]"
  2787.                                                 visible = "[Character.IsPlayerInteractionShown('marry_off_interaction')]"
  2788.  
  2789.                                                 flipdirection = yes
  2790.                                                 addcolumn = 85
  2791.                                                 addrow = 90
  2792.  
  2793.                                                 item = {
  2794.                                                     container = {
  2795.                                                         portrait_head_small = {
  2796.                                                             visible = "[Not( ObjectsEqual( GetPlayer, CharacterWindow.GetCharacter ) )]"
  2797.                                                             blockoverride "portrait_button_template_onclick"
  2798.                                                             {
  2799.                                                                 onclick = "[CharacterWindow.GetCharacter.OpenPlayerInteraction('marry_off_interaction')]"
  2800.                                                             }
  2801.                                                             blockoverride "portrait_button_template_tooltip"
  2802.                                                             {
  2803.                                                                 tooltip = "CHARACTER_WINDOW_FIND_SPOUSE"
  2804.                                                             }
  2805.                                                             blockoverride "onclick"
  2806.                                                             {
  2807.                                                                 onclick = "[CharacterWindow.GetCharacter.OpenPlayerInteraction('marry_off_interaction')]"
  2808.  
  2809.                                                                 button_icon = {
  2810.                                                                     parentanchor = center
  2811.                                                                     alwaystransparent = yes
  2812.                                                                     size = { 20 20 }
  2813.                                                                     position = {-5 -5}
  2814.                                                                     texture = "gfx/interface/icons/flat_icons/plus.dds"
  2815.                                                                 }
  2816.                                                             }
  2817.                                                         }
  2818.  
  2819.                                                         portrait_head_small = {
  2820.                                                             visible = "[ObjectsEqual( GetPlayer, CharacterWindow.GetCharacter )]"
  2821.                                                             blockoverride "portrait_button_template_onclick"
  2822.                                                             {
  2823.                                                                 onclick = "[CharacterWindow.GetCharacter.OpenPlayerInteraction('marry_off_interaction')]"
  2824.                                                             }
  2825.                                                             blockoverride "portrait_button_template_tooltip"
  2826.                                                             {
  2827.                                                                 tooltip = "CHARACTER_WINDOW_FIND_SPOUSE_SELF"
  2828.                                                             }
  2829.                                                             blockoverride "onclick"
  2830.                                                             {
  2831.                                                                 onclick = "[CharacterWindow.GetCharacter.OpenPlayerInteraction('marry_off_interaction')]"
  2832.  
  2833.                                                                 button_icon = {
  2834.                                                                     parentanchor = center
  2835.                                                                     alwaystransparent = yes
  2836.                                                                     size = { 26 26 }
  2837.                                                                     position = {-5 0}
  2838.                                                                     texture = "gfx/interface/icons/flat_icons/plus.dds"
  2839.                                                                 }
  2840.                                                             }
  2841.                                                         }
  2842.                                                     }
  2843.                                                 }
  2844.                                             }
  2845.                                         }
  2846.                                     }
  2847.                                    
  2848.                                     expand = {}
  2849.                                 }
  2850.                             }
  2851.  
  2852.                             widget = {
  2853.                                 name = "consorts_extended"
  2854.                                 # show if there are more than 3 consorts, or
  2855.                                 # there are both secondary spouses and consorts
  2856.                                 visible = "[Or( GreaterThan_int32( Character.GetMaxConsorts, '(int32)3' ), And( GreaterThan_int32( Character.GetMaxSpouses, '(int32)1' ), GreaterThan_int32( Character.GetMaxConsorts, '(int32)0' ) ) )]"
  2857.                                 layoutpolicy_horizontal = expanding
  2858.                                 layoutpolicy_vertical = expanding
  2859.                                 minimumsize = { -1 110 }
  2860.                                 maximumsize = { -1 110 }
  2861.                                 scissor = yes
  2862.  
  2863.                                 hbox = {
  2864.                                     vbox_character_row_item = {
  2865.                                         name = "consorts"
  2866.                                         layoutpolicy_horizontal = expanding
  2867.                                         layoutpolicy_vertical = expanding
  2868.  
  2869.  
  2870.                                         blockoverride "portrait_datamodel" {
  2871.                                             datamodel = "[CharacterWindow.GetConcubines]"
  2872.                                         }
  2873.  
  2874.                                         blockoverride "header_text"
  2875.                                         {
  2876.                                             text = "doctrine_concubines_name" # edited to be gender neutral.
  2877.                                         }
  2878.                                        
  2879.                                         blockoverride "remaining_items" {
  2880.                                                 visible = "[GreaterThan_int32( GetDataModelSize(CharacterWindow.GetConcubines), '(int32)7' )]"
  2881.                                                 text = "[GetNumberAbove_int32( GetDataModelSize(CharacterWindow.GetConcubines), '(int32)7' )|=]"
  2882.                                         }                              
  2883.  
  2884.                                         blockoverride "expand_button_inside" {
  2885.                                             visible = "[GreaterThan_int32( GetDataModelSize(CharacterWindow.GetConcubines), '(int32)7' )]"
  2886.                                             onclick = "[CharacterWindow.ToggleExpandedRelation( 'concubines' )]"
  2887.                                         }
  2888.  
  2889.                                         blockoverride "find_partner"
  2890.                                         {
  2891.                                             fixedgridbox = {
  2892.                                                 name = "potential"
  2893.                                                 datamodel = "[GetNullCharacterDataModel( Character.CalcUnusedConsortSlots )]"
  2894.                                                 visible = "[Character.IsPlayerInteractionShown('find_concubine')]"
  2895.  
  2896.                                                 flipdirection = yes
  2897.                                                 addcolumn = 85
  2898.                                                 addrow = 90
  2899.                                                 maxverticalslots = 1
  2900.  
  2901.                                                 item = {
  2902.                                                     container = {
  2903.                                                         portrait_head_small = {
  2904.                                                             blockoverride "portrait_button_template_onclick"
  2905.                                                             {
  2906.                                                                 onclick = "[CharacterWindow.GetCharacter.OpenPlayerInteraction('find_concubine')]"
  2907.  
  2908.                                                                 button_plus = {
  2909.                                                                     parentanchor = center
  2910.                                                                     alwaystransparent = yes
  2911.                                                                 }
  2912.                                                             }
  2913.                                                             blockoverride "portrait_button_template_tooltip"
  2914.                                                             {
  2915.                                                                 tooltip = "[CharacterWindow.GetCharacter.GetPlayerInteractionTooltip('find_concubine')]"
  2916.                                                             }
  2917.                                                         }
  2918.                                                     }
  2919.                                                 }
  2920.  
  2921.                                                 expand = {}
  2922.                                             }
  2923.                                         }
  2924.                                     }
  2925.  
  2926.                                     expand = {}
  2927.                                 }
  2928.                             }
  2929.  
  2930.                             widget = {
  2931.                                 name = "children"
  2932.                                 layoutpolicy_horizontal = expanding
  2933.                                 layoutpolicy_vertical = expanding
  2934.                                 minimumsize = { -1 110 }
  2935.                                 maximumsize = { -1 110 }
  2936.                                 scissor = yes
  2937.  
  2938.                                 vbox_character_row_item = {
  2939.                                     name = "children"
  2940.  
  2941.                                     blockoverride "portrait_datamodel" {
  2942.                                         datamodel = "[CharacterWindow.GetChildren]"
  2943.                                     }
  2944.  
  2945.                                     blockoverride "header_text"
  2946.                                     {
  2947.                                         text = "CV_CHILDREN_HEADING"
  2948.                                     }
  2949.  
  2950.                                     blockoverride "remaining_items"
  2951.                                     {
  2952.                                         visible = "[GreaterThan_int32( GetDataModelSize(CharacterWindow.GetChildren), '(int32)7' )]"
  2953.                                         text = "[GetNumberAbove_int32( GetDataModelSize(CharacterWindow.GetChildren), '(int32)7' )|=]"
  2954.                                     }
  2955.  
  2956.                                     blockoverride "expand_button_inside" {
  2957.                                         visible = "[GreaterThan_int32( GetDataModelSize(CharacterWindow.GetChildren), '(int32)7' )]"
  2958.                                         onclick = "[CharacterWindow.ToggleExpandedRelation( 'children' )]"
  2959.                                     }
  2960.                                 }
  2961.                             }
  2962.  
  2963.                             widget = {
  2964.                                 name = "siblings"
  2965.                                 layoutpolicy_horizontal = expanding
  2966.                                 layoutpolicy_vertical = expanding
  2967.                                 minimumsize = { -1 110 }
  2968.                                 maximumsize = { -1 110 }
  2969.                                 scissor = yes
  2970.  
  2971.                                 vbox_character_row_item = {
  2972.                                     name = "siblings"
  2973.  
  2974.                                     blockoverride "portrait_datamodel" {
  2975.                                         datamodel = "[CharacterWindow.GetSiblings]"
  2976.                                     }
  2977.  
  2978.                                     blockoverride "header_text"
  2979.                                     {
  2980.                                         text = "CV_SIBLINGS_HEADING"
  2981.                                     }
  2982.  
  2983.                                     blockoverride "remaining_items"
  2984.                                     {
  2985.                                         visible = "[GreaterThan_int32( GetDataModelSize(CharacterWindow.GetSiblings), '(int32)7' )]"
  2986.                                         text = "[GetNumberAbove_int32( GetDataModelSize(CharacterWindow.GetSiblings), '(int32)7' )|=]"
  2987.                                     }
  2988.  
  2989.                                     blockoverride "expand_button_inside" {
  2990.                                         visible = "[GreaterThan_int32( GetDataModelSize(CharacterWindow.GetSiblings), '(int32)7' )]"
  2991.                                         onclick = "[CharacterWindow.ToggleExpandedRelation( 'siblings' )]"
  2992.                                     }
  2993.                                 }
  2994.                             }
  2995.                         }
  2996.                     }
  2997.  
  2998.                     expand = {}
  2999.                 }
  3000.  
  3001.                 ### SIBLINGS EXPANDED
  3002.                 scrollbox = {
  3003.                     name = "family_siblings_expanded"
  3004.                     visible = "[CharacterWindow.IsRelationExpanded( 'siblings' )]"
  3005.                     size = { 100% 100% }
  3006.  
  3007.                     blockoverride "scrollbox_replace_vbox" {
  3008.                         vbox_character_row_item = {
  3009.                             name = "siblings"
  3010.                             margin_top = 10
  3011.                             spacing = 5
  3012.  
  3013.  
  3014.                             blockoverride "portrait_datamodel" {
  3015.                                 datamodel = "[CharacterWindow.GetSiblings]"
  3016.                             }
  3017.  
  3018.                             blockoverride "header_text"
  3019.                             {
  3020.                                 text = "CV_SIBLINGS_HEADING"
  3021.                             }
  3022.  
  3023.                             blockoverride "expand_button_inside" {
  3024.                                 onclick = "[CharacterWindow.ToggleExpandedRelation( 'siblings' )]"
  3025.                                 down = "[CharacterWindow.IsRelationExpanded( 'siblings' )]"
  3026.                             }
  3027.  
  3028.                             blockoverride "gridbox_slots" {}
  3029.                         }
  3030.                     }
  3031.                 }
  3032.                
  3033.                 ### SPOUSES EXPANDED
  3034.                 scrollbox = {
  3035.                     name = "family_spouses_expanded"
  3036.                     visible = "[CharacterWindow.IsRelationExpanded( 'spouses' )]"
  3037.                     size = { 100% 100% }
  3038.  
  3039.                     blockoverride "scrollbox_replace_vbox" {
  3040.                         vbox_character_row_item = {
  3041.                             name = "spouses"
  3042.                             margin_top = 10
  3043.                             spacing = 5
  3044.  
  3045.  
  3046.                             blockoverride "portrait_datamodel" {
  3047.                                 datamodel = "[CharacterWindow.GetSecondarySpouses]"
  3048.                             }
  3049.  
  3050.                             blockoverride "header_text"
  3051.                             {
  3052.                                 text = "carn_cv_spouses_heading"
  3053.                             }
  3054.  
  3055.                             blockoverride "expand_button_inside" {
  3056.                                 onclick = "[CharacterWindow.ToggleExpandedRelation( 'spouses' )]"
  3057.                                 down = "[CharacterWindow.IsRelationExpanded( 'spouses' )]"
  3058.                             }
  3059.  
  3060.                             blockoverride "gridbox_slots" {}
  3061.                         }
  3062.                     }
  3063.                 }
  3064.  
  3065.                 ### CONCUBINES EXPANDED
  3066.                 scrollbox = {
  3067.                     name = "family_concubines_expanded"
  3068.                     visible = "[CharacterWindow.IsRelationExpanded( 'concubines' )]"
  3069.                     size = { 100% 100% }
  3070.  
  3071.                     blockoverride "scrollbox_replace_vbox" {
  3072.                         vbox_character_row_item = {
  3073.                             name = "concubines"
  3074.                             margin_top = 10
  3075.                             spacing = 5
  3076.  
  3077.  
  3078.                             blockoverride "portrait_datamodel" {
  3079.                                 datamodel = "[CharacterWindow.GetConcubines]"
  3080.                             }
  3081.  
  3082.                             blockoverride "header_text"
  3083.                             {
  3084.                                 text = "carn_cv_concubines_heading"
  3085.                             }
  3086.  
  3087.                             blockoverride "expand_button_inside" {
  3088.                                 onclick = "[CharacterWindow.ToggleExpandedRelation( 'concubines' )]"
  3089.                                 down = "[CharacterWindow.IsRelationExpanded( 'concubines' )]"
  3090.                             }
  3091.  
  3092.                             blockoverride "gridbox_slots" {}
  3093.                         }
  3094.                     }
  3095.                 }
  3096.                
  3097.                 ### CHILDREN EXPANDED
  3098.                 scrollbox = {
  3099.                     name = "family_children_expanded"
  3100.                     visible = "[CharacterWindow.IsRelationExpanded( 'children' )]"
  3101.                     size = { 100% 100% }
  3102.  
  3103.                     blockoverride "scrollbox_replace_vbox" {
  3104.                         vbox_character_row_item = {
  3105.                             name = "children"
  3106.                             margin_top = 10
  3107.                             spacing = 5
  3108.  
  3109.                             blockoverride "portrait_datamodel" {
  3110.                                 datamodel = "[CharacterWindow.GetChildren]"
  3111.                             }
  3112.  
  3113.                             blockoverride "header_text"
  3114.                             {
  3115.                                 text = "CV_CHILDREN_HEADING"
  3116.                             }
  3117.  
  3118.                             blockoverride "expand_button_inside" {
  3119.                                 onclick = "[CharacterWindow.ToggleExpandedRelation( 'children' )]"
  3120.                                 down = "[CharacterWindow.IsRelationExpanded( 'children' )]"
  3121.                             }
  3122.  
  3123.                             blockoverride "gridbox_slots" {}
  3124.                         }
  3125.                     }
  3126.                 }
  3127.             }
  3128.  
  3129.             ####################################
  3130.             ########## RELATIONS TAB ###########
  3131.             ####################################
  3132.  
  3133.             # modded by carnalitas to have a scrollbox + slaves list
  3134.  
  3135.             widget = {
  3136.                 name = "relations"
  3137.                 visible = "[CharacterWindow.IsTabShown('relations')]"
  3138.                 size = { 100% 100% }
  3139.  
  3140.                 using = Animation_Tab_Switch
  3141.  
  3142.                 vbox = {
  3143.                     name = "relations_main_view"
  3144.                     visible = "[Not( Or( Or( Or( Or( CharacterWindow.IsRelationExpanded( 'friends' ), CharacterWindow.IsRelationExpanded( 'rivals' ) ), CharacterWindow.IsRelationExpanded( 'slaves' ) ), CharacterWindow.IsRelationExpanded( 'lovers' ) ), CharacterWindow.IsRelationExpanded( 'wards' ) ) )]" # Carnalitas: add a slaves expanded window
  3145.  
  3146.                     scrollbox = {
  3147.                         layoutpolicy_vertical = expanding
  3148.                         layoutpolicy_horizontal = expanding
  3149.  
  3150.                         blockoverride "scrollbox_margins" {}
  3151.  
  3152.                         blockoverride "scrollbox_content" {
  3153.                             widget = {
  3154.                                 name = "first_row"
  3155.                                 layoutpolicy_horizontal = expanding
  3156.                                 layoutpolicy_vertical = expanding
  3157.                                 minimumsize = { -1 110 }
  3158.                                 maximumsize = { -1 110 }
  3159.                                 scissor = yes
  3160.  
  3161.                                 hbox = {
  3162.  
  3163.                                     vbox_character_row_item = {
  3164.                                         name = "wards"
  3165.                                         # show if we're adults and
  3166.                                         # we have 2 or fewer wards
  3167.                                         visible = "[And( CharacterWindow.GetCharacter.IsAdult, LessThanOrEqualTo_int32( GetDataModelSize(CharacterWindow.GetRelationsOfType( GetRelation( 'ward' ) )), '(int32)2' ) )]"
  3168.                                         layoutpolicy_vertical = expanding
  3169.  
  3170.                                         blockoverride "portrait_datamodel" {
  3171.                                             datamodel = "[CharacterWindow.GetRelationsOfTypeFillEmpty( GetRelation( 'ward' ), '(int32)2' )]"
  3172.                                         }
  3173.  
  3174.                                         blockoverride "header_text"
  3175.                                         {
  3176.                                             text = "WARDS_LABEL"
  3177.                                         }
  3178.  
  3179.                                         blockoverride "expand_button" {}
  3180.  
  3181.                                         blockoverride "empty_character"
  3182.                                         {
  3183.                                             visible = "[Character.IsValid]"
  3184.                                         }
  3185.                                     }
  3186.  
  3187.                                     vbox_character_row_item = {
  3188.                                         name = "wards_expanded"
  3189.                                         # show if we're adults and
  3190.                                         # we have a lot of wards
  3191.                                         visible = "[And( CharacterWindow.GetCharacter.IsAdult, GreaterThan_int32( GetDataModelSize(CharacterWindow.GetRelationsOfType( GetRelation( 'ward' ) )), '(int32)2' ) )]"
  3192.                                         layoutpolicy_vertical = expanding
  3193.  
  3194.                                         blockoverride "portrait_datamodel" {
  3195.                                             datamodel = "[CharacterWindow.GetRelationsOfType( GetRelation( 'ward' ) )]"
  3196.                                         }
  3197.  
  3198.                                         blockoverride "header_text"
  3199.                                         {
  3200.                                             text = "WARDS_LABEL"
  3201.                                         }
  3202.  
  3203.                                         blockoverride "remaining_items"
  3204.                                         {
  3205.                                             visible = "[GreaterThan_int32( GetDataModelSize(CharacterWindow.GetRelationsOfType( GetRelation( 'ward' ) )), '(int32)7' ))]"
  3206.                                             text = "[GetNumberAbove_int32( GetDataModelSize(CharacterWindow.GetRelationsOfType( GetRelation( 'ward' ) )), '(int32)7' )|=]"
  3207.                                         }
  3208.  
  3209.                                         blockoverride "expand_button_inside" {
  3210.                                             visible = "[GreaterThan_int32( GetDataModelSize(CharacterWindow.GetRelationsOfType( GetRelation( 'ward' ) )), '(int32)7' )]"
  3211.                                             onclick = "[CharacterWindow.ToggleExpandedRelation( 'wards' )]"
  3212.                                         }
  3213.  
  3214.                                         blockoverride "empty_character"
  3215.                                         {
  3216.                                             visible = "[Character.IsValid]"
  3217.                                         }
  3218.                                     }
  3219.  
  3220.                                     vbox_character_row_item = {
  3221.                                         name = "lovers"
  3222.                                         # show if we're adults and we DON'T either have a lot of lovers or a lot of wards
  3223.                                         visible = "[And( CharacterWindow.GetCharacter.IsAdult, And( LessThanOrEqualTo_int32( GetDataModelSize(CharacterWindow.GetRelationsOfType( GetRelation( 'lover' ) )), '(int32)5' ), LessThanOrEqualTo_int32( GetDataModelSize(CharacterWindow.GetRelationsOfType( GetRelation( 'ward' ) )), '(int32)2' ) ) )]"
  3224.                                         layoutpolicy_vertical = expanding
  3225.  
  3226.                                         blockoverride "portrait_datamodel" {
  3227.                                             datamodel = "[CharacterWindow.GetRelationsOfType( GetRelation( 'lover' ) )]"
  3228.                                         }
  3229.  
  3230.                                         blockoverride "header_text"
  3231.                                         {
  3232.                                             text = "LOVERS_LABEL"
  3233.                                         }
  3234.  
  3235.                                         blockoverride "expand_button" {}
  3236.                                     }
  3237.  
  3238.                                     vbox_character_row_item = {
  3239.                                         name = "guardian"
  3240.                                         visible = "[Not(CharacterWindow.GetCharacter.IsAdult)]"
  3241.                                         layoutpolicy_vertical = expanding
  3242.  
  3243.                                         blockoverride "portrait_datamodel" {
  3244.                                             datamodel = "[CharacterWindow.GetRelationsOfTypeFillEmpty( GetRelation( 'guardian' ), '(int32)1' )]"
  3245.                                         }
  3246.  
  3247.                                         blockoverride "header_text"
  3248.                                         {
  3249.                                             text = "GUARDIAN_LABEL"
  3250.                                         }
  3251.  
  3252.                                         blockoverride "expand_button" {}
  3253.                                     }
  3254.  
  3255.                                     vbox_character_row_item = {
  3256.                                         name = "crushes"
  3257.                                         visible = "[Not(CharacterWindow.GetCharacter.IsAdult)]"
  3258.                                         layoutpolicy_vertical = expanding
  3259.  
  3260.                                         blockoverride "portrait_datamodel" {
  3261.                                             datamodel = "[CharacterWindow.GetRelationsOfType( GetRelation( 'crush' ) )]"
  3262.                                         }
  3263.  
  3264.                                         blockoverride "header_text"
  3265.                                         {
  3266.                                             text = "CRUSHES_LABEL"
  3267.                                         }
  3268.  
  3269.                                         blockoverride "expand_button" {}
  3270.                                     }
  3271.  
  3272.                                     expand = {}
  3273.                                 }
  3274.                             }
  3275.  
  3276.                             widget = {
  3277.                                 name = "lovers_expanded"
  3278.                                 # show if we're adults and we either have a lot of lovers or a lot of wards
  3279.                                 visible = "[And( CharacterWindow.GetCharacter.IsAdult, Or( GreaterThan_int32( GetDataModelSize(CharacterWindow.GetRelationsOfType( GetRelation( 'lover' ) )), '(int32)5' ), GreaterThan_int32( GetDataModelSize(CharacterWindow.GetRelationsOfType( GetRelation( 'ward' ) )), '(int32)2' ) ) )]"
  3280.                                 layoutpolicy_horizontal = expanding
  3281.                                 layoutpolicy_vertical = expanding
  3282.                                 minimumsize = { -1 110 }
  3283.                                 maximumsize = { -1 110 }
  3284.                                 scissor = yes
  3285.  
  3286.                                 hbox = {
  3287.                                     layoutpolicy_horizontal = expanding
  3288.  
  3289.                                     vbox_character_row_item = {
  3290.                                         name = "lovers"
  3291.                                         layoutpolicy_vertical = expanding
  3292.                                         layoutpolicy_horizontal = expanding
  3293.  
  3294.                                         blockoverride "portrait_datamodel" {
  3295.                                             datamodel = "[CharacterWindow.GetRelationsOfType( GetRelation( 'lover' ) )]"
  3296.                                         }
  3297.  
  3298.                                         blockoverride "header_text"
  3299.                                         {
  3300.                                             text = "LOVERS_LABEL"
  3301.                                         }
  3302.  
  3303.                                         blockoverride "remaining_items"
  3304.                                         {
  3305.                                             visible = "[GreaterThan_int32( GetDataModelSize(CharacterWindow.GetRelationsOfType( GetRelation( 'lover' ) )), '(int32)7' ))]"
  3306.                                             text = "[GetNumberAbove_int32( GetDataModelSize(CharacterWindow.GetRelationsOfType( GetRelation( 'lover' ) )), '(int32)7' )|=]"
  3307.                                         }
  3308.  
  3309.                                         blockoverride "expand_button_inside" {
  3310.                                             visible = "[GreaterThan_int32( GetDataModelSize(CharacterWindow.GetRelationsOfType( GetRelation( 'lover' ) )), '(int32)7' )]"
  3311.                                             onclick = "[CharacterWindow.ToggleExpandedRelation( 'lovers' )]"
  3312.                                         }
  3313.                                     }
  3314.  
  3315.                                     expand = {}
  3316.                                 }
  3317.                             }
  3318.  
  3319.                             widget = {
  3320.                                 name = "friends_row"
  3321.                                 layoutpolicy_horizontal = expanding
  3322.                                 layoutpolicy_vertical = expanding
  3323.                                 minimumsize = { -1 110 }
  3324.                                 maximumsize = { -1 110 }
  3325.                                 scissor = yes
  3326.  
  3327.                                 hbox = {
  3328.                                     layoutpolicy_horizontal = expanding
  3329.  
  3330.                                     vbox_character_row_item = {
  3331.                                         name = "friends"
  3332.                                         layoutpolicy_vertical = expanding
  3333.                                         layoutpolicy_horizontal = expanding
  3334.  
  3335.                                         blockoverride "portrait_datamodel" {
  3336.                                             datamodel = "[CharacterWindow.GetRelationsOfType( GetRelation( 'friend' ) )]"
  3337.                                         }
  3338.  
  3339.                                         blockoverride "header_text"
  3340.                                         {
  3341.                                             text = "FRIENDS_LABEL"
  3342.                                         }
  3343.  
  3344.                                         blockoverride "remaining_items"
  3345.                                         {
  3346.                                             visible = "[GreaterThan_int32( GetDataModelSize(CharacterWindow.GetRelationsOfType( GetRelation( 'friend' ) )), '(int32)7' ))]"
  3347.                                             text = "[GetNumberAbove_int32( GetDataModelSize(CharacterWindow.GetRelationsOfType( GetRelation( 'friend' ) )), '(int32)7' )|=]"
  3348.                                         }
  3349.  
  3350.                                         blockoverride "expand_button_inside" {
  3351.                                             visible = "[GreaterThan_int32( GetDataModelSize(CharacterWindow.GetRelationsOfType( GetRelation( 'friend' ) )), '(int32)7' )]"
  3352.                                             onclick = "[CharacterWindow.ToggleExpandedRelation( 'friends' )]"
  3353.                                         }
  3354.                                     }
  3355.  
  3356.                                     expand = {}
  3357.                                 }
  3358.                             }
  3359.  
  3360.                             widget = {
  3361.                                 name = "third_row"
  3362.                                 layoutpolicy_horizontal = expanding
  3363.                                 layoutpolicy_vertical = expanding
  3364.                                 minimumsize = { -1 110 }
  3365.                                 maximumsize = { -1 110 }
  3366.                                 scissor = yes
  3367.  
  3368.                                 hbox = {
  3369.                                     layoutpolicy_horizontal = expanding
  3370.  
  3371.                                     vbox_character_row_item = {
  3372.                                         name = "rivals"
  3373.                                         visible = "[CharacterWindow.GetCharacter.IsAdult]"
  3374.                                         layoutpolicy_vertical = expanding
  3375.                                         layoutpolicy_horizontal = expanding
  3376.  
  3377.                                         blockoverride "portrait_datamodel" {
  3378.                                             datamodel = "[CharacterWindow.GetRelationsOfType( GetRelation( 'rival' ) )]"
  3379.                                         }
  3380.  
  3381.                                         blockoverride "header_text"
  3382.                                         {
  3383.                                             text = "RIVALS_LABEL"
  3384.                                         }
  3385.  
  3386.                                         blockoverride "remaining_items"
  3387.                                         {
  3388.                                             visible = "[GreaterThan_int32( GetDataModelSize(CharacterWindow.GetRelationsOfType( GetRelation( 'rival' ) )), '(int32)7' ))]"
  3389.                                             text = "[GetNumberAbove_int32( GetDataModelSize(CharacterWindow.GetRelationsOfType( GetRelation( 'rival' ) )), '(int32)7' )|=]"
  3390.                                         }
  3391.  
  3392.                                         blockoverride "expand_button_inside" {
  3393.                                             visible = "[GreaterThan_int32( GetDataModelSize(CharacterWindow.GetRelationsOfType( GetRelation( 'rival' ) )), '(int32)7' )]"
  3394.                                             onclick = "[CharacterWindow.ToggleExpandedRelation( 'rivals' )]"
  3395.                                         }
  3396.                                     }
  3397.  
  3398.                                     vbox_character_row_item = {
  3399.                                         name = "bullies"
  3400.                                         visible = "[Not( CharacterWindow.GetCharacter.IsAdult )]"
  3401.                                         layoutpolicy_vertical = expanding
  3402.                                         layoutpolicy_horizontal = expanding
  3403.  
  3404.                                         blockoverride "portrait_datamodel" {
  3405.                                             datamodel = "[CharacterWindow.GetRelationsOfType( GetRelation( 'bully' ) )]"
  3406.                                         }
  3407.  
  3408.                                         blockoverride "header_text"
  3409.                                         {
  3410.                                             text = "BULLIES_LABEL"
  3411.                                         }
  3412.  
  3413.                                         blockoverride "expand_button" {}
  3414.                                     }
  3415.  
  3416.                                     vbox_character_row_item = {
  3417.                                         name = "victims"
  3418.                                         visible = "[Not( CharacterWindow.GetCharacter.IsAdult )]"
  3419.                                         layoutpolicy_vertical = expanding
  3420.                                         layoutpolicy_horizontal = expanding
  3421.  
  3422.                                         blockoverride "portrait_datamodel" {
  3423.                                             datamodel = "[CharacterWindow.GetRelationsOfType( GetRelation( 'victim' ) )]"
  3424.                                         }
  3425.  
  3426.                                         blockoverride "header_text"
  3427.                                         {
  3428.                                             text = "VICTIMS_LABEL"
  3429.                                         }
  3430.  
  3431.                                         blockoverride "expand_button" {}
  3432.                                     }
  3433.  
  3434.                                     expand = {}
  3435.                                 }
  3436.                             }
  3437.  
  3438.                             widget = {
  3439.                                 name = "carnalitas_fourth_row"
  3440.                                 visible = "[GreaterThan_int32( GetDataModelSize(CharacterWindow.GetRelationsOfType( GetRelation( 'slave' ) )), '(int32)0' ))]"
  3441.                                 layoutpolicy_horizontal = expanding
  3442.                                 layoutpolicy_vertical = expanding
  3443.                                 minimumsize = { -1 110 }
  3444.                                 maximumsize = { -1 110 }
  3445.                                 scissor = yes
  3446.  
  3447.                                 # Carnalitas: show slaves
  3448.                                 hbox = {
  3449.                                     layoutpolicy_horizontal = expanding
  3450.  
  3451.                                     vbox_character_row_item = {
  3452.                                         name = "slaves"
  3453.                                         visible = "[GreaterThan_int32( GetDataModelSize(CharacterWindow.GetRelationsOfType( GetRelation( 'slave' ) )), '(int32)0' ))]"
  3454.                                         layoutpolicy_vertical = expanding
  3455.                                         layoutpolicy_horizontal = expanding
  3456.  
  3457.                                         blockoverride "portrait_datamodel" {
  3458.                                             datamodel = "[CharacterWindow.GetRelationsOfType( GetRelation( 'slave' ) )]"
  3459.                                         }
  3460.  
  3461.                                         blockoverride "header_text"
  3462.                                         {
  3463.                                             text = "game_concept_slaves"
  3464.                                         }
  3465.  
  3466.                                         blockoverride "remaining_items"
  3467.                                         {
  3468.                                             visible = "[GreaterThan_int32( GetDataModelSize(CharacterWindow.GetRelationsOfType( GetRelation( 'slave' ) )), '(int32)7' ))]"
  3469.                                             text = "[GetNumberAbove_int32( GetDataModelSize(CharacterWindow.GetRelationsOfType( GetRelation( 'slave' ) )), '(int32)7' )|=]"
  3470.                                         }
  3471.  
  3472.                                         blockoverride "expand_button_inside" {
  3473.                                             visible = "[GreaterThan_int32( GetDataModelSize(CharacterWindow.GetRelationsOfType( GetRelation( 'slave' ) )), '(int32)7' )]"
  3474.                                             onclick = "[CharacterWindow.ToggleExpandedRelation( 'slaves' )]"
  3475.                                         }
  3476.                                     }
  3477.                                 }
  3478.                             }
  3479.                         }
  3480.                     }
  3481.  
  3482.                     expand = {}
  3483.                 }
  3484.  
  3485.                 ### Carnalitas: SLAVES EXPANDED
  3486.                 scrollbox = {
  3487.                     name = "slaves_expanded"
  3488.                     visible = "[CharacterWindow.IsRelationExpanded( 'slaves' )]"
  3489.                     size = { 100% 100% }
  3490.  
  3491.                     blockoverride "scrollbox_replace_vbox" {
  3492.                         vbox_character_row_item = {
  3493.                             name = "slaves"
  3494.                             margin_top = 10
  3495.                             spacing = 5
  3496.  
  3497.  
  3498.                             blockoverride "portrait_datamodel" {
  3499.                                 datamodel = "[CharacterWindow.GetRelationsOfType( GetRelation( 'slave' ) )]"
  3500.                             }
  3501.  
  3502.                             blockoverride "header_text"
  3503.                             {
  3504.                                 text = "game_concept_slaves"
  3505.                             }
  3506.  
  3507.                             blockoverride "expand_button_inside" {
  3508.                                 onclick = "[CharacterWindow.ToggleExpandedRelation( 'slaves' )]"
  3509.                                 down = "[CharacterWindow.IsRelationExpanded( 'slaves' )]"
  3510.                             }
  3511.  
  3512.                             blockoverride "gridbox_slots" {}
  3513.                         }
  3514.                     }
  3515.                 }
  3516.  
  3517.                 ### RIVALS EXPANDED
  3518.                 scrollbox = {
  3519.                     name = "rivals_expanded"
  3520.                     visible = "[CharacterWindow.IsRelationExpanded( 'rivals' )]"
  3521.                     size = { 100% 100% }
  3522.  
  3523.                     blockoverride "scrollbox_replace_vbox" {
  3524.                         vbox_character_row_item = {
  3525.                             name = "rivals"
  3526.                             margin_top = 10
  3527.                             spacing = 5
  3528.  
  3529.  
  3530.                             blockoverride "portrait_datamodel" {
  3531.                                 datamodel = "[CharacterWindow.GetRelationsOfType( GetRelation( 'rival' ) )]"
  3532.                             }
  3533.  
  3534.                             blockoverride "header_text"
  3535.                             {
  3536.                                 text = "RIVALS_LABEL"
  3537.                             }
  3538.  
  3539.                             blockoverride "expand_button_inside" {
  3540.                                 onclick = "[CharacterWindow.ToggleExpandedRelation( 'rivals' )]"
  3541.                                 down = "[CharacterWindow.IsRelationExpanded( 'rivals' )]"
  3542.                             }
  3543.  
  3544.                             blockoverride "gridbox_slots" {}
  3545.                         }
  3546.                     }
  3547.                 }
  3548.  
  3549.                 ### FRIENDS EXPANDED
  3550.                 scrollbox = {
  3551.                     name = "friends_expanded"
  3552.                     visible = "[CharacterWindow.IsRelationExpanded( 'friends' )]"
  3553.                     size = { 100% 100% }
  3554.  
  3555.                     blockoverride "scrollbox_replace_vbox" {
  3556.                         vbox_character_row_item = {
  3557.                             name = "friends"
  3558.                             margin_top = 10
  3559.                             spacing = 5
  3560.  
  3561.  
  3562.                             blockoverride "portrait_datamodel" {
  3563.                                 datamodel = "[CharacterWindow.GetRelationsOfType( GetRelation( 'friend' ) )]"
  3564.                             }
  3565.  
  3566.                             blockoverride "header_text"
  3567.                             {
  3568.                                 text = "FRIENDS_LABEL"
  3569.                             }
  3570.  
  3571.                             blockoverride "expand_button_inside" {
  3572.                                 onclick = "[CharacterWindow.ToggleExpandedRelation( 'friends' )]"
  3573.                                 down = "[CharacterWindow.IsRelationExpanded( 'friends' )]"
  3574.                             }
  3575.  
  3576.                             blockoverride "gridbox_slots" {}
  3577.                         }
  3578.                     }
  3579.                 }
  3580.  
  3581.                 ### LOVERS EXPANDED
  3582.                 scrollbox = {
  3583.                     name = "lovers_expanded"
  3584.                     visible = "[CharacterWindow.IsRelationExpanded( 'lovers' )]"
  3585.                     size = { 100% 100% }
  3586.  
  3587.                     blockoverride "scrollbox_replace_vbox" {
  3588.                         vbox_character_row_item = {
  3589.                             name = "lovers"
  3590.                             margin_top = 10
  3591.                             spacing = 5
  3592.  
  3593.  
  3594.                             blockoverride "portrait_datamodel" {
  3595.                                 datamodel = "[CharacterWindow.GetRelationsOfType( GetRelation( 'lover' ) )]"
  3596.                             }
  3597.  
  3598.                             blockoverride "header_text"
  3599.                             {
  3600.                                 text = "LOVERS_LABEL"
  3601.                             }
  3602.  
  3603.                             blockoverride "expand_button_inside" {
  3604.                                 onclick = "[CharacterWindow.ToggleExpandedRelation( 'lovers' )]"
  3605.                                 down = "[CharacterWindow.IsRelationExpanded( 'lovers' )]"
  3606.                             }
  3607.  
  3608.                             blockoverride "gridbox_slots" {}
  3609.                         }
  3610.                     }
  3611.                 }
  3612.  
  3613.                 ### WARDS EXPANDED
  3614.                 scrollbox = {
  3615.                     name = "wards_expanded"
  3616.                     visible = "[CharacterWindow.IsRelationExpanded( 'wards' )]"
  3617.                     size = { 100% 100% }
  3618.  
  3619.                     blockoverride "scrollbox_replace_vbox" {
  3620.                         vbox_character_row_item = {
  3621.                             name = "wards"
  3622.                             margin_top = 10
  3623.                             spacing = 5
  3624.  
  3625.  
  3626.                             blockoverride "portrait_datamodel" {
  3627.                                 datamodel = "[CharacterWindow.GetRelationsOfType( GetRelation( 'ward' ) )]"
  3628.                             }
  3629.  
  3630.                             blockoverride "header_text"
  3631.                             {
  3632.                                 text = "WARDS_LABEL"
  3633.                             }
  3634.  
  3635.                             blockoverride "expand_button_inside" {
  3636.                                 onclick = "[CharacterWindow.ToggleExpandedRelation( 'wards' )]"
  3637.                                 down = "[CharacterWindow.IsRelationExpanded( 'wards' )]"
  3638.                             }
  3639.  
  3640.                             blockoverride "gridbox_slots" {}
  3641.                         }
  3642.                     }
  3643.                 }
  3644.  
  3645.                 expand = {}
  3646.             }
  3647.  
  3648.             ####################################
  3649.             ############ COURT TAB #############
  3650.             ####################################
  3651.  
  3652.             vbox_character_list = {
  3653.                 datacontext = "[CharacterWindow.GetCourt]"
  3654.                 visible = "[CharacterWindow.IsTabShown('court')]"
  3655.                 layoutpolicy_vertical = expanding
  3656.                 layoutpolicy_horizontal = expanding
  3657.  
  3658.                 blockoverride "sort_buttons" {}
  3659.                 blockoverride "character_count" {}
  3660.                 blockoverride "scrollbox_margins" {
  3661.                     margin_right = 15
  3662.                 }
  3663.  
  3664.                 blockoverride "container_implementation" {
  3665.                     fixedgridbox = {
  3666.                         name = "characters_grid"
  3667.                         datamodel = "[CharacterSelectionList.GetList]"
  3668.                         visible = "[Not(CharacterSelectionList.IsBuildingList)]"
  3669.                         addcolumn = 580
  3670.                         addrow = 125
  3671.                         setitemsizefromcell = yes
  3672.  
  3673.                         item = {
  3674.                             widget_courtier_item = {
  3675.                                 datacontext = "[CharacterListItem.GetCharacter]"
  3676.  
  3677.                                 # blockoverride "description_relation_text" {
  3678.                                 #   text = "[Character.GetSpecialGuestRelationDescription]"
  3679.                                 # }
  3680.  
  3681.                                     blockoverride "gridbox_items"
  3682.                                     {
  3683.                                         datamodel_wrap = 7
  3684.                                         maxverticalslots = 2
  3685.                                     }
  3686.  
  3687.                                 blockoverride "action_buttons" {}
  3688.                             }
  3689.                         }
  3690.                     }
  3691.                 }
  3692.             }
  3693.  
  3694.             ####################################
  3695.             ########### VASSALS TAB ############
  3696.             ####################################
  3697.  
  3698.             vbox_character_list = {
  3699.                 visible = "[CharacterWindow.IsTabShown('vassals')]"
  3700.                 layoutpolicy_vertical = expanding
  3701.                 layoutpolicy_horizontal = expanding
  3702.                 datacontext = "[CharacterWindow.GetVassals]"
  3703.  
  3704.                 blockoverride "sort_buttons" {}
  3705.                 blockoverride "character_count" {}
  3706.                 blockoverride "scrollbox_margins" {
  3707.                     margin = { 0 5 }
  3708.                     margin_right = 10
  3709.                 }
  3710.  
  3711.                 blockoverride "container_implementation" {
  3712.                     fixedgridbox = {
  3713.                         name = "characters_grid"
  3714.                         datamodel = "[CharacterSelectionList.GetList]"
  3715.                         visible = "[Not(CharacterSelectionList.IsBuildingList)]"
  3716.                         addcolumn = 590
  3717.                         addrow = 90
  3718.                         setitemsizefromcell = yes
  3719.  
  3720.                         item = {
  3721.                             widget_vassal_list_item = {
  3722.                                 datacontext = "[CharacterListItem.GetCharacter]"
  3723.                                 layoutpolicy_horizontal = expanding
  3724.  
  3725.                                 blockoverride "own_vassal" {}
  3726.                             }
  3727.                         }
  3728.                     }
  3729.                 }
  3730.             }
  3731.         }
  3732.  
  3733.         ### EXPANDED VIEWS
  3734.  
  3735.         # TRAITS EXPANDED
  3736.         scrollbox = {
  3737.             name = "traits_expanded"
  3738.             visible = "[CharacterWindow.AreTraitsExpanded]"
  3739.             layoutpolicy_vertical = expanding
  3740.             layoutpolicy_horizontal = expanding
  3741.  
  3742.             using = Animation_Tab_Switch
  3743.  
  3744.             blockoverride "scrollbox_content"
  3745.             {
  3746.                 spacing = 10
  3747.  
  3748.                 vbox = {
  3749.                     spacing = 10
  3750.  
  3751.                     text_label_center = {
  3752.                         text = "MODIFIERS"
  3753.                     }
  3754.  
  3755.                     text_single = {
  3756.                         visible = "[IsDataModelEmpty(CharacterWindow.GetTimedModifiers)]"
  3757.                         text = "CV_NO_MODIFIERS"
  3758.                         default_format = "#low;italic"
  3759.                     }
  3760.  
  3761.                     dynamicgridbox = {
  3762.                         name = "modifiers_grid"
  3763.                         datamodel = "[CharacterWindow.GetTimedModifiers]"
  3764.                         datamodel_wrap = 8
  3765.                         flipdirection = yes
  3766.  
  3767.                         item = {
  3768.                             icon = {
  3769.                                 size = { 35 35 }
  3770.                                 alwaystransparent = no
  3771.                                 texture = "[ModifierItem.GetIcon]"
  3772.                                 tooltip = "[ModifierItem.GetTooltip]"
  3773.                             }
  3774.                         }
  3775.                     }
  3776.                 }
  3777.  
  3778.                 divider_light = {
  3779.                     layoutpolicy_horizontal = expanding
  3780.                 }
  3781.  
  3782.                 vbox = {
  3783.                     spacing = 10
  3784.  
  3785.                     text_label_center = {
  3786.                         text = "TRAITS"
  3787.                     }
  3788.  
  3789.                     fixedgridbox = {
  3790.                         name = "personality_traits_grid"
  3791.                         datamodel = "[CharacterWindow.GetPersonalityTraits]"
  3792.                         addcolumn = 85
  3793.                         addrow = 105
  3794.                         flipdirection = yes
  3795.                         datamodel_wrap = 6
  3796.  
  3797.                         item = {
  3798.                             icon_trait = {
  3799.                                 text_multi = {
  3800.                                     parentanchor = bottom|hcenter
  3801.                                     widgetanchor = top|hcenter
  3802.                                     position = { 0 -5 }
  3803.                                     autoresize = yes
  3804.                                     max_width = 80
  3805.                                     text = "[Trait.GetNameNoTooltip(Character.Self)]"
  3806.                                     default_format = "#high"
  3807.                                     align = hcenter
  3808.                                 }
  3809.                             }
  3810.                         }
  3811.                     }
  3812.  
  3813.                     fixedgridbox = {
  3814.                         name = "traits_grid"
  3815.                         datamodel = "[CharacterWindow.GetTraits]"
  3816.                         addcolumn = 85
  3817.                         addrow = 105
  3818.                         flipdirection = yes
  3819.                         datamodel_wrap = 6
  3820.  
  3821.                         item = {
  3822.                             icon_trait = {
  3823.                                 text_multi = {
  3824.                                     parentanchor = bottom|hcenter
  3825.                                     widgetanchor = top|hcenter
  3826.                                     position = { 0 -5 }
  3827.                                     autoresize = yes
  3828.                                     max_width = 80
  3829.                                     text = "[Trait.GetNameNoTooltip(Character.Self)]"
  3830.                                     default_format = "#high"
  3831.                                     align = hcenter
  3832.                                 }
  3833.                             }
  3834.                         }
  3835.                     }
  3836.                 }
  3837.             }
  3838.         }
  3839.  
  3840.         # TITLES EXPANDED
  3841.         scrollbox = {
  3842.             name = "titles_expanded"
  3843.             visible = "[CharacterWindow.AreTitlesExpanded]"
  3844.             layoutpolicy_vertical = expanding
  3845.             layoutpolicy_horizontal = expanding
  3846.  
  3847.             using = Animation_Tab_Switch
  3848.  
  3849.             blockoverride "scrollbox_content"
  3850.             {
  3851.                 spacing = 15
  3852.  
  3853.                 text_label_center = {
  3854.                     text = "CV_TITLES_NOCOUNT"
  3855.                 }
  3856.  
  3857.                 fixedgridbox = {
  3858.                     name = "titles_box_bishop"
  3859.                     datacontext = "[CharacterWindow.GetCharacter]"
  3860.                     flipdirection = yes
  3861.                     addrow = 90
  3862.                     addcolumn = 270
  3863.                     datamodel_wrap = 2
  3864.  
  3865.                     datamodel = "[CharacterWindow.GetTitles]"
  3866.  
  3867.                     item = {
  3868.                         flowcontainer = {
  3869.                             datacontext = "[TitleItem.GetTitle]"
  3870.                             spacing = 5
  3871.  
  3872.                             coa_title_small_crown = {
  3873.                                 using = tooltip_ne
  3874.                             }
  3875.  
  3876.                             text_multi = {
  3877.                                 text = "[Title.GetNameNoTooltip]"
  3878.                                 parentanchor = vcenter
  3879.                                 autoresize = yes
  3880.                                 default_format = "#high"
  3881.                                 using = Font_Size_Medium
  3882.                                 max_width = 190
  3883.                                 margin_top = 5
  3884.                             }
  3885.                         }
  3886.                     }
  3887.                 }
  3888.             }
  3889.         }
  3890.  
  3891.         # CLAIMS EXPANDED
  3892.         scrollbox = {
  3893.             name = "claims_expanded"
  3894.             visible = "[CharacterWindow.AreClaimsExpanded]"
  3895.             layoutpolicy_vertical = expanding
  3896.             layoutpolicy_horizontal = expanding
  3897.  
  3898.             using = Animation_Tab_Switch
  3899.  
  3900.             blockoverride "scrollbox_content"
  3901.             {
  3902.                 spacing = 10
  3903.  
  3904.                 text_label_center = {
  3905.                     text = "CV_CLAIMS_NOCOUNT"
  3906.                 }
  3907.  
  3908.                 flowcontainer = {
  3909.                     name = "titles_box_bishop"
  3910.                     datacontext = "[CharacterWindow.GetCharacter]"
  3911.                     datamodel = "[CharacterWindow.GetClaims]"
  3912.                     direction = vertical
  3913.                     spacing = 10
  3914.  
  3915.                     item = {
  3916.                         flowcontainer = {
  3917.                             spacing = 5
  3918.                             using = tooltip_ne
  3919.                             tooltip = "[Claim.GetTooltip]"
  3920.  
  3921.                             coa_title_medium = {
  3922.                                 datacontext = "[Claim.GetTitle]"
  3923.                             }
  3924.  
  3925.                             flowcontainer = {
  3926.                                 direction = vertical
  3927.                                 ignoreinvisible = yes
  3928.  
  3929.                                 text_single = {
  3930.                                     text = "[Claim.GetTitle.GetNameNoTooltip]"
  3931.                                     default_format = "#high"
  3932.                                     using = Font_Size_Big
  3933.                                 }
  3934.  
  3935.                                 text_single = {
  3936.                                     name = "pressed_claim"
  3937.                                     visible = "[And(Claim.IsPressed, Not(Claim.IsImplicit))]"
  3938.                                     text = "[pressed_claim_i][pressed_claim|E]"
  3939.                                 }
  3940.  
  3941.                                 text_single = {
  3942.                                     name = "unpressed_claim"
  3943.                                     visible = "[And(Not(Claim.IsPressed), Not(Claim.IsImplicit))]"
  3944.                                     text = "[unpressed_claim_i][unpressed_claim|E]"
  3945.                                 }
  3946.  
  3947.                                 text_single = {
  3948.                                     name = "implicit_claim"
  3949.                                     visible = "[Claim.IsImplicit]"
  3950.                                     text = "[implicit_claim_i][implicit_claim|E]"
  3951.                                 }
  3952.  
  3953.                                 text_multi = {
  3954.                                     visible = "[Claim.GetTitle.GetHolder.IsValid]"
  3955.                                     text = "CLAIM_TITLE_HOLDER"
  3956.                                     max_width = 400
  3957.                                     autoresize = yes
  3958.                                 }
  3959.  
  3960.                                 text_single = {
  3961.                                     visible = "[Not(Claim.GetTitle.GetHolder.IsValid)]"
  3962.                                     text = "CLAIM_TITLE_NOT_CREATED"
  3963.                                     default_format = "#weak"
  3964.                                     align = nobaseline
  3965.                                 }
  3966.                             }
  3967.                         }
  3968.                     }
  3969.                 }
  3970.             }
  3971.         }
  3972.  
  3973.         # DIPLOMACY EXPANDED
  3974.         scrollbox = {
  3975.             name = "diplomacy_expanded"
  3976.             visible = "[CharacterWindow.AreDiplomacyExpanded]"
  3977.             layoutpolicy_vertical = expanding
  3978.             layoutpolicy_horizontal = expanding
  3979.  
  3980.             using = Animation_Tab_Switch
  3981.  
  3982.             blockoverride "scrollbox_content"
  3983.             {
  3984.                 spacing = 15
  3985.  
  3986.                 text_label_center = {
  3987.                     text = "CV_DIPLOMACY"
  3988.                 }
  3989.  
  3990.                 vbox = {
  3991.                     name = "diplomacy_items"
  3992.                     datamodel = "[CharacterWindow.GetDiplomacyItems]"
  3993.  
  3994.                     item = {
  3995.                         vbox = {
  3996.                             layoutpolicy_horizontal = expanding
  3997.                             spacing = 20
  3998.  
  3999.                             divider_light = {
  4000.                                 layoutpolicy_horizontal = expanding
  4001.                             }
  4002.  
  4003.                             button_group = {
  4004.                                 layoutpolicy_horizontal = expanding
  4005.                                 onclick = "[DiplomacyItem.OnClick]"
  4006.                                 tooltip = "[DiplomacyItem.GetTooltip]"
  4007.                                 using = tooltip_se
  4008.  
  4009.  
  4010.                                 hbox = {
  4011.                                     layoutpolicy_horizontal = expanding
  4012.                                     spacing = 20
  4013.  
  4014.                                     widget = {
  4015.                                         size = { 65 74 }
  4016.  
  4017.                                         button = {
  4018.                                             texture = "gfx/interface/icons/diplomatic_icons.dds"
  4019.                                             frame = "[DiplomacyItem.GetDiplomacyFrame]"
  4020.                                             parentanchor = top|hcenter
  4021.                                             position = { 0 -30 }
  4022.                                             framesize = { 120 120 }
  4023.                                             size = { 50 50 }
  4024.                                             tooltip_enabled = no
  4025.                                             scale = 1.3
  4026.                                         }
  4027.  
  4028.                                         coa_realm_medium = {
  4029.                                             datacontext = "[DiplomacyItem.GetTargetCharacter]"
  4030.                                             tooltip = "[DiplomacyItem.GetTooltip]"
  4031.                                             parentanchor = hcenter
  4032.  
  4033.                                             text_single = {
  4034.                                                 name = "warscore"
  4035.                                                 visible = "[DiplomacyItem.HasWarScore]"
  4036.                                                 parentanchor = hcenter
  4037.                                                 position = { 0 -20 }
  4038.                                                 text = "[DiplomacyItem.GetWarScoreFraction|0%=+]"
  4039.                                                 using = Font_Size_Medium
  4040.                                             }
  4041.                                         }
  4042.                                     }
  4043.  
  4044.                                     text_multi = {
  4045.                                         text = "[DiplomacyItem.GetInfo]"
  4046.                                         layoutpolicy_horizontal = expanding
  4047.                                         autoresize = yes
  4048.                                         max_width = 400
  4049.                                     }
  4050.                                 }
  4051.                             }
  4052.  
  4053.                             hbox = {
  4054.                                 name = "reason_characters"
  4055.                                 visible = "[DiplomacyItem.HasReasonCharacters]"
  4056.  
  4057.                                 portrait_head_small = {
  4058.                                     name = "reason_character_left"
  4059.                                     datacontext = "[DiplomacyItem.GetLeftReasonCharacter]"
  4060.                                     blockoverride "opinion_box" {}
  4061.                                     blockoverride "status_icons" {}
  4062.                                 }
  4063.  
  4064.                                 portrait_head_small = {
  4065.                                     name = "reason_character_right"
  4066.                                     datacontext = "[DiplomacyItem.GetRightReasonCharacter]"
  4067.                                     blockoverride "opinion_box" {}
  4068.                                     blockoverride "status_icons" {}
  4069.  
  4070.                                     blockoverride "portrait_transformation"
  4071.                                     {
  4072.                                         portrait_scale = { -1 1 }
  4073.                                         portrait_offset = { 1 0 }
  4074.                                     }
  4075.                                 }
  4076.                             }
  4077.                         }
  4078.                     }
  4079.                 }
  4080.             }
  4081.         }
  4082.     }
  4083.     }
  4084.  
  4085.     ######################################################
  4086.     ################ TYPES AND TEMPLATES #################
  4087.     ######################################################
  4088.  
  4089.     types CharacterWindow
  4090.     {
  4091.     type skill_icon_label_vertical = widget {
  4092.         size = { 40 60 }
  4093.         datacontext = "[SkillItem]"
  4094.  
  4095.         icon = {
  4096.             name = "skill_icon"
  4097.             texture = "gfx/interface/icons/icon_skills.dds"
  4098.             size = { 24 24 }
  4099.             framesize = { 60 60 }
  4100.             position = { -10 17 }
  4101.  
  4102.             block "icon"
  4103.             {
  4104.                 frame = "[SkillItem.GetFrame]"
  4105.             }
  4106.         }
  4107.  
  4108.         block "tooltip"
  4109.         {
  4110.             tooltip = "SKILL_ITEM_TOOLTIP"
  4111.             using = tooltip_ne
  4112.         }
  4113.  
  4114.         text_single = {
  4115.             name = "skill_value"
  4116.             parentanchor = top|hcenter
  4117.             position = { 5 17 }
  4118.             align = center
  4119.  
  4120.             block "value"
  4121.             {
  4122.                 text = "[SkillItem.GetValue]"
  4123.             }
  4124.         }
  4125.     }
  4126.  
  4127.     type icon_row_header_background = icon
  4128.     {
  4129.         size = { 100% 25 }
  4130.  
  4131.         texture = "gfx/interface/component_tiles/tile_title_bg_01.dds"
  4132.         spritetype = corneredtiled
  4133.         spriteborder = { 20 0 }
  4134.             texture_density = 2
  4135.         alpha = 0.5
  4136.     }
  4137.  
  4138.     type widget_family_row_item = widget
  4139.     {
  4140.         layoutpolicy_horizontal = expanding
  4141.         layoutpolicy_vertical = expanding
  4142.         maximumsize = { -1 110 }
  4143.         scissor = yes
  4144.  
  4145.         icon_row_header_background = {}
  4146.  
  4147.         hbox = {
  4148.  
  4149.             block "item_list"
  4150.             {
  4151.             }
  4152.  
  4153.             expand = {}
  4154.         }
  4155.     }
  4156.  
  4157.     type vbox_character_row_item = vbox {
  4158.         spacing = -3
  4159.  
  4160.         widget = {
  4161.             layoutpolicy_horizontal = expanding
  4162.             size = { 0 25 }
  4163.             min_width = 110
  4164.  
  4165.             block "expand_button" {
  4166.                 button_standard_hover = {
  4167.                     size = { 100% 100% }
  4168.  
  4169.                     block "expand_button_inside" {}
  4170.                 }
  4171.             }
  4172.  
  4173.             hbox = {
  4174.                 margin = { 10 0 }
  4175.  
  4176.                 background = {
  4177.                     using = Text_Label_Background
  4178.                     alpha = 0.5
  4179.                     margin = { 0 -2 }
  4180.                 }
  4181.  
  4182.                 text_single = {
  4183.                     align = nobaseline
  4184.                     fontsize = 14
  4185.  
  4186.                     block "header_text"
  4187.                     {
  4188.                         text = "#D NEEDS TEXT#!"
  4189.                     }
  4190.                 }
  4191.  
  4192.                 expand = {}
  4193.  
  4194.                 text_single = {
  4195.                     align = nobaseline
  4196.                     default_format = "#weak"
  4197.  
  4198.                     block "remaining_items" {
  4199.                         visible = no
  4200.                     }
  4201.                 }
  4202.             }
  4203.         }
  4204.  
  4205.         hbox = {
  4206.             layoutpolicy_horizontal = expanding
  4207.  
  4208.             using = Animation_Character_Window_Refresh
  4209.  
  4210.             block "gridbox" {
  4211.                 fixedgridbox = {
  4212.                     flipdirection = yes
  4213.                     addcolumn = 85
  4214.                     addrow = 90
  4215.                     datamodel_wrap = 7
  4216.  
  4217.                     block "gridbox_slots"
  4218.                     {
  4219.                         maxverticalslots = 1
  4220.                     }
  4221.  
  4222.                     block "portrait_datamodel" {
  4223.                         datamodel = "[CharacterWindow.GetParents]"
  4224.                     }
  4225.  
  4226.                     item = {
  4227.                         portrait_head_small = {
  4228.                             blockoverride "portrait_button"
  4229.                             {
  4230.                                 using = tooltip_ne
  4231.                             }
  4232.                             blockoverride "glow_visible"
  4233.                             {
  4234.                                 visible = no
  4235.                             }
  4236.                         }
  4237.                     }
  4238.                 }
  4239.             }
  4240.  
  4241.             block "find_partner" {}
  4242.  
  4243.             expand = {}
  4244.         }
  4245.  
  4246.         expand = {}
  4247.     }
  4248.  
  4249.     type vbox_titles_claims_box = vbox {
  4250.  
  4251.         ## Titles
  4252.         vbox = {
  4253.             name = "titles"
  4254.             visible = "[Not( IsDataModelEmpty( CharacterWindow.GetTitles ) )]"
  4255.             layoutpolicy_horizontal = expanding
  4256.  
  4257.             button_standard_hover = {
  4258.                 layoutpolicy_horizontal = expanding
  4259.                 size = { 0 25 }
  4260.                 onclick = "[CharacterWindow.ToggleExpandedTitles]"
  4261.                 down = "[CharacterWindow.AreTitlesExpanded]"
  4262.                 tooltip = "[SelectLocalization( CharacterWindow.AreTitlesExpanded, 'CV_TITLES_HIDE_TT', 'CV_TITLES_SHOW_TT' )]"
  4263.  
  4264.                 hbox = {
  4265.                     margin = { 5 0 }
  4266.                     margin_bottom = 3
  4267.                     margin_right = 10
  4268.  
  4269.                     text_label_left = {
  4270.                         visible = "[GreaterThan_int32( GetDataModelSize(CharacterWindow.GetTitles), '(int32)1' )]"
  4271.                         text = "CV_TITLES"
  4272.                     }
  4273.  
  4274.                     text_label_left = {
  4275.                         visible = "[Not(GreaterThan_int32( GetDataModelSize(CharacterWindow.GetTitles), '(int32)1' ))]"
  4276.                         text = "CV_TITLES_SINGULAR"
  4277.                     }
  4278.  
  4279.                     expand = {}
  4280.  
  4281.                     text_single = {
  4282.                         block "titles_extra_items"
  4283.                         {
  4284.                             visible = "[GreaterThan_int32(GetDataModelSize(CharacterWindow.GetTitles), '(int32)8' )]"
  4285.                             text = "[GetNumberAbove_int32( GetDataModelSize(CharacterWindow.GetTitles), '(int32)8' )|=]"
  4286.                         }
  4287.                         default_format = "#weak"
  4288.                     }
  4289.                 }
  4290.             }
  4291.  
  4292.             hbox = {
  4293.                 layoutpolicy_horizontal = expanding
  4294.  
  4295.                 hbox = {
  4296.                     layoutpolicy_horizontal = expanding
  4297.  
  4298.                     fixedgridbox = {
  4299.                         datamodel = "[CharacterWindow.GetTitles]"
  4300.                         flipdirection = yes
  4301.                         addrow = 60
  4302.                         addcolumn = 38
  4303.                         maxverticalslots = 1
  4304.  
  4305.                         block "titles_max_slots" {
  4306.                             datamodel_wrap = 2
  4307.                         }
  4308.  
  4309.                         item = {
  4310.                             coa_title_tiny_crown = {
  4311.                                 datacontext = "[TitleItem.GetTitle]"
  4312.                                 #   visible = "[GreaterThan_int32( Title.GetTierFrame, '(int32)3' )]"
  4313.                                 using = tooltip_ne
  4314.  
  4315.                                 icon = {
  4316.                                     name = "has_laws"
  4317.                                     visible = "[TitleItem.GetTitle.HasLaws]"
  4318.                                     parentanchor = bottom|right
  4319.                                     size = { 25 25 }
  4320.                                     position = { 5 0 }
  4321.                                     texture = "gfx/interface/icons/title_status/icon_title_law.dds"
  4322.                                 }
  4323.                             }
  4324.                         }
  4325.                     }
  4326.  
  4327.                     expand = {}
  4328.                 }
  4329.             }
  4330.         }
  4331.  
  4332.         ## Claims
  4333.         vbox = {
  4334.             name = "claims"
  4335.             visible = "[Not(IsDataModelEmpty(CharacterWindow.GetClaims))]"
  4336.             layoutpolicy_horizontal = expanding
  4337.  
  4338.             vbox = {
  4339.                 layoutpolicy_horizontal = expanding
  4340.  
  4341.                 button_standard_hover = {
  4342.                     layoutpolicy_horizontal = expanding
  4343.                     margin_left = 5
  4344.                     size = { 0 25 }
  4345.                     onclick = "[CharacterWindow.ToggleExpandedClaims]"
  4346.                     down = "[CharacterWindow.AreClaimsExpanded]"
  4347.                     tooltip = "[SelectLocalization( CharacterWindow.AreClaimsExpanded, 'CV_CLAIMS_HIDE_TT', 'CV_CLAIMS_SHOW_TT' )]"
  4348.  
  4349.                     hbox = {
  4350.                         margin = { 5 0 }
  4351.                         margin_bottom = 3
  4352.                         margin_right = 10
  4353.  
  4354.                         text_label_left = {
  4355.                             visible = "[GreaterThan_int32( GetDataModelSize(CharacterWindow.GetClaims), '(int32)1' )]"
  4356.                             text = "CV_CLAIMS"
  4357.                         }
  4358.  
  4359.                         text_label_left = {
  4360.                             visible = "[Not(GreaterThan_int32( GetDataModelSize(CharacterWindow.GetClaims), '(int32)1' ))]"
  4361.                             text = "CV_CLAIMS_SINGULAR"
  4362.                         }
  4363.  
  4364.                         expand = {}
  4365.  
  4366.                         text_single = {
  4367.                             block "claims_extra_items"
  4368.                             {
  4369.                                 visible = "[GreaterThan_int32( GetDataModelSize(CharacterWindow.GetClaims), '(int32)10' )]"
  4370.                                 text = "[GetNumberAbove_int32(GetDataModelSize(CharacterWindow.GetClaims), '(int32)10' )|=]"
  4371.                             }
  4372.                             default_format = "#weak"
  4373.                         }
  4374.                     }
  4375.                 }
  4376.  
  4377.                 expand = {}
  4378.             }
  4379.  
  4380.             hbox = {
  4381.                 layoutpolicy_horizontal = expanding
  4382.  
  4383.                 fixedgridbox = {
  4384.                     name = "claims_box"
  4385.                     datamodel = "[CharacterWindow.GetClaims]"
  4386.                     flipdirection = yes
  4387.                     addrow = 60
  4388.                     addcolumn = 38
  4389.                     maxverticalslots = 1
  4390.  
  4391.                     block "claims_max_slots" {
  4392.                         datamodel_wrap = 8
  4393.                     }
  4394.  
  4395.                     item = {
  4396.                         container = {
  4397.                             datacontext = "[Claim.GetTitle]"
  4398.                             using = tooltip_ne
  4399.                             tooltip = "CHARACTER_WINDOW_CLAIM_TOOLTIP"
  4400.  
  4401.                             coa_title_tiny_crown = {
  4402.                                 name = "claim"
  4403.                                 tooltip_enabled = no
  4404.  
  4405.  
  4406.                                 highlight_icon = {
  4407.                                     name = "pressed_claim"
  4408.                                     visible = "[And(Claim.IsPressed, Not(Claim.IsImplicit))]"
  4409.                                     texture = "gfx/interface/icons/title_status/icon_claim_pressed.dds"
  4410.                                     size = { 24 24 }
  4411.                                     parentanchor = bottom|right
  4412.                                 }
  4413.  
  4414.                                 highlight_icon = {
  4415.                                     name = "unpressed_claim"
  4416.                                     visible = "[And(Not(Claim.IsPressed), Not(Claim.IsImplicit))]"
  4417.                                     texture = "gfx/interface/icons/title_status/icon_claim_unpressed.dds"
  4418.                                     size = { 24 24 }
  4419.                                     parentanchor = bottom|right
  4420.                                 }
  4421.  
  4422.                                 highlight_icon = {
  4423.                                     name = "implicit_claim"
  4424.                                     visible = "[Claim.IsImplicit]"
  4425.                                     texture = "gfx/interface/icons/title_status/icon_claim_implicit.dds"
  4426.                                     size = { 24 24 }
  4427.                                     parentanchor = bottom|right
  4428.                                 }
  4429.                             }
  4430.                         }
  4431.                     }
  4432.                 }
  4433.  
  4434.                 expand = {}
  4435.             }
  4436.         }
  4437.  
  4438.         expand = {}
  4439.     }
  4440.  
  4441.     type vbox_diplomacy_box = vbox {
  4442.         name = "diplomacy"
  4443.  
  4444.         button_standard_hover = {
  4445.             layoutpolicy_horizontal = expanding
  4446.             size = { 0 25 }
  4447.             onclick = "[CharacterWindow.ToggleExpandedDiplomacy]"
  4448.             down = "[CharacterWindow.AreDiplomacyExpanded]"
  4449.             tooltip = "[SelectLocalization( CharacterWindow.AreDiplomacyExpanded, 'CV_DIPLOMACY_HIDE_TT', 'CV_DIPLOMACY_SHOW_TT' )]"
  4450.  
  4451.             hbox = {
  4452.                 margin = { 5 0 }
  4453.                 margin_left = 10
  4454.                 margin_bottom = 3
  4455.  
  4456.                 text_label_left = {
  4457.                     layoutpolicy_horizontal = expanding
  4458.                     text = "CV_DIPLOMACY"
  4459.                         autoresize = no
  4460.                     margin_right = 0
  4461.                 }
  4462.             }
  4463.  
  4464.             hbox = {
  4465.                 margin = { 10 0 }
  4466.                 margin_bottom = 3
  4467.  
  4468.                 expand = {}
  4469.  
  4470.                 text_single = {
  4471.                     default_format = "#weak"
  4472.  
  4473.                     block "diplomacy_extra_items"
  4474.                     {
  4475.                         visible = no
  4476.                     }
  4477.                 }
  4478.             }
  4479.         }
  4480.  
  4481.         vbox = {
  4482.             margin_top = 20
  4483.             min_width = 100
  4484.  
  4485.             fixedgridbox = {
  4486.                 name = "diplomacy_items"
  4487.                 datamodel = "[CharacterWindow.GetDiplomacyItems]"
  4488.                 flipdirection = yes
  4489.                 addrow = 65
  4490.                 addcolumn = 50
  4491.  
  4492.                 block "diplomacy_slots"
  4493.                 {
  4494.                     maxverticalslots = 2
  4495.                     maxhorizontalslots = 2
  4496.                     datamodel_wrap = 2
  4497.                 }
  4498.  
  4499.                 item = {
  4500.                     container = {
  4501.                         button = {
  4502.                             parentanchor = top|hcenter
  4503.                             position = { 0 -22 }
  4504.                             texture = "gfx/interface/icons/diplomatic_icons.dds"
  4505.                             frame = "[DiplomacyItem.GetDiplomacyFrame]"
  4506.                             framesize = { 120 120 }
  4507.                             size = { 50 50 }
  4508.                             tooltip_enabled = no
  4509.  
  4510.                             text_single = {
  4511.                                 name = "warscore"
  4512.                                 visible = "[DiplomacyItem.HasWarScore]"
  4513.                                 parentanchor = top|hcenter
  4514.                                 position = { 0 10 }
  4515.                                 text = "[DiplomacyItem.GetWarScoreFraction|0%=+]"
  4516.                                 fontsize = 13
  4517.                             }
  4518.                         }
  4519.  
  4520.                         coa_realm_small = {
  4521.                             datacontext = "[DiplomacyItem.GetTargetCharacter]"
  4522.                             tooltip = "[DiplomacyItem.GetTooltip]"
  4523.                             using = tooltip_es
  4524.                             tooltip_offset = { 0 22 }
  4525.                             onrightclick = "[DefaultOnRealmFlagClick(Character.GetID)]"
  4526.  
  4527.                             state = {
  4528.                                 name = _mouse_hierarchy_enter
  4529.                                 start_sound = {
  4530.                                     soundeffect = "event:/SFX/UI/Generic/sfx_ui_generic_icon_pointer_over"
  4531.                                 }
  4532.                             }
  4533.  
  4534.                             blockoverride "coa_button"
  4535.                             {
  4536.                                 onclick = "[DiplomacyItem.OnClick]"
  4537.                                 button_ignore = none
  4538.                             }
  4539.                         }
  4540.                     }
  4541.                 }
  4542.             }
  4543.         }
  4544.  
  4545.         expand = {}
  4546.     }
  4547.         }
  4548.  
  4549.     template Animation_Character_Window_Refresh
  4550.     {
  4551.         state = {
  4552.             name = character_window_refresh
  4553.             using = Animation_Refresh_FadeOut
  4554.             alpha = 0.65
  4555.         }
  4556.    
  4557.         state = {
  4558.             using = Animation_Refresh_FadeIn
  4559.         }
  4560.     }
  4561.  
  4562.     template Animation_Character_Window_Refresh_Short
  4563.     {
  4564.         state = {
  4565.             name = character_window_refresh
  4566.             using = Animation_Refresh_FadeOut
  4567.             alpha = 0.8
  4568.         }
  4569.    
  4570.         state = {
  4571.             using = Animation_Refresh_FadeIn
  4572.             duration = 0.25
  4573.         }
  4574.     }
Add Comment
Please, Sign In to add comment