Production Calculator Google Sheet [2.0 Space Age & Vanilla]

Calculate optimal ratios for feeding recipes, search through the research-tree, specialized tools to view game-information.
ASemenov
Burner Inserter
Burner Inserter
Posts: 9
Joined: Wed Jun 21, 2017 8:07 pm
Contact:

Re: Production Calculator Google Sheet [0.16 & 0.17]

Post by ASemenov »

Please, update 0.17 sheet with oil changes
ignatio
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Mon Jun 27, 2016 3:59 pm
Contact:

Re: Production Calculator Google Sheet [0.16 & 0.17]

Post by ignatio »

Been away for a bit, but done now. The changes mean basic oil processing "balancing" doesn't really do much balancing anymore, but the button is still there in the Balancing sheet (much like the different sources for solid fuel).

I've also fixed the base speed multiplier for chemical plants. It was still 1.25 that applied to 0.16, and not 1.0 which is the correct value for 0.17. This meant the sheet substantially underestimated the number of chemical plants. I rechecked all the other facility multipliers too, and they should be correct.
Tobes
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sat Nov 02, 2019 7:10 pm
Contact:

Re: Production Calculator Google Sheet [0.16 & 0.17]

Post by Tobes »

Registered just to say what a great job you did, was preparing to make something like this for factory planning and found this first so saved a bunch of time!

Thank you!
ignatio
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Mon Jun 27, 2016 3:59 pm
Contact:

Re: Production Calculator Google Sheet [1.0]

Post by ignatio »

Did a small update to bump the version to 1.0 and add the Spidertron. Other changes are minor:

- Removed raw-wood.
- Renamed "Battery (equipment)" to "Personal battery".
- Changed ingredient/result sorting in notes. They are now sorted by descending amount.
- Added production time and ingredients for "Steam".
- Added ingredients for "Used-up uranium fuel cell".
- Water changed from 1200 units per 1 sec to 1 unit per 1/1200 sec (note gone).
- Adjusted rocket launch time from 42 to 41+1/6.
- Added "Spidertron" and "Spidertron remote" for 1.0.
- Added "Raw fish" since it's an ingredient for the Spidertron.
ssktyera
Manual Inserter
Manual Inserter
Posts: 1
Joined: Mon Aug 17, 2020 10:09 am
Contact:

Re: Production Calculator Google Sheet [1.0]

Post by ssktyera »

ignatio wrote: Wed Jun 29, 2016 5:09 am Hi, I'd like to share a spreadsheet to do advanced and very accurate production calculations:
Thanks for this Ignatio - I only bought the game this week, so still getting my head around the basic concepts, but this looks great and I'll sure it'll get more useful as I progress.
ignatio
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Mon Jun 27, 2016 3:59 pm
Contact:

Re: Production Calculator Google Sheet [1.0]

Post by ignatio »

You're welcome! If I was just starting on my first play-through I wouldn't worry too much about fancy calculations and getting all the ratios right, there'll be a time when that comes. :)
ignatio
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Mon Jun 27, 2016 3:59 pm
Contact:

Re: Production Calculator Google Sheet [1.0]

Post by ignatio »

Known bug: While working on a version of this for Krastorio 2 I realised it doesn't factor in productivity bonuses properly for recipes that consume its own output. The only recipes that happens for is coal liquefaction and Kovarex enrichment process, so if you add productivity modules for those it will overestimate the number of machines you need a little bit. (It calculates the output items as (<result count> - <ingredient count>) * <productivity>, whereas it should be (<result count> * <productivity>) - <ingredient count>.)

Fixing this requires fundamental changes, so I will finish the Krastorio 2 version first and then create new vanilla spreadsheets based on that one.
mtfreitasf
Burner Inserter
Burner Inserter
Posts: 14
Joined: Sat Apr 27, 2019 12:38 pm
Contact:

Re: Production Calculator Google Sheet [1.0]

Post by mtfreitasf »

Ignatio, congratulations for the awesome calculator and script. I have been using the script for a while, but recently it stopped working. The error I received was:
factorio lua.jpg
factorio lua.jpg (53.75 KiB) Viewed 6326 times
As line 172 is part of a call for serpent, maybe that is the error. I tried to put serpent.lua in the same directory but don't know how to use it.

Factorio setup: the game is in vanilla and I didn't edit anything in the script. I tried using lua53 (it worked before) and lua54.

Can you help me?

Best regards,

Marcos
ignatio
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Mon Jun 27, 2016 3:59 pm
Contact:

Re: Production Calculator Google Sheet [1.0]

Post by ignatio »

mtfreitasf wrote: Sun Dec 27, 2020 1:29 pm Ignatio, congratulations for the awesome calculator and script.
Thanks!
mtfreitasf wrote: Sun Dec 27, 2020 1:29 pm I have been using the script for a while, /.../
So you've been using it successfully on Windows then? If so, thanks for verifying that it works there! :) I had to do an ugly hack to get directory listings to work there and I haven't had an opportunity to try it out properly.
mtfreitasf wrote: Sun Dec 27, 2020 1:29 pm As line 172 is part of a call for serpent, maybe that is the error. I tried to put serpent.lua in the same directory but don't know how to use it.
The code that was supposed to kick in when Serpent isn't available didn't work correctly, because I haven't tested that in a long time. If you got that error after downloading serpent.lua then I'm not sure what gives - it works for me just having it in the current directory together with the script, but then I'm on Linux. In any case, I think it should work without Serpent now. Please try again and thanks for the report!
mtfreitasf wrote: Sun Dec 27, 2020 1:29 pm /.../ I tried using lua53 (it worked before) and lua54.
I had to do a small fix to make it work in 5.3. Haven't tested 5.4. I recommend using 5.2 though, since that's what Factorio itself uses (last I checked), so all the game data lua is written for that.
mtfreitasf
Burner Inserter
Burner Inserter
Posts: 14
Joined: Sat Apr 27, 2019 12:38 pm
Contact:

Re: Production Calculator Google Sheet [1.0]

Post by mtfreitasf »

Ignatio,

I have been using the 0.17 version and it has consistently worked for me. But I have updated the game for the 1.1 version (latest experimental).

I run with and without serpent.lua in the factorio folder and got new errors (same with and without). The screenshot is below (as you can see I tested in 5.2 and 5.4:
Screenshot 2021-01-01 111256.jpg
Screenshot 2021-01-01 111256.jpg (153.24 KiB) Viewed 6268 times
Sorry for not helping with the debug, but I am not familiar with lua.

Best regards and Happy New Year.

Marcos
ignatio
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Mon Jun 27, 2016 3:59 pm
Contact:

Re: Production Calculator Google Sheet [1.0]

Post by ignatio »

It got further but failed to load the translation files, which means the dir list code isn't working. It's new since the 0.17 version of the script.

I now tried running the script with a win32 binary of Lua 5.2 in a Windows emulator. It works fine for me (the "'ls' is not recognized" error is expected and can be ignored), so I'm not sure why it fails for you. One thing you can do is verify that you have the translation file data\base\locale\en\base.cfg relative to your working directory. If that's not the problem then please try

Code: Select all

ls -1 data/base/locale/en/*.cfg&&dir/b/s data/base/locale/en/*.cfg 2>&1
exactly as written and reply with the output. (It will output an error but should also list the base.cfg file.)

Another thing you may notice is that the script is a lot more picky since 0.17, and errors out on all sorts of inconsistencies. I did it that way to help flag unexpected changes in the game data that may affect the extracted info.

So depending on what you're doing, you may need to adapt the script somewhat to avoid the errors (I wouldn't say very much lua knowledge is necessary - hopefully it's mostly a matter of reading the comments and do some educated guesses on the syntax). But if you don't want to get stuck on the errors you can try adding --ignore-research-goals and/or --continue-on-error (which I added just now) to the command line.

(Btw, I'm preparing spreadsheets for 1.1 and hope to get them out soon.)
mtfreitasf
Burner Inserter
Burner Inserter
Posts: 14
Joined: Sat Apr 27, 2019 12:38 pm
Contact:

Re: Production Calculator Google Sheet [Vanilla, Krastorio2, Space Exploration - 2024 REVAMP]

Post by mtfreitasf »

Hi again Ignatio,

Long time I posted here and hope you are well. Do you have an updated script for Lua so as I can use it with Space Age? The old one still works? Which version of Lua should I continue using?

Best regards,

Marcos
ignatio
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Mon Jun 27, 2016 3:59 pm
Contact:

Re: Production Calculator Google Sheet [Vanilla, Krastorio2, Space Exploration - 2024 REVAMP]

Post by ignatio »

mtfreitasf wrote: Fri Nov 01, 2024 1:15 pm Long time I posted here and hope you are well. Do you have an updated script for Lua so as I can use it with Space Age? The old one still works? Which version of Lua should I continue using?
Hi, thank you!

No, the 1.x mod doesn't work in 2.0. I'm working on updating it, and I hope to share Vanilla 2.0 & Space Age sheets soon.

I intend to add proper support for 2.0-specific features like quality and the new beacon mechanics, but that'll take a bit longer. I e.g. need to figure out how to handle quality in a way that's useful and not too complex.
ignatio
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Mon Jun 27, 2016 3:59 pm
Contact:

Re: Production Calculator Google Sheet [2.0 Space Age & Vanilla]

Post by ignatio »

FACTORIO 2.0 UPDATE

Dropping a preliminary update for 2.0 - the data extraction mod now works in 2.0, and I've created sheets for 2.0 Vanilla and Space Age (links below). However many of the 2.0 mechanics are still on my to-do list, like quality and the new beacon effects. In the meantime I've disabled some features that don't calculate correctly.

The data extraction may also be a bit rough around the edges, but please let me know if anything doesn't look right, and in particular if the calculations aren't correct.

These are the things I plan to work on going forward:
  1. Beacon effects.
  2. Quality levels for modules and facilities. The difficult bit here is to decide how much configurability to have - more precise settings allow more precise results, but also clutter up the spreadsheet and makes it hard to use. I'm open for ideas.
  3. Recycling recipes. The current Space Age sheet ignores them all since everything can be recycled and so there are about as many recycling recipes as there are real ones, and they'd make the spreadsheet very bloated. However some may be relevant for volume production and could be useful to have.
Quality levels for items would also be interesting, so that one can calculate a production chain for e.g. epic speed modules, with all the necessary recycling etc, and checking what quality modules and quality increasing feedback loops at different production stages would do. But having 5 variants of every item would be too unwieldy, so it'd have to be limited in some way.

[Edit] Minor updates:
  • 24 Nov 2024: Fixed bug in spreadsheets where productivity module selection lists were missing for items that can be produced in factories with more than 4 slots.
Post Reply

Return to “Cheatsheets / Calculators / Viewers”