Skip to content

Commit

Permalink
1.0.1
Browse files Browse the repository at this point in the history
Fixed sorting for special buildings.
Added advantage at the top of the battle window.
Added hotkey 2 to assign or change commander.
Fixed a typo in battle results and rounding of control in the county list.
  • Loading branch information
Agamidae committed Dec 26, 2023
1 parent 444f069 commit 7bce506
Show file tree
Hide file tree
Showing 8 changed files with 107 additions and 10 deletions.
84 changes: 81 additions & 3 deletions OCR-Support/gui/window_army.gui
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,83 @@ window = {

expand = { }
}

# warnings
hbox = {
layoutpolicy_horizontal = expanding
spacing = 3

hbox = {
layoutpolicy_horizontal = expanding

visible = "[Army.IsRecentlyDisembarked]"
text_single = {
text = "[Army.GetEmbarkInfoForTooltip]"
}

expand = { }
}

hbox = {
tooltip = "ARMY_ATTRITION_TT"
spacing = 3

visible = "[GreaterThan_CFixedPoint(Army.GetArmyAttritionPercentage, '(CFixedPoint)0.03')]"

text_single = {
raw_text = "[Army.GetArmyAttritionPercentage|%0-]"
}

text_single = {
raw_text = "attrition,"
}
}

button_text = {
visible = "[Not(Army.GetCommander.IsValid)]"
blockoverride "text" {
raw_text = "Assign commander!"
}
blockoverride "disabled" {
visible = "[Not(ArmyWindow.CanShowCommanders)]"
}
enabled = "[ArmyWindow.CanShowCommanders]"
onclick = "[ArmyWindow.ShowCommanders]"
}

hbox = {
visible = "[Not(GetVariableSystem.Exists('army_tabs'))]"
tooltip = "[Army.GetSupplyStateTooltip]"
text_single = {
visible = "[EqualTo_int32(ArmyWindow.GetSupplyStateFrame, '(int32)3')]"
raw_text = "SUPPLY_STATE_2"
}

text_single = {
visible = "[EqualTo_int32(ArmyWindow.GetSupplyStateFrame, '(int32)2')]"
raw_text = "SUPPLY_STATE_1"
}

# text_single = {
# visible = "[EqualTo_int32(ArmyWindow.GetSupplyStateFrame, '(int32)1')]"
# raw_text = "SUPPLY_STATE_0"
# }
hbox = {
visible = "[GreaterThan_int32(ArmyWindow.GetSupplyStateFrame, '(int32)1')]"
text_single = {
raw_text = ", [ArmyWindow.GetCurrentSupply]"
}

text_single = {
visible = "[GreaterThan_int32(ArmyWindow.GetFullSupplyCapacity, ArmyWindow.GetCurrentSupply)]"
raw_text = " out of [ArmyWindow.GetFullSupplyCapacity] supplies."
}
}
}

expand = { }
}

}

