News:

Welcome to World of Banished!

Main Menu

Howto: upgrading a structure through its property window ?

Started by Browser_ice, January 06, 2018, 05:31:08 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Browser_ice

Where are the infos needed to create a structure option/button in the structure property window ?
Computer Specs:
I5-2500 CPU 3.30Mhz,
16GB memory,
GTX 960, DirextX-11
Windows 7 Family Premium

RedKetchup

Quote from: Browser_ice on January 06, 2018, 05:31:08 PM
Where are the infos needed to create a structure option/button in the structure property window ?

depends of what you want to do with tht button. similar to upgrade button in woodhouse template ?
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Browser_ice

Yes.

For anything that is a house, town hall, church, hospital, ....
Computer Specs:
I5-2500 CPU 3.30Mhz,
16GB memory,
GTX 960, DirextX-11
Windows 7 Family Premium

RedKetchup

Quote from: Browser_ice on January 07, 2018, 10:12:56 AM
Yes.

For anything that is a house, town hall, church, hospital, ....

bah no matter if it is an house, a townhall, a church or an hospital, it is all the same way. you add a paragraph * UpgradeUI function in your UI part of your template

{
ObjectType _type = UpgradeUI;
ElementDescription _element = "Dialog/Upgrade.rsc:upgradeButton";
String _insertAt = "pageTabGroup";
DialogControllerConfig _config = "upgradeConfig";
}


and at the bottom of your template you add the explanation of the link you set up in dialog controler config:

UpgradeUIConfig upgradeConfig
{
ComponentDescription _upgradeTo = "Template/StoneHouse.rsc";
}


which is linked to your new template for the upgraded version (the new building players will get when they click the upgrade icon)


depending if it has a residence window UI or something else, you will maybe have to change the String _insertAt to fit the exact UI you are seeing in your window (and where you want to put your upgrade icon) like String _insertAt = "userButton1"; is a different possibility for a non residence window like the herbalist UI...
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .