Afforess
The White Wizard
Ai city governer is just few lines in CvCityAi. The automations are a bit of XML and CvEnums, CvUnit, and CvUnitAi
1>CvCityAI.obj : error LNK2019: unresolved external symbol "public: int __thiscall CvGlobals::getUSE_AI_CHOOSE_PRODUCTION_CALLBACK(void)" (?getUSE_AI_CHOOSE_PRODUCTION_CALLBACK@CvGlobals@@QAEHXZ) referenced in function "public: virtual void __thiscall CvCityAI::AI_chooseProduction(void)" (?AI_chooseProduction@CvCityAI@@UAEXXZ)
1>CvInfos.cpp(18661) : error C2039: 'copyNonDefaults' : is not a member of 'CvEmphasizeInfo'
1> e:\--- BASE GAMECORE ---\BASE 1.7\CvGameCoreDLL\CvInfos.h(5169) : see declaration of 'CvEmphasizeInfo'
1>CvInfos.cpp(18668) : error C3861: 'isAvoidAngryCitizens': identifier not found, even with argument-dependent lookup
1>CvInfos.cpp(18668) : error C2065: 'm_bAvoidAngryCitizens' : undeclared identifier
1>CvInfos.cpp(18669) : error C3861: 'isAvoidUnhealthyCitizens': identifier not found, even with argument-dependent lookup
1>CvInfos.cpp(18669) : error C2065: 'm_bAvoidUnhealthyCitizens' : undeclared identifier
<Define>
<DefineName>USE_MODDERS_PLAYEROPTION_1</DefineName>
<iDefineIntVal>0</iDefineIntVal>
</Define>
<Define>
<DefineName>USE_MODDERS_PLAYEROPTION_2</DefineName>
<iDefineIntVal>0</iDefineIntVal>
</Define>
<Define>
<DefineName>USE_MODDERS_PLAYEROPTION_3</DefineName>
<iDefineIntVal>0</iDefineIntVal>
</Define>
<ElementType name="PlayerOptionInfo" content="eltOnly">
<element type="Type"/>
<!-- XMLCOPY 02/20/2008 MRGENIE -->
<element type="bTypeDependency" minOccurs="0"/>
<element type="AndDependencyTypes" minOccurs="0"/>
<element type="OrDependencyTypes" minOccurs="0"/>
<!-- XMLCOPY END MRGENIE -->
i+=1
szButtonID = "Emphasize" + str(i)
screen.addCheckBoxGFC( szButtonID, "", "", iBtnX+iBtnW+iBtnWa, iBtnY, iBtnW, iBtnHa, WidgetTypes.WIDGET_EMPHASIZE, i, -1, ButtonStyles.BUTTON_STYLE_LABEL )
szStyle = "Button_CityB" + str(i+1) + "_Style"
screen.setStyle( szButtonID, szStyle )
screen.hide( szButtonID )
#Afforess Emphasize Health & Happiness
i+=1
szButtonID = "Emphasize" + str(i)
screen.addCheckBoxGFC( szButtonID, "", "", xResolution - 260 - iBtnWa, iCityCenterRow2Y, iBtnWa, iBtnHa, WidgetTypes.WIDGET_EMPHASIZE, i, -1, ButtonStyles.BUTTON_STYLE_LABEL )
szStyle = "Button_CityB" + str(i) + "_Style"
screen.setStyle( szButtonID, szStyle )
screen.hide( szButtonID )
i+=1
szButtonID = "Emphasize" + str(i)
screen.addCheckBoxGFC( szButtonID, "", "", xResolution - 260 - iBtnWa, iCityCenterRow1Y, iBtnWa, iBtnHa, WidgetTypes.WIDGET_EMPHASIZE, i, -1, ButtonStyles.BUTTON_STYLE_LABEL )
szStyle = "Button_CityB" + str(i-1) + "_Style"
screen.setStyle( szButtonID, szStyle )
screen.hide( szButtonID )
iNumCustomEmphasizeInfos = 2
#Afforess ENd
g_pSelectedUnit = 0
screen.setState( "AutomateCitizens", pHeadSelectedCity.isCitizensAutomated() )
screen.setState( "AutomateProduction", pHeadSelectedCity.isProductionAutomated() )
for i in range (g_NumEmphasizeInfos):
#Afforess Hide Extra Emphasis Icons
if ( CyInterface().isCityScreenUp() or ( i < g_NumEmphasizeInfos - iNumCustomEmphasizeInfos) ):
# if (true):
#Afforess End
szButtonID = "Emphasize" + str(i)
As for the global defines, the reason the A_New_Dawn_GlobalDefines did not work was because you have to tell the game to load the file in CvXMLLoadUtilitySet.cpp.
<YieldChanges>
<iYieldChange>2</iYieldChange>
<iYieldChange>0</iYieldChange>
<iYieldChange>0</iYieldChange>
</YieldChanges>
Looking for some help/explanation;
In this example of iYieldChange is it Food that is increased by 2?Code:<YieldChanges> <iYieldChange>2</iYieldChange> <iYieldChange>0</iYieldChange> <iYieldChange>0</iYieldChange> </YieldChanges>
And since there are 3 iYieldChanges what is their order? Food, Hammer, Gold?
JosEPh
And Dependancies won't do what you want. How about using the NotGameOption tag for that building (or unit), and use GAMEOPTION_GUILDS.
I didn't document it, cause RevDCM added it, not me.
Ah ha! I suppose that it is getting XML errors in RoM 2.92 because it is not using the version of RevDCM that AND is using.
Btw, would putting the latest AND dll in RoM 2.92 work? Or will it show that "sensible" defaults for new stuff was not put in as the new features were added.