I'm stuck working on unt graphics because I cannot find how to keep a nif file the same when importing (either in blender or 3dsmax) and exporting without modifying anything, I always loose information about ATTACHABLES.
Do the art guys have a suggestion as to how to do so (Warkirby? help ...)?
You can do anything to Civics in the DLL. Without that... it'd be tricky/annoying I imagine.
pXML->Init2DIntList(&m_ppaiSpecialistCommerceChange, GC.getNumSpecialistInfos(), NUM_COMMERCE_TYPES);
if (gDLL->getXMLIFace()->SetToChildByTagName(pXML->GetXML(),"SpecialistCommerceChanges"))
{
iNumChildren = gDLL->getXMLIFace()->GetNumChildren(pXML->GetXML());
if (gDLL->getXMLIFace()->SetToChildByTagName(pXML->GetXML(),"SpecialistCommerceChange"))
{
for(j=0;j<iNumChildren;j++)
{
pXML->GetChildXmlValByName(szTextVal, "SpecialistType");
k = pXML->FindInInfoClass(szTextVal);
if (k > -1)
{
// delete the array since it will be reallocated
SAFE_DELETE_ARRAY(m_ppaiSpecialistCommerceChange[k]);
if (gDLL->getXMLIFace()->SetToChildByTagName(pXML->GetXML(),"CommerceChanges"))
{
// call the function that sets the yield change variable
pXML->SetCommerce(&m_ppaiSpecialistCommerceChange[k]);
gDLL->getXMLIFace()->SetToParent(pXML->GetXML());
}
else
{
pXML->InitList(&m_ppaiSpecialistCommerceChange[k], NUM_COMMERCE_TYPES);
}
}
if (!gDLL->getXMLIFace()->NextSibling(pXML->GetXML()))
{
break;
}
}
// set the current xml node to it's parent node
gDLL->getXMLIFace()->SetToParent(pXML->GetXML());
}
// set the current xml node to it's parent node
gDLL->getXMLIFace()->SetToParent(pXML->GetXML());
}
if (gDLL->getXMLIFace()->SetToChildByTagName(pXML->GetXML(), "GlobalSeaPlotYieldChanges"))
{
pXML->SetYields(&m_paiGlobalSeaPlotYieldChange);
gDLL->getXMLIFace()->SetToParent(pXML->GetXML());
}
else
{
pXML->InitList(&m_paiGlobalSeaPlotYieldChange, NUM_YIELD_TYPES);
}
I'm pretty sure it's not possible to maintain that info, but there is an easy workaround.
Get yourself one model, fully premade. With all the attachables and stuff. Then, anything new you make, just copy the new parts and paste them into that template. In essence, have a backup with all the attachables that never changes.
Not sure how relevant this is to your situation, but "nifswapping" is a pretty common practice in general. After changing something, rather than actually using the nif you export, just copy your changed parts back into the original nif, overwriting what you changed, and saving it as a new file.
Not sure how relevant this is to your situation, but "nifswapping" is a pretty common practice in general. After changing something, rather than actually using the nif you export, just copy your changed parts back into the original nif, overwriting what you changed, and saving it as a new file.
I need help for setting some tags in CvTraitInfo::copyNonDefaults().
In Orbis, we have some hugely frightening trait things, like this:And this:Code:pXML->Init2DIntList(&m_ppaiSpecialistCommerceChange, GC.getNumSpecialistInfos(), NUM_COMMERCE_TYPES); if (gDLL->getXMLIFace()->SetToChildByTagName(pXML->GetXML(),"SpecialistCommerceChanges")) { iNumChildren = gDLL->getXMLIFace()->GetNumChildren(pXML->GetXML()); if (gDLL->getXMLIFace()->SetToChildByTagName(pXML->GetXML(),"SpecialistCommerceChange")) { for(j=0;j<iNumChildren;j++) { pXML->GetChildXmlValByName(szTextVal, "SpecialistType"); k = pXML->FindInInfoClass(szTextVal); if (k > -1) { // delete the array since it will be reallocated SAFE_DELETE_ARRAY(m_ppaiSpecialistCommerceChange[k]); if (gDLL->getXMLIFace()->SetToChildByTagName(pXML->GetXML(),"CommerceChanges")) { // call the function that sets the yield change variable pXML->SetCommerce(&m_ppaiSpecialistCommerceChange[k]); gDLL->getXMLIFace()->SetToParent(pXML->GetXML()); } else { pXML->InitList(&m_ppaiSpecialistCommerceChange[k], NUM_COMMERCE_TYPES); } } if (!gDLL->getXMLIFace()->NextSibling(pXML->GetXML())) { break; } } // set the current xml node to it's parent node gDLL->getXMLIFace()->SetToParent(pXML->GetXML()); } // set the current xml node to it's parent node gDLL->getXMLIFace()->SetToParent(pXML->GetXML()); }
And I don't know at all how I'm supposed to write them in ::copyNonDefaults(). I'm nearly sure I can find some template to copy somewhere but, well, some help would be welcomed anywayCode:if (gDLL->getXMLIFace()->SetToChildByTagName(pXML->GetXML(), "GlobalSeaPlotYieldChanges")) { pXML->SetYields(&m_paiGlobalSeaPlotYieldChange); gDLL->getXMLIFace()->SetToParent(pXML->GetXML()); } else { pXML->InitList(&m_paiGlobalSeaPlotYieldChange, NUM_YIELD_TYPES); }
![]()
Would need DLL for it
if unit.getUnitType() == gc.getInfoTypeForString('UNIT_SCORPION_CLAN_WHELP'):
pPlot = unit.plot()
if pPlot.getNumUnits() < 3:
newUnit = pPlayer.initUnit(gc.getInfoTypeForString('UNIT_ARCHER_SCORPION_CLAN'), pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
else:
iRiderWeight = 15
iChariotWeight = 5
if pPlayer.isHasTech(gc.getInfoTypeForString('TECH_CONSTRUCTION')):
iChariotWeight += 25
elif pPlayer.isHasTech(gc.getInfoTypeForString('TECH_HORSEBACK_RIDING')):
iRiderWeight += 25
iRnd = CyGame().getSorenRandNum(100, "Goblin Whelp Upgrade")
if iRnd < iChariotWeight:
newUnit = pPlayer.initUnit(gc.getInfoTypeForString('UNIT_CHARIOT_SCORPION_CLAN'), pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
elif iRnd < (iChariotWeight+iRiderWeight):
newUnit = pPlayer.initUnit(gc.getInfoTypeForString('UNIT_WOLF_RIDER_SCORPION_CLAN'), pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
else:
newUnit = pPlayer.initUnit(gc.getInfoTypeForString('UNIT_GOBLIN_SCORPION_CLAN'), pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
newUnit.convert(unit)
unit = newUnit
newUnit = pPlayer.initUnit(gc.getInfoTypeForString('UNIT_ARCHER_SCORPION_CLAN'), pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
newUnit.convert(unit)
When a whelp is created. Another unit is created on the tile. And then that unit is turned into a whelp. We end up with two whelps.
I know that isn't what it does, so my understanding of it is screwed up somewhere. Can anyone explain ?
Then you call newUnit.convert(oldUnit) and the newUnit automatically automatically sucks all relevant information; experience, level, promotions et cetera; from oldUnit and finally kills it.
Does this information sucking not also include unit type/artgroup ?
Is the unit killing a part of the convert function too? I don't see a kill command anywhere there.
Also, does it include the name? or if not, do you know the required python functions to get/set unit names?
People tend to like naming pet units in general, and a druid is quite likely to become that kind of unit...