Inverted Quality


Inverts the Quality system to negative tiers (positive tiers are removed). Crafting items has a two-thirds chance to reduce their quality by one tier. Items in the lowest tier are nonfunctional. The new Downgrade Port allows high-quality items to be used in low-quality recipes, and the Meltdown Facility allows the melting down of low-quality items back into Normal base materials. Map sliders for higher resources are recommended.

Overhaul
9 days ago
2.0
400
Factorio: Space Age Icon Space Age Mod
Manufacturing

g [Resolved] freezes game at startup

5 months ago

grabbed the latest version and factorio just stops loading on this mod, no error whatsoever just complete halt.
i deleted the mod and it loads again. redownloaded the mod, stops right there at this mod

4 months ago

I believe this mod compatibility issue should be fixed. Please let me know your modlist if it still occurs.

4 months ago

Age of Production
Also, with many mods, the output from the batch is from 0 to n, and in brackets -5.
For example, bobs mod and planets

4 months ago

What do you mean?

4 months ago

With Age of Production mod the game freezes on loading
With some other mods, bob and planets mods, it gives an error on loading with out of range (0-a couple of million)
I understand that other mods do not support negative quality values, giving an error with -5

4 months ago

The freeze/hang on startup has been fixed in the latest version. Please report any other specific mods that have crashes.

4 months ago

Error while loading entity prototype "bob-artifact-radar" (radar): Value (-1) outside of range. The data type allows values from 0 to 18446744073709551615 in property tree at ROOT.radar.bob-artifact-radar.max_distance_of_sector_revealed
Modifications: Bob's Enemies mod › Inverted Quality

The bobenemies mod issues an out-of-range error
the solution is to add a line
if new_value<0 then new_value=0 end

To this file
Inverted-Quality_0.5.7\Inverted-Quality_0.5.7\prototypes\override-final\negative-quality.lua

To make it look like this

local function apply_modifier(value, modifier)
if modifier.unit then
return undo_quality_effects_on_physical_value(value, modifier)
else
local new_value
if modifier.relative then
new_value = value / (1 + modifier.relative * QUALITY_LEVELS_TO_UNDO)
if modifier.floor then
-- Inverted floor is ceil
new_value = math.ceil(new_value)
end
elseif modifier.absolute then
new_value = value - (modifier.absolute * QUALITY_LEVELS_TO_UNDO)
if new_value<0 then new_value=0 end
else
return value
end

    if modifier.bonus then
        new_value = new_value + modifier.bonus
    end

    if modifier.lower_bound then
        return math.max(new_value, modifier.lower_bound)
    end
    return new_value
end

end

New response