Jump to content

My old DS mod - log storage


Recommended Posts

Hello, community!

A few years ago I made a mod - it was a simple log storage that would update its animation depending on the number of logs inside. The building had a 1x5 slot grid. It worked great on the original DS, and since then I've dropped the game.
link: https://steamcommunity.com/sharedfiles/filedetails/?id=477723360


I couldn't adapt my mod to DST. The structure itself appears by crafting, but when I try to interact with the structure's inventory, it crashes always.

I don't understand how the widget system works in DST, how can I make a 1x5 grid. Previously i used that in prefab file:

local slotpos = {   Vector3(0,49+32+8+4,0),
                    Vector3(0,17+4,0),
                    Vector3(0,-(47+4),0),
                    Vector3(0,-(79+32+8+4),0),
                    Vector3(0,-(111+64+16+4),0)}


                    
I need help, because many are asking to transfer the mod to DST. I forgot a lot, and I don't understand how item slots are formed in this game.
My files in attachment.

log.7z

Link to comment
Share on other sites

Whats your error message?

I checked your files and to setup the slots looks good, but that by far not enough. If you create a new container size (and i think your 1x5 is completly new?) then you need to setup the full container widget.

you can check the code example here https://github.com/krylincy/local_casket/blob/master/scripts/prefabs/casket.lua#L64

And if that work, don't forget to add this to the client repica too. It takes me days to figure that out (https://github.com/krylincy/local_casket/blob/master/scripts/prefabs/casket.lua#L139)

Edited by krylincy
Link to comment
Share on other sites

[00:01:01]: [string "scripts/widgets/containerwidget.lua"]:29: attempt to index local 'widget' (a nil value)
LUA ERROR stack traceback:
    scripts/widgets/containerwidget.lua:29 in (method) Open (Lua) <24-149>
    scripts/screens/playerhud.lua:286 in (upvalue) OpenContainerWidget (Lua) <273-288>
    scripts/screens/playerhud.lua:296 in (method) OpenContainer (Lua) <290-298>
    scripts/components/container_replica.lua:311 in (method) Open (Lua) <297-318>
    scripts/components/container_replica.lua:96 in (field) fn (Lua) <88-102>
    scripts/scheduler.lua:177 in (method) OnTick (Lua) <155-207>
    scripts/scheduler.lua:371 in (global) RunScheduler (Lua) <369-377>
    scripts/update.lua:180 in () ? (Lua) <159-238>
    
[00:01:01]: Warning: Widget:SetFocusFromChild is happening on a widget outside of the screen/widget hierachy. This will cause focus moves to fail. Is     ScriptErrorWidget    not a screen?    
[00:01:01]: stack traceback:
    scripts/widgets/widget.lua:605 in (method) SetFocusFromChild (Lua) <602-627>
    scripts/widgets/widget.lua:656 in (method) SetFocus (Lua) <629-665>
    scripts/widgets/scripterrorwidget.lua:107 in (method) OnUpdate (Lua) <102-119>
    scripts/update.lua:90 in () ? (Lua) <33-129>    
[00:01:18]: Warning: Widget:SetFocusFromChild is happening on a widget outside of the screen/widget hierachy. This will cause focus moves to fail. Is     ScriptErrorWidget    not a screen?    
[00:01:18]: stack traceback:
    scripts/widgets/widget.lua:605 in (method) SetFocusFromChild (Lua) <602-627>
    scripts/widgets/widget.lua:624 in (method) SetFocusFromChild (Lua) <602-627>
    scripts/widgets/widget.lua:624 in (method) SetFocusFromChild (Lua) <602-627>
    scripts/widgets/widget.lua:624 in (method) SetFocusFromChild (Lua) <602-627>
    scripts/widgets/widget.lua:656 in (method) SetFocus (Lua) <629-665>
    scripts/widgets/scripterrorwidget.lua:107 in (method) OnUpdate (Lua) <102-119>
    scripts/update.lua:90 in () ? (Lua) <33-129>    
[00:01:18]: Warning: Widget:SetFocusFromChild is happening on a widget outside of the screen/widget hierachy. This will cause focus moves to fail. Is     ScriptErrorWidget    not a screen?    
[00:01:18]: stack traceback:
    scripts/widgets/widget.lua:605 in (method) SetFocusFromChild (Lua) <602-627>
    scripts/widgets/widget.lua:656 in (method) SetFocus (Lua) <629-665>
    scripts/widgets/scripterrorwidget.lua:107 in (method) OnUpdate (Lua) <102-119>
    scripts/update.lua:90 in () ? (Lua) <33-129>    
[00:02:05]: Warning: Widget:SetFocusFromChild is happening on a widget outside of the screen/widget hierachy. This will cause focus moves to fail. Is     ScriptErrorWidget    not a screen?    
[00:02:05]: stack traceback:
    scripts/widgets/widget.lua:605 in (method) SetFocusFromChild (Lua) <602-627>
    scripts/widgets/widget.lua:624 in (method) SetFocusFromChild (Lua) <602-627>
    scripts/widgets/widget.lua:624 in (method) SetFocusFromChild (Lua) <602-627>
    scripts/widgets/widget.lua:656 in (method) SetFocus (Lua) <629-665>
    scripts/widgets/menu.lua:83 in (method) SetFocus (Lua) <74-85>
    scripts/widgets/scripterrorwidget.lua:109 in (method) OnUpdate (Lua) <102-119>
    scripts/update.lua:90 in () ? (Lua) <33-129>    
