Jump to content

Can't get modded item to work


Recommended Posts

So, currently I have a modded character I'm trying to produce (it's my first, so yay.) and they have a modded item that the game is supposed to let exist. currently, I can craft the item, it will show up in the tabs but, everytime I try crafting it, the stuff disappears from existance  and I don't get my item. any Ideas what I'm doing wrong?

 

Link to comment
Share on other sites

Code of Item in Modmain

 

local Ingredient = GLOBAL.Ingredient
local RECIPETABS = GLOBAL.RECIPETABS
local STRINGS = GLOBAL.STRINGS
local TECH = GLOBAL.TECH

local lovepoemrecipe = AddRecipe("lovepoem",
{Ingredient("papyrus", 1)
, Ingredient("featherpencil", 1)
, Ingredient("reviver", 1)},
RECIPETABS.MAGIC, TECH.NONE,
nil, nil, nil, nil,
"poem_writer",
"images/inventoryimages/lovepoem.xml",
"lovepoem.tex")

modimport("strings.lua")

lovepoemrecipe.sortkey = 1

 

 

modicon.tex

modicon.xml

modinfo.lua

modmain.lua

strings.lua

lovepoem.lua

I hope thats what I was supposed to submit?

(I mean, I only included scripts, for all I know I might've made the sprite too big)

 

Link to comment
Share on other sites

Usually you attach your mod as a .zip so people could see the entire mod at once.

I didn't look at all the files (because of the reason above). I can however already see that your item doesn't have the "tradable" component, but have this line :

        inst.components.tradable.goldvalue = 4

I doubt this is the reason of your problem.

Also, is the item in your inventory but invisible, or doesn't exist at all ?

Link to comment
Share on other sites

17 minutes ago, Lumina said:

Usually you attach your mod as a .zip so people could see the entire mod at once.

I didn't look at all the files (because of the reason above). I can however already see that your item doesn't have the "tradable" component, but have this line :


        inst.components.tradable.goldvalue = 4

I doubt this is the reason of your problem.

Also, is the item in your inventory but invisible, or doesn't exist at all ?

The item does not exist upon crafting it, hence the fail message (in the 2 second video).

 

Link to comment
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
 Share

×
  • Create New...