PTR Changelog 2019-06-24: Store and market


  • Dev Team

    This post describes changes on the Public Test Realm.

    • Implemented new global Store prototype. All structures and creeps now use this prototype as their store property. Old style properties are now considered deprecated. See documentation for more details, and also this previous discussion.

    • Added new method Game.market.getHistory.

    • Increased per-player market orders limit from 50 to 300.

    • Added expiration period to market orders. An order expires in 30 days after its creation, and the remaining market fee is returned. Extending the order doesn't update its expiration time.


    This update is available in ptr beta branch on npm and Steam starting from version 4.0.0-beta.1:

    npm install screeps@ptr
    

    0_1544102982120_Steam_2018-12-06_16-28-37.png

    🎉


  • Yey! Access to the market history will definitely make the market easier and less costly to use.

    It's great that we can eventually get our fee back if no-one deals our order. However, this does make me start to wonder why we can't just get the fee back if we cancel the order early? Is there a reason why we need to enforce a time limit on this?


  • CoPS

    @SystemParadox Among other things, it puts a price on flooding the market with orders, to e.g. artificially depress or inflate resource prices.

    I love the concept of the store change, its going to tidy a huge portion of my code 🙂

    ☝

  • YP

    could you please push it to npm ? 🙂


  • Dev Team

    @w4rl0ck Private servers support is not implemented yet.



  • Excellent, and I agree with the returning leftover fee. Should help encourage a more diverse market. Thanks for the hard work!



  • Although it's "fair" to return unused fees, it discourages people pricing their orders "to sell" - so the spread will be wider, and less transactions will take place, as there's no penalty for having a sell order at such a high price that it never sells, or a buy order at such a low price that no-one sells into it.



  • @wtfrank While there is some downside in not having as much of a cost to place outlier orders, having the market price average will drastically reduce the impact of having far-off orders. In fact, given there is an average price I think that people will find their bad orders never really get completed. I think it's better for overall market health in the less traded regions, even if it does have some downsides.



  • hmm.. my creeps having problem withdrawing from tombstones.. always getting -7 INVALID_TARGET

    I cleared my main-loop and called directly for an example: 0_1561401946589_11fdc685-7fd7-4b81-bec3-f541607277c0-image.png


  • Dev Team

    @demawi Thanks, we'll take a look



  • and PowerCreeps can not withdraw generally also with a OK result.. but using GENERATE_OPS power works

    their carryCapacity is undefined..

    0_1561418133763_b1682f4a-7b83-4697-9375-6dd635654974-image.png

    Edit: ops consuming powers don't seem to work (at least OPERATE_EXTENSION). it returns with -6 ERR_NOT_ENOUGH_RESOURCES



  • shard2 halted.. no ongoing ticks anymore


  • Dev Team

    @demawi Fixed



  • seems there are more problems on shard2

    0_1561714606910_f7602bc2-cca7-4d85-9cb5-480ae4bf85b1-image.png

    probably only a short-term problem.. seems not a problem anymore..


  • Culture

    I'm very happy about this change. It brings information into the game that was previously only in the UI. Even scanning the market and keeping history data yourself couldn't tell you volume and price paid.

    There's also still value in scanning and keeping some of your own history, though, so anyone who already has that code isn't sad to have it.

    Also, I'm looking forward to getting the million credits or so back for my legendary energy order on shard0. 🙂


  • Dev Team

    @demawi we'll take a look, thank you



  • Code deployed to PTR doesn't match PTR branch on github, creep to creep transfer broken on currently deployed code. Line 25 of function prevents transfer to anything not a structure.

     if(!register.structures[target.id] || !utils.capacityForResource(data(target.id), resourceType)) {
                return C.ERR_INVALID_TARGET;
     }
    


  • When iterating through Storage.store (or any other .store) via for (var key in room.storage.store) one of the keys returned is .toString function, which I think it should not be returned.



  • @demawi said in PTR Changelog 2019-06-24: Store and market:

    and PowerCreeps can not withdraw generally also with a OK result.. but using GENERATE_OPS power works

    their carryCapacity is undefined..

    0_1561418133763_b1682f4a-7b83-4697-9375-6dd635654974-image.png

    Edit: ops consuming powers don't seem to work (at least OPERATE_EXTENSION). it returns with -6 ERR_NOT_ENOUGH_RESOURCES

    Still an issue. Without PowerCreeps also factories can hardly be tested



  • tombstone-pickup and usePower.PWR_OPERATE_FACTORY now working... but still having problems with PWR_OPERATE_EXTENSION it returns 0 but nothing happens (no cooldown nor extensions will be filled)