whoward69
DLL Minion
Nearly all of the useful constants, #defines and enums used within the cpp code come from CvDLLUtilDefines.h and CvEnums.h - including MAX_CIV_PLAYERS, MAX_MAJOR_CIVS et al and all of the AI "decision" values.
These two files are not actually part of the "CvGameCoreDLL" code base but are included from the "CvGameCoreDLLUtil" code base - for which we only have the headers and the pre-compiled library file.
The CvGameCoreDLLUtil code base is shared with the exe file (and presumably the other dlls, eg CvGameDatabase) - note the comments at the top of these files, especially the word "shared" in CvEnums.h
So while we could edit these files to change the values used within the CvGameCoreDLL .cpp code files, there is no guarentee that the resulting changed code will be compatible with the .exe and other .dll files! In fact, Gedemon's "34 Civs DLL (for YnAEMP)" modded DLL not loading LeaderHead screens for more than the first 22 (default number) civs is a very strong indication that there are dependencies in the other code bases that we do not have access to.
Adding another entry to one of the AI decision enums crashed my game (not immediately but after 70 to 80 turns) presumably because the value passed from the GameCore code to some other code was not one that was expected. This is going to make extending the AI (as opposed to altering its current behaviour/response) tough, as you can't, with any certainity, add new behavioural outcomes to the AI enums (eg adding a new spy task in addition to "rig election" and "steal tech").
So what's the point of this post ... really just to say don't be surprised if you change one of the values in these files and you get reports of (apparently random) game crashes!
These two files are not actually part of the "CvGameCoreDLL" code base but are included from the "CvGameCoreDLLUtil" code base - for which we only have the headers and the pre-compiled library file.
The CvGameCoreDLLUtil code base is shared with the exe file (and presumably the other dlls, eg CvGameDatabase) - note the comments at the top of these files, especially the word "shared" in CvEnums.h
Code:
//! \file CvDLLUtilDefines.h
//! \brief Public header Civ5 definitions that are external to the DLL.
//! This header includes all macros and defines that are external to the DLL
Code:
//! \file CvEnums.h
//! \brief Public header common Civ5 enumerations
//! This header includes all enumerations shared by both exe and dll.
So while we could edit these files to change the values used within the CvGameCoreDLL .cpp code files, there is no guarentee that the resulting changed code will be compatible with the .exe and other .dll files! In fact, Gedemon's "34 Civs DLL (for YnAEMP)" modded DLL not loading LeaderHead screens for more than the first 22 (default number) civs is a very strong indication that there are dependencies in the other code bases that we do not have access to.
Adding another entry to one of the AI decision enums crashed my game (not immediately but after 70 to 80 turns) presumably because the value passed from the GameCore code to some other code was not one that was expected. This is going to make extending the AI (as opposed to altering its current behaviour/response) tough, as you can't, with any certainity, add new behavioural outcomes to the AI enums (eg adding a new spy task in addition to "rig election" and "steal tech").
So what's the point of this post ... really just to say don't be surprised if you change one of the values in these files and you get reports of (apparently random) game crashes!
