Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: AnnoZone Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

AlphaLlama

Frisch Angeheuert

  • »AlphaLlama« ist der Autor dieses Themas

Beiträge: 2

Registrierungsdatum: 30. Juni 2010

  • Nachricht senden

1

Dienstag, 29. Mai 2012, 00:27

Adding a 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 done 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.

Also, i suppose i should mention that i have added the <Upgradable /> tags to the buildings (and entered in the target GUID) in the assets.xml and included the "Upgrade" function in the entry list context menu. everything should be set on that side, now i believe it to be a problem with the GUI only.

colombus

Piratenschreck

Beiträge: 566

Registrierungsdatum: 7. Mai 2016

  • Nachricht senden

2

Donnerstag, 31. Mai 2012, 10:38

Hi AlphaLlama!

Question:
The "Iconguid" number "7074", what are this number is a random, or are the number from already exists list of other iconguid number?

Have you make control, so as this number are not used by other function?
Or is this number used for other iconguid? (So her these don't have problem, but if the number is random, so is not sure!!!)

I think, here should done error!
"patch0.rda\addondata\config\gui\menudefinitions\objectmenu_manufactory.dlg"

I think, the Program don't recognize to add new ".dlg" file.

Dlg = Resource integrated into game.
So change any resource into game, should give special complication.

AlphaLlama

Frisch Angeheuert

  • »AlphaLlama« ist der Autor dieses Themas

Beiträge: 2

Registrierungsdatum: 30. Juni 2010

  • Nachricht senden

3

Donnerstag, 31. Mai 2012, 22:13

Hey, thanks for the reply!

The Icon GUID is the same as that for the "instant pick up" function, Would reusing the icon cause problems? (i am still pretty new to interface editing)

As far as the manufactory.dlg, I was hoping that packing the file in to the patch0.rda file would force it to overwrite the others, but I may be wrong. I have posted this on projectanno.de and someone said that this would not be possible. So, perhaps I could explain what I am trying to do so that others may provide possible alternatives to achieve a similar effect. I wanted to make the factories upgradable, the new building they upgrade in to would have 25% increased production output, but would also increase the costs of maintenance. I was hoping to make the upgrade ability dependent on the level of civilization, so as you "level up" you would gain access to these upgrades. The idea would be that you could increase production output without having to sacrifice too much space, allowing for larger populations on smaller maps. I wanted to do this in a way that wouldn't change the economy, only the space requirements.

colombus

Piratenschreck

Beiträge: 566

Registrierungsdatum: 7. Mai 2016

  • Nachricht senden

4

Samstag, 2. Juni 2012, 02:38

Zitat

Originally posted by AlphaLlama
Hey, thanks for the reply!

1) The Icon GUID is the same as that for the "instant pick up" function, Would reusing the icon cause problems? (i am still pretty new to interface editing)


Oh sure, if Icon Guid number is used by another function, so this can make problem.

Zitat

Originally posted by AlphaLlama
2) As far as the manufactory.dlg, I was hoping that packing the file in to the patch0.rda file would force it to overwrite the others, but I may be wrong. I have posted this on projectanno.de and someone said that this would not be possible. So, perhaps I could explain what I am trying to do so that others may provide possible alternatives to achieve a similar effect. I wanted to make the factories upgradable, the new building they upgrade in to would have 25% increased production output, but would also increase the costs of maintenance. I was hoping to make the upgrade ability dependent on the level of civilization, so as you "level up" you would gain access to these upgrades. The idea would be that you could increase production output without having to sacrifice too much space, allowing for larger populations on smaller maps. I wanted to do this in a way that wouldn't change the economy, only the space requirements.


Wait, wait wait just a moment!

would you have 25% more production without need to make update?
Is simply!
(I have found this by playing on Anno 1701).

So here i use only example from Iron Ore Mine ("Raw iron" production)ok .

To have +25% production, you should install to minimal area back from mine the Market. So mine have 5 Ton Stock reserve ok?
So guy with cart should reach mine, into time distance, each time as mine have 5 ton stock fully. (Each time into market, guy with cart transport 5 Ton product).
The Iron smelter production, need only 4 ton ore to make 4 ton Iron.
So you have +1 ton more product/ minute.

With Iron smelter production, Here, road should have zigzag course, so as distance is in length, to gain maximal time, to search each time 5 ton Iron.
Production from smelter should are placed near market, but road for guy with cart, here should make many distance....

Etc..............

But now if we speak another time on DLG file.
.DLG file = Dialogue.
Why use you Dialogue resource function to make Button ressource?


This was used as file into Anno1701 game directory Button.
Two file : .ABM + .DDS

Into Anno1701 "anno 1701\data0\data\config\gui\menudefinitions", here this directory content .DLG file. But so as i have try to you'r explain, DLG file = Dialogue resource file, nothing button.dlg are present into directory.
By anno 1404, this should are same structure. Or programmer have a bit changed structure from directory, but should are same 80% as 1701.

to button function, i think is better, you read first time this as information.
http://msdn.microsoft.com/en-gb/library/…ws.forms.button(v=vs.80).aspx

to create button for game, it was used same technical principle.
So i self don't have possibility to uncompress RAD file for anno 1404, or i have look into file.

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »colombus« (2. Juni 2012, 02:39)