View Full Version : UU Buildings?


strategyonly
Feb 04, 2007, 03:09 PM
I have a problem , i have an archery range in the game and it works fine, then i put in another CIV, and have another building for that CIV that is different looking archery range, but named it the same see BuildInfo:
<BuildingInfo>


<BuildingClass>BUILDINGCLASS_ARCHERY_RANGE</BuildingClass>


<Type>BUILDING_ARCHERY_RANGE_THE_OTHERS</Type>
<SpecialBuildingType>NONE</SpecialBuildingType>
<Description>Ginger Archery Range</Description>


<Civilopedia>TXT_KEY_BUILDING_ARCHERY_RANGE_PEDIA</Civilopedia>


<Strategy>TXT_KEY_BUILDING_ARCHERY_RANGE_STRATEGY</Strategy>
<Advisor>ADVISOR_MILITARY</Advisor>


<ArtDefineTag>ART_DEF_BUILDING_GINGER_RANGE</ArtDefineTag>



it works in the game no art problems even shows up as a UU, problem is :
i have units in the game that require an Archery Range before it can be build (which works great in the other civs) but when the Archery Range_The_Others is in the game , i CAN'T build the archery units, its says it needs an Archery Range to build???? but in the town listing its there?

CivInfo:
<Building>


<BuildingClassType>BUILDINGCLASS_ARCHERY_RANGE</BuildingClassType>


<BuildingType>BUILDING_ARCHERY_RANGE_THE_OTHERS</BuildingType>
</Building>

Kael
Feb 04, 2007, 07:00 PM
Untis shouldnt be able to require a building. They should only require a buildingclass.

strategyonly
Feb 04, 2007, 08:37 PM
Untis shouldnt be able to require a building. They should only require a buildingclass.


<PrereqBuilding>BUILDING_ARCHERY_RANGE</PrereqBuilding>

is this what you meant???


Heres the attached jpeg on what i get??

Impaler[WrG]
Feb 05, 2007, 12:06 AM
No Kael he's right, it is BuildingType based rather then Building Class based see here in the XML read function for CvUnit

pXML->GetChildXmlValByName(szTextVal, "PrereqBuilding");
m_iPrereqBuilding = pXML->FindInInfoClass(szTextVal, GC.getBuildingInfo(), sizeof(GC.getBuildingInfo((BuildingTypes)0)), GC.getNumBuildingInfos());


I agree this and several other effects through out the game realy SHOULD operate off building class. The Building Pre-req tag dose operate of BuildingClass fortunately, which is probably what you were thinking of.

strategyonly
Feb 05, 2007, 02:46 AM
;5066913']No Kael he's right, it is BuildingType based rather then Building Class based see here in the XML read function for CvUnit

pXML->GetChildXmlValByName(szTextVal, "PrereqBuilding");
m_iPrereqBuilding = pXML->FindInInfoClass(szTextVal, GC.getBuildingInfo(), sizeof(GC.getBuildingInfo((BuildingTypes)0)), GC.getNumBuildingInfos());


I agree this and several other effects through out the game realy SHOULD operate off building class. The Building Pre-req tag dose operate of BuildingClass fortunately, which is probably what you were thinking of.


So whats the solution then??:blush:

Mexico
Feb 05, 2007, 04:03 AM
So whats the solution then??:blush:

i have already programmed component which add possibility to building CLASS prerequisities for units via new XML tags, but can recognize old tag <PrereqBuilding> and change type to class
will be released soon (during this week i hope) when i found some time to extract this code from TR mod

Mexico

Kael
Feb 05, 2007, 07:32 AM
;5066913']No Kael he's right, it is BuildingType based rather then Building Class based see here in the XML read function for CvUnit

pXML->GetChildXmlValByName(szTextVal, "PrereqBuilding");
m_iPrereqBuilding = pXML->FindInInfoClass(szTextVal, GC.getBuildingInfo(), sizeof(GC.getBuildingInfo((BuildingTypes)0)), GC.getNumBuildingInfos());


I agree this and several other effects through out the game realy SHOULD operate off building class. The Building Pre-req tag dose operate of BuildingClass fortunately, which is probably what you were thinking of.

Oops, your right. Your best bet for now may to be to make a UU for the civ with the UB that requires the new building.