AnimeOfTheArts Posted January 21, 2015 Share Posted January 21, 2015 so my problem is this, i have an item, that is required for most of the other items you can make. i can make this item just fine, however, when i go to make the other items, the original item i made does not have a picture in the crafting box for the other items, and it does not detect i have the original item in my inventory. so i am missing something in my modmain, but i do not know what. also, the items in question are health related, but i am not sure how to tell the game the exact amount of health each item needs to give. some help would be greatly appreciated. Link to comment https://forums.kleientertainment.com/forums/topic/49487-missing-script-for-uncalled-item-beginner-help/ Share on other sites More sharing options...
SeriousCreeper Posted January 21, 2015 Share Posted January 21, 2015 Not quite sure i fully understand your first issue (and i am also new to modding so i might be wrong) but defining the crafting item is done like this: local furnace = GLOBAL.Recipe("furnace",{Ingredient("rocks", 16),},RECIPETABS.TOWN, TECH.SCIENCE_ZERO, "furnace_placer" ) -- This is used for the iventory iconfurnace.atlas = "images/inventoryimages/furnace.xml" I just have an image in the images/inventory furnace with the same name as the item i added. About the healing bit, looking at the healingsalve file, it seems like you need this: inst:AddComponent("healer")inst.components.healer:SetHealthAmount(TUNING.HEALING_MED)Instead of using TUNING.HEALING_MED you can just use any numeric number. Hope that helps a bit! Link to comment https://forums.kleientertainment.com/forums/topic/49487-missing-script-for-uncalled-item-beginner-help/#findComment-604575 Share on other sites More sharing options...
AnimeOfTheArts Posted January 22, 2015 Author Share Posted January 22, 2015 (edited) Not quite sure i fully understand your first issue (and i am also new to modding so i might be wrong) but defining the crafting item is done like this: local furnace = GLOBAL.Recipe("furnace",{Ingredient("rocks", 16),},RECIPETABS.TOWN, TECH.SCIENCE_ZERO, "furnace_placer" ) -- This is used for the iventory iconfurnace.atlas = "images/inventoryimages/furnace.xml" I just have an image in the images/inventory furnace with the same name as the item i added. About the healing bit, looking at the healingsalve file, it seems like you need this: inst:AddComponent("healer")inst.components.healer:SetHealthAmount(TUNING.HEALING_MED)Instead of using TUNING.HEALING_MED you can just use any numeric number. Hope that helps a bit! so instead of inst:AddComponent("healer")inst.components.healer:SetHealthAmount(TUNING.HEALING_MED)itsinst:AddComponent("healer")inst.components.healer:SetHealthAmount(TUNING.HEALING_14)for a specific number? also i have the proper script for crafting the item, it calls for butterfly wings just fine, the problem is in the other item i made in the mod, if it makes more seance i will add names i craft crushed pestles, i can craft this just fine with no problems, i now have crushed pestles in my inventory, however when i try to craft an item that required crushed pestles, the image in the crafting box that is meant for crushed pestles is missing, and it doesn't detect i even have the item in my inventory. so its not a problem with the recipe itself, its a problem of me missing something in the modmain, that stops crushed pestles from being called for, or making what i have in my inventory something different from what is needed for the recipe. Edited January 22, 2015 by AnimeOfTheArts Link to comment https://forums.kleientertainment.com/forums/topic/49487-missing-script-for-uncalled-item-beginner-help/#findComment-604758 Share on other sites More sharing options...
bigpak Posted January 22, 2015 Share Posted January 22, 2015 I have had this issue as well, I am interested in watching this topic. I will look into it and post if I can figure it out. Link to comment https://forums.kleientertainment.com/forums/topic/49487-missing-script-for-uncalled-item-beginner-help/#findComment-604926 Share on other sites More sharing options...
SeriousCreeper Posted January 22, 2015 Share Posted January 22, 2015 (edited) It would be like this: inst:AddComponent("healer")inst.components.healer:SetHealthAmount(14)The "TUNING.HEALING_MED" is just a reference to a number. About the image thing, i'm not quite sure why it wouldn't show up (again, i'm new to modding too heh) but i think you need to take care of 2 things for this to work. 1) Have the inventory image file loaded in the modmain.lua like this:Assets = { Asset("ATLAS", "images/inventoryimages/crushedpestels.xml"), Asset("ATLAS", "images/inventoryimages/otheritem.xml"),}That makes sure the files are loaded when you call the otheritem.atlas = "images/inventoryimages/otheritem.xml"stuff later after defining the recipe. The other thing is make sure that the names are exactly the same everywhere. When you enter your recipe like this:local otheritem = GLOBAL.Recipe("otheritem",{ Ingredient("crushedpestles", 1),}make sure that the "crushedpestles" name is the same as your prefab name (crushedpestles.lua or whatever). They have to match exactly, problably even if it's upper/lowercase or not. Let me know if any of this helped xD -SC Edited January 22, 2015 by SeriousCreeper Link to comment https://forums.kleientertainment.com/forums/topic/49487-missing-script-for-uncalled-item-beginner-help/#findComment-604951 Share on other sites More sharing options...
AnimeOfTheArts Posted January 23, 2015 Author Share Posted January 23, 2015 i have both the asset and .atlas for the items, and everything is spelled correctly, do i need to call the .atlas for both the item itself and the required item after every recipe? because right now my recipe looks like this local SmallPoultice = GLOBAL.Recipe("SmallPoultice",{Ingredient("CrushedPetals",3) },GLOBAL.RECIPETABS.FARM, GLOBAL.TECH.SCIENCE_ONE) SmallPoultice.atlas = ("images/inventoryimages/SmallPoultice.xml") Link to comment https://forums.kleientertainment.com/forums/topic/49487-missing-script-for-uncalled-item-beginner-help/#findComment-605137 Share on other sites More sharing options...
AnimeOfTheArts Posted January 26, 2015 Author Share Posted January 26, 2015 i think i figured out the problem, the prefab files had one instance where it was lower case, however the problem is that when changing it to upper case, the mod just broke. so i needed to change everything to fit what was in the prefab file, that includes remaking the animation and tex files, however while i can now craft all the items the description and the image in the recipe is now missing for all of the recepies. Link to comment https://forums.kleientertainment.com/forums/topic/49487-missing-script-for-uncalled-item-beginner-help/#findComment-606160 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