Sid Meier's Civilization VI

Sid Meier's Civilization VI

115 ratings
Community Extension
7
2
6
5
2
2
3
2
2
2
   
Award
Favorite
Favorited
Unfavorite
Type: Mod
File Size
Posted
Updated
2.661 MB
Jun 29, 2024 @ 7:41am
Aug 2, 2024 @ 1:05pm
4 Change Notes ( view )

Subscribe to download
Community Extension

Description
Civilization VI: Community Extension
This mod is currently in beta. Report bugs on the issue tracker[github.com]. You can also contact me directly or on the steam workshop page. I prefer if you do it on the issue tracker though.
Visit the wiki![github.com]
Mod GUID: 3351473b-0746-417a-a618-2b66a04d8f3d
FAQ
What does this mod do?
This mod exposes new tools for modders to use by editing Civ VI's base code.
How does this mod edit the base code?
In essence, the game will load a custom dll, which then in turn loads the GameCore DLL and makes changes to it. If you want to learn more, join the Civilization VI Modding Helpline[discord.gg] and ask me there. (My username is wildw)
Can you implement X feature?
Probably. Open a feature request on the issue tracker[github.com]. The more precise you are with your request the more likely I'll be able to implement it.
Is this mod compatible with Mac/Linux?
No. It's possible to port parts of it, but it's just too far out of scope right now.
Can you fix the asset limit bug?
Probably not.
License
This project is distributed under AGPL 3.0. That means that all derivative works of this project must be open source and distributed under the same AGPL 3.0 license. This is to protect the modding community from bad actors and encourage collaboration. The only way this community can grow is if we work together.
Support
[ko-fi.com]
70 Comments
s3boun3t Mar 8 @ 12:51am 
please make this compatible with linux
faber_avgust Mar 3 @ 12:29pm 
Any news?
PhantomJ_M Dec 26, 2024 @ 9:55am 
Imo the problem is on how the art resources are loaded. They set fixed size arrays to load different classes of asset. To fix it will need a complete rework of the asset load algorithm, which I think its almost impossible to achieve by modders
CaptainUnknown Dec 24, 2024 @ 7:42pm 
Thanks. I joined the discord but have to run for now. I will do some tests on different OSes of the game to better understand the problem. It would be useful to know if it's renderer specific or not.
WildW  [author] Dec 24, 2024 @ 6:34pm 
@CaptainUnknown I use Ghidra (any will work tho), I can send you some of the scripts and other minor tools I use too. Make sure when you're attaching a debugger you bypass the anti debug with a tool like the one here https://github.com/Ricardonacif/steam-loader .

Triggering the bug is done just by using mods that add a lot of assets. Anything over 8192 assets can cause undefined behavior, my assumption is that the D3D11Resource buffer is being overflowed and additional assets are stored in unallocated memory. Though I'm not sure why there is a limit in the first place, beyond that this could be a limitation with Dx11 and 12.

If it is a Dx limitation I don't think this bug would exist on other renderers, so it's probably not on Max or Linux. Though I have never tested. Maybe relevant: https://learn.microsoft.com/en-us/windows/win32/direct3d11/overviews-direct3d-11-resources-limits .

If you want a longer conversation, ping me @ WildW in this server
https://discord.gg/kPnh3C8Dtb
CaptainUnknown Dec 24, 2024 @ 5:36pm 
@WildW thanks, I'll give it a shot. Have you done any analysis on the game exe in a decompiler (Ida pro, ghidra, binary ninja)? There are a few sections where the string "attempting to add... over %d items" is mentioned. It's connected to the Lua state. I think there could be potential from walking back form those functions, but I wanted to be able to trigger the bug first before I continue.

I am also curious if this bug is present in all versions (win, linux, mac) or just Windows?
WildW  [author] Dec 24, 2024 @ 5:12pm 
For anyone interested in figuring out how to link in the custom event system (events in code, not in game), it's also worth taking a look at and decompiling firetuner. It was written in C# so decompiling it is almost like looking at the source code. It must be linked to the event loop somehow. Also contact me and look on the dev branch of this mod. I am very close but lost motivation recently.
WildW  [author] Dec 24, 2024 @ 5:07pm 
@CaptainUnknown Use the warfare expanded mods and track the asset limit with my asset counter mod. I know where you can generally start with looking into the asset limit, but if you have any shot at it you need to be capable of analyzing and debugging compiled code without access to any debug symbols or source code since what you need to change is in the exe which has never had its debug symbols leaked (unlike the GameCore DLLs).
WildW  [author] Dec 24, 2024 @ 5:03pm 
@faber_avgust I would need help from someone experienced in analyzing and modifying multithreaded windows programs. This requires some knowledge in assembly and C.
CaptainUnknown Dec 23, 2024 @ 4:56pm 
Does anyone know of a way to trigger the asset limit on turn one? I would be willing to explore fixing the limit but I've never triggered it