Skip to content

Instantly share code, notes, and snippets.

@johnnymo87
Created November 13, 2016 16:22
Show Gist options
  • Save johnnymo87/f75c1983abad3b4bb42c63b18bc011ac to your computer and use it in GitHub Desktop.
Save johnnymo87/f75c1983abad3b4bb42c63b18bc011ac to your computer and use it in GitHub Desktop.
Expose 'Auto Unit Cycle' option in the UI
From 04157d2e3825baf4793e454076ffa0a12765bf6e Mon Sep 17 00:00:00 2001
From: johnnymo87 <johnnymo87@gmail.com>
Date: Sun, 13 Nov 2016 16:14:16 +0000
Subject: [PATCH] Expose 'Auto Unit Cycle' option in the UI
---
Text/en_US/FrontEndText.xml | 3 +++
UI/Options.lua | 5 +++++
UI/Options.xml | 4 ++++
3 files changed, 12 insertions(+)
diff --git a/Text/en_US/FrontEndText.xml b/Text/en_US/FrontEndText.xml
index 78b2de7..851ded8 100755
--- a/Text/en_US/FrontEndText.xml
+++ b/Text/en_US/FrontEndText.xml
@@ -504,6 +504,9 @@
<Row Tag="LOC_OPTIONS_QUICK_MOVEMENT">
<Text>Quick Movement:</Text>
</Row>
+ <Row Tag="LOC_OPTIONS_AUTO_UNIT_CYCLE">
+ <Text>Auto Unit Cycle:</Text>
+ </Row>
<Row Tag="LOC_OPTIONS_AUTO_END_TURN">
<Text>Auto End Turn:</Text>
</Row>
diff --git a/UI/Options.lua b/UI/Options.lua
index 5719b6a..db7f444 100755
--- a/UI/Options.lua
+++ b/UI/Options.lua
@@ -1092,6 +1092,11 @@ function TemporaryHardCodedGoodness()
end,
UserConfiguration.IsValueLocked("QuickMovement"));
+ PopulateComboBox(Controls.AutoUnitCyclePullDown, boolean_options, Options.GetUserOption("Gameplay", "AutoUnitCycle"), function(option)
+ Options.SetUserOption("Gameplay", "AutoUnitCycle", option);
+ end,
+ UserConfiguration.IsValueLocked("AutoUnitCycle"));
+
PopulateComboBox(Controls.AutoEndTurnPullDown, boolean_options, Options.GetUserOption("Gameplay", "AutoEndTurn"), function(option)
Options.SetUserOption("Gameplay", "AutoEndTurn", option);
end,
diff --git a/UI/Options.xml b/UI/Options.xml
index f066ed4..713deaa 100755
--- a/UI/Options.xml
+++ b/UI/Options.xml
@@ -42,6 +42,10 @@
<Label Anchor="L,C" Style="ShellOptionText" String="LOC_OPTIONS_QUICK_MOVEMENT"/>
</Stack>
<Stack Anchor="R,T" StackGrowth="Left" Padding="5">
+ <PullDown ID="AutoUnitCyclePullDown" Style="PullDownBlue" ScrollThreshold="400" Size="300,24" Offset="0,0" SpaceForScroll="0"/>
+ <Label Anchor="L,C" Style="ShellOptionText" String="LOC_OPTIONS_AUTO_UNIT_CYCLE"/>
+ </Stack>
+ <Stack Anchor="R,T" StackGrowth="Left" Padding="5">
<PullDown ID="AutoEndTurnPullDown" Style="PullDownBlue" ScrollThreshold="400" Size="300,24" Offset="0,0" SpaceForScroll="0"/>
<Label Anchor="L,C" Style="ShellOptionText" String="LOC_OPTIONS_AUTO_END_TURN"/>
</Stack>
--
2.9.0
@johnnymo87
Copy link
Author

johnnymo87 commented Nov 13, 2016

Directions

Let's start by committing the current state of the assets.

cd cd ~/Library/Application\ Support/Steam/steamapps/common/Sid\ Meier\'s\ Civilization\ VI/Civ6.app/Contents/Assets/Base/Assets/
git init
git add .
git commit -m"Save initial state"

Now save auto-unit-cycle.diff as a file here and apply it.

git am < auto-unit-cycle.diff

Restart the game. When you view your game options, you should see the following:
screen shot 2016-11-13 at 16 30 14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment