YAFC - Factorio calculator/analyser for modded games

Calculate optimal ratios for feeding recipes, search through the research-tree, specialized tools to view game-information.
Post Reply
ShadowTheAge
Inserter
Inserter
Posts: 29
Joined: Fri Mar 04, 2016 12:58 pm
Contact:

YAFC - Factorio calculator/analyser for modded games

Post by ShadowTheAge »

After playing a bunch of Pyanodon and struggling with its deeply recursive recipes when Helmod were not enough, I have decided to make my own calculator / analyser tool. As usual it took a lot longer than expected (almost 2 months) but it was a lot of fun!

Image

More gifs here (traffic warning!)

YAFC is written with two primary goals: To work with modded games, and to help the user to make educated choices while exploring unknown mod packs.

So YAFC is not just a calculator, it contains multiple complex analysis tools and really tries to understand what is going on in the modpack. It even estimates the amount of resources generated by the map generator, and it also simulates hypothetical late-game base to understand how much of everything do you need, what is the best recipe to make what, what are locked behind different science packs, how much of everything do you need, etc.

For example YAFC also contains "Never Enough Items Explorer" tool that (similar to FNEI) shows you how to produce and consume everything, but with additional information like recipe efficiency, and how "important" the recipe is (For vanilla game example, it knows that about 80% of petroleum gas is going to plastic, and about 80% of plastic is going to advanced circuits)

As a calculator, the two main features are great handling of recursive recipes and the ability to organise recipes in nested sheets so that (for example) green circuits can have its own copper cable production, not mixing with copper cables for other uses.

There is also a cool small "auto-module" feature that assigns productivity modules to recipes that benefit the most from them with a single slider "How many modules do you want?"

It is the first beta release. I have found and fixed a lot of incompativilities with Factorio mods, but probably not all of them, so it is expected that YAFC may not work with some (especially less popular) mods. But hopefully I could fix more incompatibilities in the following weeks. Other bugs are also possible!

YAFC is a desktop app for Windows, and there are also Linux and OSX experimental builds!

You can read more, look at more gifs, and download it on Github

salbris
Inserter
Inserter
Posts: 38
Joined: Sun May 24, 2015 4:50 am
Contact:

Re: YAFC - Factorio calculator/analyser for modded games

Post by salbris »

Holy shit! Excellent work the UI looks slick!

It looks like a bunch of us keep writing the same code to parse mod data. I wonder if the community should try to build a generic utility to generate item and recipe data...

ShadowTheAge
Inserter
Inserter
Posts: 29
Joined: Fri Mar 04, 2016 12:58 pm
Contact:

Re: YAFC - Factorio calculator/analyser for modded games

Post by ShadowTheAge »

Probably the reason is this looks like a quite simple task while it actually not at all because mods are relying on every implementation detail there is and crash when it changes.

However, I think I have advanced one of the fathest. I even have custom Lua build that emulates changes to Factorio next() iterator. I think that I have compatibility with at least 95% of the mods (Including all the popular ones like py, angel, bob, IR, omni, bio industries, krastorio, 5dim) and I have checked lots of them (Plus some users on github have added some more)

About the ui, it is 100% custom, written for this project, up to text editing cursor blinking. It is very simplistic (from the coding perspective), lacks functionality (e.g. multiline text editing does not exist) lacking in things like keyboard controls, but it is very easy to write code for.
Actually, the UI renderer can only draw colored rectangles, text, 32x32 icons and shadows. It also only knows about 24 colors (some of them are duplicates), however icons can be colorful.

salbris
Inserter
Inserter
Posts: 38
Joined: Sun May 24, 2015 4:50 am
Contact:

Re: YAFC - Factorio calculator/analyser for modded games

Post by salbris »

I've been discussing it a bit with some others here: https://github.com/factoriolab/factorio-lab/issues/72

I don't know which should become the "standard" but I like how the tool referenced in that thread is standalone and just produces JSON.

ShadowTheAge
Inserter
Inserter
Posts: 29
Joined: Fri Mar 04, 2016 12:58 pm
Contact:

Re: YAFC - Factorio calculator/analyser for modded games

Post by ShadowTheAge »

I think the standard should be "compatible with data.raw"
Even if it is json

so the result will be {raw:{item:{"electronic-circuit":{...}...}...}

So the format would be well-documented on Factorio wiki, and new fields will have well-known names
And also the parser could be reused both ways (just swap lua table with json or vise-versa)

Impatient
Filter Inserter
Filter Inserter
Posts: 575
Joined: Sun Mar 20, 2016 2:51 am
Contact:

Re: YAFC - Factorio calculator/analyser for modded games

Post by Impatient »

Hey there,

great to see someone taking a new approach on a calculator. I am already testing YAFC. Here is some feedback:

Bugs

- The amount of assemblers is calculated wrongly. I observed this with vanilla assemb mk3 + 4 prodmods mk3, 8 beacons + 2 speedmods mk3. It gives almost double the amount of assemblers needed. For comparisson the results of kirks calculator: ( https://kirkmcdonald.github.io/calc.htm ... +zxRzSCw== ), which I tested and verified in-game.

- Pressing backspace in the item ammount input field when it is empty throws and catches an exception.

ShadowTheAge
Inserter
Inserter
Posts: 29
Joined: Fri Mar 04, 2016 12:58 pm
Contact:

Re: YAFC - Factorio calculator/analyser for modded games

Post by ShadowTheAge »

For beacons: Forgot to take in account the amount of modules per beacon, thanks :D (So, now the meaning is "beacon modules")
For exception: I wasn't able to reproduce with backspace, but I was able to reproduce with "left arrow", thanks
Both are fixed for the next release

BTW, I am monitoring issues on Github https://github.com/ShadowTheAge/yafc/issues if you find more you can post it there!

Post Reply

Return to “Cheatsheets / Calculators / Viewers”

Who is online

Users browsing this forum: No registered users