Jump to content

Recommended Posts

Since after all this time Klei hasn't addressed the issue of +-infinity not being savable, I wrote a patch of the game's saving system which allows saving these values.

I uploaded it as a sample mod, with all functionality in the savable_infinity.lua script, which may be modimport'ed by any mod in order to enable the saving extension.

  • Like 2

I can't understand why they haven't added support for this yet. If editing the dumper.lua file itself, this would be extremely simple. Just a matter of changing

    number = function(value) return value end,
to

    number = function(value)        if value == math.huge then            return "1/0"        elseif value == -math.huge then            return "-1/0"        elseif value ~= value then            return "0/0"        else            return value        end    end
and the third test (for NaN) is not even that important, since saving NaN is hardly useful (but it's nice to have it not corrupt savedata :razz:).
  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...