# header
Expand Down Expand Up @@ -2145,9 +2222,10 @@ window = {
margin_left = 5

button_text = {
shortcut = speed_2
visible = "[Not( Character.IsValid )]"
blockoverride "text" {
raw_text = "Assign commander."
raw_text = "Assign commander, hotkey 2."
}
blockoverride "disabled" {
visible = "[Not(ArmyWindow.CanShowCommanders)]"
Expand Down Expand Up @@ -2209,9 +2287,9 @@ window = {
}

button_text = {
shortcut = speed_1
shortcut = speed_2
blockoverride "text" {
raw_text = "Change commander, 1."
raw_text = "Change commander, 2."
}
blockoverride "extra" {
text_single = {
Expand Down
2 changes: 1 addition & 1 deletion OCR-Support/gui/window_battle_summary.gui
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ window = {
layoutpolicy_horizontal = expanding
text_single = {
layoutpolicy_horizontal = expanding
raw_text = "Your solders:"
raw_text = "Your soldiers:"
}

vbox = {
Expand Down
10 changes: 9 additions & 1 deletion OCR-Support/gui/window_character.gui
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,14 @@ window = {
layoutpolicy_horizontal = expanding
margin_left = 5

# hbox = {
# visible = "[Character.IsAlive]"
#
# text_single = {
# raw_text = "You are [Character.GetHerHis] heir!"
# visible = "[ObjectsEqual(Character.GetPrimaryTitle.GetHeir.Self, GetPlayer )]"
# }
# }

button_text = {
blockoverride "text" {
Expand Down Expand Up @@ -1541,7 +1549,7 @@ window = {
raw_text = "levies: [Scope.GetLandedTitle.MakeScope.Var('total_levies').GetValue|0]."
}
text_single = {
raw_text = "Control: [Scope.GetLandedTitle.GetCountyData.GetControl]."
raw_text = "Control: [Scope.GetLandedTitle.GetCountyData.GetControl|0]."
}
}

Expand Down
6 changes: 6 additions & 0 deletions OCR-Support/gui/window_combat.gui
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,12 @@ window = {
raw_text = "[Multiply_float(Subtract_float(CombatWindow.GetCombat.GetPowerSlider, '(float)50'), '(float)2')|0]%,"
}

text_single = {
raw_text = "[CombatWindow.GetAdvantage] advantage,"
tooltip = "[CombatWindow.GetAdvantageDescription]"
visible = "[Not(CombatWindow.IsCombatInPursuitPhase)]"
}

hbox = {
margin_top = 1
visible = "[CombatWindow.IsCombatInPursuitPhase]"
Expand Down
4 changes: 2 additions & 2 deletions OCR-Support/gui/window_county_view.gui
Original file line number Diff line number Diff line change
Expand Up @@ -2168,11 +2168,11 @@ window = {
# debug
button_text = {
visible = no
datacontext = "[GetPlayer.GetCouncillor('councillor_chancellor')]"
datacontext = "[GetPlayer.GetCouncillor('councillor_court_chaplain')]"
layoutpolicy_horizontal = expanding
onclick = "[GetScriptedGui('finish_task').Execute( GuiScope.SetRoot( Character.MakeScope ).End )]"
blockoverride "text" {
raw_text = "Finish chancellor's task"
raw_text = "Finish chaplain's task"
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions OCR-Support/gui/window_military.gui
Original file line number Diff line number Diff line change
Expand Up @@ -1643,6 +1643,11 @@ types OCR {
visible = "[And(Or(Not(MercenaryCompany.IsHired), MercenaryCompany.IsHiredByLocalPlayer), Not(MercenaryCompany.WillGoInBankruptcy(GetPlayer.Self)))]"
}

text_single = {
visible = "[MercenaryCompany.IsHiredByLocalPlayer]"
raw_text = "View"
}

text_single = {
name = "cost_label"
raw_text = "[MercenaryCompany.GetCostDesc],"
Expand Down
2 changes: 1 addition & 1 deletion OCR-Support/gui/window_my_realm.gui
Original file line number Diff line number Diff line change
Expand Up @@ -1938,7 +1938,7 @@ window = {
}
blockoverride "extra" {
text_single = {
raw_text = "[Select_CString(ScriptedGui.IsShown( GuiScope.SetRoot( GetPlayer.MakeScope ).End ), 'Sorted by distance, sort by tax', 'Sorted by tax, sort by distance')], hotkey T."
raw_text = "[Select_CString(ScriptedGui.IsShown( GuiScope.SetRoot( GetPlayer.MakeScope ).End ), 'Sorted by tax, sort by distance', 'Sorted by distance, sort by tax')], hotkey T."
}
}
onclick = "[GetScriptedGui('sort_sp_tax').Execute( GuiScope.SetRoot( GetPlayer.MakeScope ).End )]"
Expand Down
4 changes: 2 additions & 2 deletions OCR-Support/localization/english/ocr_l_english.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

test1: "speed_1"

mod_version: "Mod version 1.0"
mod_changes: "Fixed events increasing speed.\nAdded a toggle to auto-unpause events.\nFixed sorting for character counties not refreshing the list.\nTweaked updates to not be read first in some windows."
mod_version: "Mod version 1.0.1"
mod_changes: "Fixed sorting for special buildings.\nAdded advantage at the top of the battle window.\nAdded hotkey 2 to assign or change commander.\nFixed a typo in battle results and rounding of control in the county list."
prev_changes: ""


Expand Down

0 comments on commit 7bce506

Please sign in to comment.