0.15 resource calculator--LUA

Post all other topics which do not belong to any other category.
zzy
Manual Inserter
Manual Inserter
Posts: 2
Joined: Thu Jul 14, 2016 11:22 am
Contact:

0.15 resource calculator--LUA

Post by zzy »

I just wrote a resource calculator for 0.15 by LUA. This calculator can calculate the total number of resources needed by any product (with or without productivity module). And also all the intermediate product, as well as the number of facilities you need for all the intermediate products. Hope it can help you guys.

For example,

Setting:
difficulty:normal
productivity module 3 used, no efficiency module
12 beacons for each assembler/furnace/chemical plant

Output:

Code: Select all

science-pack-1
setting: prodmod=true effectmod=false beacon=12 oilbeacon=16
prodmod=4 speedmod=12 effectmod=0

resource:
copper-ore=0.5952380952381 in/sec:1.3333333333333
iron-ore=0.85034013605442 in/sec:1.9047619047619

intermediate per sec:
iron-gear-wheel=1.6
facility=0.071428571428571 prodmod=4 speedmod=12 effectmod=0

copper-plate=1.6
facility=0.34825870646766 prodmod=2 speedmod=12 effectmod=0

iron-plate=2.2857142857143
facility=0.49751243781095 prodmod=2 speedmod=12 effectmod=0
This means, in order to produce one science-pack-1, you essentially need 0.595 copper ore and 0.85 iron ore.
If you want to run an assembly machine for science-pack-1 at max speed, you need 0.07 max-outted assembly machine for iron gear, 0.35 max-outted electric furnace for copper plate, and 0.5 max-outted electric furnace for iron plate

Here is the result while there is no productivity module.

Code: Select all

science-pack-1
setting: prodmod=false effectmod=false beacon=12 oilbeacon=16
prodmod=0 speedmod=16 effectmod=0

resource:
copper-ore=1 in/sec:2.25
iron-ore=2 in/sec:4.5

intermediate per sec:
iron-gear-wheel=2.25
facility=0.1 prodmod=0 speedmod=16 effectmod=0

copper-plate=2.25
facility=0.4921875 prodmod=0 speedmod=14 effectmod=0

iron-plate=4.5
facility=0.984375 prodmod=0 speedmod=14 effectmod=0
The module 3

Code: Select all

productivity-module-3
setting: prodmod=true effectmod=false beacon=12 oilbeacon=16
prodmod=0 speedmod=16 effectmod=0

resource:
water=111.58072696534 in/sec:20.921386306002
copper-ore=641.5729557129 in/sec:120.29492919617
iron-ore=462.98684308888 in/sec:86.810033079166
coal=94.976452119309 in/sec:17.80808477237
petroleum-gas=1994.626252868 in/sec:373.99242241275

intermediate per sec:
sulfuric-acid=20.089285714286
facility=0.03690339511235 prodmod=3 speedmod=12 effectmod=0

productivity-module-2=0.9375
facility=2.5 prodmod=0 speedmod=16 effectmod=0

plastic-bar=46.301020408163
facility=2.126338480283 prodmod=3 speedmod=12 effectmod=0

electronic-circuit=145.40816326531
facility=6.4914358600583 prodmod=4 speedmod=12 effectmod=0

processing-unit=5.625
facility=0.25111607142857 prodmod=4 speedmod=12 effectmod=0

copper-cable=404.19096209913
facility=9.0221196897126 prodmod=4 speedmod=12 effectmod=0

advanced-circuit=32.410714285714
facility=1.4469068877551 prodmod=4 speedmod=12 effectmod=0

productivity-module=3.75
facility=5 prodmod=0 speedmod=16 effectmod=0

copper-plate=144.3539150354
facility=31.420317327357 prodmod=2 speedmod=12 effectmod=0

sulfur=1.5453296703297
facility=0.070968067523751 prodmod=3 speedmod=12 effectmod=0

iron-plate=104.172039695
facility=22.674262371424 prodmod=2 speedmod=12 effectmod=0
I actually added the calculation for all researches, you can just add "res" before the research name to calculate it.

Code: Select all

resmilitary-2
setting: prodmod=true effectmod=false beacon=12 oilbeacon=16
prodmod=2 speedmod=12 effectmod=0

resource:
copper-ore=0.8756478781989 in/sec:0.46934726271461
iron-ore=2.8698979591837 in/sec:1.5382653061224

intermediate per sec:
science-pack-2=0.44666666666667
facility=0.23928571428571 prodmod=4 speedmod=12 effectmod=0

iron-gear-wheel=0.79761904761905
facility=0.035607993197279 prodmod=4 speedmod=12 effectmod=0

transport-belt=0.31904761904762
facility=0.0070899470899471 prodmod=0 speedmod=16 effectmod=0

science-pack-1=0.44666666666667
facility=0.19940476190476 prodmod=4 speedmod=12 effectmod=0

copper-cable=0.68367346938776
facility=0.01526056851312 prodmod=4 speedmod=12 effectmod=0

inserter=0.31904761904762
facility=0.014179894179894 prodmod=0 speedmod=16 effectmod=0

electronic-circuit=0.31904761904762
facility=0.014243197278912 prodmod=4 speedmod=12 effectmod=0

copper-plate=0.56321671525753
facility=0.12259070294785 prodmod=2 speedmod=12 effectmod=0

iron-plate=1.8459183673469
facility=0.40178571428571 prodmod=2 speedmod=12 effectmod=0
And finally the biggest one:

Code: Select all

resfollower-robot-count-7
setting: prodmod=true effectmod=false beacon=12 oilbeacon=16
prodmod=2 speedmod=12 effectmod=0

