Don't Starve

Don't Starve

Auto Equip (reworked)
 This topic has been pinned, so it's probably important
[DBH].Whismerhill.{SSgt}  [developer] 15 Oct, 2016 @ 9:46pm
Bug Reports
Please give as much details as possible :
-either the error message if you got one,
-either the log file error message located above : "LUA ERROR stack traceback" in "Documents\Klei\DoNotStarve\log.txt"
< >
Showing 1-15 of 17 comments
Starry Eyed Zee 31 Oct, 2016 @ 2:05am 
Here's a full log. Shouldn't be too long, as I started a map just to immediately perform the bugged action. holding space with an axe in hand to chop a jungle tree crashed it as soon as the stump got dug up. http://pastebin.com/7hUaTVJf
[DBH].Whismerhill.{SSgt}  [developer] 31 Oct, 2016 @ 2:24am 
Thanks. I'll look into it
Last edited by [DBH].Whismerhill.{SSgt}; 31 Oct, 2016 @ 2:24am
[DBH].Whismerhill.{SSgt}  [developer] 31 Oct, 2016 @ 2:31am 
hum... ok I see the script error :
../mods/workshop-781753556/scripts/auto_equip.lua(253,1) Equip proper tool
../mods/workshop-781753556/scripts/auto_equip.lua(149,1) switch to previous equipped item
...dont_starve/data/scripts/components/tigersharker.lua:187: attempt to index local 'action' (a nil value)
LUA ERROR stack traceback:
C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/components/tigersharker.lua:187 in (method) OnAction (Lua) <185-193>

is it repeatable ? and it happens only on jungle trees ?
Starry Eyed Zee 31 Oct, 2016 @ 7:13am 
I've figured out exactly how to reproduce it and ruled out many things that aren't the cause.

Steps to reproduce:
Have this mod.
Load into a Shipwrecked world.
Have an axe and a shovel in inventory.
Have a spear or battle spear in your hand.
Find an isolated tree.
Hold space all the way through chopping, collecting, and digging up the stump.
Crash!

Variables ruled out:
Character chosen doesn't matter.
Generating a new world doesn't matter.
Other mods don't matter. (disabled all other mods for testing)
Tree type doesn't matter.

But, having a spear in your hand does matter.
Starting with an axe equipped or empty-handed did not cause a crash, but having a spear or battle spear crashed 100% of the time.
Karas 2 Jan, 2017 @ 11:27pm 
plz repair that i love this mod very much thx
Starry Eyed Zee 9 Mar, 2017 @ 3:12am 
Hey, I stopped playing shipwrecked for a while, but when I opened it again, this bugged me again. I think I may have found the solution, though.

So, in auto_equip.lua, digging specifically seems to contain the following line:
wuka.components.playercontroller.autoequip_giveoriginalweapon(wuka)
Other actions don't finish up with that, and I can't find anywhere else in the code that "autoequip_giveoriginalweapon" is mentioned, so I tried commenting that line out. Everything seems to work fine now. I'm not sure if I'm destroying some intended functionality, but it fixed it for me.

