Jump to content

Question about inventory images!


Kasheek

Recommended Posts

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!

 

 

post-325713-0-04670500-1389919502_thumb.

post-325713-0-53237900-1389919517_thumb.

post-325713-0-15027700-1389919509_thumb.

 

 

Link to comment
Share on other sites

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
Share on other sites

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. 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
Share on other sites

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
Share on other sites

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