饥荒联机版

饥荒联机版

Extra Equip Slots
NubsPixel  [开发者] 2015 年 4 月 25 日 下午 10:23
Please, submit your crash log
If you still crash in any way.
1. Please browse to your DST log. Do NOT re-open DST, this will delete the current crash log. The file should be located in
Documents\Klei\DoNotStarveTogether\log.txt
.2. Open the file.
3. Copy the whole content. (Ctrl + A, then Ctrl + C)
4. Open Pastebin[pastebin.com]
5. Paste into the text box. (Ctrl + V)
6. Click Submit (scrolll down a bit).
7. Copy the URL (on the browser).
8. Paste the URL in the comments here.

My logs sample: http://pastebin.com/1g4c6nQw
最后由 NubsPixel 编辑于; 2015 年 4 月 25 日 下午 10:24
< >
正在显示第 1 - 15 条,共 47 条留言
Deja Vu 2015 年 4 月 27 日 下午 5:54 
Here is the crash log: http://pastebin.com/hvC7P9BZ
NubsPixel  [开发者] 2015 年 4 月 28 日 上午 4:28 
@Deja Vu
[00:02:21]: [string "scripts/widgets/uiclock.lua"]:155: invalid number of time segs
LUA ERROR stack traceback:
=[C]:-1 in (global) assert (C) <-1--1>
scripts/widgets/uiclock.lua:155 in (method) OnClockSegsChanged (Lua) <151-180>

As far as i know, i did not implement any "uiclock" in any of my mods. Do you have any mods that changes time/clock specifically?
Braff Zacklin 2015 年 5 月 4 日 上午 2:42 
Hey got this crash today - http://pastebin.com/MvKeBUXD
NubsPixel  [开发者] 2015 年 5 月 4 日 上午 9:34 
@sam, says on the log: [string "../mods/workshop-388109833/data/components/..."]:6: attempt to index local 'item' (a nil value)

based on the url: http://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=388109833 its caused by another mod. Its probably a compatibility issue with my mod. Not really sure. I don't really have the time to test it today.
Braff Zacklin 2015 年 5 月 4 日 下午 3:20 
Thank you for the info :)

Removing that character mod seems to have fixed the problem.
最后由 Braff Zacklin 编辑于; 2015 年 5 月 4 日 下午 3:28
DJSassySam 2016 年 4 月 19 日 下午 6:35 
Was hosting a dedicated server with the same mods I've been using for months now. Dedicated server crashed and linked this mod as the cause. The game just updated today too. Maybe they changed something and now this mod doesn't work with it anymore? I've never had any problems up until now.

Here's my LUA error:

[00:08:21]: [string "scripts/components/playerinspectable.lua"]:3: calling 'SetPlayerEquip' on bad self (number expected, got nil)
LUA ERROR stack traceback:
=[C]:-1 in (method) SetPlayerEquip (C) <-1--1>
scripts/components/playerinspectable.lua:3 in (local) fn (Lua) <2-4>
scripts/entityscript.lua:960 in (method) PushEvent (Lua) <954-977>
scripts/components/inventory.lua:833 in (upvalue) original_Equip (Lua) <765-840>
../mods/workshop-375850593/modmain.lua:66 in (method) Equip (Lua) <65-77>
scripts/components/builder.lua:382 in () ? (Lua) <344-439>
=(tail call):-1 in () (tail) <-1--1>
scripts/bufferedaction.lua:24 in (method) Do (Lua) <20-34>
scripts/entityscript.lua:1234 in (method) PerformBufferedAction (Lua) <1226-1244>
scripts/stategraphs/SGwilson.lua:2819 in (field) ontimeout (Lua) <2816-2820>
scripts/stategraph.lua:550 in (method) UpdateState (Lua) <536-580>
scripts/stategraph.lua:607 in (method) Update (Lua) <599-627>
scripts/stategraph.lua:125 in (method) Update (Lua) <109-148>
scripts/update.lua:209 in () ? (Lua) <150-223>

It crashed three times in our playthroughs. Once when I equipped a life giving amulet, the other two were when I equpped a backpack. This is the most recent log I could pick out.
最后由 DJSassySam 编辑于; 2016 年 4 月 19 日 下午 6:37
Ciphered Entity 2016 年 4 月 19 日 下午 6:39 
Hey this mod seems to crash my older world but if I make a new world it works just fine, this is after the update that happened today. Here is my log and a screenshot of the old server and the new server, showing how one won't work and the other will.

https://www.dropbox.com/sh/wh7f4gl32my9pr2/AADwB8cRIn8cAjNqe1Yfx5o7a?dl=0
Muche 2016 年 4 月 20 日 上午 1:50 
The recent incompatibility is due to EQUIPSLOT_IDS table creation moving from components/playerinspectable.lua to constants.lua.
Recreating the table
GLOBAL.EQUIPSLOT_IDS = {} local slot = 0 for k, v in pairs(GLOBAL.EQUIPSLOTS) do slot = slot + 1 GLOBAL.EQUIPSLOT_IDS[v] = slot end slot = nil
after custom equip slots are added seems to help.
最后由 Muche 编辑于; 2016 年 4 月 20 日 上午 5:37
EverstillTV 2016 年 4 月 20 日 上午 4:49 
http://pastebin.com/jtwNu9qM

