Production Planner

    Joined
    Feb 16, 2016
    Messages
    67
    Reaction score
    42
    When the registry was down I wrote a tiny js 'app'. It's goal is to help you identify the resources and factories needed for a specific project.

    Installation:

    Just download & extract the zip (found at SM Production Planner) anywhere you want. Inside it you'll find some folders, the BlockConfig.xml (from v. 0.19592) and the SMPP.html. SMPP stands for 'StarMade Production Planner' (not a very creative name, I admit). Open the html file with your favorite browser. I have built it and tested it with FF. Any HTML5 browser should do. In case an alert is thrown on startup, this means that your browser is probably not FF and has some security cross-domain issues (it's not allowed to open the BlockConfig.xml file). I can't help you with that.

    Whenever your BlockConfig.xml changes (game update or mod) you should place a copy in the SMPP's folder to have the latest config. That's a limitation from js.

    Usage:

    Suppose we want to build a missile system (10 tubes + 1 computer) and we'd like to know what are the costs. Start typing 'missile' in the top-left input box (the one with 'block name' as a placeholder). The app should suggest you:
    pick one of them. In the case of tubes, enter 10 in the number box and click 'Add'. In the case of computer, just click 'Add'. After you have added 10 tubes and 1 computer, the screen should look like this:
    In the graph there are some nodes (rectangles and ellipses) and edges (arrows). Elliptic nodes represent factories, rectangular -- products and resources. Blue rectangles are for our required products, gray are for raw materials. Since Alloyed metal & Crystal Composite are obtainable in quite a lot of ways, they are considered raw materials for simplicity. Red rectangles are missing resources. You can double click a red rectangle to expand it's production requirements. In our case the result would be:
    On the right is a summary of our production chain: needed resources, required products and any surplus products. Purple boxes mean intermediate resources. Their quantities cannot be negative. If the quantity of an intermediate product is positive, it is a surplus. Quantities written in the brackets.
    Quantities in the elliptic nodes -- the factories, are the number of factory ticks extra required or factory enhancers to produce in a single tick. For instance: Missile Tube(+10) means 10 tubes but Basic Factory (+9) means basic factory and 9 enhancers.

    Complex Example: Isanth VI

    If I was a pirate lord and wanted to mass produce Isanths, I'd use this tool like this:
    I'd be happy to know, that I can sell these 24 extra Tekt Capsules for an unexpected profit :).

    PS: That's most of it. There are some nice features for you to find. Probably some more useful ones are missing. I've written enough already. Thanks!
     
    Last edited:
    Joined
    Feb 16, 2016
    Messages
    67
    Reaction score
    42
    I have updated the package to a new version. I wanted to add credit & energy calculations too, as I noticed that the optimal production chain might not be the one which goes all the way down to raw materials. Unfortunately the pricing data inside BlockConfig.xml seems incorrect. If someone knows where to extract this data from, I'd be very thankful to be informed.
     
    Joined
    Jul 21, 2013
    Messages
    2,932
    Reaction score
    460
    • Hardware Store
    I have updated the package to a new version. I wanted to add credit & energy calculations too, as I noticed that the optimal production chain might not be the one which goes all the way down to raw materials. Unfortunately the pricing data inside BlockConfig.xml seems incorrect. If someone knows where to extract this data from, I'd be very thankful to be informed.
    The pricing in the BlockConfig.xml is not always used. Depending on the serverconfig, if a material is craftable normally, its price is the sum of its components[alloy mesh and cristal composite are not normally craftable, as they can be crafted in multiple ways].

    On another note, is it theoretically possible to combine this with MSCC? (MSCC reads the relevant info from the server you are on, to accustom custom configs. My questions in particular are:
    • Would you agree to allowing both pages/scripts/programs to work with each other?
    • Can you pass on arguments to the planner immedeatly as queries in the URL?
      (e.g. file://SMPP.html?blockConfig=BlockConfig%2Exml&requiredOutput=1%3A1+485%3A10 )
      [escaped sequences highlighted. %2E escapes to '.', %3A escapes to ':', + escapes to ' ']
      parameter description:
      • blockConfig=BlockConfig.xml [self-explanatory path to the blockconfig in question]
      • requiredOutput=1:1 485:10 [required item-output in <ID>:<Amount> ; separated by spaces. occurrences of the same id should be added together]
      [if the query cannot be utilized, how about the fragment identifier?]
    • If so, how about a shortened format only containing the needed data, supplied as a query in the URL? [details can be discussed in a pm]
      (the file is to be dynamically generated by MSCC using data obtained from the server)
     
    Joined
    Feb 16, 2016
    Messages
    67
    Reaction score
    42
    A (new) update is released (again).
    New features:
    • Much, much better performance;
    • Funny expand animations;
    • SAVE button! You may not lose your work if you hit F5 now if you press it.
    • Price calculations (NOTE: uses default prices, probably won't be of much use for your particular game)
     
    Joined
    Feb 16, 2016
    Messages
    67
    Reaction score
    42
    A (new) update is released (again).

    Paste
    Code:
    ?requiredOutput=75:112;47:3;16:59;6;63:12;56;5:285;122:12;2:199;3:4;1;8:52
    after the page's url in your browser's address bar to see the production plan for Isanth VI
     
    Joined
    May 16, 2016
    Messages
    31
    Reaction score
    5
    This is brilliant, and I love you. :) <3

    I may be easy. However, I'm picky about Chrome. Chromium for life is actually tattooed on my face. Some people find that off putting, but I can commit when I feel strongly about a browser. Thanks, Google! You're the best!

    Chrome doesn't work because of a perfectly legitimate if not somewhat inconvenient security policy.

    This is my solution to people who want to run this in chrome (on windows):
    1) Install node: Download | Node.js
    2) Trust me. ;)
    3) In the SMPP_2_02 directory, create a file named "nodeSMPP.bat"
    That file should contain the following:
    Code:
    cmd /C "npm install -g http-server"
    start cmd "/C http-server"
    start "" "http://localhost:8080/SMPP.html"
    4) Trust me. ;)
    5) Double click on nodeSMPP.bat and you're good!!!!

    That also will work for IE or whatever browser you have. node works everywhere, so it's easy to adapt that to mac or linux.

    Now I have, "http://localhost:8080/SMPP.html?requiredOutput=265;76;867;474;178;493:10;866;638;239:9;172;598:3" for the convoluted nonsense to produce one block of red advanced armor. I tried planning this out in a spreadsheet and your tool is so much better! It is ridiculous that you lose money producing advanced hardener.


    Suggestions:
    1) Your search box would be better if it looked for entries containing what you type instead of just beginning. You can't search for "hardener", for example.
    2) Keep being awesome! Wow! I love this thing!
    3) I actually looked at this tool today because I'm trying to decide what to do with this pile of capsules I'm sitting on. I would love to see a list of outputs possible from potential inputs, along with possible profit.

    Thanks!