Computercraft control over Shop Pricing

Discussion in 'Alice (Minecraft)' started by MyrddinE, Mar 27, 2014.

  1. MyrddinE

    MyrddinE Active Member

    Joined:
    Dec 4, 2011
    Messages:
    220
    Likes Received:
    69
    Is there any way to have a computer (MC computer) control the buy/sell values for a shop?

    I would like to open a shop, but it is very difficult to balance supply, demand and arbitration; I'd like to compensate by having dynamic pricing (as my supply dwindles, the price rises automatically) to prevent changing prices and arbitration from destroying the sustainability of my business.

    In other games I have done this by setting a desired inventory. As the actual inventory goes over, the price is discounted; as the inventory gets low, the price rises. In the end, the result is the inventory (and price) reaching a natural equilibrium that discourages continued abuse of a poor initial price. If I price something low, then inventory will drop until the price rises to be more correct... if I price something high, then nobody will buy it and the available quantity will rise until the price matches demand and players start buying.

    One method would be two simple changes: the return of SK's sign-based stores, and a simple mod that allows computercraft to read and set sign text.

    I skipped over a lot of potential complexity of course... nothing is completely 'simple', especially with mod interactions, damage values, and metadata. Regardless, I would like to have some way to manage shop prices through a computer.

    If I can get that, then I can remake the Mall. It will be harder. But the result will be better, faster, stronger.
     
  2. LordRedstone

    LordRedstone Best Coder 2k15

    Joined:
    Jun 14, 2012
    Messages:
    391
    Likes Received:
    73
    if trade-o-mats weren't so stubborn, you could do that. It might still be possible if we had control over which slots cc interacted with.
     
  3. MyrddinE

    MyrddinE Active Member

    Joined:
    Dec 4, 2011
    Messages:
    220
    Likes Received:
    69
    I don't follow... I don't want to change the item offered. I want to change the amounts, the numbers, for the trade.

    I mean, full control would be nice, but slot-inventory-access is not relevant to my needs. Though I suppose it would be necessary when reducing the price so far you go from (for example) ingots to nuggets.
     
  4. LordRedstone

    LordRedstone Best Coder 2k15

    Joined:
    Jun 14, 2012
    Messages:
    391
    Likes Received:
    73
    but if you think about it, to change the amount offered in a trade-o-mat, you need per-slot access (to access the locked slots that only you as the owner can see)
     
  5. gknova61

    gknova61 Farbes Lover

    Joined:
    Mar 17, 2012
    Messages:
    1,238
    Likes Received:
    350
    Should put it in program suggestions. Although, if such a program is done, you may need to migrate your shop from w/e mod you're using to CC
     
  6. MyrddinE

    MyrddinE Active Member

    Joined:
    Dec 4, 2011
    Messages:
    220
    Likes Received:
    69
    I'm not sure I understand your comment, since I explicitly mention using CC in the subject. The issue is controlling pricing via CC, not writing the software. Are you aware of a method to do this? Can CC adjust a shop object completely (the item and quantity per transaction, for both wanted and offered side)?
     
  7. TitanfallInbound

    TitanfallInbound Dude who knows a lot about mods.

    Joined:
    Jul 24, 2013
    Messages:
    107
    Likes Received:
    3
    Couldn't you set up a thing where you drop payment in a hopper, which feeds to a chest with a computer that checks the amount of the item and A.Dispenses you what you put in if it is the incorrect amount or item, or B.Gives you the item(s) and takes your money(money equals what you pay to get the product) and changes the price accordingly. Just how I would do this, since I don't set up huge automating systems like you people.
     
  8. MyrddinE

    MyrddinE Active Member

    Joined:
    Dec 4, 2011
    Messages:
    220
    Likes Received:
    69
    That might be possible, but there is the issue of trust, as well as theft. If I opened a shop with a bunch of hoppers would YOU start throwing items in? If it didn't spit your item back, is it because Bob standing nearby snatched it out of the air, or is it my fault? How do I prove it?
     
  9. LeiserGeist

    LeiserGeist Gamer, Software Developer

    Joined:
    Oct 26, 2012
    Messages:
    479
    Likes Received:
    116
    Narcissistic Turtles can be slot-specific.
     
  10. gknova61

    gknova61 Farbes Lover

    Joined:
    Mar 17, 2012
    Messages:
    1,238
    Likes Received:
    350
    Yup, it can. Take a look at OpenPeripheral (specifically inventory methods). Now, the only thing left to do is write code!
     
  11. LordRedstone

    LordRedstone Best Coder 2k15

    Joined:
    Jun 14, 2012
    Messages:
    391
    Likes Received:
    73
    Now this sounds interesting! I'll definitely be messing around with this... when I get enough diamonds. :p