Starbound
44 oy
Many Tabs - Spinning Wheel Frackin' Universe Tab
   
Ödül
Favorilere Ekle
Favorilere Eklendi
Favorilerden Çıkar
Dosya Boyutu
Gönderilme
Güncellenme
285.218 KB
18 Mar 2022 @ 18:08
28 Şub @ 14:39
3 Değişiklik Notu ( görüntüle )

İndirmek için abone ol
Many Tabs - Spinning Wheel Frackin' Universe Tab

AnomNom tarafından 1 koleksiyonda
Anom's Creations
120 öğe
Açıklama


An addon for Many Tabs that separates the content from Frackin' Universe into another Spinning Wheel / Sewing Machine tab.

There is only so many tabs that can fit on a single Crafting GUI, so some of my addons may share the same tabs. This addon does not currently share a tab with any other addons. If you know of any mods that you'd like to have given their own tab, then please, don't hesitate to submit a request. It may take me a while to get back to you, depending on my current level of activity.






⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀






⠀⠀⠀⠀⠀⠀







We want to add a new tab to the Spinning Wheel, but because we are limited to a certain number of available tabs (15 if using More Tabs for Many Tabs and Extended GUI, and even less otherwise), we don't want there to be too many tabs. The solution, of course, is to merge several of the tabs together.

But before we actually do that, we first need to patch every recipe file for each item we want to move to the new tab. We run through what I call an Iterated Test Patch - a series of sequential patches, wherein we check each value of an array with a test, then make a change if we find the value we're looking for - in the "groups" array.

We want to find the value of "clothing" (as this group is used to assign the recipes to the Clothing Tab), then replace this group with the new group of our tab. The patch should look something like this.

[ [ { "op": "test", "path": "/groups/0", "value": "clothes" }, { "op": "replace", "path": "/groups/0", "value": "mtsw_bagelsmoreclothing" } ], [ { "op": "test", "path": "/groups/1", "value": "clothes" }, { "op": "replace", "path": "/groups/1", "value": "mtsw_bagelsmoreclothing" } ], [ { "op": "test", "path": "/groups/2", "value": "clothes" }, { "op": "replace", "path": "/groups/2", "value": "mtsw_bagelsmoreclothing" } ], [ { "op": "test", "path": "/groups/3", "value": "clothes" }, { "op": "replace", "path": "/groups/3", "value": "mtsw_bagelsmoreclothing" } ], [ { "op": "test", "path": "/groups/4", "value": "clothes" }, { "op": "replace", "path": "/groups/4", "value": "mtsw_bagelsmoreclothing" } ], [...]

Next, we need to patch the Spinning Wheel's crafting menu. Since some addons are going to share the same tabs, we first want to test as many values as necessary - I tend to go with thirty as a standard, which is a bit overkill, but will certainly be thorough - to see if the tab we want to make already exists.

Tabs in Many Tabs are based on their icon, so two mods sharing the same tab will have the same icon, which we can test for. If this tab does already exist, we want to add our new group into it. It should look something like this.

[ [ { "op": "test", "path": "/modTab/0/file", "value": "/interface/crafting/mtsw_tabicon_hoodie.png" }, { "op": "add", "path": "/modTab/0/filter/-", "value": "mtsw_bagelsmoreclothing" } ], [ { "op": "test", "path": "/modTab/1/file", "value": "/interface/crafting/mtsw_tabicon_hoodie.png" }, { "op": "add", "path": "/modTab/1/filter/-", "value": "mtsw_bagelsmoreclothing" } ], [ { "op": "test", "path": "/modTab/2/file", "value": "/interface/crafting/mtsw_tabicon_hoodie.png" }, { "op": "add", "path": "/modTab/2/filter/-", "value": "mtsw_bagelsmoreclothing" } ], [ { "op": "test", "path": "/modTab/3/file", "value": "/interface/crafting/mtsw_tabicon_hoodie.png" }, { "op": "add", "path": "/modTab/3/filter/-", "value": "mtsw_bagelsmoreclothing" } ], [ { "op": "test", "path": "/modTab/4/file", "value": "/interface/crafting/mtsw_tabicon_hoodie.png" }, { "op": "add", "path": "/modTab/4/filter/-", "value": "mtsw_bagelsmoreclothing" } ], [...]

After however many of those tests we've chosen to do, we then want to test all of the values again, but this time, within the same array. We specifically want to be testing with the line "inverse": true at the end of it. This will invert the results of the test patch, so instead of succeeding only when it finds the value we're testing for, it will succeed unless it finds that value.

In this new test, we want to make sure that the tab doesn't exist, and assuming that it does not, we want to create it. It should look something like this.

[...] [ { "op": "test", "path": "/modTab/0/file", "value": "/interface/crafting/mtsw_tabicon_hoodie.png", "inverse": true }, { "op": "test", "path": "/modTab/1/file", "value": "/interface/crafting/mtsw_tabicon_hoodie.png", "inverse": true }, { "op": "test", "path": "/modTab/2/file", "value": "/interface/crafting/mtsw_tabicon_hoodie.png", "inverse": true }, { "op": "test", "path": "/modTab/3/file", "value": "/interface/crafting/mtsw_tabicon_hoodie.png", "inverse": true }, { "op": "test", "path": "/modTab/4/file", "value": "/interface/crafting/mtsw_tabicon_hoodie.png", "inverse": true }, [...] { "op": "add", "path": "/modTab/-", "value": { "file": "/interface/crafting/mtsw_tabicon_hoodie.png", "filter": ["mtsw_bagelsmoreclothing"] } } ] ]

This series of patches ensures that the tab we are adding can be shared across multiple mods. It checks if the tab already exists, adding the new group to it if it does, and creating the tab if it doesn't. This will prevent conflicts, duplicates, or unnecessary core requirement mods. It will also completely negate the need to manage load order, as any mod that adds the same tab can load at any time, and it will simply either create the tab, or add to it.






5 Yorum
Lukiwarble 19 Mar 2022 @ 12:48 
after alot of attempts i got Frackin stations interface to work again by placing it on the mod folder and adding a low priority
Lukiwarble 19 Mar 2022 @ 12:13 
And now i cant use that mod anymore even after unsubbing from this and resubbing to that one, god dammit this is better c nightmare all over again
Lukiwarble 19 Mar 2022 @ 12:02 
Found it, all the patches to the spinning wheel conflict with Frackin' Stations Interface
Lukiwarble 19 Mar 2022 @ 11:48 
now i cant open the furnace for some reason
[Error] Exception caught in client main-loop
(WidgetParserException) Malformed gui json: member configuration is either not a map, or does not specify a widget name and type
PassionateAboutPonies 18 Mar 2022 @ 19:40 
Since you're requesting requests, could you do one for The Pony Modpack at the spinning wheel? https://steamproxy.com/sharedfiles/filedetails/?id=730849360
The mod adds a significant number of clothing items to fit the unique pony body shape.