Jump to content

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.

 

 

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. 

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 by Kasheek

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 by Mr. Tiddles

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.

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.

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...