Modding Union
[en] - Modding Corner => Coding => Thema gestartet von: jiraiyathegallent am 31. Jan 2016, 16:21
-
Hello everyone I added mirkwood fighters to a building but i need help Removing the requirements to recruit them any help will be great thanks. :)
-
Edit the following commandbutton:
CommandButton Command_ConstructLothlorienMirkwoodFighterHorde
Command = UNIT_BUILD
Object = LothlorienMirkwoodFighterHorde
Options = NEED_UPGRADE CANCELABLE
TextLabel = CONTROLBAR:LothlorienMirkwoodFighterHorde
ButtonImage = HSMirkwoodSword
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipBuildLothlorienMirkwoodFighterHorde
Radial = Yes
InPalantir = Yes
ShowProductionCount = Yes
NeededUpgrade = Upgrade_RaiseSchmiedekunst
DisableOnModelCondition = RUBBLE POST_RUBBLE
End
Your button should look like this:
CommandButton Command_ConstructLothlorienMirkwoodFighterHorde
Command = UNIT_BUILD
Object = LothlorienMirkwoodFighterHorde
Options = CANCELABLE
TextLabel = CONTROLBAR:LothlorienMirkwoodFighterHorde
ButtonImage = HSMirkwoodSword
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipBuildLothlorienMirkwoodFighterHorde
Radial = Yes
InPalantir = Yes
ShowProductionCount = Yes
End
-
sorry i shouldve been more specific its for a map.ini and the code doesnt work im guessing because its for the mirkkwoodfighter.ini
-
Yes, copy the changed code in your map.ini and everything should work. A commandbutton doesnt have anything to do with the ini of an unit.
-
it doesnt work just to be sure is this right?
CommandSet GondorRangerTentsCommandSetNew
1 = Command_ConstructLothlorienMirkwoodFighterHorde
2 = Command_ConstructLothlorienMirkwoodSpearmenHorde
3 = Command_ConstructLothlorienMirkwoodArcherHorde
4 = Command_ConstructMirkwoodElkriderHorde
6 = Command_Sell
End
Object GondorRangerTents
CommandSet = GondorRangerTentsCommandSetNew
End
CommandButton Command_ConstructLothlorienMirkwoodFighterHorde
Command = UNIT_BUILD
Object = LothlorienMirkwoodFighterHorde
Options = CANCELABLE
TextLabel = CONTROLBAR:LothlorienMirkwoodFighterHorde
ButtonImage = HSMirkwoodSword
ButtonBorderType = BUILD
DescriptLabel = CONTROLBAR:ToolTipBuildLothlorienMirkwoodFighterHorde
Radial = Yes
InPalantir = Yes
ShowProductionCount = Yes
End
-
You should add the following line to your comandbutton.
NeededUpgrade = None
Else, the game won't override it and keep the old upgrade as a requirement.
-
that didnt work sadly