Page 1 of 1

Help on new Defined Item

Posted: Sun Dec 22, 2013 7:14 pm
by Eleven Warrior
Hi all..

What I have done is edited a Herder Cap in GMT. I changed the Material to Spider Egg in the edit material mode so now the Cap is wrapped in the Spider Egg texture It works.

The cap on the Ground has the Spider Egg texture, but when I pick it up of the floor it reverts back to the original herder texture, I thinks its the 2D Model.. Here is the new defined object:

defineObject{
name = "poison_gland",
class = "Item",
uiName = "Poison Gland",
model = "mod_assets/models/poison_gland1.fbx",
gfxIndex = 61,
consumable = false,
weight = 1.8,
description = "Herder Poison Gland.",
}

Could someone tell me where I went wrong.. How do I change the 2D object to have the Spider Egg Material.. Thxs for the help Guys.. :)

Re: Help on new Defined Item

Posted: Sun Dec 22, 2013 8:28 pm
by germanny
You have to create a custom icon atlas.
Paint or create/copy a image that fit your need.
Search the modding section here how to create a custom icon atlas.

Change your item description after that (example):
gfxAtlas = "mod_assets/textures/gui/new_icoatlas.tga",
gfxindex = 61 (change it to your index number then).

Re: Help on new Defined Item

Posted: Sun Dec 22, 2013 11:44 pm
by msyblade
Yes, the 2D icons are kept in a seperate file called an "Atlas". It's a flat sheet with many 2d models on it, seperated into squares that are numbered, so you can point to the square in the atlas that you want. It's similar to how a sprite animation sheet works. John Wordsworth made a toolkit for doing this (Because he's awesome), but I have never looked at it and cannot offer any tips or instructions.


viewtopic.php?f=14&t=5400&p=59859&hilit=atlas#p59859