Crash - mods adding tasks


Kuloslav
  • Fixed

Problem concerns mods that affectt world creation (Islands, Steam Biome, Hero in the Dark. etc). Problem occurs only in versions with Shipwrecked.

Example crash log:

...amapps/common/dont_starve/data/scripts/map/tasks.lua:75: variable 'GEN_PARAMETERS' is not declared
LUA ERROR stack traceback:
        =[C] in function 'error'
        D:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/strict.lua(23,1)
        D:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/map/tasks.lua(75,1) in main chunk
        =[C] in function 'require'
        D:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/../mods/workshop-390449107/modworldgenmain.lua(6,1) in main chunk
        =[C] in function 'xpcall'
        D:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/util.lua(453,1) in function 'RunInEnvironment'
        D:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/mods.lua(217,1) in function 'InitializeModMain'
        D:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/mods.lua(194,1) in function 'LoadMods'
        scripts/main.lua(233,1) in function 'ModSafeStartup'
        scripts/main.lua(278,1)
        =[C] in function 'SetPersistentString'
        D:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/mainfunctions.lua(18,1) in function 'SavePersistentString'
        D:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/modindex.lua(76,1)
        =[C] in function 'GetPersistentString'
        D:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/modindex.lua(63,1) in function 'BeginStartupSequence'
        scripts/main.lua(277,1) in function 'callback'
        D:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/modindex.lua(331,1)
        =[C] in function 'GetPersistentString'
        D:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/modindex.lua(311,1) in function 'Load'
        scripts/main.lua(276,1) in main chunk

 

Original code (tasks.lua):

local params = json.decode(GEN_PARAMETERS)

if params.ROGInstalled or params.level_type == "shipwrecked" or params.level_type == "volcano" then
    require ("map/sw_tasks")
else
    require ("map/standard_tasks")
end

When I changed it, problem is gone:
 

--local params = json.decode(GEN_PARAMETERS)

--if params.ROGInstalled or params.level_type == "shipwrecked" or params.level_type == "volcano" then
if IsDLCEnabled(REIGN_OF_GIANTS) or IsDLCEnabled(CAPY_DLC) then
    require ("map/sw_tasks")
else
    require ("map/standard_tasks")
end

 


Steps to Reproduce
Just turn on mods: Islands / Steam Biome / Hero in the Dark
  • Like 1


User Feedback


A developer has marked this issue as fixed. This means that the issue has been addressed in the current development build and will likely be in the next update.
.... ....