Jump to content


Question about custom Commandbuttons and Commandsets in map.ini

custom command buttons commandset map.ini ini

  • Please log in to reply
2 replies to this topic

#1 DrHouse93

  • Members
  • 18 posts
  • Location:Rome
  • Projects:RotWK Maps (Both Edain and 2.02 versions)

Posted 09 February 2015 - 02:26 PM

Hi all^^


For my scripted map, I created some custom commandbuttons put in the map.ini of the map. Those are intended to give special features to some players. The code work very well, but I'd like to make a question: whenever I create a custom string for Command_etc, even if I set up the correct image, in the game no one appears, and I see a transparent (but still working) button. This is the string from the map.ini:

CommandButton Command_ConstructGondorCitadel
  Object	= GondorCampKeep
  TextLabel	= CONTROLBAR:ConstructCastle
  ButtonImage	= BRCamp_Build
  DescriptLabel = CONTROLBAR:ToolTipCastleUnpack
  Radial	= Yes

This is the code of the builders:

CommandSet IthilienBuilderStart

  1 = Command_Stop
  2 = Command_PorterExtinguishFire
  3 = Command_PorterConstructMenFarm
  4 = Command_ConstructIthilienTent
  5 = Command_PorterConstructMenWell
  6 = Command_PorterConstructMenStatue
  7 = Command_ConstructGondorCitadel


Object MenPorter

	Behavior = CommandSetUpgrade IthilienBuilderStart
		TriggeredBy = Upgrade_GondorFaction
		CommandSet = IthilienBuilderStart


The code works, since I'm able to build only those buildings. However, the buttons of the Gondor Citadel and the Ithilien Tent are transparent. Furthermore, I used the defensive buildplots of the Men Fortress in the tutorial to build some sentry towers and trebuchets. They're correctly built, but a strange thing happens: none of them reduce my resources, and also the trebuchets (I used the MenWall upgrade), rather than being slowly built, spawn instantly. This is the code:

CommandButton Command_MenWallUpgradeToTrebuchet
  Object	= MenWallTrebuchetSmall
  ButtonImage	= BGFortress_Trebuchet
  ButtonBorderType = BUILD
  Radial	= Yes
  TextLabel	= CONTROLBAR:Command_MenWallUpgradeToTrebuchet
  DescriptLabel = CONTROLBAR:ToolTipCommand_MenWallUpgradeToTrebuchet

CommandSet DefensivePlots

  1 = Command_ConstructGondorSentryTower
  2 = Command_MenWallUpgradeToTrebuchet


Object MenFortressExpansionPadSide_Tutorial1
  CommandSet = DefensivePlots
  ShroudClearingRange = MEN_PORTER_SHROUD_RANGE


Hope someone can help me^^

#2 -SilverBane-


    Inactive Noob

  • Project Team
  • 474 posts
  • Location:Bucharest
  • Projects:Life
  •  Mapper & Coder

Posted 09 February 2015 - 04:45 PM

I can tell you from start, you cant create new commandbuttons in a map ini with images being shown. Thats the sad truth. Instead, edit existing ones wich have the desired icon, and add them in a commandset. They will act normally in other commandsets, but where u added them they will do what u edited about them.


#3 DrHouse93

  • Members
  • 18 posts
  • Location:Rome
  • Projects:RotWK Maps (Both Edain and 2.02 versions)

Posted 09 February 2015 - 05:21 PM

Thanks for your help^^

Also tagged with one or more of these keywords: custom, command, buttons, commandset, map.ini, ini

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users