I'll play a bit more and post again if any emergent issues pop up.
The Baconeer 1 May, 2017 @ 11:39am 
As requested, this is my crash log from yesterday regarding your AutoEquip mod (which I enjoy thoroughly, less so the crashing :p): https://pastebin.com/hdPpHt3p
The Baconeer 1 May, 2017 @ 11:47am 
Courtesy of the comment above my last one I found some code strings that seem odd to me (or maybe they're not and this is just a guess at first blush). It's this bit here:

playercontroller.inst.components.locomotor.atdestfn = function( salf ) if not salf or not tool then return end print("Equip proper tool") salf.components.locomotor:PushAction(BufferedAction(salf, nil, ACTIONS.EQUIP, tool), true) -- salf.components.locomotor:PushAction(BufferedAction(salf, target, salf.autoequip_actiontodo), true) if( salf.autoequip_actiontodo == ACTIONS.DIG ) then if not target.components.workable.autoequip_onfinish then target.components.workable.autoequip_onfinish = target.components.workable.onfinish end target.components.workable.onfinish = function( self, wuka ) --wuka.components.playercontroller.autoequip_giveoriginalweapon(wuka) self.components.workable.autoequip_onfinish(self,wuka) end end salf.autoequip_actiontodo = nil return end

Forgive me if it's not wrong in the slightest, but, wherever it says "salf", is that meant to be "self"? If so, that could be the root of some issues, as I notice this too is related to digging. And the simplest mistake in code can just make the whole thing explode under the right circumstances.
Starry Eyed Zee 1 May, 2017 @ 12:51pm 
I have played quite a bit with the line mentioned simply deleted, and everything seems to work exactly as intended.
[DBH].Whismerhill.{SSgt}  [developer] 1 May, 2017 @ 1:15pm 
@The Fish Slapper
it seems like you do not have the latest version of this mod

edit: just verified by subscribing to my own mod, the line that starts with wuka is commented out in the latest version like it is in the version I uploaded. so everything's fine and your version is outdated for some reason unknown to me.

if don't starve is not updating the mod by going into your mods list
then please unsubscribe, launch the game, go into mods, exit the game, resubscribe, and go into mods again
this should hopefully update your version to the latest.

---------------------------
if you look at the file :
modinfo.lua
you should see the following :
name = "Auto Equip whis"
version = "0.4.8"

and inside your mods it should say version 0.4.8 too
Last edited by [DBH].Whismerhill.{SSgt}; 1 May, 2017 @ 1:25pm
The Baconeer 1 May, 2017 @ 3:12pm 
So even after updating to the most recent version, I still got an exception error (this time it was specifically a spacebar-use shovel action on a sandy pile), as seen here: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=917472675

And for good measure, here's the log.txt file right after the crash.
https://pastebin.com/qykPwaGJ
The Baconeer 1 May, 2017 @ 3:12pm 
To be even MORE specific, it occurred on the second dig action of the sandy pile. The first one finished just fine. The second caused the crash.
[DBH].Whismerhill.{SSgt}  [developer] 1 May, 2017 @ 4:04pm 
ugh ok thanks lol
EDIT: version 0.4.9 uploaded

EDIT2: I'm sorry if it's overly annoying to deal with this.... This is code I didn't write originally and I never understood why there's an exception for shovelling to begin with in this part of the code (which is when it equips anything that was decided in previous code). And generally developpers do stuff for a good reason even if it escapes me :) (though not always, but the original autoequip had pretty good code overall :) )
Last edited by [DBH].Whismerhill.{SSgt}; 1 May, 2017 @ 4:20pm
JustJasper 17 Jan, 2018 @ 3:11pm 
Error when trying to build the "encrusted boat" in shipwrecked, log points to this mod.

https://pastebin.com/zk9PQwLy
[DBH].Whismerhill.{SSgt}  [developer] 18 Jan, 2018 @ 3:44am 
I'm not so sure jasper :
here's the reason why it crashed :
scripts/mainfunctions.lua(124,1) Can't find prefab encrustedboat_placer

and imho here's the reason why it's not loaded/can't find it :
[...]
Could not preload undefined prefab 0xb070dece (OUTOFSPACE)
Could not preload undefined prefab 0xb070dece (OUTOFSPACE)
Could not preload undefined prefab 0xc8b38691 (OUTOFSPACE)
Could not preload undefined prefab 0x6170f8be (OUTOFSPACE)
Could not preload undefined prefab 0xeee6ebd (encrustedboat)
Could not preload undefined prefab 0x574d9e6d (encrustedboat_placer)

edit:
I'm not sure what's causing it in your load order (if it's even repeatable)
but memory spike fix was removed from the workshop by simplex for a reason imho.

edit2: could also be a hardware limit ... or not
Last edited by [DBH].Whismerhill.{SSgt}; 18 Jan, 2018 @ 4:01am
< >
Showing 1-15 of 17 comments
Per page: 1530 50