Jump to content

Can't Display Preview Image For Mod / Crashing When Enabled


Gathouria

Recommended Posts

So I'm just starting out on mods and trying to learn with a test example, but I'm having trouble with my preview image.

Current file setup:
- I have an empty modmain
- my modinfo follows the same structure I'm seeing on dontstarveapi
- I have a 512x512 image (a size I've believe I'm seeing other mods use) converted to TEX from a PNG using TEXCreator for my modicon.tex
- my modicon.xml is copied from dontstarveapi and double checked with current mods, with the reference to the .tex changed. I just made this in notepad.

The problem:
When I include the icon_atlas = "modicon.xml" line in my modinfo.lua and try to open the mods page on DS, the whole game crashes. Commenting out this line seems to let it work fine, though of course no image will show. Anyone know what's up?

Link to comment
Share on other sites

Well heres a tip on making the tex file and xml file of modicon without the tool as its easier to do. Place the modicon png inside a images mod file, could be a character mod, a item mod or some sort of mod with images folder present. From there run the autocompiler from the game and move the tex and xml file back to the main directory. But if your not interested in that then for the tex tool (1.2.0) you'll need to use the texcreator (different from textool) and use the following settings: pixel format: DXT5 texture type: 1D, mipmap resize filter: default, uncheck generate mipmaps if it has a check . The old textool is a bit outdated and has a tendency to crash pretty often so heres the 1.2.0 version:

the old ones settings where: pixel format: DXT5 texture type: 2D, mipmap resize filter: default, uncheck generate mipmaps and pre-multiply alpha. Last note the old textool will need the mipmaps and pre-multiply alpha unchecked constantly when opening it up (hint crashes often). And heres a modicon.png if you don't have one.

modicon.png

Link to comment
Share on other sites

Thank you so much! I got the tool to work just fine now. I have a mod with an images folder, but don't see how to autocompile it though.

As a broader question if you happen to know, is there a more updated source where info is kept for the API? I'm having trouble seeing where I can find a list of all the inst. and GLOBAL. items and other things in the files. (I'm assuming they're somewhat different between DS and DST?)

Link to comment
Share on other sites

The autocompiler always runs when you launch the game, its the black box that looks like it spits out lots of words really quickly. You can also activate it if you download the tool from steam under library-tools-don'tstarvemodtools and from that download you go to:

C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Mod Tools\mod_tools\autocompiler.exe

makes it easier to compile without running the game multiple times. As for the second question im not sure where they are can't help you there, other than that there is a difference in coding for DS and DST (DS is older and more manual). DST is updated and is more...efficient in terms of length and flexiblity at times, other than that you could go to the dst mod forums (we're in the ds mod forums) and ask around.

Link to comment
Share on other sites

You don't have to load the game slot, auto-compilers usually run in the beginning of most programs so that the files are ready to load when the program actually starts. Unless you closed the black box window to stop the compiler early, then what ever your trying to compile isn't being picked up for the following reasons: the file whether scml or png isn't in the following folders(bigportaits, exported,images) that the compiler is picky about, the compiler may bug and not see the png/scml so re-edit the file (doesn't have to be much just small erase undo and overwrite) and try again, the file you're trying to compile may not be png/scml as thats mainly what the compiler recognizes (not .bmp,.jpeg,.gif and such) or some other small overlooked error. Also not good practice to put files in workshop (other mods) folders as sometimes they get refreshed and what ever you put in there will be erased.

Link to comment
Share on other sites

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...