Good day everyone,<br style="color:rgb(0,0,0);font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12.48px;font-style:normal;font-weight:normal;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(231,234,239);" /><br style="color:rgb(0,0,0);font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12.48px;font-style:normal;font-weight:normal;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(231,234,239);" />I was playing around with getting my own space on each sub-tool bar, so that I can break my main mod up and release bits independently, with out worrying about multiple placement issues or spamming up existing tool bars.<br style="color:rgb(0,0,0);font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12.48px;font-style:normal;font-weight:normal;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(231,234,239);" /><br style="color:rgb(0,0,0);font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12.48px;font-style:normal;font-weight:normal;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(231,234,239);" />First, I started a new mod, based on the apiary example. I made a trapper. In the 'MyMods/Trapper folder', I added another folder, 'Game' and a file 'NecoraToolbar.rsc' so it is 'MyMods/Trapper/Game/NecoraToolbar.rsc'. This rsc looked like this...<br style="color:rgb(0,0,0);font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12.48px;font-style:normal;font-weight:normal;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(231,234,239);" />
<div>
Quote
</div>
Quote: - MyMods/Trapper/Game/NecoraToolbar.rsc
Toolbar base
{
StringTable _stringTable = "Dialog/NecoraTBStringTable.rsc";
SpriteSheet _spriteSheet = "Dialog/NecoraTBSpriteSheet.rsc";
}
ExternalList resource
{
External _resources
[
"NecoraFood",
"NecoraHousing"
]
}
Toolbar NecoraFood : "base"
{
Toolbar _parent = "Game/Toolbar.rsc:food";
int _sortPriority = 100;
String _toolTip = "NecoraFoodTip";
String _image = "NecoraFood";
Action _action = ShowGroup;
bool _autoHotKey = true;
Keys _hotKey = Toolbar1;
}
Toolbar NecoraHousing : "base"
{
Toolbar _parent = "Game/Toolbar.rsc:housing";
int _sortPriority = 100;
String _toolTip = "NecoraHousingTip";
String _image = "NecoraHousing";
Action _action = ShowGroup;
bool _autoHotKey = true;
Keys _hotKey = Toolbar1;
}
<div>
</div>
<br style="color:rgb(0,0,0);font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12.48px;font-style:normal;font-weight:normal;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(231,234,239);" />You'll see I added a sprite sheet (and associated texture, material etc.) into the 'Trapper/Dialog' folder, along with a string table. The sprite sheet just points to a few 32x32 icons, in this case one, a maple leaf, for each tool bar icon. Same with string table.<br style="color:rgb(0,0,0);font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12.48px;font-style:normal;font-weight:normal;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(231,234,239);" />
<div>
Quote
</div>
Quote: MyMods/Trapper/Dialog/NecoraTBStringTable.rsc
StringTable resource
{
Entry _strings
[
{ String _name = "NecoraFoodTip"; String _text = "Necora's Food"; }
{ String _name = "NecoraHousingTip"; String _text = "Necora's Housing"; }
]
}
<div>
</div>
<div>
Quote
</div>
Quote: MyMods/Trapper/Dialog/NecoraTBSpriteSheet.rsc
SpriteSheet resource
{
String _materialName = "NecoraTBSpriteSheetMaterial.rsc";
String _imageName = "Build/NecoraTBSpriteSheet.png";
int _imageWidth = 256;
int _imageHeight = 256;
bool _padForFiltering = true;
Sprite _sprites
[
{ String _name = "NecoraFood"; String _source = "Dialog/MapleLeaf.png"; }
{ String _name = "NecoraHousing"; String _source = "Dialog/MapleLeaf.png"; }
]
}
<div>
</div>
<br style="color:rgb(0,0,0);font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12.48px;font-style:normal;font-weight:normal;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(231,234,239);" />So now, I can add a tool bar icon to each sub menu, one for housing, food, storage, industry etc.<br style="color:rgb(0,0,0);font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12.48px;font-style:normal;font-weight:normal;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(231,234,239);" /><br style="color:rgb(0,0,0);font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12.48px;font-style:normal;font-weight:normal;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(231,234,239);" />All I need to do, is make sure that these files are in the 'Dialog' and 'Game' folder of every mod I break my big one up into.<br style="color:rgb(0,0,0);font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12.48px;font-style:normal;font-weight:normal;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(231,234,239);" /><br style="color:rgb(0,0,0);font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12.48px;font-style:normal;font-weight:normal;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(231,234,239);" />For example, I made this trapper, then copied the whole Trapper folder, renamed it AnotherTrapper, and three files within to AnotherTrapper/AnotherTrapper.rsc, AnotherTrapper/AnotherTrapperResources.rsc, and AnotherTrapper/Template/AnotherTrapper.rsc. Everything else was left the same. I built and packaged it up.<br style="color:rgb(0,0,0);font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12.48px;font-style:normal;font-weight:normal;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(231,234,239);" /><br style="color:rgb(0,0,0);font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12.48px;font-style:normal;font-weight:normal;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(231,234,239);" />I moved both mods, Trapper.pkm and AnotherTrapper.pkm into my Windata in the steam folder, fired it up, enabled both mods, loaded a game, and the results are in the attached picture. As you can see, there is 1 maple leaf icon in the food tool bar, and both trappers are sitting happily side by side within it, despite both being separate mods.
[img]<fileStore.core_Attachment>/monthly_2017_02/ToolBar.jpg.d5c0d59226a6ee507baa404b39a91140.jpg[/img]
<br style="color:rgb(0,0,0);font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12.48px;font-style:normal;font-weight:normal;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(231,234,239);" />So<span> modders can have their own</span> menu on either the main tool bar or in different sub tool bars, with all individual mods into it with no crashes etc.!<br style="color:rgb(0,0,0);font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12.48px;font-style:normal;font-weight:normal;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(231,234,239);" /><br style="color:rgb(0,0,0);font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12.48px;font-style:normal;font-weight:normal;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(231,234,239);" />Somebody with lots of separate mods please test this!