Sign in to follow this  

[SOLVED] Widget background doesnt show up

Recommended Posts

Narmor    15

SOLVED: My Problem was solved. If you encounter the same problem have a look at

If a mod reads this: you are welcome to close the thread.



Hey Guys,

I have a custom container prefab for which i have created a custom widget spriter animation. But when I try to load the widget it just doesnt show up. I have done the following:

Spriter setup:


This is my exported Folder:



This is my anim folder:




this is the import of my asset:

Assets =
    Asset( "IMAGE", "images/inventoryimages/sorter.tex" ),
    Asset("ATLAS", "images/inventoryimages/sorter.xml"),

    Asset( "IMAGE", "images/inventoryimages/sortreceivingchest.tex" ),
    Asset("ATLAS", "images/inventoryimages/sortreceivingchest.xml"),

    Asset("ATLAS", "minimap/sorter.xml" ),
    Asset("ATLAS", "minimap/sortreceivingchest.xml" ),
    Asset("ANIM", "anim/"),


and this is the setup of my widget:

widget =
		slotpos = {},
		animbank = "ui_toolrack_3x6",
		animbuild = "ui_toolrack_3x6",
		pos = Vector3(200,0,0),
		side_align_tip = 100,
	acceptsstacks = false,
	type = "chest",
	itemtestfn = function(container, item, slot)
		if item ~= nil then
			if item.sortCategory == modConstants.TOOLTAG or  item.sortCategory == modConstants.WEAPONSTAG or item.sortCategory == modConstants.ARMORTAG or item.sortCategory == modConstants.CLOTHESTAG then
				return true
		return false
for y = 6, 1, -1 do
	for x = 0, 2 do
		table.insert(customWidgets.sortreceivingequipmentbox.widget.slotpos, Vector3(80*x-80*2+80, 80*y-80*6+80,0))


Eveything seems to be working fine, except that it looks ingame like this (the widget background is missing):



And I dont understand why it doesnt work. I decompiled the ui_chest_3x3 to have a look how the widgetbackground is set up and created my spriter file in a similar way. I have googled and tried out things for the last 3 hours, but couldnt find anything.

The only thread i found similar to my problem was this one: 

But no one ever answered and it got archived.

Has anyone has ever had this problem and knows how to fix it? I think it is a problem with my spriter file, because when i copy custom container backgrounds from other mods (like "storm cellar" or "bigger Chests") they do work and are displayed. I would be very thankful for help. I attached my spriter file with the images as zip.


Edited by Narmor

Share this post

Link to post
Share on other sites
Maris    233

Try to decompile background from  "storm cellar" and compile again. See what's wrong. Try again etc.

If recompilation was successful, try change name. See what's wrong. Etc.

If success, change picture and size etc etc.

Every time make only one single small step.

Edited by Maris

Share this post

Link to post
Share on other sites
Narmor    15

Hey Maris, thanks for your reply.

I did the following:

Test the original "Storm Cellar" art. Its working and looks like this:


So everything is fine. The original is attached as "".

Afterwards I decompiled(using ktools 4.4.4) the original. You can find the contents in "DECOMPILED_ui_largechest_5x5.rar".

Then, without even touching any of the Files that came out of the decompillation process I recompiled it, using the autocompiler from the newest version of the dont starve mod tools on steam.

Then it looks like this:


Which means during these steps it must have broken:

Original -> decompile -> compile

You can find the recompiled data in the attachment "". For some reason the recompiled zip is 13kb smaller than the original one. Which might hint at some kind of loss during that process.


My completely self created animation isnt working either, which means the following workflow produces the same error:

NewSciterAnimationForWidget -> compile


So my assumption would be, that there is something wrong with the compiler. BUT! all other self made animations are working totally fine. Which would mean, that the compiler works fine. So how come its only broken when I try to use it for a widget? It must be some king of special requirements for widgets thats not needed for normal prefab animations. I tried searching for those requirements, but couldnt find any. Does someone have an idea why it is like this?


Share this post

Link to post
Share on other sites
Narmor    15

Hey Ricoom, thank you for your answer. I was very stupid and you gave such an obviously simple hint I didnt think of, so that having a look into the logs solved my problem.

The log stated the following:

[00:00:43]: Could not find anim [open] in bank [ui_largechest_5x5]

From which I assumed that


was wrong. In the beginning I assumed that the names of the bank had to be like that because they were like that in the decompiled Spriter file. They must be "Open" and "Close". If not named like that the widget animation build will not work. So I changed the bank names as following:



and surprise (i mismeasured the size of the graphic, but at least now my custom anim works):



So this issue is solved. Thanks a lot for you replies!

Edited by Narmor

Share this post

Link to post
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
Sign in to follow this