Page 1 of 1
can't get custom items into the editor
Posted: Wed Oct 10, 2012 1:12 am
by YpsiNine
Hi,
I am working on a mod and have successfully created a little fun place (I think).
I am creating some simple custom items (modified textures only), by adding stuff into the items.lua script and modifying the model reference.
This is the same as I have done with my wallset with modified textures, it works fine (adding stuff in materials.lua and objects.lua).
However, none of the custom items it will show up in the editor so I can't place them on the map.
I have tried reloading the dungeon many times. Any idea?
Thanks.
Re: can't get custom items into the editor
Posted: Wed Oct 10, 2012 2:49 am
by Leki
Xaurus wrote:Hi,
I am working on a mod and have successfully created a little fun place (I think).
I am creating some simple custom items (modified textures only), by adding stuff into the items.lua script and modifying the model reference.
This is the same as I have done with my wallset with modified textures, it works fine (adding stuff in materials.lua and objects.lua).
However, none of the custom items it will show up in the editor so I can't place them on the map.
I have tried reloading the dungeon many times. Any idea?
Thanks.
Check your path to the files (common error is "assets / mod_assets") or try to use some published sources as reference
Item "Horn_of_winter" from :
viewtopic.php?f=14&t=3481&p=35537&hilit ... ell#p35537
Re: can't get custom items into the editor
Posted: Wed Oct 10, 2012 3:54 am
by YpsiNine
Thanks, the paths are OK. The model even looks to be OK in the model toolkit, it has my modified texture on it as well.
But I can't get it
in to the editor.
This is currently my code in items.lua:
Code: Select all
local function miscItems()
defineObject{
name = "new_skull",
class = "Item",
uiName = "Skull",
model = "mod_assets/models/items/new_skull.fbx",
gfxIndex = 31,
weight = 2.2,
}
end
I have also an entry in materials.lua:
Code: Select all
defineMaterial{
name = "new_skull",
diffuseMap = "mod_assets/textures/props/new_skull_dif.tga",
specularMap = "mod_assets/textures/props/new_skull_spec.tga",
normalMap = "mod_assets/textures/props/new_skull_normal.tga",
doubleSided = false,
lighting = true,
alphaTest = false,
blendMode = "Opaque",
textureAddressMode = "Wrap",
glossiness = 30,
depthBias = 0,
}
Re: can't get custom items into the editor
Posted: Wed Oct 10, 2012 5:40 am
by YpsiNine
I managed to fix it, had to remove the
local function miscItems() text and the end tag.
Finally!

Re: can't get custom items into the editor
Posted: Sat Oct 13, 2012 7:20 am
by Belblindd
I'm wondering, I made a floor tile with a new texture...
and it's working script-wise, but ingame it seems to show the "NAME_spec.tga" and it isn't lit by the environment...
Does someone has a clue what I did wrong? I use the exact same script shown above and everything is in place.