resource:
stone=4.9603174603175 in/sec:1.3293650793651
heavy-oil=2.4529042386185 in/sec:0.65737833594976
water=16.656338066796 in/sec:4.4638986019013
light-oil=45.493197278912 in/sec:12.192176870748
copper-ore=41.881243599905 in/sec:11.224173284775
coal=8.1386361451959 in/sec:2.1811544869125
iron-ore=90.533008898979 in/sec:24.262846384926
petroleum-gas=117.44465605067 in/sec:31.47516782158

intermediate per sec:
sulfuric-acid=4.2863571802347
facility=0.0078739052679398 prodmod=3 speedmod=12 effectmod=0

rocket-part=0.022333333333333
facility=0.0059821428571429 prodmod=4 speedmod=12 effectmod=0

gun-turret=0.079761904761905
facility=0.056719576719577 prodmod=0 speedmod=16 effectmod=0

processing-unit=0.37556462585034
facility=0.016766277939747 prodmod=4 speedmod=12 effectmod=0

assembling-machine-1=0.15952380952381
facility=0.0070899470899471 prodmod=0 speedmod=16 effectmod=0

high-tech-science-pack=0.22333333333333
facility=0.13958333333333 prodmod=4 speedmod=12 effectmod=0

piercing-rounds-magazine=0.079761904761905
facility=0.021269841269841 prodmod=0 speedmod=16 effectmod=0

pumpjack=0.079761904761905
facility=0.070899470899471 prodmod=0 speedmod=16 effectmod=0

firearm-magazine=0.079761904761905
facility=0.0070899470899471 prodmod=0 speedmod=16 effectmod=0

science-pack-1=0.22333333333333
facility=0.099702380952381 prodmod=4 speedmod=12 effectmod=0

pipe=1.1068999028183
facility=0.049195551236368 prodmod=0 speedmod=16 effectmod=0

copper-cable=31.37300978263
facility=0.70029039693371 prodmod=4 speedmod=12 effectmod=0

inserter=0.15952380952381
facility=0.0070899470899471 prodmod=0 speedmod=16 effectmod=0

steel-plate=2.8414771622935
facility=0.088354389374798 prodmod=2 speedmod=12 effectmod=0

grenade=0.079761904761905
facility=0.056719576719577 prodmod=0 speedmod=16 effectmod=0

solar-panel=0.022333333333333
facility=0.019851851851852 prodmod=0 speedmod=16 effectmod=0

iron-gear-wheel=2.9518904275996
facility=0.1317808226607 prodmod=4 speedmod=12 effectmod=0

transport-belt=0.15952380952381
facility=0.0035449735449735 prodmod=0 speedmod=16 effectmod=0

speed-module=0.1937074829932
facility=0.25827664399093 prodmod=0 speedmod=16 effectmod=0

stone-brick=0.79761904761905
facility=0.17361111111111 prodmod=2 speedmod=12 effectmod=0

electronic-circuit=10.772882375399
facility=0.48093224890175 prodmod=4 speedmod=12 effectmod=0

radar=0.0011166666666667
facility=4.962962962963e-005 prodmod=0 speedmod=16 effectmod=0

electric-engine-unit=0.079761904761905
facility=0.071215986394558 prodmod=4 speedmod=12 effectmod=0

rocket-control-unit=0.15952380952381
facility=0.42729591836735 prodmod=4 speedmod=12 effectmod=0

solid-fuel=1.2192176870748
facility=0.32512471655329 prodmod=0 speedmod=16 effectmod=0

low-density-structure=0.18185714285714
facility=0.0081186224489796 prodmod=4 speedmod=12 effectmod=0

iron-plate=29.115415661912
facility=6.3373106229285 prodmod=2 speedmod=12 effectmod=0

accumulator=0.022333333333333
facility=0.019851851851852 prodmod=0 speedmod=16 effectmod=0

science-pack-2=0.22333333333333
facility=0.11964285714286 prodmod=4 speedmod=12 effectmod=0

space-science-pack=0.22333333333333
facility=0.019851851851852 prodmod=0 speedmod=16 effectmod=0

plastic-bar=3.597192142163
facility=0.16519826140817 prodmod=3 speedmod=12 effectmod=0

electric-furnace=0.079761904761905
facility=0.035449735449735 prodmod=0 speedmod=16 effectmod=0

sulfur=0.32971978309498
facility=0.015142125515269 prodmod=3 speedmod=12 effectmod=0

advanced-circuit=2.0633916423712
facility=0.092115698320144 prodmod=4 speedmod=12 effectmod=0

engine-unit=0.21649659863946
facility=0.19330053449951 prodmod=4 speedmod=12 effectmod=0

battery=0.19142857142857
facility=0.0087912087912088 prodmod=3 speedmod=12 effectmod=0

rocket-fuel=0.17069047619048
facility=0.45720663265306 prodmod=4 speedmod=12 effectmod=0

satellite=0.00022333333333333
facility=5.9555555555556e-005 prodmod=0 speedmod=16 effectmod=0

production-science-pack=0.22333333333333
facility=0.13958333333333 prodmod=4 speedmod=12 effectmod=0

lubricant=0.85459183673469
facility=0.0078492935635793 prodmod=3 speedmod=12 effectmod=0

military-science-pack=0.22333333333333
facility=0.099702380952381 prodmod=4 speedmod=12 effectmod=0

copper-plate=13.46900794173
facility=2.9316870519934 prodmod=2 speedmod=12 effectmod=0

science-pack-3=0.22333333333333
facility=0.23928571428571 prodmod=4 speedmod=12 effectmod=0
This is for one research lab. Here space science pack is essentially 0.1 rocket part with 0.001 satellite, so I add it in the recipes. All solid fuel made from light oil.
Attachments
factorio.zip
Please run main.lua, settings are in the first few lines.
(177.35 KiB) Downloaded 134 times
Post Reply

Return to “General discussion”