Civ6-PK UI Framework [v1.1]

If you liked this item, please rate it up on Steam Workshop page.

Author: 皮皮凯(PiPiKai)

Last revision: 10 Feb, 2025 at 14:30 UTC

File size: 586.03 KB

On Steam Workshop

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]DocumentsMy GamesSid Meier’s Civilization VISavesSingle
  • 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]