World of Banished

MODS Garage => Tips and Help => Topic started by: Browser_ice on January 06, 2018, 05:31:08 PM

Title: Howto: upgrading a structure through its property window ?
Post by: 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 ?
Title: Re: Howto: upgrading a structure through its property window ?
Post by: RedKetchup on January 06, 2018, 05:49:20 PM
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 ?
Title: Re: Howto: upgrading a structure through its property window ?
Post by: Browser_ice on January 07, 2018, 10:12:56 AM
Yes.

For anything that is a house, town hall, church, hospital, ....
Title: Re: Howto: upgrading a structure through its property window ?
Post by: RedKetchup on January 07, 2018, 01:03:22 PM
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...