席德·梅尔的文明VII

席德·梅尔的文明VII

评价数不足
Civ7 Center Capital Mod
   
奖励
收藏
已收藏
取消收藏
Type: Mod
文件大小
发表于
26.976 KB
11 月 15 日 下午 3:58
1 项改动说明 ( 查看 )

订阅以下载
Civ7 Center Capital Mod

在 Balo0 的 1 个合集中
Civ7 useful mods
4 件物品
描述
Centers the camera on the capital and cycles cities with hotkeys.

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: 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.

热门讨论 查看全部(1)
0
11 月 16 日 上午 7:57
Bug reports and issues
Balo0
6 条留言
Balo0  [作者] 12 小时以前 
kiwikobold: Ok, nice that you figured it out. We can keep the comments in case someone else has similar issues.
kiwikobold 16 小时以前 
Hi, I actually discovered it was not your mod that was crashing the game when it started to constantly do it and I went through the mods 1 by 1 seeing when it started crashing again. Sorry about the red herring, I can remove my comments if you want.
Balo0  [作者] 16 小时以前 
此留言正在等待我们的自动内容检查系统分析。在我们证实其内容无害之前(例如试图窃取信息的钓鱼站点链接),留言将暂时隐藏。
kiwikobold 20 小时以前 
It crashes at the key press and before the movement to the city, if it is not effecting others I will leave it be until I want to run a game without other mods, it could be also because I have been on a killing spree and have over 30 cities atm in the game.
Balo0  [作者] 11 月 16 日 上午 7:54 
kiwikobold: "I think this is crashing my game when I click on cities in the list sometimes, I have had it happen twice so far, most times it is ok but once in a while it isn't".

I wonder if there is some other mod that does not work with this one. I have not observed anything like that before. The mod should not effect city selection from the list in any way. It only listens to key presses and centers to the capital or cycles through cities. Please post here if you have more info to share about this issue.
kiwikobold 11 月 16 日 上午 1:49 
I think this is crashing my game when I click on cities in the list sometimes, I have had it happen twice so far, most times it is ok but once in a while it isn't