Jump to content

item mod


S0m3Dud3

Recommended Posts

hey thanks!

 

 

one more question though. I am trying to add a name for my item so I added something like this in modmain above the prefab list.

 

GLOBAL.STRINGS.NAME.SCANE = "Skull Cane"
GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.SCANE = "Magical whacking cane."
 
PrefabFiles = {
      "scane",
 
 
 
but I get error when I start the game.
 
here is the screenshot of the error.
 
thanks in advance to anyone who can help.
 
 
Link to comment
Share on other sites

Ah, I believe that you have to set the item's name in the prefab's file itself, not the modmain.

You should be able to jut paste both of those strings into the prefab file to get it to work. (except you can take out the "GLOBAL." because you only need to use that when working in the modmain)

Link to comment
Share on other sites

it didn't work though, I get an error. I just added the string in the prefab file item.lua without the global. like you said.

 

this is the tutorial I am following btw that is why I added it in the modmain yet I have no idea why I get error.

 

http://forums.kleientertainment.com/topic/27341-tutorial-the-artists-guide-to-characteritem-modding/

Link to comment
Share on other sites

What error are you getting?

Are you checking the line number that the error screen is giving you? That's often a big help to finding out where the problem is coming from.

 

And also, if you want to be able to inspect your item, you will need "inst:AddComponent("inspectable")" in your item's prefab file

Link to comment
Share on other sites

if I add the string on top of the prefab item it does not give me the error msg it just freezes and closes the program.

 

if I add the string inside the local function I get this error

http://imgur.com/x53ZpVH

 

btw, just in case you didn't notice I have sent you my character via pm so you can check it as well. 

 

oh and I just want to have my item to have a name when you hover your mouse on it. so it wouldn't be "missing name".

Link to comment
Share on other sites

Error in your picture clearly said that STRINGS.NAME is not exists

it's mean that STRINGS is not defined or you trying to add field to table which is not exists

your issue is : you should use STRINGS.NAMES

also it's can be good to check table before adding something to prevent crash

like

if STRINGS.NAME then      STRINGS.NAME.MYCOOLITEM = 'my cool item'end
it's don't harm anything, but not add description too.
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...