Draft: factories and commodities (new crafting/trading mechanic)



  • The biggest challenge for a newcomer is, that this new resource is just like power a resource to fight for. You must fight for these resources in neutral rooms or have lazy neighbours, but you can't sit in your own room mining these new resources. So, I can see that this makes it indeed more difficult for newcomers and favour strong attackers. The newcomer should also always be able to sell his minerals to npc without the need for a factory or labs, otherwise: what can he do with his first minerals?



  • @xenofix said in Draft: factories and commodities (new crafting/trading mechanic):

    what can he do with his first minerals?

    Probably going to be an unpopular opinion, but do what I did with my first minerals? Sell to a player? I expect there's going to be rise of buy orders on the market as things liven up. Plus, artch already said they're considering leaving some NPC buy orders for minerals as well so brand-new-to-market players can sell their stuff to them directly.

    ☝


  • @orlet That only works if there are players buying. If this system fails for some reason or in 5+ years there are a lot fewer players to buy things, then the new person needs a place to sell things. Those NPC buy orders need to exist to make sure the game system stays sustainable.


  • SUN

    @kyralee Then NPC orders can be re-introduced if/when such a thing becomes a problem.

    --My 2c of a lot of the talk i've been seeing on this:

    I like the idea to remove NPC buy orders for minerals. There's certainly enough player demand for T1 minerals it seems. If NPCs only buy these new materials player demand will only go up for T1 minerals.

    In particular to the concerns i've seen from players on Shard 3: I'm currently in the process of setting up an outpost on the shard to access the market and I know i'm not the only one. Regardless, my code can't tell the difference between an NPC order and a player one without looking at the room and it should be the same with your code.

    The concerns i've seen for inflation are not unfounded but there's enough knobs on this system to tune it so that doesn't happen. Ideally this should be self balancing.

    Finally processing these materials are far simpler than labs, and if i'm understanding it correctly even powerless players have access to T0. I just don't see how newer players are excluded from this at all.



  • @artch Well yes it could, if there was market for it. I currently produce everything myself for the most part. I use some credits to balance out base minerals and sometimes import some extra energy. Oppertunity for trade is really what is lacking currently, either supply is simply not there or things have a crazy high price due to someone having bought and sold a subscription token.

    Mineral balancing is deeply influenced by NPC buy orders. If you manage to sell your extra's to NPCs you maybe be able to match their price to import some shortages, otherwise mineral trade can be a net loss quite easily.

    I am CPU bottlenecked, playing the market is pretty hard and CPU intensive currently due to having very little tools to do so. Anything I do here will directly impact my GCL or otherwise energy gain. Add my lifetime subscription and credits just aren't super interesting.

    Hopefully this new system will change things somehow improving the market.


  • Dev Team

    @tun9an0 NPC sell orders for minerals are not going anywhere, we're thinking about removing buy orders only.



  • @tun9an0 said in Draft: factories and commodities (new crafting/trading mechanic):

    playing the market is pretty hard and CPU intensive currently

    I am worried about this. Getting a reasonable amount of market intel is pretty high CPU right now. Changing order count to 300 is going to make that worse.


  • Dev Team

    @tigga Do you use filter property llike Game.market.getAllOrders({type: ORDER_SELL, resourceType: RESOURCE_GHODIUM})? It is internally optimized in comparison to Game.market.getAllOrders().filter(...).



  • I do filter, yes. You still have to loop through all of the orders and pull/analyise the properties. There's a trade off right now between having up to date market intel and the CPU cost required. To do the best you can in the market it's not as simple as "I want to sell, so get orders, and sell". You have to decide if the price is reasonable, potentially based on other prices (ie. is OH 10x the price of O+H? Or is it 0.5x) and price histories. More market orders means the loops get bigger. Short timescales matter: if somebody is buying for a significantly higher price you want to catch it before other people. If an underpopulated market has an average price of x credits but right now the best price you can sell for is x/2, you kinda want to know that's a bad deal in code.

    All that said I don't think it's a big issue. I doubt many people hit the 50 order limit right now and even those who do probably won't push a 300 order limit too hard.



  • Have the market history available through the game API would eliminate the need to do all these getAllOrders calls..


  • Dev Team

    @tun9an0 OK, consider it planned then. We'll try to implement it in the same patch with other market changes.

    👍


  • @tigga I easily hit the 50 order limit, at one point I had some code that listed various minerals that didn't have many sell orders. It would list them a a relatively high markup over estimated value. If someone undercut me, I might create a new order, and leave the original order up (rather than write off the credits spent listing it) in the hope that the market would move into the order later. I rapidly exhausted my order capacity with this strategy so I had to disable it.

    I would say that anybody who has put more than an hour's effort into selling resources will have hit the 50 order limit.



  • @wtfrank me too. But count the total number of orders on the market and divide it by the number of players on the shard. Heck, if you like only count players with GCL > 15 or something. It's much less than 50!



  • Question on

    Thus, in order to implement the full chain by yourself, you'll need 6 factories and 5 operators. If you want to produce all chains in parallel, multiply by 4.

    How do reactions work? Are you only able to make a single thing at a time? A single type? If the base resource (metal) is a limiting factor for example, would you be able to process Biological and Mechanical chains in the same factory (either switching per time period or or in parallel?).

    Random thought: The classic prayer rooms might have another use now. You have a factory tuned to a different level and bounce between claiming them to work through your backlog at a certain level. Good for the low GCL playstyle/if you don't have enough power creeps. Harder given that PCs are needed to just run the factories though 😬


  • Dev Team

    @davaned Level 1 Factory can produce all level 1 commodities: Composite, Phlegm, Switch, Tube, Condensate. You choose what to produce this way:

    factory.produce(RESOURCE_PHLEGM);
    

    The required materials are taken from factory.store which is similar to storages and terminals.



  • @artch Presumably one reaction per tick, with a CD that differs based on reaction type (level?).

    I see the other reason you'd want to lock power creeps now if you had this in the pipeline.


  • Dev Team

    @davaned

    Presumably one reaction per tick, with a CD that differs based on reaction type (level?).

    Correct.



  • Market stats will be very nice. Easily 90% of my market CPU is just tracking prices.

    Please separate buy order stats from sell order stats. A single average + stddev doesn't help much when the market is split (which happens way more often in screeps).

    Feel free to design however feels correct and is efficient, but here is my humble request.

    1000 tick rolling window

    • BUY average
    • BUY stddev
    • BUY volume
    • BUY median
    • SELL average
    • SELL stddev
    • SELL volume
    • SELL median

    Median is very stable stat and helps avoid wild swings when players sell 1 energy for 100k credits to transfer credits between players. You could also provide a 10k and/or 100k tick summaries without the median stats, though players could calculate these themselves with minimal CPU cost.

    These stats would be enough for a passive seller to use the market entirely through orders. Further these stats cannot be collected any other way.

    Players looking for active arbitrage will still need to scan for juicy orders, but that is the CPU trade off they'll have to make either way.


  • Dev Team

    @deft-code Sorry, this is not technically possible, it's a huge refactoring.



  • @artch I want to add, that one reaction per tick or one product per tick won't be enough even if the cooldown is always 0. We already harvest round about 1 mineral per tick per owned room. If we can only process 1 mineral per tick to make a mineral bar in a level 0 factory, then we can't process all minerals even if the factory cooldown is 0. Also Sourcekeeper-Rooms give extra minerals to process.

    👆