New 'mount' item, model disappears when I select item. Help!
Hey guys!
As you may remember, a few weeks back I posted some code for roadbuilding units. This worked pretty well, but at the time I was trying to disallow mounts for roadbuilding units, as a mechanism for slowing them down. My rationale for this was I wanted something that would allow players to tweak the existing road networks, without excessively nerfing the trait ability that allows champions and Capitar to do this (i.e. Champions with the Roadbuilding ability and Capitar can do it much faster than these units can).
So, I ended up deciding to make the roadbuilding equipment a 'mount', with a prerequisite perk/trait/ability 'Roadbuilding'. I didn't want the crews to actually be shown as mounted, however, as the horses required are workhorses to haul/pull things around, and are not the riding variety, so I tried borrowing code from a ring-type item (i.e. art def code that doesn't actually change/modify the model as far as I can tell).
BTW, I'm still pondering the balance on this thing (resource requirements), but that's not relevant to the problem at hand.
Problem is that the model disappears when I select the roadbuilding equipment. The 'man with shovel' icon shows up fine, but selecting it disappears the unit model in the unit building window. I haven't been able to figure this one out... Help!
Relevant Code below:
- <GameItemTypes>
- <GameItemType InternalName="RoadbuildingEquipment">
- <DisplayName>Roadbuilding Equipment</DisplayName>
- <Description>Provides the unit with the necessary horses and equipment needed for roadbuilding</Description>
- <Type>Mount</Type>
- <CanBeEquipped>1</CanBeEquipped>
- <AdditionalTrainingTurns>20</AdditionalTrainingTurns>
- <HideInHiergamenon>1</HideInHiergamenon>
- <ShopValue>120</ShopValue>
- <Cost>50</Cost><Type>Army</Type>
- <GameModifier>
- <ModType>Unit</ModType>
- <Attribute>UnlockAction</Attribute>
- <StrVal>BuildRoad</StrVal>
- <Provides>Allows the unit to build roads</Provides>
- </GameModifier>
- <GameModifier>
- <ModType>Unit</ModType>
- <Attribute>AdjustUnitStat</Attribute>
- <StrVal>UnitStat_Moves</StrVal>
- <Value>-1</Value>
- <Provides>Reduces Movement to 1</Provides>
- </GameModifier>
- <ProductionRequirement>
- <Type>Resource</Type>
- <Attribute>Population</Attribute>
- <Value>10</Value>
- </ProductionRequirement>
- <ProductionRequirement>
- <Type>Resource</Type>
- <Attribute>Horses</Attribute>
- <Value>2</Value>
- </ProductionRequirement>
- <AdditionalTrainingTurns>48</AdditionalTrainingTurns>
- <IsAvailableForSovereignCustomization>0</IsAvailableForSovereignCustomization>
- <Prereq>
- <Type>UnitStat</Type>
- <Attribute>UnitStat_BuildRoads</Attribute>
- <Value>1</Value>
- </Prereq>
- <ArtDef>BuildRoadsItem_ArtDef</ArtDef>
- <GameItemTypeArtDef InternalName="BuildRoadsItem_ArtDef">
- <GameItemTypeModelPack InternalName="BuildRoadsItem_Default">
- <IconFile>Digger.png</IconFile>
- <TintR>240</TintR>
- <TintG>10</TintG>
- <TintB>10</TintB>
- <SFX>Hit_Hammer1</SFX>
- <SFX>Hit_Hammer2</SFX>
- <SFX>Hit_Hammer3</SFX>
- <GameItemTypeModel>
- </GameItemTypeModel>
- </GameItemTypeModelPack>
- </GameItemTypeArtDef>
- <AIData AIPersonality="AI_General">
- <AIPrefType>AIPrefType_MOUNT</AIPrefType>
- </AIData>
- </GameItemType>
- </GameItemTypes>