[00:02:05]: Warning: Widget:SetFocusFromChild is happening on a widget outside of the screen/widget hierachy. This will cause focus moves to fail. Is     ScriptErrorWidget    not a screen?    
[00:02:05]: stack traceback:
    scripts/widgets/widget.lua:605 in (method) SetFocusFromChild (Lua) <602-627>
    scripts/widgets/widget.lua:656 in (method) SetFocus (Lua) <629-665>
    scripts/widgets/scripterrorwidget.lua:107 in (method) OnUpdate (Lua) <102-119>
    scripts/update.lua:90 in () ? (Lua) <33-129>    
[00:02:06]: Warning: Widget:SetFocusFromChild is happening on a widget outside of the screen/widget hierachy. This will cause focus moves to fail. Is     ScriptErrorWidget    not a screen?    
[00:02:06]: stack traceback:
    scripts/widgets/widget.lua:605 in (method) SetFocusFromChild (Lua) <602-627>
    scripts/widgets/widget.lua:624 in (method) SetFocusFromChild (Lua) <602-627>
    scripts/widgets/widget.lua:624 in (method) SetFocusFromChild (Lua) <602-627>
    scripts/widgets/widget.lua:624 in (method) SetFocusFromChild (Lua) <602-627>
    scripts/widgets/widget.lua:656 in (method) SetFocus (Lua) <629-665>
    scripts/widgets/scripterrorwidget.lua:107 in (method) OnUpdate (Lua) <102-119>
    scripts/update.lua:90 in () ? (Lua) <33-129>    
[00:02:06]: Force aborting...
[00:02:06]: [IPC] Sending signal... #00000BAC
[00:02:07]: [IPC] Unregistering handler for signal #00000B98
[00:02:07]: [IPC] Unregistering handler for signal #00000B9C
[00:02:07]: [IPC] Unregistering handler for signal #00000BA0
[00:02:07]: [IPC] Unregistering handler for signal #00000BA4
[00:02:07]: [IPC] Unregistering handler for signal #00000BA8
[00:02:07]: [IPC] Sending signal... #00000BCC
[00:02:08]: [IPC] Unregistering handler for signal #00000BBC
[00:02:08]: [IPC] Unregistering handler for signal #00000BB8
[00:02:08]: [IPC] Unregistering handler for signal #00000BC0
[00:02:08]: [IPC] Unregistering handler for signal #00000BC4
[00:02:08]: [IPC] Unregistering handler for signal #00000BC8
[00:02:08]: [Connect] PendingConnection::Reset(true)
[00:02:08]: PushNetworkDisconnectEvent With Reason: "ID_DISCONNECTION_NOTIFICATION", reset: true
[00:02:08]: Serializing user: session/60DD20258C05B43F/A7MF1MBHTTPJ/0000000001
[00:02:08]: [Steam] Game Connection terminated (2130706433|10999)
[00:02:08]: [Shard] Stopping shard mode
[00:02:08]: ModWorkshop::CancelDownloads clearing all unfinished downloads
[00:02:08]: ModWorkshop::CancelDownloads clearing all unfinished downloads
[00:02:08]: Collecting garbage...
[00:02:08]: lua_gc took 0.03 seconds
[00:02:08]: ~ShardLuaProxy()
[00:02:08]: ~cEventLeaderboardProxy()
[00:02:08]: ~ItemServerLuaProxy()
[00:02:08]: ~InventoryLuaProxy()
[00:02:08]: ~NetworkLuaProxy()
[00:02:08]: ~SimLuaProxy()
[00:02:08]: ModWorkshop::CancelDownloads clearing all unfinished downloads
[00:02:08]: lua_close took 0.04 seconds
[00:02:09]: ModWorkshop::CancelDownloads clearing all unfinished downloads
[00:02:09]: [Steam] Auth ticket cancelled
[00:02:09]: Could not unload undefined prefab (wavyjones_marker)
[00:02:09]: Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. 
[00:02:09]: Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. 
[00:02:09]: Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. 
[00:02:09]: Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. 
[00:02:09]: Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. 
[00:02:09]: Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. 
[00:02:09]: Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. 
[00:02:09]: Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. 
[00:02:09]: Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. 
[00:02:09]: Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. 
[00:02:09]: Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. 
[00:02:09]: Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. 
[00:02:09]: Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. 
[00:02:09]: Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. 
[00:02:09]: Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. 
[00:02:09]: Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. 
[00:02:09]: Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. 
[00:02:09]: Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. 
[00:02:09]: CurlRequestManager::ClientThread::Main() complete
[00:02:09]: HttpClient2 discarded 0 callbacks.
[00:02:09]: Shutting down

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...