Sign in to follow this  
EverSoNitro

Custom item won't show up

Recommended Posts

EverSoNitro    0

I'm trying to make a custom weapon for my character (well, two of them, actually), but I'm running into some issues with getting them to appear.

I followed this tutorial

But after doing so, the items in question don't show up in my character's hand, nor in my inventory. However, they do appear on the ground, as well as in the crafting tab.

Attached is the full mod, I've gone over the files but I can't seem to figure out the issue.

Whoopee.rar

Share this post


Link to post
Share on other sites
Lumina    1,516

Try add this in the prefab for the inventory image part :


    inst:AddComponent("inventoryitem")
		inst.components.inventoryitem.imagename = "myprefab"
		inst.components.inventoryitem.atlasname = "images/inventoryimages/myprefab.xml"

Usually the imagename and atlasname share the same name, but obviously if for one reason or another you have multiples images in one atlas, rename the image accordingly.

(You should already had the first line)

Edited by Lumina

Share this post


Link to post
Share on other sites
Lumina    1,516

Also, i think your folder aren't ok. You should have

 

Folder "swap_whatevermyprefabis"

Containing :

"swap_whatevermyprefabis.scml" project

another folder "swap_whatevermyprefabis"

 

And in this another folder "swap_whatevermyprefabis"

"swap_whatevermyprefabis.png" image

 

As far as i understand this is this structure that allows the swap image to be understood as a symbol by the game.

 

Hope it's clear. I know that it's hard to understand because the tutoriel is old and old posts on forum have the code balise messed up so they are harder to read.

Share this post


Link to post
Share on other sites

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

Sign in to follow this