World of Banished

MODS Garage => Tips and Help => Topic started by: dmax on February 24, 2019, 03:17:58 PM

Title: Apiary Mod with two choices
Post by: dmax on February 24, 2019, 03:17:58 PM
Hi, I try to create an apiary mod with two food's production (honey and honeyvinegar), modify the apiary in the developer kit. I have 6 folders (Dialog, Models, Profession, Template, Texture and UI). In the Dialog, Profession and Texture folder I haven't modified any files. In Models and UI folders i added/create for each "honey" files or text-string, its corresponding "honeyvinegar" files (both ".rsc" and ".png") or text-string; in Template folder i create a "RawMaterialHoneyVinegar.rsc" file and in the "Apiary.rsc" i added ConsumeProduceDescription consumeproduce
{
Product _products
[
{
ComponentDescription _produceMaterial = "Template/RawMaterialHoney.rsc";
ResourceLimit _resourceLimit = Food;
String _requirements = "HoneyRequire";
}
{
ComponentDescription _produceMaterial = "Template/RawMaterialHoneyVinegar.rsc";
ResourceLimit _resourceLimit = Food;
String _requirements = "HoneyVinegarRequire";
}
]

StringTable _stringTable = "UI/ApiaryStringTable.rsc";

float _workTime = 4.0;
ToolType _toolType = Hoe;
int _workRequired = 10;
}


i modify also, apiary.rsc, apiaryResources.rsc and Package.rsc files and i create my apiary mod with bat file. No errors during the packagin and i have my Apiary.pkm file, but in game I can't choose between the two products (honey and honeyvinegar), because there isn't any menu for selection.

where am I wrong?

thanks
Title: Re: Apiary Mod with two choices
Post by: Gatherer on February 24, 2019, 03:27:33 PM
I'm not a modder myself but this topic might give a nudge in the right direction  - - > http://worldofbanished.com/index.php?topic=2866.0 (http://worldofbanished.com/index.php?topic=2866.0)
Title: Re: Apiary Mod with two choices
Post by: Discrepancy on February 24, 2019, 04:12:13 PM
You will need to add the consume produce UI element into the Template file to show up the product selector on the building if desired for selection of product vs random.


UIDescription ui
{
ObjectType _type = ConsumeProduceUI;
ElementDescription _element = "Dialog/ConsumeProduce.rsc";
String _insertAt = "userGroup0";
}



Title: Re: Apiary Mod with two choices
Post by: dmax on February 26, 2019, 02:51:35 AM
QuoteI'm not a modder myself but this topic might give a nudge in the right direction  - - > http://worldofbanished.com/index.php?topic=2866.0
Thanks Gatherer. That topic help me to understand more on the mod and the correct operation.

QuoteYou will need to add the consume produce UI element into the Template file to show up the product selector on the building if desired for selection of product vs random.
Yes, this strings show the menu. Thanks Discrepancy