Skip to content

Commit

Permalink
More UI/accessibility changes (mostly; big commit)
Browse files Browse the repository at this point in the history
Let's start with:
Changes not (directly) related to the BUG menu:
* Fixed an issue with [advc.001c]: No GP probabilities had been shown when there was a positive GP rate but no accumulated progress yet.
* Bug fixed in the recently merged [dlph.26] (restructured code for triggered declarations of war): Attitude cache was not getting updated when there was just a single declaration of war (no wars triggered).
* Added an upper bound for the number of Barbarians placed per unowned tile because Barbarian activity was sometimes too intense on the highest difficulty settings. [advc.300]
(Still to be done: When placing Barbarians, take into account where Barbarians have previously been placed or killed. This mechanism is going make sure that Barbarians don't keep coming and coming in large numbers.)
* Animals may enter unowned tiles with a resource if that resource requires a tech to be revealed. This should make it impossible to infer hidden resources from the movements of animals. [advc.309]
* Default number of Advanced Start points in the Ancient era set to 400 (was 800). 400 is a better default for the SPaH option and not unreasonable for regular Advanced Start. [advc.250b]
* Two bugs fixed in BUG's calculateTradeRoutes function (TradeUtil.py). I don't think either of these had any impact in AdvCiv, but they were still bugs. Merged from Dawn of Civilization; Git commit:
dguenms/Dawn-of-Civilization@6dbe198
* Freed up some space on the "Active" tab of the Foreign Advisor by removing the leader name headings. [advc.066]
* To make the help text shown when hovering over a unit icon more compact, the owner is no longer shown when the unit belongs to the active player.  [advc.069]
* Colon removed after "Turn" on the game turn display (upper right corner). [advc.002k]
* Sevopedia shows icons before category headings only if there is room. In English, almost all headings are sufficiently short, but, in other languages, many are too long (given the AdvCiv font size). [advc.002b]
* A few more changes to the shortcuts section of Sevopedia. [advc.004y]

As a result of trying to generate some very large maps:
* Amended [advc.030] (impassable tiles can separate map areas) to make the computation of areas less memory-intensive.
* Fixed a Python crash at game start resulting from [advc.004a] (reworked bulb path utility). In the process, I've exposed CvGlobalContext::IsGraphicsInitialized to Python. I'm keeping it exposed although I'm not using it after all.

BUG MENU

Tidied up the layout of the entire BUG/K-Mod menu, in part, to match AdvCiv's increased font size [advc.002b], revised or rewrote most of the help texts (some of which were nearly incomprehensible to me) in English and German and made minor changes to the behavior of some of the options, in particular, again, changes to help text (on the actual widgets). Merged a bit of code from BULL, but nothing major; some of that remains to be done (see Tbd. in the manual under change id 004). The one part of BUG that I mostly skipped is the Customizable Domestic Advisor.

Improved the handling of invalid data in BUG ini files. Hopefully, this will later result in smooth updates from AdvCiv 0.94 to 0.95. [advc.009d]
In the process, I came across a few bugs in the error handling code in BugOptionsTab.py. [advc.001]

BUG no longer writes default values and hover text as comments into its ini files. As far as I can tell, this only affects new installations because the comments are only written once when the ini files are created -- which is also why I'm disabling them: they become outdated when the options-related XML files are changed. (And the ini files shouldn't be edited manually anyway, so comments don't make much sense.) [advc.009d]

AdvCiv options moved from XML to the BUG menu (enabled by default):
* Option to show resource bubbles at the start of a new game moved to the "Map" tab. Also, the option didn't actually work. I think it did work in v0.94 and I don't know how I broke it, but, anyway, it should be fixed now. [advc.004m]
* Option to color-code team membership moved to the "Score" tab. Now only works when the option for the Advanced/Tabular layout is also enabled. [advc.155]
* Moved the "List Units per Owner" option [advc.061] from the General tab of the BUG menu to the Map tab. [advc.061]

Merged from BULL:
* Adapted WhipAssist (overflow info on Hurry button) to K-Mod's treatment of excess overflow. Overflow info on the production bar (if enabled) now uses the same (C++) code as WhipAssist; redundant Python code in CvMainInterface.py commented out. [advc.064]

Functional changes to BUG options:
* Uncoupled the "Show Era" and "Show Era Color" options from the "Just Another Game Clock" option and rearranged the "Clock" tab a bit. Added an option to show the primary view of the clock for a longer or shorter time period than the alternate view. (Also added an option for showing the game era instead of the active player's era, but then changed my mind and hid the new option through BugNJAGCOptionsTab.py.) [advc.067]
* Added a dirty-bit for the Tech Advisor screen so that the tech tree gets properly redrawn when era colors are changed. [advc.068]
* Some changes to PLE mode/filter button help text to match the terminology of the menu. [advc.069]
* PLE help text for unit icons shows only the basic unit help; had previously shown e.g. the unique replacements of the unit and its production cost. Turns to heal now shown on a separate line (was an inscrutable number after the combat strength values). [advc.069]
* PLE bugfixes: [advc.001,advc.069]
- Movement Highlighter had crashed sometimes (AStarTools.py).
- Color changes to unit bars had only been applied after a restart (PlotListEnhancements.py).
- Health bars had been shown for civilian units (PLE.py; possibly intended that way).
* "Fractional Movement Points" now also affects the help text shown when hovering over a unit icon in the plot list. [advc.069]
* Bugs fixed in the Autolog mod (autologEventManager.py): had assumed in a few places that the active player is in slot 0, which isn't usually true in scenarios. I haven't tested the corrections in a scenario, so perhaps there are further issues. [advc.001]

Removed BUG options:
* "Show Strategy layer" because players can use Ctrl+X for that
* "Show Percent Progress" (game clock) because the percentage of elapsed game turns isn't a helpful statistic.
* Option for setting the default counting method for Raw Yields
* "Pending: Border Expansion" and "Peace" alerts
* Dark gray can no longer be selected in BUG's drop-down menus. Orange can be selected instead.
* Blinking reminder about the BUG menu shortcut
* Start year setting (Autolog); the log always uses game turn and game year now.
* "Show Culture Turns", "Commerce Subtotals", "Widescreen" (Tech Advisor) and K-Mod's "Non-Zero Stats Only" are always enabled, no longer optional. [advc.065]

Changes to default settings:
(applies only to new installations of AdvCiv)
* "Improved Info Tab" disabled (tab "Advisors")
* Send reminders as popups (was popup AND on-screen message; tab "Alerts")
* Show WhipAssist tooltip on the hurry button (previously unavailable; tab "City Screen")
* FoodAssist ("Detailed Food Info") enabled (tab "City Screen")
* Promotion indicator for unit icons disabled (tab "Unit Icons" tab)
These changes are only relevant if one enables other options that remain disabled by default:
* Promotion Offset in PLE help text set to 8 in order to match changes to the size of the text pane (was 0; tab "Unit Icons")
* Custom Inland Advisor's color-coding disabled (tab "Advisors")
* "Health Bars" for unit icons enabled and hidden during combat (tab "Unit Icons")
* Don't record reminders through Autolog (tab "Alerts")
* Don't record slider positions through Autolog (tab "Autolog")
* To reduce the space taken up by the "alternate" info of Advanced Combat Odds:
- "Survival Odds" and "Unharmed Odds" are never shown
- "Basic Values" are only shown in standard view, not in alternate
- "XP Range" never shown, alternate view shows "Unrounded XP" instead
  • Loading branch information
f1rpo committed Jan 6, 2019
1 parent aa7146b commit bd47281
Show file tree
Hide file tree
Showing 94 changed files with 3,646 additions and 1,925 deletions.
23 changes: 15 additions & 8 deletions Assets/Config/Advanced Combat Odds.xml
Expand Up @@ -28,9 +28,11 @@
type="boolean" default="True"/>
<option id="ShowModifierLabels" key="Show Modifier Labels"
type="boolean" default="False"/>


<!-- advc.048: default was 3. Need to make the alternate view a bit
more compact. -->
<list id="ShowBasicInfo" key="Show Basic Info"
type="int" default="3" listType="string"
type="int" default="1" listType="string"
values="Never|Normal|Shifted|Both"/>
<!-- advc.048: default was 0 -->
<list id="ShowAttackerInfo" key="Show Attacker Info"
Expand All @@ -39,12 +41,16 @@
<list id="ShowDefenderInfo" key="Show Defender Info"
type="int" default="3" listType="string"
values="ACO__ShowBasicInfo"/>

<!-- advc.048: default was 3. Note that victory and defeat odds
are shown in any case. -->
<list id="ShowSurvivalOdds" key="Show Survival Odds"
type="int" default="3" listType="string"
type="int" default="0" listType="string"
values="ACO__ShowBasicInfo"/>
<!-- advc.048: default was 2. Need to clear space, and this info
is redundant as far as I can tell (equal to the
probability on the topmost bar). -->
<list id="ShowUnharmedOdds" key="Show Unharmed Odds"
type="int" default="2" listType="string"
type="int" default="0" listType="string"
values="ACO__ShowBasicInfo"/>
<list id="ShowAverageHealth" key="Show Average Health"
type="int" default="2" listType="string"
Expand All @@ -55,12 +61,13 @@
<list id="ShowDefenderHealthBars" key="Show Dedender Health Bars"
type="int" default="2" listType="string"
values="ACO__ShowBasicInfo"/>

<!-- advc.048: Swapped the defaults of these two. The
ExperienceRange is too complicated. -->
<list id="ShowUnroundedExperience" key="Show Unrounded Experience"
type="int" default="0" listType="string"
type="int" default="2" listType="string"
values="ACO__ShowBasicInfo"/>
<list id="ShowExperienceRange" key="Show Experience Range"
type="int" default="2" listType="string"
type="int" default="0" listType="string"
values="ACO__ShowBasicInfo"/>

<list id="ShowDefenseModifiers" key="Show Defense Modifiers"
Expand Down
9 changes: 7 additions & 2 deletions Assets/Config/Advanced Scoreboard.xml
Expand Up @@ -70,7 +70,7 @@
type="boolean" default="True"
get="isAlignIcons" set="setAlignIcons" dirtyBit="Score"/>
<option id="DisplayOrder" key="Display Order"
type="string" default="!?2WSZC6PTURAHQ*LO"
type="string" default="!?2WSZCPTURAHQ*LO"
get="getDisplayOrder" set="setDisplayOrder" dirtyBit="Score"/>
<list id="DefaultSpacing" key="Default Column Spacing"
type="int" default="0" values="0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10"
Expand All @@ -85,6 +85,10 @@
<option id="GroupVassals" key="Group Vassals Under Master"
type="boolean" default="True"
get="isGroupVassals" set="setGroupVassals" dirtyBit="Score"/>
<!-- advc.155 -->
<option id="ColorCodeTeamScore" key="Color Code Team Score"
type="boolean" default="True"
get="isColorCodeTeamScore" dirtyBit="Score"/>
<option id="LeftAlignName" key="Left-Align Name"
type="boolean" default="True"
get="isLeftAlignName" set="setLeftAlignName" dirtyBit="Score"/>
Expand All @@ -108,8 +112,9 @@
<choice id="ThemVersusYou" get="isPowerThemVersusYou"/>
<choice id="YouVersusThem" get="isPowerYouVersusThem"/>
</list>
<!-- advc.004: values 3 and 4 removed -->
<list id="PowerDecimals" key="Power Ratio Decimals"
type="int" default="1" values="1, 2, 3, 4"
type="int" default="1" values="1, 2"
get="getPowerDecimals" set="setPowerDecimals" dirtyBit="Score"/>
<option id="PowerColor" key="Power Color"
type="color" default="COLOR_WHITE"
Expand Down
6 changes: 4 additions & 2 deletions Assets/Config/Autolog.xml
Expand Up @@ -75,8 +75,9 @@
get="isShowIBT" set="setShowIBT"
label="Show IBT"
help="When checked, the logger inserts IBT (in between turns) at the end of the player's turn."/>
<!-- advc.004: Colon added to default string -->
<option id="Prefix" key="Prefix"
type="string" default="Player Comment"
type="string" default="Player comment:"
get="getPrefix" set="setPrefix"
label="Prefix"
help="Used as a prefix before user entries in the log [use ALT + E], e.g. your nick."/>
Expand Down Expand Up @@ -109,8 +110,9 @@
get="isLogImprovements" set="setLogImprovements"
label="Improvements"
help="When checked, will log when your improvements are built or destroyed by you."/>
<!-- advc.004: default was True. Too noisy. -->
<option id="LogSliders" key="Sliders"
type="boolean" default="True" and="LoggingOn"
type="boolean" default="False" and="LoggingOn"
get="isLogSliders" set="setLogSliders"
label="Sliders"
help="When checked, will log the sliders each turn."/>
Expand Down
8 changes: 5 additions & 3 deletions Assets/Config/BUG Advisors.xml
Expand Up @@ -17,7 +17,7 @@
<options id="Advisors" file="BUG Advisors.ini">
<section id="Advisors">
<!-- Exotic Foreign Advisor (F4) by Requies, Dresden, EmperorFool -->
<!-- advc.004: Set the default to Numbers (was Smilies) -->
<!-- advc.004: Set the default to Numbers (was Smilies in K-Mod) -->
<option id="EFAGlanceTab" key="EFA Glance"
type="boolean" default="True"
get="isShowGlance"/>
Expand All @@ -31,8 +31,9 @@
<option id="EFAWarTrades" key="EFA War Trades"
type="boolean" default="True"
get="isShowGlanceWarTrades"/>
<!-- advc.004: default was True in K-Mod -->
<option id="EFAImprovedInfo" key="EFA Improved Info"
type="boolean" default="True"
type="boolean" default="False"
get="isUseImprovedEFAInfo"/>
<option id="EFADealTurnsLeft" key="EFA Deal Turns Left"
type="boolean" default="True"
Expand All @@ -51,9 +52,10 @@
<option id="WideTechScreen" key="Wide Tech Screen"
type="boolean" default="False"
get="isWideTechScreen"/>
<!-- advc.068: dirtyBit added -->
<option id="ShowTechEra" key="Show Tech Era"
type="boolean" default="False"
get="isShowTechEra"/>
get="isShowTechEra" dirtyBit="Tech_Screen"/>

<!-- BUG Religion Advisor (F7) by Ruff_Hi -->
<option id="BugReligiousTab" key="Religious"
Expand Down
10 changes: 6 additions & 4 deletions Assets/Config/BUG City Screen.xml
Expand Up @@ -40,8 +40,9 @@
</list>

<!-- FoodAssist by EmperorFool -->
<!-- advc.004: default was False in K-Mod -->
<option id="FoodAssist" key="FoodAssist"
type="boolean" default="False"
type="boolean" default="True"
get="isShowFoodAssist" dirtyBit="CityScreen"/>

<!-- WhipAssist by EmperorFool, Dresden -->
Expand All @@ -53,9 +54,10 @@
get="isWhipAssistOverflowCountCurrentProduction" dirtyBit="CityScreen"/>

<!-- Culture Turns by Chinese American -->
<option id="CultureTurns" key="Culture Turns"
<!-- advc.065: No longer optional -->
<!--option id="CultureTurns" key="Culture Turns"
type="boolean" default="True"
get="isShowCultureTurns" dirtyBit="CityScreen"/>
get="isShowCultureTurns" dirtyBit="CityScreen"/-->

<!-- Great Person Info by Chinese American, EmperorFool -->
<option id="GreatPersonTurns" key="Great Person Turns"
Expand All @@ -71,7 +73,7 @@
get="isShowAngerCounter" dirtyBit="CityScreen"/>

<!-- Show Only Present and Extra Religions/Corporations by johny smith -->
<!-- advc.106d: Set both defaults to True -->
<!-- advc.004: defaults were both False in K-Mod -->
<option id="OnlyPresentReligions" key="Only Present Religions"
type="boolean" default="True"
get="isShowOnlyPresentReligions" dirtyBit="CityScreen"/>
Expand Down
3 changes: 3 additions & 0 deletions Assets/Config/BUG Core.xml
Expand Up @@ -16,6 +16,9 @@
url="http://forums.civfanatics.com/forumdisplay.php?f=268">

<options id="Core" file="BUG Core.ini">
<!-- advc.003 (note): Since isShowOptionsKeyReminder in
'BUG Main Interface.xml' isn't used anymore, this setting
is obsolete. -->
<section id="General">
<option id="OptionsScreenOpened" key="Options Screen Opened"
type="boolean" default="False"
Expand Down
13 changes: 11 additions & 2 deletions Assets/Config/BUG Main Interface.xml
Expand Up @@ -16,15 +16,19 @@

<options id="MainInterface" file="BUG Main Interface.ini">
<section id="Main">

<!-- Options Screen Shortcut Reminder -->
<!-- advc.003 (note): Now unused -->
<option id="OptionsKey" key="Options Shortcut Reminder"
type="boolean" default="False"
get="isShowOptionsKeyReminder" set="setShowOptionsKeyReminder" dirtyBit="GameData"/>

<!-- Options Screen Button -->
<!-- advc.004: Dirty-bit ("GameData") removed b/c this requires a
restart anyway. -->
<option id="OptionsButton" key="Options Button"
type="boolean" default="False"
get="isShowOptionsButton" set="setShowOptionsButton" dirtyBit="GameData"/>
get="isShowOptionsButton" set="setShowOptionsButton"/>

<!-- advc.106b -->
<option id="AutoOpenEventLog" key="Auto Open Event Log"
Expand Down Expand Up @@ -72,6 +76,11 @@
get="isHideEspSlider" dirtyBit="PercentButtons, GameData, Espionage_Advisor">
<change module="CvCustomizableDomesticAdvisor" function="forcePositionCalc"/>
</option>

<!-- advc.004m -->
<option id="StartWithResourceIcons" key="Start With Resource Icons"
type="boolean" default="True"
get="isStartWithResourceIcons"/>

<!-- City Cycle Arrows by SimCutie -->
<option id="CityArrows" key="City Cycle Arrows"
Expand Down Expand Up @@ -121,7 +130,7 @@
type="boolean" default="True"
get="isListUnitsPerOwner"/>
<!-- dirtyBit: Would like to redraw the unit layer indicators, but
I don't think that's possible through a dirty-bit. -->
that's not possible through a dirty-bit. See tbd. in manual. -->

<!-- Build/Action Icon Size by EmperorFool -->
<list id="BuildIconSize" key="Build Icon Size"
Expand Down
9 changes: 5 additions & 4 deletions Assets/Config/BULL Misc Hovers.xml
Expand Up @@ -63,8 +63,9 @@


<section id="City Screen">
<option id="BaseCommerce" key="Base Commerce"
type="boolean" default="False"/>
<!-- advc.065: No longer optional -->
<!--option id="BaseCommerce" key="Base Commerce"
type="boolean" default="False"/-->
<option id="GreatPeopleRateBreakdown" key="Great People Rate Breakdown"
type="boolean" default="False"/>

Expand Down Expand Up @@ -92,9 +93,9 @@
type="boolean" default="False" dll="3"/>
<option id="ConscriptLimit" key="Conscript Limit"
type="boolean" default="False" dll="3"/>
<!-- advc.064: default was False -->
<option id="HurryOverflow" key="Hurry Overflow"
type="boolean" default="False"/>
type="boolean" default="True"/>
<option id="HurryOverflowIncludeCurrent" key="Hurry Overflow Include Current"
type="boolean" default="False"/>

Expand Down
3 changes: 2 additions & 1 deletion Assets/Config/Customizable Domestic Advisor.xml
Expand Up @@ -30,8 +30,9 @@
values="None|Small|Medium|Large|LargeLeft" default="1">
<change module="CvCustomizableDomesticAdvisor" function="forcePositionCalc"/>
</list>
<!-- advc.004: default was 3 -->
<list id="ProductionGrouping" key="Production Grouping"
type="int" default="3" listType="string">
type="int" default="1" listType="string">
<choice id="None" get="isProductionGroupingNone"/>
<choice id="Icons" get="isProductionGroupingIcons"/>
<choice id="Colors" get="isProductionGroupingColors"/>
Expand Down

0 comments on commit bd47281

Please sign in to comment.