glider1
Deity
Hi there great modders of Civ5
I have been playing around with the DLL for BNW. I tried to access a custom XML variable by doing this:
1) Create a new XML variable like this in the mod:
2) Build a custom DLL doing things exactly the way Firaxis do it:
Now it actually works that is not my problem.
The problem is that every now and then the DLL will crash on exit or reload.
If I build a custom DLL without this code, it never crashes.
How do you people access custom XML from inside the DLL?
I have been playing around with the DLL for BNW. I tried to access a custom XML variable by doing this:
1) Create a new XML variable like this in the mod:
Spoiler :
<GameData>
<Defines>
<Row Name="ALL_START_WAR">
<Value>1</Value>
</Row>
</Defines>
</GameData>
<Defines>
<Row Name="ALL_START_WAR">
<Value>1</Value>
</Row>
</Defines>
</GameData>
2) Build a custom DLL doing things exactly the way Firaxis do it:
Spoiler :
CvGlobals:
int m_iALL_START_WAR;
m_iALL_START_WAR(0),
m_iALL_START_WAR = getDefineINT("ALL_START_WAR");
inline int getALL_START_WAR()
{
return m_iALL_START_WAR;
}
int m_iALL_START_WAR;
m_iALL_START_WAR(0),
m_iALL_START_WAR = getDefineINT("ALL_START_WAR");
inline int getALL_START_WAR()
{
return m_iALL_START_WAR;
}
Now it actually works that is not my problem.
The problem is that every now and then the DLL will crash on exit or reload.
If I build a custom DLL without this code, it never crashes.
How do you people access custom XML from inside the DLL?