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



  • 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.

    👆

  • Dev Team

    @xenofix Produce amount is not necessarily equal to 1.

    ☝


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

    @xenofix Produce amount is not necessarily equal to 1.

    Was kinda hoping that would be the case. Produce amount of 1 on low tier materials would mean an enormous waste of CPU cycles producing it, seriously limiting people's will to use that.


  • Dev Team

    The root post has been updated.

    Briefly, here is what changed:

    • Electron replaced by Silicon, Dust replaced by Mist
    • Simple commodities (ones without a level, former level 0 commodities) can now be produced at a factory of any level.
    • Densities of all commodities has been multiplied by 5
    • Added 'reverse' blueprints so you can compress and uncompress raw minerals for storing or sending
    • Added 'battery' blueprints (compressed energy)
    • Production chains reworked to be much fairer (all chains now consumes the same amount of catalyst and the same amount of lab-produced ghodium)
    👍


  • Me like! I actually considered proposing an idea for compression and re-processing into base minerals. Awesome.



  • This is important: commodities will become the only resource types NPC traders are interested in, they will stop buying raw minerals once factories go live (NPC sell orders will remain). Now, if you want an NPC trader to buy your, say, Lemergium, you need to process it into Lemergium Bar first. NPC traders will buy all types of commodities constantly adjusting their prices based on the supply, there is no fixed price for anything. Players will continue to place buy orders for anything they want, of course.

    If factories are available from RCL7, I really think that there needs to be a solution for excess minerals between RCL6 and 7. I know it's not a long period, but it's a glaring omission.



  • Once set, the factory level cannot be changed. When the effect duration ends, the factory simply becomes inactive, but its level remains the same. You need an Operator with the same power level to reactivate it again. The power of another level will not be applied, the only way to change the factory level is to rebuild it (and the construction cost will be quite high).

    The consequence of this is that Operators will tend to be restricted to a single base (or a handful of bases). It will not be viable to make a flexible operator role that moves from base to base depending on demand in different bases (e.g. if you have changed the remote rooms you're exploiting after another player has moved into or out of the area, you might find that your requirement for spawn capacity changes, so you might call in or send away an Operator with OPERATE_SPAWN. Likewise if you're attacking from a particular base for a while, you might want to have that operator work from that base).

    Is it an intended consequence that operators become more-or-less locked to a single room?



  • This wouldn't be a problem if we are able to pass a lvl on the operate factory intend.
    This also helps to prevent to set the lvl "accidentally" since you must pass a int.

    @o4kapuk is a higher lvl factory without a operator still inactive or able to process lvl 0 stuff without one?



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

    Is it an intended consequence that operators become more-or-less locked to a single room?

    I dislike this. It seems to be forcing a restriction and constraints that didn't exist before. Those constraints aren't that interesting: I think moving power creeps around should be incentivised rather than keeping them still as that leads to more interesting problems to solve.

    I don't think it's quite as bad as you say as it seems operators aren't needed for level 0 production. I still think it's an annoying restriction though.