Best Answer Suchar, 21 March 2015 - 07:41 AM
Well, it's pretty simple.
First, find commandset.ini file, and commandset of structure you want to edit.
I will use gondorbarrackscommandset, for example.
CommandSet GondorBarracksCommandSet 1 = Command_ConstructGondorFighterHorde 2 = Command_ConstructRohanSpearmenHorde 3 = Command_ConstructGondorTowerShieldGuardHorde 4 = Command_PurchaseUpgradeGondorBarracksLevel2 6 = Command_Sell End
Just uncomment "Command_PurchaseUpgradeGondorBarracksLevel2" part of code, so it will looks like:
CommandSet GondorBarracksCommandSet 1 = Command_ConstructGondorFighterHorde 2 = Command_ConstructRohanSpearmenHorde 3 = Command_ConstructGondorTowerShieldGuardHorde ; 4 = Command_PurchaseUpgradeGondorBarracksLevel2 6 = Command_Sell End
and you will be unable to upgrade barracks.
Next, find all build commands of units, that aren't avaiable at first level of structure.
In gondor barracks, it will be: "Command_ConstructGondorTowerShieldGuardHorde"
Copy it, and search for it in commandbutton.ini:
CommandButton Command_ConstructGondorTowerShieldGuardHorde Command = UNIT_BUILD Object = GondorTowerShieldGuardHorde Options = NEED_UPGRADE CANCELABLE NeededUpgrade = Upgrade_GondorBarracksLevel2 TextLabel = CONTROLBAR:ConstructGondorShieldGuardHorde ButtonImage = BGBarracks_TowerGuard ButtonBorderType = BUILD DescriptLabel = CONTROLBAR:ToolTipBuildGondorShieldGuardHorde Radial = Yes InPalantir = Yes ShowProductionCount = Yes End
Now, we must edit that command button:
CommandButton Command_ConstructGondorTowerShieldGuardHorde Command = UNIT_BUILD Object = GondorTowerShieldGuardHorde Options = CANCELABLE ;NEED_UPGRADE ; NeededUpgrade = Upgrade_GondorBarracksLevel2 TextLabel = CONTROLBAR:ConstructGondorShieldGuardHorde ButtonImage = BGBarracks_TowerGuard ButtonBorderType = BUILD DescriptLabel = CONTROLBAR:ToolTipBuildGondorShieldGuardHorde Radial = Yes InPalantir = Yes ShowProductionCount = Yes End
As you can see, you should uncomment unnecesary parts of code, that makes units avaiable at higher level of building - "NEED_UPGRADE" and "NeededUpgrade = Upgrade_GondorBarracksLevel2"
And that's it!
Go to the full post