席德·梅尔的文明VII

席德·梅尔的文明VII

Civ7 Center Capital Mod
正在显示第 1 - 1 项,共 1 项条目
更新于:11 月 15 日 下午 3:58
作者:Balo0

This mod adds custom hotkeys to make city management easier in Civilization VII:

1. Center Camera on Capital (default key: Home)
2. Cycle Through Cities (default keys: PageUp, PageDown)

What Does This Mod Do?
This mod adds three custom hotkeys to make city management easier in Civilization VII:
- Home → Center Camera on Capital. Second press → Open Capital city details panel
- PageUp → Cycle Forward Through Cities
- PageDown → Cycle Backward Through Cities

Customizing Keybindings
Keybindings are now configured in the mod's XML file:

1. Open:
On windows 11 - (C:\Program Files (x86)\Steam\steamapps\workshop\content\1295660\3606530449)
Civ7_CenterCapitalMod\data\input-action-default-gestures.xml
2. Locate these lines:
GestureData="KEY_HOME"
GestureData="KEY_PAGEUP"
GestureData="KEY_PAGEDOWN"

3. Edit the GestureData value. Examples:
- Single key: KEY_G
- Ctrl + key: KEY_CONTROL+KEY_H
- Alt + key: KEY_ALT+KEY_H
- Ctrl + Alt + key: KEY_CONTROL+KEY_ALT+KEY_H
- Shift + key: KEY_SHIFT+KEY_N

4. Save the file and restart the game.

---

New Features

Configurable City Cycling Modes (New!)
The mod now offers 4 distinct city cycling modes for improved navigation:

1. Grouped Order
- Player’s cities sorted by city ID in alphabetical order, starting with the capital.
2. Alphabetical Order
- All cities are sorted alphabetically. The capital is forced to be at index 0.
3. Geographical Order (Recommended)
- Cities are sorted by proximity to the capital, with an advanced look-ahead pathfinding system for optimal path creation.
- Use this setting for a natural city navigation path.
- Capital is forced to be at index 0.
4. Game Default Order
- Uses the game’s native order — no sorting applied.

To configure the cycling mode:
1. Open: Civ7_CenterCapitalMod\UI\focus-capital.js
2. Locate this setting at the top of the file:
const CYCLING_MODE = 3;

3. Change the number to the desired mode:

| Mode | Description |
|------|--------------------------------|
| 1 | Grouped Order |
| 2 | Alphabetical Order |
| 3 | Geographical Order (Recommended) |
| 4 | Game Default Order |

4. Save the file and restart the game.

---

### Timestamp Logic for Efficient Refreshing (New!)
To improve performance, the mod now refreshes the city table only if the last refresh was over 20 seconds ago.
- Located in focus-capital.js
const REFRESH_INTERVAL = 20000; // Time in milliseconds (20 seconds)
---

Troubleshooting
- Ensure this mod does not conflict with other mods using the same key actions.
- Confirm that the mod folder is in the correct location and that the mod is enabled.
- The camera actions are only active in the "World" context (the main map view). They won’t work in menus or special screens.
- If changes don’t take effect, try disabling other mods to check for conflicts.

---

Enjoy the Mod!
Feel free to adapt this mod for your own needs! If you’d like to improve or expand features, contributions are welcome.

---

Common Key Identifiers

Alphanumeric Keys
KEY_0 to KEY_9
KEY_A to KEY_Z

Function Keys
KEY_F1 to KEY_F12

Arrow Keys
KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT

Editing/Navigation Keys
KEY_BACKSPACE, KEY_DELETE, KEY_INSERT
KEY_HOME, KEY_END
KEY_PAGEUP, KEY_PAGEDOWN

Control Keys
KEY_SHIFT, KEY_ALT, KEY_CONTROL (or KEY_CTRL)

More key identifiers can be found in the game installation directory:
/core/config/Input.xml

Note: Caps Lock, Windows key, or other special keys may not always be recognized. Check for collisions or test them directly.