Page 1 of 1

How to calculate price

Posted: Mon Feb 05, 2018 7:06 pm
by darkfrei
Hi all!
How to calculate prices in the game? For example, iron ore needs 2 seconds to mine and one item of iron ore costs 20 credits.

How much costs the iron gear? https://wiki.factorio.com/Iron_gear_wheel

Re: How to calculate price

Posted: Mon Feb 05, 2018 8:48 pm
by DaveMcW
darkfrei wrote:one item of iron ore costs 20 credits.
There are no credits in the base game, you have to look at the source code of the scenario you are using.

Re: How to calculate price

Posted: Mon Feb 05, 2018 9:14 pm
by darkfrei
DaveMcW wrote:
darkfrei wrote:one item of iron ore costs 20 credits.
There are no credits in the base game, you have to look at the source code of the scenario you are using.
I don't have any scenario. I want to know how to calculate prices.

Re: How to calculate price

Posted: Wed Feb 07, 2018 10:41 pm
by Nel
From my perspective, it is not very clear what exactly you mean, since the game does not have a "price" mechanic, i.e. there is no "currency" with which all items are evaluated by.

Speaking more generally, the price of an item in the normal economy is practically only decided by supply and demand (for some simple item like a toothbrush). The price that an item is usually offered at first is basically the sum of its cost (raw materials, machines, energy, labor, logistics, advertising) plus some kind of desired profit margin, and VAT.

If you want to know how much resources you need to provide for a machine to work at full speed, you use:
[number of raw material] * [final crafting speed of machine after modules etc.} * [time required per recipe as stated in the recipe]

Re: How to calculate price

Posted: Thu Feb 08, 2018 8:56 am
by bobingabout
Yeah, I have no idea what you mean either. there is no concept of value in the base game, except for that one scenario where you have the market.

Re: How to calculate price

Posted: Thu Feb 08, 2018 3:23 pm
by mrvn
For me in vanilla the price of something would be the energy required (recursively) to produce it.

- 1 iron ore needs 2s @ 90kW = 180kW to mine
- smelting 1 iron ore takes ~4s @ 180kW = 720kW
- 1 iron plate then costs 900kW
- 1 iron gear wheel needs 2 iron plates and 0.5*0.75s @ 150kW = 56.25kW

for a total of 1856.25kW ignoring inserters (which I do because I'm too lazy to calculate per item cost of inserters at the moment).

This works perfectly fine as long as there is only one way to produce something. In vanilla Iron gear wheels are always made from iron plates, which need iron ore. Everything has a set price and you can compare different production methods like steel furnace vs. electric furnace easily enough.

With Bobs+Angels on the other hand you have various ways to make iron ore that consume different angels ores and produce different side products. Some of those side products you also need. Others you have way too much. So one process might produce more iron ore than another but because you can't get rid of the extra silver ore it produces it is a bad choice. You need dynamic prices there that adjust to the supply and demand of materials. I have a price model there that gives everything a price depending on how much of it available and then recipes have a positive or negative cost computed as price of outputs - price of inputs - energy cost.