WIP - Craft recipe look up tool

    Joined
    Jun 24, 2013
    Messages
    270
    Reaction score
    43
    Uploaded ( 12/29/2015 ):
    Updated ( 12/8/2015 ):
    • Updated data
    • Now making a build available with textures (with permission!)
    Updated ( 1/5/2015 ):
    • New look (a little more classic Starmade ;))
    • Added Factories the best I could given the data that was available.
    • Little bit of cleanup. (New build process makes the file tiny now!)
    Screenshot:


    Using the data files from the Starmade data, I busted out a quick and (pretty) dirty recipe search utility with some React.js goodness. I tried to minify and compress it as much as I could to save space, but with the re-formed block data (in JSON format) it still clocks in just over 1.4MB (85K compressed). Right now it's a very simple text based filtering of recipes and components. If you type in 'matt' you will get all recipes that use or make something with 'matt' in the name (mattise capsules, mattise ingots, etc.)

    This is a personal work in progress and I make no promises of future updates (unless I think of something cool to add...) but I wanted to share it in case someone was annoyed at trying to figure out what components make what blocks. There are some missing recipes because they are not in the BlockConfig.xml (like Mattise -> Mattise Capsules). I don't know why, and I wasn't about to manually key them in. I wrote a few lines of code to convert the valuable data I needed from BlockConfig into JSON to utilize some tasty array map/filter/reduce methods in JavaScript and this is the result.

    On the left is the required components with the counts needed and on the right is the result. If you click on one of the items, it will update the filter with that item name.

    Since I did not want to run into trouble hosting files that are not mine, there is a small bit of setup if you want icons to show up:

    1. Unzip the attached file to a folder. It will have an index.html along with js, images, and css folders.
    2. Copy t000.png, t001.png, and t002.png files from <starmade install>/data/textures/block/<your favorite texture>/64 to the images folder and launch index.html in your favorite browser.

    I currently only support the 64 pixel textures. Using others will result in a bad experience. (64x64 is plenty big for these icons...IMHO)

    ** I make no promises of it not looking like crap. I developed it for Firefox and Chrome. If you are using an old IE, I don't know what to tell you. Maybe upgrade? It (mostly) works in IE9+, with IE9 throwing an error but it seems to still work(?)
     

    Attachments

    Last edited:
    Joined
    Nov 8, 2014
    Messages
    70
    Reaction score
    5
    • Legacy Citizen
    • Purchased!
    This is incredibly cool. Please keep up the great job you have done as the game progresses. This is the tool I have been wanting, but had no idea how to make. Thanks!
     
    Joined
    Jun 24, 2013
    Messages
    270
    Reaction score
    43
    New update! I added factory information and cleaned up my items object a little. Next on the list? I want to add a "total items" link that gives a sum of all items needed to make something with a little popup to detail that. I'm still working on the format.

    I'm a little leery with the style I did because I don't know when the UI updates are going in so I didn't want to put too much work in! (Also, it might look bad on some IE browsers...)

    Edit: Also, if one of the team is reading this... Care to give input on me potentially hosting this as a website? If I go that route, I'll need to host the textures to use as icons and I want to make sure that's alright... I'll probably be emailing someone soon about it anyway.
     
    Last edited:
    • Like
    Reactions: Valck
    Joined
    Aug 24, 2013
    Messages
    191
    Reaction score
    80
    • Wiki Contributor
    • Purchased!
    • Legacy Citizen 5
    This will prove very useful in updating manufacturing information on the wiki, thanks a bunch for creating such an incredibly useful tool!
     
    • Like
    Reactions: Valck
    Joined
    Aug 8, 2013
    Messages
    403
    Reaction score
    45
    • Legacy Citizen
    • Purchased!
    • Legacy Citizen 2
    I've been looking for something like this for the longest time! Thanks for making it :D
     
    Joined
    Jun 23, 2013
    Messages
    3
    Reaction score
    0
    • Legacy Citizen 2
    • Legacy Citizen
    This tool is pretty much necessary for crafting anything! However, it could be improved... If you're not going to do this, could you possibly post the source code to this? Others could always improve this.
     
    Joined
    Jun 24, 2013
    Messages
    270
    Reaction score
    43
    This tool is pretty much necessary for crafting anything! However, it could be improved... If you're not going to do this, could you possibly post the source code to this? Others could always improve this.
    Sorry, I kind of forgot about this! It's in desperate need of an update anyway with the new blocks. What feature did you want? I happen to have some spare time on my hands to make updates.
    [DOUBLEPOST=1449607179,1449604317][/DOUBLEPOST]I've updated the current build with the new data.