Community Project - Economy Worksheet

Discussion in 'Crafting & Gathering' started by enderandrew, Aug 3, 2015.

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

    Curt Avatar

    Messages:
    1,639
    Likes Received:
    2,356
    Trophy Points:
    125
    Gender:
    Male
    Location:
    Sweden
    Wonder how to reflect the local economies in this.
     
    Time Lord and Sara Dreygon like this.
  2. caioketo2

    caioketo2 Avatar

    Messages:
    52
    Likes Received:
    68
    Trophy Points:
    8
    If its not usefull what I'm doing, I could stop, just warn me so I dont waste a lot of time =D
     
    Time Lord and Winfield like this.
  3. Winfield

    Winfield Legend of the Hearth

    Messages:
    1,295
    Likes Received:
    6,537
    Trophy Points:
    113
    Gender:
    Male
    Location:
    San Antonio, Texas
    What does the page do? http://sotarecipes.parseapp.com/

    I entered an Item name like cotton, or salt. Then what should happen?

    I know JavaScript and jQuery a bit -- enough to plow through things (I create visualizations/custom pages for SharePoint). You are right: the data schema comes first to get data into something that can be queried, then query the data and pull it into client JavaScript data arrays for calculations, grouping (keys) and sorting to get to some "cost" values based on raw materials / ingredients. Then finally, to design the web interface which is the way to interact with the data, generate list reports, and to update data base values as they change in the market. Updating values could be smart enough to use a journal table to record all 'changes' in prices while pushing the latest price into the master table for calculations.

    Ideas?
     
    Time Lord likes this.
  4. Winfield

    Winfield Legend of the Hearth

    Messages:
    1,295
    Likes Received:
    6,537
    Trophy Points:
    113
    Gender:
    Male
    Location:
    San Antonio, Texas
    Looking into things a little deeper... mySQL + PHP on the server is a good way to go for working with the data, doing calculations, storage, and results. Getting the data to JavaScript and the client is harder.

    On the other hand, when I use MS SharePoint, I can use JavaScript to query SharePoint lists through CSOM or SPServices calls and jQuery asynchronously (I just wait for the data to come back through a 'promise' or 'deferred'). It's a blast actually and I can use the power of JavaScript without server side code-level access to the farm which is very nice. I don't get farm access at work... so sad.

    Well, that was a lot of greek or geek talk eh? I think I'd rather be fishing!
     
    Time Lord and enderandrew like this.
  5. enderandrew

    enderandrew Legend of the Hearth

    Messages:
    7,359
    Likes Received:
    15,646
    Trophy Points:
    165
    Gender:
    Male
    Location:
    Omaha, NE
    I know exactly what you're saying sadly, but I wouldn't use Sharepoint personally.
     
    Time Lord likes this.
  6. Winfield

    Winfield Legend of the Hearth

    Messages:
    1,295
    Likes Received:
    6,537
    Trophy Points:
    113
    Gender:
    Male
    Location:
    San Antonio, Texas
    Agreed about SharePoint. We use that because it is enterprise managed; we don't mess with server level code. We just use the lists as data base tables - very easy in fact, no knowledge of SQL needed - and then get the data we need and customize for users. Power users can design things in SharePoint ... and intermediate webmasters.

    For this project, I imagine people do not have a SharePoint site available. So would need mySQL and PHP, thus someone with root access to some server to help us.
     
    Time Lord and enderandrew like this.
  7. caioketo2

    caioketo2 Avatar

    Messages:
    52
    Likes Received:
    68
    Trophy Points:
    8
    That isnt doing anything just yet, I used parse.com so it makes "backend" easy, as it manages database and queries.
    If you want to help I can invite you to the project.. The parse simply provides a database and a API so you can query everything easly and fast.
    I started like that so we dont need a server (which I dont have), but if wants to change, and go with PHP & mySQL we can do it.
    Its just for the start I think it would be simplier to start like that, and see what we will need after...
    Give me your email and I invite you to the project so you can look at it, and even make the visualizations/controls, which could be easy with jQuery.


    EDIT:
    Just go to http://parse.com and take a look at it, at the javascripts api, its very basic, so we could get it working very fast
     
    Time Lord, Winfield and enderandrew like this.
  8. caioketo2

    caioketo2 Avatar

    Messages:
    52
    Likes Received:
    68
    Trophy Points:
    8
    So, inserting new Itens is already working..
    Inserting recipes is working too..
    So basically we can add Itens and recipes, now I just need to query it all and do the calculations..
     
    Last edited: Oct 23, 2015
    Time Lord and enderandrew like this.
  9. caioketo2

    caioketo2 Avatar

    Messages:
    52
    Likes Received:
    68
    Trophy Points:
    8
    Time Lord and enderandrew like this.
  10. Dorham Isycle

    Dorham Isycle Avatar

    Messages:
    1,990
    Likes Received:
    2,887
    Trophy Points:
    165
    Gender:
    Male
    Location:
    Ontario, Canada
    Here is what I've got
    https://docs.google.com/spreadsheets/d/1L4aeXZce-iEvu7U9x64bX2GKHOMT86N-wFgZ3cpuNrQ/edit?usp=sharing
    Cost to make is all Base resources counted together as far back till it's at the Gathered resource + tool value which is 1gold which is added at every stage per use. NPC value is backpack hover value, Profit is what npc will pay (Npc Value/2 - Crafted Value). What you're doing is essentially the same as what my spreadsheet already does, I've been working on this spreadsheet for about 2 years & I recently plugged in the value numbers & the recipes from sotadb.net in addition to the existing from sotawiki.

    I realize many players don't have or don't want to use a spreadsheet so an online version would be an excellent addition.
     
    Time Lord and enderandrew like this.
  11. Arradin

    Arradin Avatar

    Messages:
    1,152
    Likes Received:
    2,167
    Trophy Points:
    125
    Gender:
    Male
    Location:
    Sweden
    Keeping an eye on this thread.
     
    Time Lord likes this.
  12. Winfield

    Winfield Legend of the Hearth

    Messages:
    1,295
    Likes Received:
    6,537
    Trophy Points:
    113
    Gender:
    Male
    Location:
    San Antonio, Texas
    I sent my information to @caioketo2, but have not had time to access parse.com and check things out. I will likely not have time for a few weeks unfortunately ... with R23 release coming up.
     
    Time Lord likes this.
  13. caioketo2

    caioketo2 Avatar

    Messages:
    52
    Likes Received:
    68
    Trophy Points:
    8
    I'm trying to finish at least the programming part of that, after that it will need to change the UI.
     
    Time Lord likes this.
  14. caioketo2

    caioketo2 Avatar

    Messages:
    52
    Likes Received:
    68
    Trophy Points:
    8
    Do you guys think it needs to put user in that site, so not everyone can insert products? or let it like it is now, everyone could insert new items/recipes?
     
    Time Lord likes this.
  15. Winfield

    Winfield Legend of the Hearth

    Messages:
    1,295
    Likes Received:
    6,537
    Trophy Points:
    113
    Gender:
    Male
    Location:
    San Antonio, Texas
    Getting into user control/management is a bit of a pain I imagine. Something is probably needed to prevent spam / corruption though.

    Two easy options:
    • Add a "password" field to the add/edit interface (entry forms) that people will known, but not publicly distributed. This does not need to be a big authentication thing, just a compare in the script that is hidden from "view source". If there are problems, then change the value needed for that field at times and then we let people know who are helping.
    • Put the forms in a password protect directory that just requires a password (and a generic user name). This is more secure, but still have to change this if things go bad.
    So I would start with one of these easy options for data entry and edit. We can find out who will be adding/editing/testing and have them on a Private Message list for now.
     
    Time Lord likes this.
  16. caioketo2

    caioketo2 Avatar

    Messages:
    52
    Likes Received:
    68
    Trophy Points:
    8
    I'm looking at it now, the way parse.com works it should be easy to define user, and all the requests I can compare if the user is logged. So even if the anonymous could see/enter data, they wont be able to post it. After we can add some sort of directiory protection.
     
    Time Lord and Winfield like this.
  17. caioketo2

    caioketo2 Avatar

    Messages:
    52
    Likes Received:
    68
    Trophy Points:
    8
    Ok, already added User Login, and User info in every post. Also verify if the user is logged before posting data.
    Just need a reframe in the UI, I separated everything in div's, so we can easily create something with better positioning, even maybe with tabs Item Recipe, calculation. But i'm horrible with UI, html, css, so I'll wait until someone offers to reframe it. =D

    EDIT:
    It's already showing/hiding the divs if user not logged in.
     
    Last edited: Oct 26, 2015
    Time Lord, Winfield and enderandrew like this.
  18. enderandrew

    enderandrew Legend of the Hearth

    Messages:
    7,359
    Likes Received:
    15,646
    Trophy Points:
    165
    Gender:
    Male
    Location:
    Omaha, NE
    Thanks for running with this!
     
    Time Lord and Winfield like this.
  19. Daxxe Diggler

    Daxxe Diggler Avatar

    Messages:
    2,692
    Likes Received:
    5,711
    Trophy Points:
    153
    Gender:
    Male
    Location:
    Virtue Oasis - Hidden Vale
    Looking at your spreadsheet, I have a suggestion and two questions:

    Suggestion - Lock the header row so that as you scroll down the page you can see what all the columns are supposed to be.

    Question 1 - How are you calculating the "Profit"? Is there a formula in place or are you just entering numbers in manually? I ask because you have different items with the same "Cost to Make" and "NPC Value"... but their "Profit" columns are different (example, look at Gold Ore and Granite Block).

    Question 2 - Why do you have a "Cost to Make" value for gathering items? Are you just adding in a standard amount for the tool damage?
     
    Time Lord likes this.
  20. caioketo2

    caioketo2 Avatar

    Messages:
    52
    Likes Received:
    68
    Trophy Points:
    8
    No problem, I'm trying my best, I already created another thread requestion if some times developers would enable some kind of API to query database, so we could make it much easier, but probably this will take a LOT to be done. So better make a good tool with our database.
     
    Time Lord, Winfield and enderandrew like this.
Thread Status:
Not open for further replies.