Mobbstar Posted September 15, 2014 Share Posted September 15, 2014 when i debug spawn it says can't find prefab myitem. Did you put a "return inst" at the end of the main function (probably the last one)?Did you "return Prefab(blablabla)" at the end of the file?Did you declare it in modmain.lua? Link to comment Share on other sites More sharing options...
Raven Crow Posted September 15, 2014 Share Posted September 15, 2014 Did you put a "return inst" at the end of the main function (probably the last one)?Did you "return Prefab(blablabla)" at the end of the file?Did you declare it in modmain.lua?yes,yes,what should i add in modmain.lua? Link to comment Share on other sites More sharing options...
Mobbstar Posted September 15, 2014 Share Posted September 15, 2014 yes,yes,what should i add in modmain.lua? As stated in the tutorial §1, you should have this table: PrefabFiles = { "myitem",} Link to comment Share on other sites More sharing options...
Raven Crow Posted September 15, 2014 Share Posted September 15, 2014 As stated in the tutorial §1, you should have this table: PrefabFiles = { "myitem",}yes i did.is it possible that i put the folder in the wrong place? Link to comment Share on other sites More sharing options...
Mobbstar Posted September 16, 2014 Share Posted September 16, 2014 yes i did.is it possible that i put the folder in the wrong place? Your mod is a folder in Don'tStarve/mods. In that folder, there is modinfo.lua, modmain.lua and the scripts folder(which contains a prefab folder). Here's a simple path guide: Don'tStarve -> mods -> Mymod (contains modmain.lua and modinfo.lua) -> scripts -> prefabs (contains myitem.lua) You should already know that though. On a side note, it is kinda odd that you have all "local function"s inside of the main function (underneath "local function fn()"). It shouldn't affect the functionality, I think. It's just unusual. Link to comment Share on other sites More sharing options...
FoxKeiser Posted November 17, 2014 Share Posted November 17, 2014 think you could make a tutorial on how to make a craftable item? I've really wanted to make an infinite light source mod with the light source being expensive as all hell to make it, not only an end game item, but the peak of survival (kinda like a trophy if that makes any sense) Link to comment Share on other sites More sharing options...
Mobbstar Posted November 17, 2014 Share Posted November 17, 2014 (edited) think you could make a tutorial on how to make a craftable item? I've really wanted to make an infinite light source mod with the light source being expensive as all hell to make it, not only an end game item, but the peak of survival (kinda like a trophy if that makes any sense)GLOBAL.Recipe("firepit", {Ingredient("log", 2),Ingredient("rocks", 12)}, GLOBAL.RECIPETABS.LIGHT, GLOBAL.TECH.NONE, "firepit_placer")--first thing (firepit) is the thing to craft, then come the ingredients ({Ingredient("stuff",5),etc.}), then comes the recipe tab (light), then the science/magic tier (none, avaible at all times), then the placer (structures only, items don't need this)GLOBAL.Recipe("turf_road", {Ingredient("turf_rocky", 1), Ingredient("boards", 1)}, GLOBAL.RECIPETABS.TOWN, GLOBAL.TECH.SCIENCE_TWO)--this is another exampleThis line of code goes into modmain.lua, but you should download some simple mods to see more examples, and find solutions for any possible issues occuring Edited November 17, 2014 by Mobbstar Link to comment Share on other sites More sharing options...
dnjswns951 Posted December 25, 2014 Share Posted December 25, 2014 I have a problem with creating the swappable build. I got everything else but when I followed all the steps for the swappable build, the image doesn't show up in the game. My inventory image wokrs fine, my ground image workes fine too, but my swappable image just does't show up at all no matter what I try..... When I save my swappable build as "swap_myitem.scml", no window pops up and it just saves it. I think this is way my image doesn't show up,,, but im not sure about it.... could you help me with this?? Link to comment Share on other sites More sharing options...
HomShaBom Posted December 26, 2014 Share Posted December 26, 2014 The swap animation isn't working right for me. When i drag and drop the image onto the canvas in Spriter the pivot circle defaults to the top left corner of the image. I moved it to the handle of the item and saved and did all that junk. When I test it in game the image appears when my character is holding it but instead of holding it where i moved the circle, he's holding it where the top left corner of the image would be. As if i never moved the circle at all and left it in the default position. I reloaded spriter and opened the project to make sure I put the circle in the right place and I did. Link to comment Share on other sites More sharing options...
dungdodger Posted December 27, 2014 Share Posted December 27, 2014 you need to right click on the pivot point it should pop up a window to overwrite the default pivot point so you do then the pivot point will be red like it was before u moved it .. thats what i learned hope it helps Link to comment Share on other sites More sharing options...
Malacath Posted December 28, 2014 Author Share Posted December 28, 2014 ... ... If you have a problem please provide your files, otherwise it is nearly impossible to give you proper help. Link to comment Share on other sites More sharing options...
MikeRobe Posted January 1, 2015 Share Posted January 1, 2015 (edited) Save that file as "myitem.scml", without the ".scml" this will be the name of our build. I'm confused at that part - do I save it first as an scml file and then rename it to .bin?EDIT: Ok, nevermind, I see what you mean.But where do I make my anim.bin file? Edited January 1, 2015 by MikeRobe Link to comment Share on other sites More sharing options...
trocruspi Posted January 3, 2015 Share Posted January 3, 2015 For some reason everything worked fine until I tried to turn it into a weapon. Then the UI disappeared when I tried to Spawn it in. Here's the prefab script.moonsword.lua Link to comment Share on other sites More sharing options...
Somnei Posted January 5, 2015 Share Posted January 5, 2015 Followed the guide, but no zip files are created. I have the same structure as the guide states, but the guide differs from your sample.My game crashes, since it can't find any zip files. What do I do? Link to comment Share on other sites More sharing options...
goldfish911 Posted January 5, 2015 Share Posted January 5, 2015 (edited) Followed the guide, but no zip files are created. I have the same structure as the guide states, but the guide differs from your sample.My game crashes, since it can't find any zip files. What do I do? You must be doing something wrong. I had the same problem. Try starting over, because I don;t think tweaking it makes it start working again.Keep in mind that in the folder "exported" the folders are organized like this:exported >myitem >ground_myitem myitem.scml--note that in a new spriter file created in this directory, you name --entity000 to myitem myitem.png >swap_myitem swap_myitem.scml >swap.myitem myitem.png Edited January 5, 2015 by goldfish911 Link to comment Share on other sites More sharing options...
goldfish911 Posted January 5, 2015 Share Posted January 5, 2015 For some reason everything worked fine until I tried to turn it into a weapon. Then the UI disappeared when I tried to Spawn it in. Here's the prefab script.Learn to find/read your log.txt for don't starve. The UI disappearing indicates the game has crashed, assuming you couldn't use any mouse or keyboard controls except maybe the "open developer console" button. Link to comment Share on other sites More sharing options...
goldfish911 Posted January 5, 2015 Share Posted January 5, 2015 (edited) @Malacath, you should probably mention that the pivot must be right-clicked and overwritten when making the swappable build file, otherwise the item will be held weirdly by the corner in-game. this issue has been addressed several times in the replies to this topic, but you haven't edited it into the OP yet so... Edited January 5, 2015 by goldfish911 Link to comment Share on other sites More sharing options...
Somnei Posted January 5, 2015 Share Posted January 5, 2015 Tried using the sample file and rewriting the prefab and modmain as well as renaming the prefab and replacing the images with my own. I generated a file using the spriter but it still won't let me make a zip file. I'm running win 8, any known issues? Link to comment Share on other sites More sharing options...
goldfish911 Posted January 7, 2015 Share Posted January 7, 2015 Tried using the sample file and rewriting the prefab and modmain as well as renaming the prefab and replacing the images with my own. I generated a file using the spriter but it still won't let me make a zip file. I'm running win 8, any known issues? I am running windows 8 as well...here is a tip to try and fix your problem.You can rename the file "hat_bee_bw_swap.scml"(from the example hat mod) , open it in spriter, change swap_hat_bee_bw in the menu on the right to "swap_youritem", and then put it in any subfolder in "yourmod/exported". Make sure that the folder "swap_hat" and all files in it are moved to that same directory.DO NOT RENAME THE PICTURE FILES OR THE FOLDER "swap_hat" HOLDING THEM BECAUSE THEY ARE REFERENCED IN THE SCML FILE. I made this mistake and broke the compiler, as I think the game was finding the scml file but it couldn't find the directory or pictures the .scml file was telling it to use. Link to comment Share on other sites More sharing options...
kivviz Posted January 7, 2015 Share Posted January 7, 2015 http://forums.kleientertainment.com/topic/48591-problem-with-a-backpack/ You won't help? That not so with a code? Link to comment Share on other sites More sharing options...
Somnei Posted January 7, 2015 Share Posted January 7, 2015 (edited) I am running windows 8 as well...here is a tip to try and fix your problem.You can rename the file "hat_bee_bw_swap.scml"(from the example hat mod) , open it in spriter, change swap_hat_bee_bw in the menu on the right to "swap_youritem", and then put it in any subfolder in "yourmod/exported". Make sure that the folder "swap_hat" and all files in it are moved to that same directory.DO NOT RENAME THE PICTURE FILES OR THE FOLDER "swap_hat" HOLDING THEM BECAUSE THEY ARE REFERENCED IN THE SCML FILE. I made this mistake and broke the compiler, as I think the game was finding the scml file but it couldn't find the directory or pictures the .scml file was telling it to use. Didn't work! But I didn't have the hat_bee_swap.scml since I used the sample in this thread which was a wand. Not that it matters, since I replaced everything and just kept the structure. But yeah, I tried renaming the scml-file and nothing happened.When I start my game the cmd says Traceback (most recent call last): File "..\..\Don't Starve Mod Tools\mod_tools\compiler_scripts\image_build.py",line 110, in <module> process_file_to_atlas() File "..\..\Don't Starve Mod Tools\mod_tools\compiler_scripts\image_build.py",line 85, in process_file_to_atlas assert len( atlas_data ) == 1AssertionErrorERROR: Command failed!'..\..\Don't' is not recognized as an internal or external command,operable program or batch file. Edited January 7, 2015 by SophieTheDog Link to comment Share on other sites More sharing options...
goldfish911 Posted January 8, 2015 Share Posted January 8, 2015 Didn't work! But I didn't have the hat_bee_swap.scml since I used the sample in this thread which was a wand. Not that it matters, since I replaced everything and just kept the structure. But yeah, I tried renaming the scml-file and nothing happened.When I start my game the cmd says Traceback (most recent call last): File "..\..\Don't Starve Mod Tools\mod_tools\compiler_scripts\image_build.py",line 110, in <module> process_file_to_atlas() File "..\..\Don't Starve Mod Tools\mod_tools\compiler_scripts\image_build.py",line 85, in process_file_to_atlas assert len( atlas_data ) == 1AssertionErrorERROR: Command failed!'..\..\Don't' is not recognized as an internal or external command,operable program or batch file. It looks like your mod tools may be broken then? Try verifying tool cache. It seem's it's trying to run a folder name as a program. Link to comment Share on other sites More sharing options...
Donateller1 Posted January 8, 2015 Share Posted January 8, 2015 What should I do to have a folder named "anim"? Link to comment Share on other sites More sharing options...
Gekido2802 Posted January 11, 2015 Share Posted January 11, 2015 I made images for an item, followed the tutorial , had some issue but fixed them , and now all work except that my images are really small in-game. In fact I made a spear but it look like a pencil or a wand when Wilson hold it in his hand. Even the ground image is small but all my images are bigger then for example the normal spear and in-game the normal spear appear really bigger then my own spear... Link to comment Share on other sites More sharing options...
irongollem Posted January 12, 2015 Share Posted January 12, 2015 I got kinda stuck on this one. I'm building a swiss armyknife "swissblade". I copy pasted the code snippets in notepad++ and used the recommented folder tree. When compiling however the autocompiler seems to get stuck somewhere then keeps looking an endless poolworker thing. The spriter steps seemed to work fine. Can anyone enlighten me? Also for some reason when I do the early step of commenting out to at least see the inventory image version is also doesn't work. The debugger/console says it couldn't find refab swissblade (which for some reason is spelled refab instead of prefab)swissblade.zip Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now