Packaging up mods...
#4


part 2... it didn't let me post it all at once:




 




If you take it slow and try to understand how it works, it is pretty simple.




The top part of the code between the { brackets } is the part calling up your main menu button. This is your top toolbar parent.




If you add another menu into this menu, you will use code like is in the 2nd { brackets } - you can see it is calling up the Toolbar _parent = "DSSmallVillage.rsc:DSSVMenu";




As you can see the first part of the code says Toolbar DSSVHousing: "DSSVMenu" - the second word DSSVHousing is the name of the menu, the bit after is also telling the game who its parent is: DSSVMenu .




For all menu buttons like this, you will need to add in sprite images for toolbar buttons, as well as the string texts.




utilize the  int _sortPriority   to keep the menus in order - you can use any numbers I think, I generally start with 100, 200, 300 etc, or you could use 10,20,30 etc...




The menu buttons that call up the buildings are easy enough to do, pick the toolbar parent, adjust int_sortPriority and then link the template file into ComponentDescription _tool =




 




Once you have done all of this, you will also need to make a file like apiaryResources.rsc, this needs to simply call up all the menu items, like:




 




ExternalList resource

{

    External _resources

    [

        "DSSmallVillage.rsc:DSSVMenu",

        "DSSmallVillage.rsc:DSSVHousing",

        "DSSmallVillage.rsc:DSSVHouse2x2",




    ]

}




 




hope this helps you out and isn't too confusing.


  Reply


Messages In This Thread
Packaging up mods... - by Necora - 12-12-2016, 12:38 PM
Packaging up mods... - by ShockPuppet - 12-12-2016, 12:53 PM
Packaging up mods... - by Discrepancy - 12-12-2016, 09:47 PM
Packaging up mods... - by Discrepancy - 12-12-2016, 09:48 PM
Packaging up mods... - by Discrepancy - 12-12-2016, 09:55 PM
Packaging up mods... - by Necora - 12-13-2016, 04:05 AM