simplex Posted May 11, 2014 Share Posted May 11, 2014 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. Link to comment Share on other sites More sharing options...
squeek Posted May 11, 2014 Share Posted May 11, 2014 Nice work. Added to the The Big List Of Mod-Related Code Suggestions. Link to comment Share on other sites More sharing options...
simplex Posted May 11, 2014 Author Share Posted May 11, 2014 Nice work. Added to the The Big List Of Mod-Related Code Suggestions.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 endand 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 ). Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.