Promethium is Quality


Give promethium asteroid chunks another purpose. Turn them into a catalyst for refining an item's quality at no loss.

Content
22 days ago
2.0
660
Factorio: Space Age Icon Space Age Mod
Manufacturing

g Feature request and bug

a month ago
(updated a month ago)

So, two things. First off, a sort of bug. Recipes that include items that can only be gotten from spoiling, such as the limestone resource in the Maraxsis mod (which spoils from coral, but has no recipes that produce it otherwise), cannot be refined, nor can any subsidiary items. This, for example, blocks any recipe in Maraxsis that includes glass, since that is a product of limestone. I've handled this locally by assigning a refine_complexity to the item, but it may be worth revisiting if an item has no recipe but IS a result of something else spoiling, to permit it and assign it a similar base complexity as ores.

Second, as a feature request, the ability to set a hard cap on refining time. After the above adjustment, some of the items in Maraxsis (like the pressure dome) have a derived complexity of multiple millions (in the case of the pressure dome, 4.5 million), resulting in a refining time of 9500s (nearly 3 hours). I think it's reasonable to be able to set a hard cap on the refining time to avoid recipes like that. Any recipe with a computed time beyond that value simply gets to the specified time instead. This should probably be applied after the refining time multiplier is applied, to avoid weirdness (such as setting a hard cap of 60m and a refining time multiplier of 50 resulting in an actual cap of 30m).

Another option would be to loosen the constraints on the hardness and leanness settings. Throwing the calcs into excel, I find I can get more or less the refine time pattern I'm looking for (a much flatter curve overall, with higher at the lower end and lower at the higher end) by setting the leanness to a much higher number than the setting currently allows. With 1000% leanness and 500% for both hardness and time multiplier, the result is higher refining time for low-complexity items than the mod default, but limiting even exceptionally complex items (like the above pressure dome, with ~4.5 million complexity) to only about 15m of refine time.

Addendum: I figured out why the complexity of the dome is so high. It costs 500 glass, which a lot, ya, but glass is just an intermediary made at a foundry. However, glass requires limestone (which I've set to complexity 1), salt (~1.67), and sand. Sand has a computed complexity of 3000, because it is created by a sort of hack the mod author used to allow players to place mining machines anywhere outside a coral patch and "mine" sand. The mod creates a copy of mining drills, typed as an assembly machine instead, with a fixed recipe to produce sand out of nothing, which it replaces any mining drill built on normal sand with. This mod sees that as a recipe that creates something out of nothing and assigns the product a complexity of 300 * energy_required (which is 10, for the sand recipe). Net is that glass itself is considered to have obscene complexity due to the sand ingredient, and thus the dome, which requires 500 glass, is calculated as even more obscenely complex. I've fixed that particular issue by assigning sand a refine_complexity as well. May need to throw a compatibility section in for mod items like that >.<

a month ago
(updated a month ago)

Hey thank you for all the details and sorry for the super late response.

I intend to support interop with other mods but I myself don't have time to check them all out in depth enough. So I depend on feedback like yours to fix stuff like this.

As it stands the mod doesn't look into spoiling at all. That's an oversight on me. I'll give spoil results same refine_complexity as initial item and see how mods pick it up from there. I'll test how it'll affect Maraxsis' Limestone and its product chain.

The 300 multiplier on "something out of nothing" recipes was initially made for biter eggs. I'm new to the mod space and, I hope properly, assumed that they're primarily used to generate items that need delicate care. Here's one instance where I'm wrong :) Things like these are probably best solved on a case by case basis with refine_complexity for now.

I'll throw in an update for these two things soon.

When it comes to hardness and leanness, the values insofar were best tuned for Space Age, and I made those settings as an ad hoc fix incase someone finds stuff like this, and before I solve them with an update. I'll extend their ranges, but I also think that with above mentioned stuff, Maraxsis's Pressure dome will drop in refine time to within reasonable with defaults.

a month ago

Version 0.8.16 should now give Limestone a refining recipe.

Now I gave Sand refine_complexity of 2 which on default settings is 0.45s refine time. I thought that going as low as other ores doesn't make sense when 1 sand item takes 10 seconds to mine.

That drops Pressure dome to 680 seconds refine time... which if you were to argue is still too much, I'd be inclined to drop refine time for Sand even more, but I don't know how much more is sensible. It is a giant building after all and it takes 500 Glass.

Let me know if you think there's anything I missed ^^

a month ago

Nope, all of that sounds reasonable, and of course final refining time can be tuned in the mod already. I do think it might still be reasonable to add a hard cap setting to avoid particularly absurd refine times like the original computed pressure dome time. Looking at the code, I think you'd be able to just throw in a new conditional after the existing elseif block that rounds up the refining time based on magnitude, where if the setting is assigned and the final computed time is greater than that setting, it gets set equal to it instead. Would help with outliers and mods that haven't had compatibility added, I would think.

RE sand I'm a bit torn. It seems likely that the 10s time on it was assigned with the assumption that the Vulcanus big drills would be used, and that you can place them just about anywhere, so volume of drill input isn't really an issue (though of course power might be). That said, your argument also seems rational, they certainly take longer to produce sand than a normal drill on a deposit takes. Does the complexity cost take into account the ore's hardness? Ex. scrap taking half as much time to mine, tungsten taking 5x as much to mine? If so, sand is essentially equal to a 10x mining speed ore (which is, tbh, rather weird for sand, but w/e).

24 days ago

Late reply again sorry, work is a bitch :(

Capped refining time is still a good idea, I'll add it as an option disabled by default.

Does the complexity cost take into account the ore's hardness?

Yes. 1 second mining time is 0.5 complexity, so sand should be 5. Felt unfair to me after checking refining times for rest of the production chain, so I cut it to 2

New response