Packaging up mods...
#1


Hello.




It would be great if someone experienced could give some insight into packaging mods and arranging things in toolbars.




When I run the package.bat, there are no errors, but it also doesn't seem to produce anything. I can't find any .pkm files anywhere. Any ideas what I am missing?




Also, how do you go about making mods with multiple things in it? I can create F-variants of a 1x1 dock, the same with 1x2 and 1x3. How do I get them into the game in the same package?




And finally, how do you arrange things on toolbars? I can add to housing etc., but what if I want to make a new toolbar icon with sub icons for the whole set?




I guess there will have to be shared resources between sets too.... no idea where to start on that one.




 




Cheers!




 


  Reply
#2

Its actually never been my strong point, and as I havent packaged anything in about a year, perhaps <a contenteditable="false" data-ipshover="" data-ipshover-target="<___base_url___>/index.php?/profile/3-kralyerg/&do=hovercard" data-mentionid="3" href="<___base_url___>/index.php?/profile/3-kralyerg/">@Kralyerg</a> or <a contenteditable="false" data-ipshover="" data-ipshover-target="<___base_url___>/index.php?/profile/6338-discrepancy/&do=hovercard" data-mentionid="6338" href="<___base_url___>/index.php?/profile/6338-discrepancy/">@Discrepancy</a> or <a contenteditable="false" data-ipshover="" data-ipshover-target="<___base_url___>/index.php?/profile/3183-ketchup/&do=hovercard" data-mentionid="3183" href="<___base_url___>/index.php?/profile/3183-ketchup/">@Ketchup</a> can help [img]<fileStore.core_Emoticons>/emoticons/smile.png[/img]/emoticons/smile@2x.png 2x" title=":)" width="20" /> 

  Reply
#3


to make a toolbar:




if you want it to be on the main toolbar (like DSSV / NMT / Rowhouses etc), you will want to have code like this in your toolbar file (in the Apiary example it is the file example/building/Apiary.rsc):




this is the code from my DS Small Village:






Code:
// Main menu - this is the main menu button
Toolbar DSSVMenu
{
    int _sortPriority = 297;
        SpriteSheet _spriteSheet = "UI/DSSVSpriteSheet.rsc";
    String _image = "DSSVMenu";
    StringTable _stringTable = "UI/DSSVStringTable.rsc";
    String _toolTip = "DSSVMenuTip";
        Action _action = ShowGroup;
}
    // Housing - this is the housing menu button second level of menu
Toolbar DSSVHousing: "DSSVMenu"
{
    Toolbar _parent = "DSSmallVillage.rsc:DSSVMenu";
    int _sortPriority = 100;
        SpriteSheet _spriteSheet = "UI/DSSVSpriteSheet.rsc";
    String _image = "DSSVHousing";
    StringTable _stringTable = "UI/DSSVStringTable.rsc";
    String _toolTip = "DSSVHousingTip";
        Action _action = ShowGroup;
}
    // House button - this is the button that selects a building.
    Toolbar DSSVHouse2x2: "DSSVHousing"
{    
    Toolbar _parent = "DSSmallVillage.rsc:DSSVHousing";    
    int _sortPriority = 100;    
        Action _action = Tool;        
    ComponentDescription _tool = "Template/DSSVHouse2x2.rsc";            
        bool _autoHotKey = true;  
}




  Reply
#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
#5


About you trying to package and it not doing anything...




Can I ask where your modkit directory is? also make sure there are no dots or underscores in the folder names.




I have my modkit in my main drive C:\BanishedKit106\MyMods\DSSmallVillage - I did read somewhere that this can cause issues compiling if it isn't on the main drive.




 




When I package a mod, the .pkm will go to C:\BanishedKit106\bin\WinData.


  Reply
#6


<a contenteditable="false" data-ipshover="" data-ipshover-target="<___base_url___>/index.php?/profile/6338-discrepancy/&do=hovercard" data-mentionid="6338" href="<___base_url___>/index.php?/profile/6338-discrepancy/">@Discrepancy</a> thank you, you are a star. My mod kit was in C drive, but I put it there without changing the name so it had lots of dots and underscores in it as it was downloaded with. Took them all out and it works great. Now I have a .pkm!




I'll check out the rest of the toolbar stuff later.




 




Cheers!


  Reply