Trouble adding a new button to the manufactory GUI.

  • Hello, I have been trying to add a new button to the GUI of all production facilities. The button would allow you to upgrade the facility, much like warehouses and resident buildings upgrade. I would like to place this button next to the "call market cart/Instant pickup" button in the object menu. My reason for this placing it here is that the other instances of upgrade buttons throughout the game appear at the top of the menu, where the "cultivate" button appears on production facilities. I figure adding the button below, near the other functions wouldn't interfere with the cultivate function. So far I have added the following to patch0.rda\addondata\config\gui\menudefinitions\objectmenu_manufactory.dlg:



    <BUTTON>
    <PATHID>UPGRADE_FACTORY</PATHID>
    <TEMPLATE_REF_ID>ROUND_MENU_BUTTON_SMALL</TEMPLATE_REF_ID>
    <EXTENT>
    <TOP>75</TOP>
    <LEFT>17</LEFT>
    <WIDTH>40</WIDTH>
    <HEIGHT>40</HEIGHT>
    </EXTENT>
    <ICONGUID>7074</ICONGUID>
    <EVENTHANDLER>
    <UPGRADE_HOUSE/>
    <EVENT>OnLeftClick</EVENT>
    </EVENTHANDLER>
    <ACCESSID>PRODUCTION_UPGRADE_FACTORY_BUTTON</ACCESSID>
    <IS_DRAGGABLE>0</IS_DRAGGABLE>
    <BACKGROUND>addondata/config/gui/backgrounds/final/general_buttons/35x35_circle.bkg</BACKGROUND>
    <TOOLTIP>
    <TEXT>10157526</TEXT>
    </TOOLTIP>
    <ZORDER>4</ZORDER>
    <ICONSTRETCH>1</ICONSTRETCH>
    <ICONSPACE>
    <LEFT>4</LEFT>
    <TOP>4</TOP>
    </ICONSPACE>
    <SOUNDGUIDCLICK>2809</SOUNDGUIDCLICK>
    </BUTTON>
    However the button will not appear in game. I searched through the other files in the gui directory for instances of the other buttons that appear on the menu, but it would appear that the objectmenu_manufactory.dlg is the only place where you can find the button definitions. Am I missing an obvious step? any help would be appreciated.


    Edit: I should also mention that i have added the "upgradable" properties(including upgrade guid, etc) to the assets.xml entry, including the "Upgrade" function on the entry list of the asset's context menu.

  • das spiel ist nicht konzipiert für so ein knopf.
    das erkennt deine erfundenen befehle nicht.


    ich habe mich ein wenig damit auseinander gesetzt um so ein button rein zu schummeln aber es geht einfach nicht.
    der upgrade über die tastatur geht aber auch ohne diesen knopf.

  • Thanks for the response. I was hoping it was possible since everywhere else i had looked "UPGRADE_HOUSE" seemed to be the universal event handler, but in further research it looks like there is a lot more that goes in to the conditionals which would determine whether or not the building is eligible for an upgrade. I would be interested in hearing about your method, if you would be willing to spend the time. Also, I found several developer commands for use in the console, They are listed in bindingsdev.ini of the /game folder. the command would allow you to force an upgrade of the selected building, but it does so without the construction costs which is unfair for my intended purpose. I'll experiment with them and report back what i find!

  • There are only two types of house that can arise, warehouse / markethouse and resident buildings. No more functions are [/color]registered in the exe.
    The command "UPGRADE_HOUSE" in association to the bindingsdev.ini is a remains from the development and has been disabled with patch 1.1. You my thoughts and try to explain not cut it. I Have generally difficults to advice something like this, even more in english language...


    I've tried to manipulate the menu several times without any success. Buttons with their own command is not possible.
    Normally it should be enough to ad a 'upgrade guid' to the asset in assets.xml. The rose so you can then worry about the keyboard without the menu button.


    So you must live. I have so many things in IAAM with it.