I remember one time R3ven (formerly aka Huhnu) had done a new upgrade involving Tech upgrades for the Japan War Factory and Naval Yard as well as for the Allies Construction Yard and Outpost. I have the modified portrait icon from the Huhnu Alert3 source code that R3ven once released. Right now I am stumped on trying to make this upgrade out of the Japan War Factory in order to have tier 4 units to be buildable under that condition.
Here's what I have added right now:
Upgrade.xml:
ButtonStateDataCommon.xml:Code:<UpgradeTemplate id="Upgrade_JapanWarFactoryTech4" inheritFrom="BasePurchasableUpgrade" DisplayName="UpgradeName:JapanWarFactoryTech4" AcquireHint="UpgradePrereq:JapanWarFactoryTech4" TypeDescription="UpgradeType:JapanWarFactoryTech4" Description="UpgradeDesc:JapanWarFactoryTech4" Type="OBJECT" BuildTime="30.0s" BuildCost="3000" IconImage="Button_UpgradeMortar"> <GameDependency ForbiddenModelConditions="STRUCTURE_UNPACKING"> <NeededUpgrade>Upgrade_JapanWarFactoryTech3</NeededUpgrade> </GameDependency> </UpgradeTemplate>
Images.xml:Code:<ButtonSingleStateData id="ButtonStateUpgradeJapanWarFactoryTech4"> <State Image="JUA_Nanotech_Upgrade3" Title="NAME:UpgradeJapanWarFactoryTech4" Description="DESCRIPTION:UpgradeJapanWarFactoryTech4" /> </ButtonSingleStateData>
In the JapanWarFactory.xml:Code:<Texture id="JapanWarFactoryUpgrade3" File="JPN_EXP_UPGRADE3.tga" OutputFormat="A8R8G8B8" GenerateMipMaps="false" AllowAutomaticResize="false"/> <PackedTextureImage id="JUA_Nanotech_Upgrade3" Texture="JapanWarFactoryUpgrade3" Rotated="false"> <Dimensions x="106" y="106"/> <Coords x="0" y="0"/> <TextureDimensions x="106" y="106"/> </PackedTextureImage>
In AttributeModifier.xml:Code:<SubObjectsUpgrade id="ModuleTag_SubObjectsUpgrade3"> <TriggeredBy>Upgrade_JapanWarFactoryTech4</TriggeredBy> <Nugget ShowSubObjects="Upgrade_04" HideSubObjects="Upgrade_01 Upgrade_02 Upgrade_03" Upgrade="Upgrade_JapanWarFactoryTech4"> <CustomAnimAndDuration AnimState="USER_4"/> </Nugget> </SubObjectsUpgrade> <AttributeModifierUpgrade id="ModuleTag_JapanWarFactoryTech4_AttributeModifier" AttributeModifier="AttributeModifer_JapanTech4_JapanWarFactory"> <TriggeredBy>Upgrade_JapanWarFactoryTech4</TriggeredBy> </AttributeModifierUpgrade>
Every time I compiled this, the compiler doesn't know the define of "Upgrade_JapanWarFactoryTech4", and the "BasePurchasableUpgrade" part doesn't cover that. Am I missing something or what?Code:<AttributeModifier id="AttributeModifer_JapanTech4_JapanWarFactory" Category="LEVEL"> <Modifier Type="HEALTH_MULT" Value="125%"/> </AttributeModifier>

Reply With Quote


