How to compile the DLL

So is the inability of a ship to enter a coastal fort a bug or an enhancement ... depends who you ask ;)

enhancement

EDIT: To quote that reliable source of truth known as Wikipedia
"A software bug is an error, flaw, mistake, failure, or fault in a computer program or system that produces an incorrect or unexpected result, or causes it to behave in unintended ways"

Thus to use your example...a lack of canals is not a bug but an oversight or limitation. Ships losing all their HP points when entering a city would be a bug.

I know you agree with me whoward and just playing devil's advocate so I thought I would clarify this further for those who come along and read the last few threads thinking 'wish-list' time!
 
Bingo...thats the info I was after...thanks for clarifying.

How hard would it be for our DLL modders to come to some agreement on releasing a single 'community' DLL that includes bug fixes and performance improvements so that us non-DLL types can not have to worry about multiple DLLs that fix issues. Of course, game changing features should continue to be released separately as per normal mod approach.

There is a proposal here, but that's not for a "single community DLL", more an easier way to pick the change you want and combine them in a DLL.

One important thing here I think, is to make gameplay change optional when possible, as whoward69 is doing, this way if a DLL is widely used, each mod needing it could activate or not the new "features".
 
Another important thing is documentation. If a modder includes (added by:[AUTHOR]) in the comments next to every change then things will be a lot easier to look through and decide what parts they want.
 
I still have no idea why we can't just make DLLs, and ship with a standard GameCore that includes whatever DLLs are mentioned in a certain XML file.

I'm not versed in C++ at all, but I'm fairly sure you can include.
 
BTW, I changed the build directory and I built the .dll but it generated 29 warnings about various .pdb files with the comment "linking object as if no debug info". Will this be a problem?

Also, it builds .pdb, .lib and .exp files as well as a .dll. What do I use those files for? Can I ignore them?

Thanks.
 
Only the first occurance in each file needs to be replaced, the second is part of how visual studio auto-generates files.

And then only if you are using the free Express version, if you already own the full version there is no need to make these edits.



Thanks for letting me know; you saved me a little unnecessary work/installing, since I'm lucky enough to have a copy of VS 2010 Pro at home and already installed C++, thinking that it might help with game-editing projects. I take it the SDK subfolder would get copied into the corresponding folder for Visual C++ 2010? :) (Sorry if I seem completely clueless here; I'm just beginning to learn DLL editing here, and going about it the same way I did with XML--examine the core game code, memorize the snippets for behaviors I know, and ask for help when I get stuck.)
 
AFAIK you just need to copy CvGameCoreSource to "the usual place" (on my machine it's "C:\Users\{username}\Documents\Visual Studio 2010\Projects") BUT you will still need to install VS 2008 (you can use the Express version)
 
BTW, I changed the build directory and I built the .dll but it generated 29 warnings about various .pdb files with the comment "linking object as if no debug info". Will this be a problem?

Also, it builds .pdb, .lib and .exp files as well as a .dll. What do I use those files for? Can I ignore them?

Thanks.

Warnings won't prevent compilation... can usually be ignored, but useful to keep track of if something unexpected happens. You can ignore those files but you'll want to keep them around. They speed up future compilation times.

I still have no idea why we can't just make DLLs, and ship with a standard GameCore that includes whatever DLLs are mentioned in a certain XML file.
This is the difference between a language that is interpreted vs. compiled. In C++, "include" doesn't mean "load that file when you're loading this one" - it tells the compiler to literally copy and paste the text of that file over the include statement. There is no practical difference between placing #include "CvMap.h" in your file and pasting the entire contents of CvMap.h onto that spot. And of course, compilation happens modder-side before distribution, not user-side when run (otherwise civ5 would take 20 minutes to load).

it does rather destroy my "many small mods on the buffet table" approach
Never cared for the "many small mods on the buffet table" approach myself. I prefer larger mods like Rhye's and Fall of Civilization and Fall from Heaven. I wouldn't be surprised if many people who had plans for what to do when the DLL was released are the same way; the DLL lends itself more to those mods than the small mods, especially with Lua being able to do more than civ4's python.
 
c:\users\croxis\documents\src\civvsdk\cvgamecoredll_expansion\CvGameCoreDLLPCH.h(58): fatal error C1083: Cannot open include file: 'unordered_set': No such file or directory

When trying to build.
 
This is the difference between a language that is interpreted vs. compiled. In C++, "include" doesn't mean "load that file when you're loading this one" - it tells the compiler to literally copy and paste the text of that file over the include statement. There is no practical difference between placing #include "CvMap.h" in your file and pasting the entire contents of CvMap.h onto that spot. And of course, compilation happens modder-side before distribution, not user-side when run (otherwise civ5 would take 20 minutes to load).

A dll is loaded at runtime, nothing to do with includes. You could even build in some dynamic dll loading into the civ dll, I guess. A first step towards multiple mods modifying the dll, perhaps?

I wanted to check how difficult it would be to tinker with the tactical AI... 9000 lines of c++ tells me it's probably gonna be quite a challenge :sad:
 
A dll is loaded at runtime, nothing to do with includes. You could even build in some dynamic dll loading into the civ dll, I guess. A first step towards multiple mods modifying the dll, perhaps?

I wanted to check how difficult it would be to tinker with the tactical AI... 9000 lines of c++ tells me it's probably gonna be quite a challenge :sad:

A DLL is compiled from all the .cpp and .h files; when we speak of DLL modding, we are actually speaking of changing the .cpp and .h files and compiling a new DLL. It is only this final compiled code that is loaded at runtime, not the source.

While I don't have civ5, the civ4 C++ code was interdependent to such a degree that even a simple change as adding a new XML field required changing code in dozens of locations. If the civ5 DLL is in any way similar, it would be flat out impossible for two modders to make changes the the DLL that don't conflict with each other. Even merging two civ4 DLL mods required the work of an expert programmer.
 
He's not talking about that.
Theoretically it's possible to load a second dll from a first dll.
But I have no clue how this would be interconnected, how this would practically work in regards to merging stuff, and would probably also be lots of work, and at the end probably not worth it.
 
I really put some great hopes in something like what is proposed in the Git thread...
 
Theoretically it's possible to load a second dll from a first dll.

It's more than theory! It's known as "dependancy injection" and is part of the Inversion of Control / Aspect Orientated Programming (IoC/AOP) frameworks such as Spring for Java and PocoCapsule for C++

But the use of such frameworks needs to be adopted from Day 1 - not 2 years down the track
 
He's not talking about that.
Theoretically it's possible to load a second dll from a first dll.
But I have no clue how this would be interconnected, how this would practically work in regards to merging stuff, and would probably also be lots of work, and at the end probably not worth it.

Given the way XML and Lua work in civ5, I suspect that if Firaxis had made the code in such a way to allow for this to be practical that they would have done so.
 
Depends on if you have the people with the experience to do that.
The other stuff is sure set up in a very professional way, but they had already some experience in that area.

But since whoward pointed out that this is rather a big thing, I guess they didn't have the people who knew enough about it.

It's more than theory!

Oh, 'kay. Not much of a pro in that area :D.
 
Oh...then you now know what we expect from you :D.

But the use of such frameworks needs to be adopted from Day 1 - not 2 years down the track

Didn't realise I started this two years ago ;) - perhaps I should send Firaxis two-years worth of consultancy invoices and see what happens :lol:
 
Back
Top Bottom