The CommandButton:
CommandButton Command_PurchaseUpgradeRohanFortressExpansionPad Command = OBJECT_UPGRADE Upgrade = Upgrade_RohanFortressUpgradeExpansionPad Options = CANCELABLE TextLabel = CONTROLBAR:PurchaseUpgradeRohanFortressExpansionPad ButtonImage = HSSharkuTameBeast; BGFortress_BRSentryTwr ButtonBorderType = UPGRADE DescriptLabel = CONTROLBAR:ToolTipPurchaseUpgradeRohanFortressExpansionPad Radial = Yes InPalantir = No End
The CommandSet
CommandSet RohanFortressExpansionPadCommandSetEndCommandSet RohanFortressExpansionPadUpgradedCommandSet 1 = Command_ConstructRohanSentryTowerEndCommandSet RohanFortressCommandSet InitialVisible = 7//Main Menu 1 = Command_ConstructRohanPorter 2 = Command_SelectRevivablesMenFortress 3 = Command_StartCitadelSelfRepair 6 = Command_Sell 5 = Command_SelectUpgradesMenFortress //Upgrades Menu 8 = Command_PurchaseUpgradeRohanFortressExpansionPad 14 = Command_RadialBack //Hero Menu 15 = Command_RingHeroReviveSlot // Note we also need an extra slot for the Create A Hero 17 = Command_GenericReviveSlot1 //Revives any hero. keep them UNIQUE within the same commandset! 18 = Command_GenericReviveSlot2 19 = Command_GenericReviveSlot3 20 = Command_GenericReviveSlot4 21 = Command_GenericReviveSlot5 22 = Command_GenericReviveSlot6 23 = Command_GenericReviveSlot7 24 = Command_RadialBack End(a little messy)
The relevant part of the expansionplot:
CommandSet = SellableCommandSet ... Behavior = CommandSetUpgrade ModueTag_RohanFortressExpansionPadUpgradedCommandSet TriggeredBy = Upgrade_RohanFortressUpgradeExpansionPad1 CommandSet = RohanFortressExpansionPadUpgradedCommandSet End
The part out of the Fortress:
Behavior = CastleUpgrade ModuleTag_SentryTowerExpansionPadUpgrade TriggeredBy = Upgrade_RohanFortressUpgradeExpansionPad Upgrade = Upgrade_RohanFortressUpgradeExpansionPad1 End
And upgrade.ini:
Upgrade Upgrade_RohanFortressUpgradeExpansionPad Type = OBJECT BuildCost = 1000 BuildTime = 20 DisplayName = Upgrade:RohanFortressUpgradeExpansionPad ;ResearchSound = CampSoldierUpgradeFortress SkirmishAIHeuristic = AI_UPGRADEHEURISTIC_FORTRESS End Upgrade Upgrade_RohanFortressUpgradeExpansionPad1 Type = OBJECT End
I can't find what's wrong with this code. Perhaps the double linking to upgrade.ini is irrelevant, although it shouldn't be a problem.
What happens: I can buy the upgrade without problem, but then the commandset of the expansionplots doens't change.