.

You've modified CvInfoBase, which is the base class containing the info's type and stuff.

I think that what you're really after is that you want to add a new info class and xml file.
 
Lord Olleus said:
I put it in the unit xml file.

Then you'll want to read it within the CvUnitInfo class. How about posting an example of the data you added to the xml file?
 
Check out the method:

Code:
//------------------------------------------------------------------------------------------------
// FUNCTION:    CvUnitInfo::read
//! \brief      Reads in a CvUnitInfo from XML
//! \param      pXML Pointer to the XML loading object
//! \retval     true if the data was read successfully, false otherwise
//------------------------------------------------------------------------------------------------
bool CvUnitInfo::read(CvXMLLoadUtility* pXML)

This is where it's reading the data in from Civ4UnitInfos.xml and if you go down a bit you get:

Code:
pXML->GetChildXmlValByName(szTextVal, "Advisor");
	m_iAdvisorType = pXML->FindInInfoClass(szTextVal, GC.getAdvisorInfo(), sizeof(GC.getAdvisorInfo((AdvisorTypes)0)), GC.getNumAdvisorInfos());

	pXML->GetChildXmlValByName(&m_bAnimal, "bAnimal");

It's in that blank line there that you want to get it to read your new data.
 
Back
Top Bottom