Charsis Posted April 15, 2019 Share Posted April 15, 2019 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. So far the item not even spawn in game with console am I missing something else? Link to comment Share on other sites More sharing options...
Ultroman Posted April 15, 2019 Share Posted April 15, 2019 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 More sharing options...
Charsis Posted April 15, 2019 Author Share Posted April 15, 2019 @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 More sharing options...
Ultroman Posted April 15, 2019 Share Posted April 15, 2019 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 More sharing options...
Charsis Posted April 15, 2019 Author Share Posted April 15, 2019 Where and how do I define what prefab name actually? Log just say it cannot find my prefab and I checked all files, it is named correct. Link to comment Share on other sites More sharing options...
Ultroman Posted April 15, 2019 Share Posted April 15, 2019 At the bottom of your prefab's LUA there should be a call to a function called Prefab e.g. return Prefab("PREFABNAME", blablabla Maybe your folder structure is wrong. Link to comment Share on other sites More sharing options...
Charsis Posted April 16, 2019 Author Share Posted April 16, 2019 @Ultroman attached is zip file, I don't know what is wrong and it look like game compile zip folder in wrong place testingitem.zip Link to comment Share on other sites More sharing options...
Ultroman Posted April 16, 2019 Share Posted April 16, 2019 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 More sharing options...
Charsis Posted April 16, 2019 Author Share Posted April 16, 2019 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 I don't understand problem, what do I need to do? Here is log 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 More sharing options...
Ultroman Posted April 16, 2019 Share Posted April 16, 2019 9 hours ago, Charsis said: What are you talking about? Path is set to anim not exported at top of blackbox.lua Exactly, the reference says it should be in the anim folder, but it isn't. The zip file should be in the anim folder. Link to comment Share on other sites More sharing options...
Ultroman Posted April 16, 2019 Share Posted April 16, 2019 It will not create the prefab if it cannot find (certain ones of) the referenced files, so that's why your prefab isn't being imported into the game, and thus it tells you that the prefab cannot be found. Link to comment Share on other sites More sharing options...
Charsis Posted April 16, 2019 Author Share Posted April 16, 2019 @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 But item invisible when dropped on ground, any idea how to give ground image to it? Link to comment Share on other sites More sharing options...
Ultroman Posted April 16, 2019 Share Posted April 16, 2019 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 More sharing options...
Charsis Posted April 16, 2019 Author Share Posted April 16, 2019 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 More sharing options...
Ultroman Posted April 16, 2019 Share Posted April 16, 2019 Awesome! Congratulations Link to comment Share on other sites More sharing options...
Recommended Posts
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.