Jump to content

How To Add Mod Icon?


yildirim

Recommended Posts

Edit: Fixed.

 

For those who doesn't know how to add an icon, first download Matt's Tools. Then prepare an 256x256 icon. Convert it to .tex format by the tools. Copy paste it to your mod folder. Then start a new .xml file and name it your icon's name. After that, open it and write this:

 

 

<Atlas><Texture filename="ICON.tex" /><Elements><Element name="ICON.tex" u1="0.001953125" u2="0.998046875" v1="0.001953125" v2="0.998046875" /></Elements></Atlas>

 

Then open your modinfo.lua and change those according to your icon and xml files:

 

---- Can specify a custom icon for this mod!
--icon_atlas = "ICON.xml"
--icon = "ICON.tex"

 

Don't forget to delete --. That's it!

Link to comment
Share on other sites

For those reading this thread in future, I will explain.

 

If you have the Don't Starve Modding Tools (Available in the Tools tab in Steam, Windows only), then when you launch Don't Starve the autocompiler will generate a converted TEX file, and an appropriate XML file, for each PNG in your mod. In other words, just use PNGs for your images, and the game will convert them as required (The code still needs to reference the TEX and XML files).

 

It is general practice to store the mod's icon in "modicon.tex", although technically you can use any file name, if you change the reference in "modinfo.lua".

Link to comment
Share on other sites

No dice.

 

The compiler is creating the .tex and .xml in the images folder, but when I go into the mods menu in-game, the image is still blank. 

I even made sure I went into modinfo.lua and changed the directory to the images folder.

All of this is weird, since it always was in the core folder, and worked without issue.

All of a sudden, nothing worked at all.

 

I have no idea what the issue is.

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