Jump to content

This Update Was Not Moderately Friendly To Me :(


Volarath

Recommended Posts

Today I learned a valuable lesson in Don't Starve.  I had tried out a mod for a different kind of storage box, and I put some Things in it that would eventually help me escape that world.  I now know that game updates disable all mods, and that entering and leaving the game will destroy the previously mentioned chests.  My poor robot is doomed to haunt this world till I delete him and try again. 

 

Is there a way to find another copy of an important item that may have been eaten by update?

 

Edit:  Apparently I put Chester's bone in there too.  The poor guy is wandering in something that's not entirely unlike a cicrcle near my base.  At least I can still open him up!

^

That's your only option, really. The whole situation of mod disabling vs. savedata is very annoying. If you load a save with a mod disabled, it won't be able to fetch the relevant savedata (let alone store it back when you save/quit), so the data is effectively lost.

But I think spawning a new eyebone will create another Chester. You should take whatever is inside the existing one and then delete it, i.e.

RunScript "consolecommands"(c_find "chester"):Remove()

^

That's your only option, really. The whole situation of mod disabling vs. savedata is very annoying. If you load a save with a mod disabled, it won't be able to fetch the relevant savedata (let alone store it back when you save/quit), so the data is effectively lost.

But I think spawning a new eyebone will create another Chester. You should take whatever is inside the existing one and then delete it, i.e.

RunScript "consolecommands"(c_find "chester"):Remove()

Personally, what I think the game should do is present a confirmation message to the player if they're trying to load a save with fewer mods enabled than the last time.

I used the console method as you've suggested, and I left the world to start again.  Now I get an error about the CharacterSelectScreen not being declared.  Anyone know a good image hosting site?  I tried image shack, and it promised to email a link that has yet to arrive.

 

This error only happens on the character I've previously used the mod and I just used the console to spawn an item on.

There is warning about mods if you have some of them enabled, so if you run the game and there is no mod warning you should know that they are disabled.

If you're playing continuously, that might be enough. But this should be warned on a per save basis. And showing the mods no longer enabled, not all the enabled ones.

Using the spawn codes on the wiki, I put down the four parts annnnd maybe the base too by mistake.  I used the base the game gave me though, not the one I tossed down in my base.  I also discovered a godmode command on said page.  I may turned it on to slap a walrus in the face for that thing it did to me once.

 

I get the feeling I should just start anew.  This might not be an easy fix.

Using the spawn codes on the wiki, I put down the four parts annnnd maybe the base too by mistake.  I used the base the game gave me though, not the one I tossed down in my base.  I also discovered a godmode command on said page.  I may turned it on to slap a walrus in the face for that thing it did to me once.

God mode is not an issue. And I don't imagine spawning in Things is too. Spawning the base (the Teleportato) might...

  • Developer

Hmmm. This actually uncovered a crash bug in the game when you are trying to continue a slot that's between levels. If you add the line 

local CharacterSelectScreen = require "screens/characterselectscreen"

to the top of gamelogic.lua it'll fix it. We'll push a real hotfix tomorrow for it tomorrow morning.

If you're playing continuously, that might be enough. But this should be warned on a per save basis. And showing the mods no longer enabled, not all the enabled ones.

Something that you can enable in modmain and then it gets saved, and when you try to load save without that mod game will display a window with warning. Something like that would be optimal and you could decide if your mod needs that or not, cause something like that is needed for mods that add custom items and structures.

Something that you can enable in modmain and then it gets saved, and when you try to load save without that mod game will display a window with warning. Something like that would be optimal and you could decide if your mod needs that or not, cause something like that is needed for mods that add custom items and structures.

Yes, something like that would be optimal (though I think modinfo would be preferable over modmain). I'll make sure to bug Ipsquiggle when he gets back.

Things like that really got on my nerves when working on Up and Away. Since we're not using any standard assets (other than sounds and anims), not even ground types, loading a save currently in the cloud world without the mod enabled just puts the player over an abyss (literally, it's a cave level, so by being groundless the player stands over an abyss). Even the level exit gets erased. So it's very frustrating.

  • Developer

The screens and widgets got moved to their own files / out of global for consistency and to make them easier to mod. I... er... forgot to include that particular screen in that particular file, and it's actually pretty rare for that code path to get executed. Volarath was just lucky, I suppose. :)

I really like that you're transitioning into deeper use of dependencies locally imported through require. It's very Lua >= 5.1 of you ;P. Not to mention it accurately detects dependency cycles, if any, and builds closures around the dependencies (ensuring their persistence).

But of course, code refactoring is always a pain. Things like this are bound to happen, especially in a rare execution flow.

I'm going to blame it on one of the mods I tried out on this character.  I gave this guy everything from a camp fire you could harvest for ash, to a rather classy house, to a glow in the dark (I think) Chester.  I'm just lucky swooped in with your one line fix!

  • Developer

I really like that you're transitioning into deeper use of dependencies locally imported through require. It's very Lua >= 5.1 of you ;P. Not to mention it accurately detects dependency cycles, if any, and builds closures around the dependencies (ensuring their persistence).

But of course, code refactoring is always a pain. Things like this are bound to happen, especially in a rare execution flow.

 

I actually didn't know Lua (beyond what we used in Shank 1 + 2) before this project. We're atoning for some learning sins here. We also integrated 5.1 on like the last day before 5.2 came out. The mod stuff relies upon a bunch of mechanisms that changed in the new version, so we're not going to upgrade it any time soon. Sigh.

I actually didn't know Lua (beyond what we used in Shank 1 + 2) before this project. We're atoning for some learning sins here. We also integrated 5.1 on like the last day before 5.2 came out. The mod stuff relies upon a bunch of mechanisms that changed in the new version, so we're not going to upgrade it any time soon. Sigh.

You mean things like

debug.setmetatable(nil, { __index = function() return nil end })
?

;P

But about the mod stuff, the real hard dependency on 5.1 is setfenv(). However, while it is true that Lua 5.2 no longer cleanly supports changing the environment of an arbitrary function*, it does allow setting the environment of a loaded chunk at the moment it's loaded (using the now universal load() function), which would be enough for loading mod code, as long as the environment setting was bundled with the code loading. Though I noticed you're having to patch the loading functions for NaCl, so maybe pushing a custom loader from C++ wrapping around lua_load (which receives a lua_Reader to control actual IO) would be necessary**.

The compatibility issue at the C API level are much more severe, though, and I can't tell how that might affect you.

But anyway, I'm not suggesting the game should migrate to 5.2. Lua 5.1 is still dominant, and it's quite good. In many aspects I still prefer it. Some things in 5.2 are very nice, such as being able to yield from inside an iterator, or being able to set length, ipairs and pairs metamethods to tables (so that proxy tables can properly be used, implementing access control without breaking all interoperability with the standard library), but overall it's not such a big update if compared to what 5.1 was in respect to 5.0.

* Since in 5.2 the environment is an upvalue (always the first one, actually), that can be done through the debug library. debug.setvalue() serves for basic needs, and a combination of it with debug.upvaluejoin() allows for a reimplementation of setfenv() if need be. This idiom just stopped being directly supported by the language, being moved to the debug library.

** Or, you know, since NaCl isn't moddable this could be ignored for the mod case. But other forms of sandboxing, such as the loading of savedata, might still require it.

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.

×
  • Create New...