Discussion in 'Civ5 - SDK / LUA' started by DaveMcW, Nov 2, 2012.
Updated for the BNW SDK.
One of the warnings when building the latest source (which whizzes up the screen) is
"module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance"
Right click the project, select Properties and change the setting as shown to remove this
Not sure if it is appropriate to ask here, do you know if I can include the 3 DLLs in the same mod? Will the game be "smart" enough to use the one corresponding to the activate DLCs the user has?
You can't include the base/vanilla dll in a mod anyway, but the other two you can - see here http://forums.civfanatics.com/showthread.php?t=501252
How to compile the BNK SDK with VS2012?
At a guess the same way as you do for VS2008/VS2010 (as Firaxis supply the project config files for VS2012, and fixed the major issues in the last patch with the project config files for VS2010)
If it's not compiling/building for you, we're going to need specific error messages.
You need VS 2008 installed to have the toolset needed to compile the project (which is a 2008 VC++ project regardless of the solution).
I don't see a problem with all or most DLL modders sharing a single project on an open source site, provided we all make any functional changes (i.e., changes beyond just creating a new event) able to be toggled on or off via the DB or LUA so other modders can control whether they want to use each individual change or not at run time.
Do the source files in CvGameCoreDLL and CvGameCoreDLL_Expansion1 have any effect if there's a same-name source file in CvGameCoreDLL_Expansion2?
Basically, which of the three folders should I be making changes to? Do I need to modify them all?
Only the files from the folder you want to compile. (CvGameCoreDLL = vanilla civ5, CvGameCoreDLL_Expansion1 = G+K, CvGameCoreDLL_Expansion2 = BNW)
If your making a DLL for G+K, make your change in CvGameCoreDLL_Expansion1.
If later you want to make a DLL for BNW, any feature you've added in your G+K's DLL will have to be ported in the files in CvGameCoreDLL_Expansion2.
BTW, now you can (must ?) use "OnGetDLLPath/SetDLLPatch" action, your DLL can then have any name and the "Import into VFS" property set to true is not needed.
It's probably a good idea to use the DLLPath settings but you don't have to, the old VFS way still works.
How does it differentiate which DLL is for Vanilla, G&K or BNW - or does this only work for one DLL in a mod?
Only one DLL in a mod set this way. That DLL will be loaded whatever expansion is used.
So, good for total conversion, but yeah, the VFS = true method is still the only way for one mod including DLLs for each version of the game.
What happens if a mod loads a BNW DLL into an install that doesn't have BNW? Surely there are missing functions or extra function calls that will cause crashes?
It would. But the mod should be setting the correct "dependant on" associations to avoid this situation
It crashes, but from missing tables/entries in the Database IIRC.
The .exe and all other DLL are common to all versions of the game.
The game core API (both in methods available and signatures) differ across all three versions
oh, my bad
But now I'm curious, how does it works ?
Anyone have specifics regarding the required toolset and the dependency for a successful compilation? Seems that fresh install of VS2010 or VS2012 should be able to do the job with at most an add-on tool install. Guess I just don't like having to install an older VS just to get the newer VS to work properly. Additionally, to read that the installation order matters [Thanks whoward] just seems ridiculous though not shocking considering it's from MS. So far in my software development life I've managed to stay away from having to use VS and be thrust into MS's version of common sense.
The actual c++ project is a VC2008 vcxproj file, even though there are solutions for VS 2008, 2010, and 2012 (the 2012 one works in 2013 as well). So you need the VC2008 toolchain to compile it.
Separate names with a comma.