Sid Meier's Civilization VI

Sid Meier's Civilization VI

25 betyg
Civ6-PK UI Framework [v1.1]
2
   
Utmärkelse
Favorit
Favoritmarkerad
Avfavoritmarkerad
Type: Mod
Mod: Gameplay, UI
Filstorlek
Lades upp
Uppdaterades
586.035 KB
29 jan @ 11:06
10 feb @ 6:30
5 ändringsnotiser ( visa )

Abonnera för att ladda ner
Civ6-PK UI Framework [v1.1]

I 1 samling av 皮皮凯(PiPiKai)
CIV-PK UI FW Mods By PPK
4 artiklar
Beskrivning
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]
Populära diskussioner Visa alla (1)
4
12 feb @ 15:30
PK FW: Dynamic Development(PK框架开发日常)
皮皮凯(PiPiKai)
11 kommentarer
皮皮凯(PiPiKai)  [skapare] 19 okt @ 18:46 
@Slav'sya Hi there! Thank you for your interest in my mod. I'm glad you like it!

I’ve actually designed this mod with extensibility in mind, so you don’t need to integrate the scripts directly into your own mod. Instead, you can simply use this framework mod as a prerequisite (a "predecessor" or "dependency") and achieve your goals through the provided extension scripts. This way, you can call or modify the functions without having to replace or directly embed my mod files.

If you'd like, we can discuss the specifics further! Feel free to let me know what you're trying to accomplish, and I’ll be happy to help guide you through the extension process.
Slav'sya 15 okt @ 21:32 
Great work! Could I use your scripts in my mod? It's not the leader scene, but I'd like to play animations via 'specific events', So I guess I'll have to modify the mod to suit my purposes.
Yuki的游戏 21 feb @ 19:21 
哦,找到了,原来有兼容的另一个mod
Yuki的游戏 21 feb @ 18:14 
这个mod会顶掉其他的修改主菜单的mod吗,然后顶掉了之后没看见跟原版有什么区别啊
1730726935 18 feb @ 19:18 
利好订阅了大量mod的玩家:steamthumbsup:
皮皮凯(PiPiKai)  [skapare] 10 feb @ 7:08 
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:08 
虽不明,但觉厉
皮皮凯(PiPiKai)  [skapare] 1 feb @ 13:20 
@Leftbehind, I suggest you join the Discord channel, where there are many tutorials on mod making
leftbehind 1 feb @ 12:36 
I wasn't aware of that - is there documentation anywhere that explains the features of Civ 6 Lua environment in more detail?
皮皮凯(PiPiKai)  [skapare] 1 feb @ 1:29 
@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.