Some Questions About Quality

Place to post guides, observations, things related to modding that are not mods themselves.
coffee-factorio
Long Handed Inserter
Long Handed Inserter
Posts: 88
Joined: Thu Oct 17, 2024 10:56 pm
Contact:

Some Questions About Quality

Post by coffee-factorio »

I wanted to do some research for doing a mod of the quality mechanics (to see how much work/if the idea is supportable).

It appears that some things that I want to do where accomplished by quality rebalance. The strategy used there appears to be to go through data['raw'] and decorating prototypes at a different quality level, that appear to be made dynamically/at runtime. Is that a more or less correct understanding of how to put specific buffs or custom changes on "levels of quality"?

The specific desired behavior is to change the balance of quality (i.e. set a machines crafting speed to an arbitrary value). I'm pretty sure the answer is "yes" or at least "close enough".

And that would be the easy part. The hard part is, I want specific levels of quality to be relatively rare as you start out, but to become dramatically increased by a module effect, while reducing the occurrence of intermediate values. This is desirable but sacrificial if impractical. An example of the desired outcome is "insert module tier one, return uncommon, rare, epic at given rate, insert module tier 2 return uncommon, rare at arbitrary rate, epic at rate proportional to uncommon".

The other "hard part" is to ask if there is some way of automatically generating items at a specific quality by way of a recipe. The working example I'd have is variable-n items to get a product of a particular quality. It might sound like I'm trying to bypass the system or weaken it a bit, but I'm very interested in the refining mechanics of the system and would prefer to have the ability to start a player at an arbitrary point in (what I see as) a directed graph.

To that end though, how customizable are the recycling recipes? Could you say have a 'cycling machine return a fish from a chemical plant if a mod developer needed that functionality?
coffee-factorio
Long Handed Inserter
Long Handed Inserter
Posts: 88
Joined: Thu Oct 17, 2024 10:56 pm
Contact:

Re: Some Questions About Quality

Post by coffee-factorio »

So, answering some of this because it might prove useful.

The quality rebalance sets the entity.created_entity trigger to swap an entity out with a different prototype at runtime. Just from a few minutes reading it doesn't seem like there's something to change quality levels or what it is applied to in another way. This is a bit disappointing because you're in the land of generating a large swath of items as prototypes in the data stage, although it is reassuring to know it is possible.

I might ask for a mechanism like that formally since it seems like a common enough use case.

I am still curious about jumping levels. I'm curious about what exactly the "quality_prototype.next_probability" variable does in conjunction with modules? So if I where to set legendary "next_probability" to be 0.05 instead of 0.10, would that be interpreted as say normal_quality.next_probability*...*legendary.next_probabilty*(modules_quality_bonus([...modules...]))?

As a system it seems... inherently hard. I'm not sure how best to phrase it. The workmanship is excellent. But the problem is inherently hard. I wasn't able to find creation capability for individual elements, so you can't just make an item at quality. The stated presumption in FFF's was that someone would go and make a "just buy it mod". You can just tweak the module percentages or you can decide it isn't better just to hand someone a n*x value machine for a m*x cost directly; from a modder's perspective.

The rough is, it seems like a global/singleton bonus table at this point. But what I'm trying to find out is if it's intended to be one global bonus table which support one global bonus set now or going forward. If I have q_1, ... , q_5, and a bonus I can set arbitrarily but I can't just make items of q_6; that is fine:

If I could do that I could make a separate little economy in theory, as a modder. In practice... I mean it'd be the mod equivalent of a quality build, I'd have to filter everything in that little economy from the normal economy of "normal-legendary". Or manage how those economies linked very carefully. So I'd kind of have to be planning an economy at that point, rather than something of limited scale like the gem sort from Seablock which uses probabilities of return to cause "fun".

I can certainly work with the singleton model for my ideas.

Although, I do have another odd question now. Is it possible to do a native quality bonus in the same vein as a native productivity bonus? Or is that a situation where I'd have to bake modules (preferably hidden) into an assembly machine?
Post Reply

Return to “Modding discussion”