Auto Research

by canidae

Automates research. Toggle GUI with Shift+T (customizable).

Utilities
4 years ago
0.13 - 1.1
55.8K

i weighted research cost

7 years ago

You could use the broken down into base material cost either from the wiki (https://wiki.factorio.com/Science_pack) or automatically generated in data-final-fixes to weight tech cost.

Doing that would allow to research cheaper tech first.
For example your current implementation would deem tech needing 2x(red, green, blue) more expensive than one needing 1x(red, green, blue, purple).

7 years ago

That's a good idea, and I think I'll look into this as I'm not too happy about the current effort calculation. Although, I'm going on vacation for some weeks tomorrow, so I don't think I'll manage to implement this and test it properly before I leave.
Further I don't want to hardcode science pack cost, it needs to be determined dynamically. This because you can change recipe complexity in the base game (might make some science packs more expensive than others), as well as other mods may add new research ingredients.

7 years ago

I briefly looked into this a bit and it's possible it can be done, but I'll have to look more into it when I'm back from vacation. Sadly it's possible it might just not be worth it:

I can break research ingredients down to raw resources. Such as iron ore, copper ore, coal, stone, uranium ore, water, crude oil, etc. Then I can sum up the total of these raw resources and with that calculate the "cheapest" tech.
Although, this is not entirely straight forward, though. While iron ore, copper ore, stone and coal probably can be considered to be equally expensive, crude oil and uranium is far more valuable. Water on the other hand is practically worthless. If AR is to pick research in a sensible order I need to weight these materials, but that's not as easy as it sounds. For one, players can change game parameters, making some raw materials scarce while others are plentiful. And mods may add more resource types which I can't really know the value of (unless I constantly update AR to balance this, but that's not something I wish to do).

I still like the idea of basing effort on more than just the amount of science packs, but breaking it down to the raw resources might not actually be helpful.

7 years ago

A thought struck me so I'm just throwing it out here as a reminder to myself:
Instead of raw resources needed count the amount of steps required to build the research ingredient.

7 years ago

I think including scarcity of resources into calculations is a bit overkill.
Players usually set resource distribution to either have an even progression expanding to new resources evenly or go for a handicap by almost entirely removing some resource.

I see why you want to include scarcity of resources though.
A generic formula to determine the value of a raw resource will likely fail on resources like oil. It uses hardness 1, mining time 1 while providing 10 units as result which would make it very cheap in any formula I can come up with that doesn't include scarcity.

The solution for this I used when rewriting Quarry was to include a table with balance factors for such resources. Currently I only know of oil needing such special treatment. Perhaps Angels, Bobs or a mix of the two would have some resources also requiring special treatment.

Using a formula like required steps * craft time * (items/step needed) sounds like a possible way to go too.

7 years ago

Looking a bit into using steps/resources for determining science ingredient weights, although it's a bit tricky coming up with a generic approach that (likely) works with external mods. The "steps" required for the base science packs:
SP1: 6
SP2: 19
SP3: 36
PSP: 51
MSP: 22
HSP: 63
SSP: 1

(Gathering ore/oil/water is considered a step, hence 6 steps for SP1: Copper ore, Copper plate, Iron ore, Iron plate, Iron gear wheel, Science pack 1).
The Space science pack mess up everything. There are no "steps" for getting those. I don't want to create any exceptions because as soon as people add other mods that add science ingredients that are hard to get, but have few "steps" then I'll just have to add more exceptions.

Even though I'd like to improve the effort calculation I don't think this is the way to go. Granted, it is a bit annoying when AR picks a research that isn't the cheapest available, although arguably this is mainly a problem in the early stages of the game where you probably shouldn't let AR decide techs for you.

I'll leave the effort calculation as it is for now.

New response