Warp Drive Machine


You are in relative control of a spacecraft equipped with a warp drive that distorts the shape of the space-time continuum and may travel at speeds greater than that of light by many orders of magnitude. Jump from planet to planet and extract most resources you can to rebuild you ship. Each planet is unique with its own challenges, and you can stay limited time on it, until spaceship warps toward another world.

Overhaul
17 hours ago
1.1 - 2.0
3.59K

b Crash on difficulty 5 with +mod resources

9 months ago

Yuoki's provokes a crash, (not your fault per-se, but it "half-is"). When warping to a new surface, get_new_random_planet can cause map-gen-settings to have weird values:
["y-res2"] = {
frequency = -0.76822242001158516,
richness = -0.66768833074694953,
size = -0.85518064079689484
}

    elseif (not nauvis_like) then
        set_autoplace_value(autoplace,autoplace.frequency* rand_adjust(2)*crazy_adjust(6,2))
    end

after passing through this branch, because it's not a "normal" resource like it says in the branch a little above this one...

I am on difficulty 5 with 9 max resource types per planet.

Crash message:
Factorio crashed. Generating symbolized stacktrace, please wait ...
c:\users\build\appdata\local\temp\factorio-build-b8c3zr\src\floatcast.hpp (101): float_cast<unsigned int>
c:\users\build\appdata\local\temp\factorio-build-b8c3zr\src\map\autoplacespecification.cpp (943): AutoplaceSpecification::Settings::set
c:\users\build\appdata\local\temp\factorio-build-b8c3zr\src\map\compiledmapgensettings.cpp (190): CompiledMapGenSettings::compileAutoplacersPass1<ID<EntityPrototype,unsigned short> >
c:\users\build\appdata\local\temp\factorio-build-b8c3zr\src\map\compiledmapgensettings.cpp (478): CompiledMapGenSettings::finalizeCompilation
c:\users\build\appdata\local\temp\factorio-build-b8c3zr\src\map\compiledmapgensettings.cpp (440): CompiledMapGenSettings::compile
....
1126.363 Error FloatCast.hpp:101: !std::isnan(input) was not true
1126.363 Error CrashHandler.cpp:641: Received 22

I'd suggest wrapping the parts of:
local function set_autoplace_value(autoplace,v)
autoplace.frequency = v
autoplace.size = v * rand_adjust(5)
autoplace.richness = v * rand_adjust(5)
end

with math.max( , 0), so it's always 0 or above, which wouldn't be expected to cause errors. Not quite sure how to report this on the forum, probably can reproduce it in some way and they can determine if it should be fixed or not

New response