Looking for DLL help (Unified Yields)

Zezima

Warlord
Joined
Nov 9, 2012
Messages
207
Location
United States
Longtime Civ5 player here. Lately I got the bug to build my own modpack. Started off as just compiling my favorites to troubleshoot some compatibility issues, but then slowly snowballed into tweaking more and more to suit my own gameplay preferences. Civ5 is such an accessibly moddable game, and there's a real treasure trove of resources in the community. So deepest kudos to you all.

Anyway, I'm hitting the limits of what I can achieve with SQL. Specifically, I want to get more creative with yields. Beliefs that boost river yields, improvements that boost adjacent improvements, that sort of thing. The work that was done by Whoward and others here (Unified Yields) - https://forums.civfanatics.com/threads/dll-unified-yields.528847/ - looks right up my alley. I gather this work is now a part of CBP, and I'd like to pull this specific "module" out of the DLL without bringing over the many other CBP changes that I'm just not familiar with. I don't see any kind of standalone item for this on the workshop or on Whoward's Pick'n'mix page (unless I'm overlooking it).

Is there some more efficient way for me to get and work with these changes, or is my only option breaking open the CBP DLL and extracting the specific lines of code I'm interested in? I like to dabble in coding, but I'm not a programmer by trade, and my free time is such that I may never have the time to penetrate the "DLL decompiling" step if that's really what it takes.
 
Can't speak for the CBP DLL, but pulling all that code out of DLL - VMC would be a major undertaking. Most of DLL - VMC is "off" by default, so you could try using that as your base. Then if there is something "on" that you don't want, rip that code out (I use #if/#endif blocks to identify code)
Source code is linked from my sig, my use of #if/#endif is explained here - https://forums.civfanatics.com/thre...-coded-constants-with-database-values.516108/
 
Awesome, thank you for the advice. This sounds like the most efficient approach, so I'll give it a try. There's a bunch of your works I've been interested in exploring anyway, so it'll just move that up on my timeline. I've just been taking it very piecemeal / incremental up to this point but seems that approach won't really work with this DLL hurdle.

Most of DLL - VMC is "off" by default, so you could try using that as your base.

By "off" I assume you mean it won't affect the gameplay without the corresponding SQL/XML/LUA to "enable" it. Am I understanding that right? This was something I wondered as well - how much is hot-swappable depending on whether one chooses to import the LUA/DB or not. I tried to plug-n-play with the CBP DLL and that quickly blew up, which I figured would happen. And deciphering which LUA / DB changes are critical vs optional would be a herculean effort. It's helpful to know that yours is more, I'll say, "vanilla compatible".
 
By "off" I assume you mean it won't affect the gameplay without the corresponding SQL/XML/LUA to "enable" it.
Correct, apart from bug fixes (science overflow and many others), all game play changes are disabled without the corresponding mod that turns them on

how much is hot-swappable depending on whether one chooses to import the LUA/DB or not
Most mods are XML/SQL (database) and LUA (UI/Logic) and are "swappable" (enabled/disabled). The problem is that for DLL (C++) mods you can only have one (you replace the whole DLL or not - you can't just replace bits of it). Unless the DLL mod has been written to permit the contained changes to be switched on/off you're stuck with the global changes the modders have selected, that is, it's a Total Conversion mod. My approach was/is "Pick and Mix" - hence the CustomMods stuff.
 
Back
Top Bottom