smithing pricing tool

Discussion in 'Player Created Resources' started by Lazlo, Oct 7, 2016.

Thread Status:
Not open for further replies.
  1. Lazlo

    Lazlo Avatar

    Messages:
    1,498
    Likes Received:
    3,225
    Trophy Points:
    113
    Pricing crafted items in SotA is pretty difficult due to the amount of materials and recipes involved, random benefits, items loss, etc. I made a tool for calculating prices of smithed items based on material values and fees that you set. Prices take into account all materials used, combines required, recipes required, item loss, and bonus quality.

    All of the user set variables are at the top of the script under "raw materials and fuels" and "fees and modifiers". I assigned the default values off the top of my head without much thought, so don't take those as some kind of reference of actual material values.

    There is a durability modifier that lets you set the value of an item with a high durability bonus relative to the same item with normal durability. The formula works in such a way that your base material cost remains the same. For example, if an item has a base material cost of 1000g and a durability modifier of 2, the base value of the high durability item is 1600g and the base value of the normal durability item is 800g. This is based on an exceptional success rate of 25%. Keep in mind that you may want to have a higher durability modifier for items that benefit more from the durability bonus.

    There is also a dropdown menu on all items for bonus quality. This refers to relative quality of enchantments and masterworks on the items. There is no way to compute this with a formula, so it is just left up to the user and the %s are displayed on the menu. Just keep in mind that this is a relative value and the mods you assign should average out to the middle over time if you are pricing fairly.

    When calculating a price, it is only necessary to choose from the menus that are required to make an item. If you select nothing for gems, enchantments, or masterworks, it will default to 0 even though 0 is an option on the menus also. The same goes for durability and quality. You can leave those unselected and produce an unmodified price.

    When you calculate a price you will be shown 4 different values: Base material cost, adjusted material cost, total material cost, and final price.

    Base material cost is the value of the base item being made. It only counts materials used for the base item and fees included in making the base item.

    Adjusted material cost is just the base material cost adjusted according to the durability modifier.

    Total material cost is the adjusted material cost, plus the cost of all additions to the base item, and also adjusted for item loss.

    Final price is the total material cost after adjusting for the bonus quality modifier.

    I do not have this hosted on a website yet, so in order to use, copy all and paste into a text editor and save as an html file. You can then edit your material values and fees an run in a local browser.

    It's not very fancy looking, but here is a preview:

    [​IMG]

    Also, if you intend to do any editing other than the values at the top, I would recommend using Notepad++ or some other editor with collapsing. I bracketed everything to make it easier to find and edit things since it's a pretty huge jumble of stuff.

    [​IMG]

    If you find anything that's broken or inaccurate, let me know please. I haven't done a lot of testing, so I would be very surprised if there weren't at least a few mistakes.

    File is here: https://drive.google.com/file/d/0BwRygSSRoChaSGdGaXMzbG56dUE/view
     
  2. Krissa Lox

    Krissa Lox Avatar

    Messages:
    220
    Likes Received:
    552
    Trophy Points:
    18
    Gender:
    Female
    Will it work to paste as new script in Greasemonkey for personal use?
     
  3. Lazlo

    Lazlo Avatar

    Messages:
    1,498
    Likes Received:
    3,225
    Trophy Points:
    113
    Other than creating the body element, it is entirely written in plain javascript, so it could be pasted into a userscript and run at some url as long as you create a body or the url already has one. I don't think there's really any advantage to that over just editing the text file and running locally though.

    Btw, I will probably rewrite this so that all crafting recipes can be easily added. It's written very inefficiently right now because I was originally making it for just a few things and so I just made all the elements separately. Then I ended up putting in more and more stuff and got a little carried away. I could make it so that instead of making menus for everything, you select the specific recipe you want, the appropriate menus become active, and the calculation formula is adjusted based on what menus are active. Then new recipes could be added very easily and the code wouldn't be a mile long.

    This is the pre alpha :cool:
     
    Fister Magee and Krissa Lox like this.
Thread Status:
Not open for further replies.