Jump to content

What is .tex and .xml files for and how do I get them?


Recommended Posts

Looking at some mods, they has .tex and .xml file. What are they, why do I need them and how do I get? Trying to make item mod, but not find any info about making item mod so quite difficult taking what I know.

image.png.62037a31aaaa36692f3b85c0291a9332.png

image.png.0bbacaf7b7bf6d4036cf3d147d728abd.png

So far the item not even spawn in game with console :( am I missing something else?

Link to comment
Share on other sites

There are tutorials in the tutorial sections for something just like this. See my newcomer post for a lot more info on starting out with modding. Here's a link to a thread about the TEX tool used to convert between TEX and PNG files.

In short, the TEX files are textures, and the XML files next to them with the same name tell the game how to read the textures. Since a texture can have several images on it, the XML files is a catalog relating IDs with certain parts of the texture.

Link to comment
Share on other sites

@Ultroman I think I did everything need for item, but it is not spawning. .tex and .xml file were generated on their own it look like. I have;

* modinfo.lua done correctly

* modmain has examine and name of prefab file, and also necessary globals declare

* prefab lua file in scripts/prefabs

* put .scml animation with texture file and folder in exported

* item texture in images/inventoryimages

* game compiler put .text and .xml files in images/inventoryimages and I have anim folder but is empty, no zip file

But when I try spawn item in game it not show up, what to do? I did have mod enabled, do I need do anything else?

Link to comment
Share on other sites

Look in the newcomer post in the section about debugging. Your logs will probably show what's wrong. There will likely be an error pertaining to textures preventing your item from showing up, or another error keeping the mod from being loaded entirely.

Usually, the problem is with some reference. The filenames and the references to them are case-sensitive, and must be correct in both the filename, the XML file and the references to them in the LUA files in the mod.

Take a look for yourself through the logs and your references. It's a great learning experience :) If you want to mod, this is going to be a big part of your life. If you can't fix it with reasonable effort, return here with your findings, and drag'n'drop your logs onto your reply so we can have a look. A zipped copy of your mod would also be very helpful.

Link to comment
Share on other sites

You can see the paths at the top of your blackbox.lua file. Indeed, the blackbox.zip is residing in the exported\blackboxitem folder instead of the anim folder.

If it doesn't work with the anim placed correctly, please attach your logs after trying to start a server with the mod on and trying to spawn the item.

Link to comment
Share on other sites

1 hour ago, Ultroman said:

You can see the paths at the top of your blackbox.lua file. Indeed, the blackbox.zip is residing in the exported\blackboxitem folder instead of the anim folder.

What are you talking about? Path is set to anim not exported at top of blackbox.lua

image.png.60da9ffdf783aca264adf0c93f7faea9.png

I don't understand problem, what do I need to do?

Here is log

image.thumb.png.c6732c8aa724a974f3e19d600e7ae838.png

 

You can test this yourself too, that is why I gave you zip file, I don't know why it not working!

Link to comment
Share on other sites

9 hours ago, Charsis said:

What are you talking about? Path is set to anim not exported at top of blackbox.lua

image.png.60da9ffdf783aca264adf0c93f7faea9.png

Exactly, the reference says it should be in the anim folder, but it isn't.

5cb5bac8d6bd1_2019-04-1613_20_08-Window.png.43f4dba4feb546f27a54b3d70f6951f8.png

5cb5bad61c91e_2019-04-1613_20_20-Window.png.2f681abd1b714ec6eec3fcc63641207b.png

The zip file should be in the anim folder.

Link to comment
Share on other sites

@Ultroman okay weird, yesterday took out animation zip and put in anim folder, then took out exported folder and it not working, but now it is. Look like mod not working because it set to not compatible with other things than Hamlet, Klei not updated mod compatibility for Hamlet list

image.png.029c04688f77cf6328462573445cc3a0.png

But item invisible when dropped on ground, any idea how to give ground image to it?

Link to comment
Share on other sites

15 minutes ago, Charsis said:

@UltromanBut item invisible when dropped on ground, any idea how to give ground image to it?

This is usually also a problem with references between LUA files, images and XML files, or something like it. I can't find anything immediately wrong in your references. Take a look at the bulleted list in my newcomer post, and find the CactusArmor.zip. It is the simplest possible way to set up a fully functional armor, with all textures working. Compare the code for that against what you have (ignoring the armor-component), and you should quickly find what the difference is.

Link to comment
Share on other sites

Ok, found issue for item on ground not visible; the item play anim when on ground always, never use texture and the Bank/Build was set to the item I names it to in the lua file, but on spriter scml file the entity was not renamed so I need to rename it correctly. Now it find the correct anim to play for it and works :)

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