Zitat von
melcher kürzer
Actually these are two different problems.
First, it's not possible to use formations. The requierd
entry in the <UnitMeshGroup> (CIV4UnitArtStyleTypeInfos.xml) isn't working.
Code:
<UnitMeshGroup>
<iRequired>2</iRequired>
<ArtDefineTag>ART_DEF_UNIT_NATIVE_MERC</ArtDefineTag>
</UnitMeshGroup>
Or i miss something?
In BTS it doesn't have such a field either; the UnitArtStyles doesn't modify the settings like iRequired and such of the MeshGroup, it only replaces the art define tag. If you change it in UnitInfos, it will also be changed for the alternate unit graphic:
The other problem has to do with the colopedia. The unit art in the upper right corner shows the original unit model. I assume this is the same issue as with the wrong interface art.
You are correct, it is the same problem. Both use the "addUnitGraphicGFC" command, which I don't know where is defined.
EDIT: Good news! I managed to make it work correctly. In CvInfos.cpp, changing this:
Code:
const CvArtInfoUnit* CvUnitInfo::getArtInfo(int index, int iProfession) const
{
return ARTFILEMGR.getUnitArtInfo(getArtDefineTag(index, iProfession));
}
To this:
Code:
const CvArtInfoUnit* CvUnitInfo::getArtInfo(int index, int iProfession) const
{
//Androrc UnitArtStyles
// return ARTFILEMGR.getUnitArtInfo(getArtDefineTag(index, iProfession));
UnitArtStyleTypes eStyle = NO_UNIT_ARTSTYLE;
if (GC.getGameINLINE().isFinalInitialized())
{
eStyle = (UnitArtStyleTypes) GC.getCivilizationInfo(GET_PLAYER(GC.getGameINLINE().getActivePlayer()).getCivilizationType()).getUnitArtStyleType();
}
return ARTFILEMGR.getUnitArtInfo(getArtDefineTag(index, iProfession, eStyle));
//Androrc End
}
Makes those work in the interface!