Sid Meier's Civilization VI

Sid Meier's Civilization VI

Not enough ratings
Civ6-PK UI Framework [v1.1]
2
   
Award
Favorite
Favorited
Unfavorite
Type: Mod
Mod: Gameplay, UI
File Size
Posted
Updated
586.035 KB
29 Jan @ 11:06am
10 Feb @ 6:30am
5 Change Notes ( view )

Subscribe to download
Civ6-PK UI Framework [v1.1]

In 1 collection by 皮皮凯(PiPiKai)
CIV-PK UI FW Mods By PPK
4 items
Description
If you find this mod interesting, please give me a thumbs up
Content Overview
This mod is a UI framework mod and does not involve any changes to the game content.
Some features of this mod are still under development, please look forward to them!
Currently supported features include:
  1. Mod Local Data Storage Framework
  2. Leader 2D Animation Framework
  3. Custom Main Menu Interface
  4. Adding New UI Features to the Game Frontend
  5. Several Lua Script Tools
Please do not integrate/borrow the code from this mod without prior permission.

Explanation of the Mod Local Data Storage Framework
  • This module allows mods to store data on the player's computer. For example, mod developers can set up features that span game saves, or even replicate some features from Civilization VII.
  • With this framework, many mod settings do not have to be limited to the current game save, avoiding the need to reconfigure every time a new game save is created (of course, this requires mod developers to adapt to this mod).
  • Mod data is stored by default in a configuration file named 'PKUI_ModData' (PKUI_ModData.Civ6Cfg).
  • Players, please note not to delete this configuration file to avoid losing your mod data.
  • The save file is usually located at: C:\Users[Your Username]\Documents\My Games\Sid Meier's Civilization VI\Saves\Single
  • If you wish to change the archive name for your mod data storage, you can check the mod's MyModDataFileNameX.lua file.
  • I also wrote a user guide for this sub framework (Githup) [github.com] (Gitee) [gitee.com]
  • But currently there is no English board for the guide
Introduction to the Leader 2D Animation Framework
  • This module adds a 2D animation mode to the existing 3D leader animations in Civilization VI.
  • Two animation modes are provided: image switch animation and video animation.
  • Additionally, it supports configuring multiple different diplomatic animations for a leader, for instance, a leader can present different images in the game's Classical and Industrial Eras.
  • It also allows replacing the leader's diplomatic background with a video, and a leader can have multiple different diplomatic backgrounds.
Description of the Custom Main Menu Functionality
  • This module supports customizing the UI of the main menu in Civilization VI.
  • Each UI control of the main menu can be customized to display certain elements.
  • It also includes settings for the background and music.
  • Mod developers only need to configure through sql/xml to be compatible with other mods that change the main menu background and music.
Adding New UI Features to Game Frontend
  • Mod developers with experience in frontend UI mod development should understand that the game FrontEndActions does not support AddUserInterfaces.
  • Simply enter the corresponding data table in sql/xml, and the new UI interface can be loaded on the frontend.
However, it should be noted that the ReplaceUIScript ability has not yet been implemented.
To ensure Mod compatibility, all Mod developers must add the following line of code at the end of their respective UI-lua files:
include( "yourUIluaName_", true )
(Note that 'yourUIluaName' here is the name of your UI script.)
This operation allows other developers to make compatibility modifications without replacing the original script, thereby enhancing compatibility between Mods without directly replacing scripts, indirectly achieving the ReplaceUIScript ability.
Several Lua Script Tools
  • CalculatorManager.lua - Contains simple arithmetic functions that have been written.
  • CIV6_LibDeflate - Implements DEFLATE/zlib format data compression and decompression (from GitHub) [github.com]
  • CIV6_Serialize - Implements serialization/deserialization of Lua tables (from GitHub) [github.com]
  • DeBugManager - A small tool for printing Lua tables, primarily used for debugging my own mod and Research game Lua API.
  • PK_MetaTableUtility - Provides two excellent Lua metatables.
  • UITimerManager - Implements a Lua timer/delay mechanism in Civilization VI that meets most timing requirements.
Buy me a coffee
[ko-fi.com]
Popular Discussions View All (1)
4
12 Feb @ 3:30pm
PK FW: Dynamic Development(PK框架开发日常)
皮皮凯(PiPiKai)
9 Comments
Yuki的游戏 21 Feb @ 7:21pm 
哦,找到了,原来有兼容的另一个mod
Yuki的游戏 21 Feb @ 6:14pm 
这个mod会顶掉其他的修改主菜单的mod吗,然后顶掉了之后没看见跟原版有什么区别啊
1730726935 18 Feb @ 7:18pm 
利好订阅了大量mod的玩家:steamthumbsup:
皮皮凯(PiPiKai)  [author] 10 Feb @ 7:08am 
If you're using this mod for the first time, you might encounter an issue where the game gets stuck while loading mod data. In this case, please try restarting the game. I didn't find any error messages in the lua.log file, which is why I didn't notice this issue earlier. I suspect it might be because I nested multiple functions in the Lua code, preventing the error from being reported in time. I'll do my best to fix this issue when I have time in the future.

如果你是第一次使用这个模组,可能会遇到游戏卡在加载模组数据的情况。建议你尝试重新启动游戏。我在检查lua.log文件时没有发现任何报错信息,所以没能及时注意到这个问题。我猜测可能是因为我在Lua代码中嵌套了多个函数,导致错误没有及时报出。后续有空时,我会尽力修复这个问题。
Vidyflan 3 Feb @ 4:08am 
虽不明,但觉厉
皮皮凯(PiPiKai)  [author] 1 Feb @ 1:20pm 
@Leftbehind, I suggest you join the Discord channel, where there are many tutorials on mod making
leftbehind 1 Feb @ 12:36pm 
I wasn't aware of that - is there documentation anywhere that explains the features of Civ 6 Lua environment in more detail?
皮皮凯(PiPiKai)  [author] 1 Feb @ 1:29am 
@leftbehind 在Lua编程中,#someTable 仅适用于数组表(array-like tables),而对哈希表(hash-like tables)无效。相比之下,table.count 是《文明6》Lua API 提供的一个通用函数,适用于任意类型的表。因此,在处理哈希表或无法确定表类型的情况下,使用 table.count 是更为准确和可靠的选择。

In Lua programming, #someTable is only applicable to array-like tables (tables with sequential integer keys) and does not work for hash-like tables (tables with key-value pairs). In contrast, table.count is a universal function provided by the Civilization VI Lua API, which is applicable to tables of any type. Therefore, when dealing with hash-like tables or when the table type is uncertain, using table.count is a more accurate and reliable approach.
leftbehind 31 Jan @ 7:58pm 
I'm thinking of making a mod so took interest in your mod. I noticed you're using `table.count(someTable)` - does the `#someTable` approach not work in Civ 6 Lua implementation?