Kasheek Posted January 17, 2014 Share Posted January 17, 2014 So, here is what is up; I made a lighter mod for my character mod "rob". It works fine, there is nothing wrong with it. I take it out, the custom lighter is there, and when I drop it, the custom lighter shows up on the ground. Here is the issue I am having: For the LIFE of me I cannot figure out why the inventory image shows willow's lighter and not mine. I have a the inventory image for my lighter defined in the code, so I am not sure how to go about fixing this. Anyyy tips, hints, tricks, advice y'all want to throw my way would be sah-weet! Link to comment https://forums.kleientertainment.com/forums/topic/30970-question-about-inventory-images/ Share on other sites More sharing options...
ColeenMcCleod Posted January 17, 2014 Share Posted January 17, 2014 You have the inventory image for your custom icon defined in the prefab? Ok... start simple then. I assume you have an images folder with an inventoryimages subfolder that has your custom icon .tex and .xml assigned? Link to comment https://forums.kleientertainment.com/forums/topic/30970-question-about-inventory-images/#findComment-405001 Share on other sites More sharing options...
Kasheek Posted January 17, 2014 Author Share Posted January 17, 2014 You have the inventory image for your custom icon defined in the prefab? Ok... start simple then. I assume you have an images folder with an inventoryimages subfolder that has your custom icon .tex and .xml assigned?Yes that is correct. I double checked to make sure. Link to comment https://forums.kleientertainment.com/forums/topic/30970-question-about-inventory-images/#findComment-405036 Share on other sites More sharing options...
Kasheek Posted January 17, 2014 Author Share Posted January 17, 2014 (edited) (this was a double post for some reason. grr. ignore it) Edited January 17, 2014 by Kasheek Link to comment https://forums.kleientertainment.com/forums/topic/30970-question-about-inventory-images/#findComment-405037 Share on other sites More sharing options...
Redrum313 Posted January 17, 2014 Share Posted January 17, 2014 How were you able to get the lighter in your inventory? I've tried editing everything I can find and something still prevcents me from getting it. Link to comment https://forums.kleientertainment.com/forums/topic/30970-question-about-inventory-images/#findComment-405089 Share on other sites More sharing options...
Kasheek Posted January 17, 2014 Author Share Posted January 17, 2014 (edited) I have it defined as such in the modmain.lua : PrefabFiles = {"rob","hat_canada","jack_axe","lighter",}and in my rob.lua I have it defined as such: local start_inv ={ "hat_canada", "jack_axe", "lighter", }and then at the bottom ---> return MakePlayerCharacter("rob", prefabs, assets, fn, start_inv)in my prefabs I have in the lighter.lua: local assets ={Asset("ANIM", "anim/lighter.zip"),Asset("ANIM", "anim/swap_lighter.zip"),Asset("ATLAS", "images/inventoryimages/lighter.xml"),--Asset("SOUND", "sound/common.fsb"),}Also in the lighter.lua I slapped in the: inst:AddComponent("inventoryitem") I left both the anims the same as the ones I found in the don't starve anim folder. With the exception that i made my own custom .tex for each, renamed them to atlas-0, but left the .bins the same. Now I attempted to changed the names of alll the files and code of the lighter so something custom but anytime I do that it breaks. And I know i have done it just the way I did for my other custom items, but this lighter. /facepalm. Edited January 17, 2014 by Kasheek Link to comment https://forums.kleientertainment.com/forums/topic/30970-question-about-inventory-images/#findComment-405116 Share on other sites More sharing options...
Redrum313 Posted January 17, 2014 Share Posted January 17, 2014 Thanks very much for the peek at your mod. It's strikes me odd that the lighter's coded so differently from any other object, even character specific ones like lucy the axe. Link to comment https://forums.kleientertainment.com/forums/topic/30970-question-about-inventory-images/#findComment-405132 Share on other sites More sharing options...
NikMik Posted January 17, 2014 Share Posted January 17, 2014 (edited) If Rob's lighter's prefab name is still "lighter" it will both replace Willow's lighter, and keep the inventory item. Renaming it something like "rob_lighter" will fix the problem. If you put up a .zip file, and tell me EXACTLY (Dyslexia makes me need details no normal person would even think about or else everything else they've said would mean nothing. Funnily enough, my mother is the complete opposite.) what you've tried to do, it would also help. Edited January 17, 2014 by Mr. Tiddles Link to comment https://forums.kleientertainment.com/forums/topic/30970-question-about-inventory-images/#findComment-405157 Share on other sites More sharing options...
Redrum313 Posted January 17, 2014 Share Posted January 17, 2014 In response to your problem, I seem to remember in one of the tutorials on item creation that the bin file wont always match up to your .tex and I specifically remember a guy changing his image aspect ratio to be divisible by 20. AT least I think it was twenty, I'll see if I can track down that video. Link to comment https://forums.kleientertainment.com/forums/topic/30970-question-about-inventory-images/#findComment-405171 Share on other sites More sharing options...
Redrum313 Posted January 17, 2014 Share Posted January 17, 2014 I'm still having no luck with the lighter. I've tried everything. I even deleted the part of the lighter code at the end that seems to check who has it in their inventory. I know its trying to put it in my bags but then something instantly deletes it, even if I say F it and use the console command I get a sound effect like it's spawning then immediately being deleted. Link to comment https://forums.kleientertainment.com/forums/topic/30970-question-about-inventory-images/#findComment-405172 Share on other sites More sharing options...
Kasheek Posted January 17, 2014 Author Share Posted January 17, 2014 If Rob's lighter's prefab name is still "lighter" it will both replace Willow's lighter, and keep the inventory item. Renaming it something like "rob_lighter" will fix the problem. If you put up a .zip file, and tell me EXACTLY (Dyslexia makes me need details no normal person would even think about or else everything else they've said would mean nothing. Funnily enough, my mother is the complete opposite.) what you've tried to do, it would also help.Here is the .zip for my character mod. Give it a look see, and tell me what you think. I am going to try renaming it once again to see if that works in the meantime. thescout_charactermod.zip Link to comment https://forums.kleientertainment.com/forums/topic/30970-question-about-inventory-images/#findComment-405186 Share on other sites More sharing options...
ColeenMcCleod Posted January 17, 2014 Share Posted January 17, 2014 I'll take a peek at this once I get home from work myself! Maybe with all of us looking, we can sort it out Link to comment https://forums.kleientertainment.com/forums/topic/30970-question-about-inventory-images/#findComment-405210 Share on other sites More sharing options...
Kasheek Posted January 20, 2014 Author Share Posted January 20, 2014 Well the renaming didn't work for whatever reason, i have no idea. At this point I am well and truly stumped. e_e Link to comment https://forums.kleientertainment.com/forums/topic/30970-question-about-inventory-images/#findComment-406380 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