I can restart the server, the loading screen comes up for a little bit, then freezes and the error shows on the screen, then the .exe closes the game.
最后由 EverstillTV 编辑于; 2016 年 4 月 20 日 上午 5:04
Jon 2016 年 4 月 20 日 上午 5:53 
引用自 Muche
The recent incompatibility is due to EQUIPSLOT_IDS table creation moving from components/playerinspectable.lua to constants.lua.
Recreating the table
GLOBAL.EQUIPSLOT_IDS = {} local slot = 0 for k, v in pairs(GLOBAL.EQUIPSLOTS) do slot = slot + 1 GLOBAL.EQUIPSLOT_IDS[v] = slot end slot = nil
after custom equip slots are added seems to help.
Thanks:steamhappy:, it work, put this code in this mod's modmain.lua file
like:
GLOBAL.EQUIPSLOTS= { HANDS = "hands", HEAD = "head", BODY = "body", BACK = "back", NECK = "neck", } GLOBAL.EQUIPSLOT_IDS = {} local slot = 0 for k, v in pairs(GLOBAL.EQUIPSLOTS) do slot = slot + 1 GLOBAL.EQUIPSLOT_IDS[v] = slot end slot = nil
star 2016 年 4 月 20 日 上午 8:16 
:fix: Elegant (compatible with any other good mods):
if GLOBAL.rawget(GLOBAL,"EQUIPSLOT_IDS") ~= nil then local new = {"back", "neck"} local slots = #GLOBAL.EQUIPSLOT_IDS for i, v in ipairs(new) do if GLOBAL.EQUIPSLOT_IDS[v] == nil then slots = slots + 1 GLOBAL.EQUIPSLOT_IDS[v] = slots end end end
最后由 star 编辑于; 2016 年 4 月 20 日 上午 8:22
Muche 2016 年 4 月 20 日 上午 8:33 
@star, yes, except it assigns new numbers to the new slots, as opposed to mixing them all.
I'm not sure if this matters somewhere else in the code, for example components/equippable_replica.lua does its own numbering.
最后由 Muche 编辑于; 2016 年 4 月 20 日 上午 8:35
star 2016 年 4 月 20 日 上午 11:40 
@Muche, I didn't test it. Okay. How about this?
local _G = GLOBAL if _G.rawget(_G,"EQUIPSLOT_IDS") ~= nil then local new = {"back", "neck"} local slots = #_G.EQUIPSLOT_IDS for i, v in ipairs(new) do if _G.EQUIPSLOT_IDS[v] == nil then slots = slots + 1 _G.EQUIPSLOT_IDS[v] = slots end end local FindUpvalue = function(fn, upvalue_name, member_check, no_print) local info = _G.debug.getinfo(fn, "u") local nups = info and info.nups if not nups then return end local getupvalue = _G.debug.getupvalue local s = '' for i = 1, nups do local name, val = getupvalue(fn, i) s = s .. "\t" .. name .. ": " .. type(val) .. "\n" if (name == upvalue_name) and ((not member_check) or (type(val)=="table" and val[member_check] ~= nil)) then return val, true end end if no_print == nil then print("CRITICAL ERROR: Can't find variable "..tostring(upvalue_name).."!") print(s) end end local replica = GLOBAL.require "components/equippable_replica" local EQUIPSLOT_NAMES = FindUpvalue(replica.EquipSlot, "EQUIPSLOT_NAMES", 1) local EQUIPSLOT_IDS = FindUpvalue(replica.SetEquipSlot, "EQUIPSLOT_IDS", "head") if EQUIPSLOT_NAMES == nil or EQUIPSLOT_IDS == nil then print("EXTRA EQUIP SLOTS ERROR") return else for j,v in ipairs(_G.EQUIPSLOT_IDS) do EQUIPSLOT_NAMES[j] = v EQUIPSLOT_IDS[v] = j end end end
http://pastebin.com/cGCGzVt9
P.S. I didn't test it too. But it's self testing code. :D
最后由 star 编辑于; 2016 年 4 月 20 日 上午 11:45
Deja Vu 2016 年 4 月 20 日 下午 12:19 
@star
Is all this necessary? Muche already provided a fix that works fine. Author just needs to update the mod.
Urusai47 2016 年 4 月 20 日 下午 12:31 
When I die I still get the same error even with the fix. But equiping works
最后由 Urusai47 编辑于; 2016 年 4 月 20 日 下午 12:31
< >
正在显示第 1 - 15 条,共 47 条留言
每页显示数: 1530 50