Author Topic: Howto: upgrading a structure through its property window ?  (Read 480 times)

0 Members and 1 Guest are viewing this topic.

Offline Browser_ice

  • Laborer
  • **
  • Posts: 14
  • Country: 00
Howto: upgrading a structure through its property window ?
« on: January 06, 2018, 05:31:08 PM »
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

Online RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 9261
  • Country: ca
Re: Howto: upgrading a structure through its property window ?
« Reply #1 on: January 06, 2018, 05:49:20 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 Paypal Donations < < <
Click here to PayPal Donate.

Offline Browser_ice

  • Laborer
  • **
  • Posts: 14
  • Country: 00
Re: Howto: upgrading a structure through its property window ?
« Reply #2 on: January 07, 2018, 10:12:56 AM »
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

Online RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 9261
  • Country: ca
Re: Howto: upgrading a structure through its property window ?
« Reply #3 on: January 07, 2018, 01:03:22 PM »
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
Code: [Select]
{
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:

Code: [Select]
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 Paypal Donations < < <
Click here to PayPal Donate.