Sid Meier's Civilization VI

Sid Meier's Civilization VI

Civ6-PK UI Framework [v1.1]
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?