Custom Item Question

PikkonMG

New Member
Joined
Aug 29, 2013
Messages
14
Iv'e been doing some test trying to see if I could add a custom item based off the appearance of another item and haven't had any luck.

Was wondering if any has done this before I have been doing my test off of a holocron, the shared_jedi_holocron_dark.iff to be specific. Below i'll list what I have done.

1. I have extracted shared_jedi_holocron_dark.iff and it's file structure, I hvae also extracted object_template_crc_string_table.iff.

2. I renamed shared_jedi_holocron_dark.iff to shared_jedi_holocron_dark_test.iff.

3. I edited the object_template_crc_string_table.iff with hex editor and added shared_jedi_holocron_dark_test.iff.

Now the folder/file structures are correct I made sure of that.

4. I packed a new tre archive and named it test_01.tre added added it to my client and test env and also adding it to the config files swgemu_live.cfg on the client and config.lua on server env.

5. I created the needed files I think on my test env in scripts/object/tangible/jedi/jedi_holocron_dark_test.lua

And added includeFile("tangible/jedi/jedi_holocron_dark_test.lua") to the serverobjects.lua.


jedi_holocron_dark_test.lua
Code:
object_tangible_jedi_jedi_holocron_dark_test = object_tangible_jedi_shared_jedi_holocron_dark_test:new {

}

ObjectTemplates:addTemplate(object_tangible_jedi_jedi_holocron_dark_test, "object/tangible/jedi/jedi_holocron_dark_test.iff")
objects.lua inside tangible/jedi/ folder
Code:
object_tangible_jedi_shared_jedi_holocron_dark_test = SharedTangibleObjectTemplate:new {

	clientTemplateFileName = "object/tangible/jedi/shared_jedi_holocron_dark_test.iff"

}

ObjectTemplates:addClientTemplate(object_tangible_jedi_shared_jedi_holocron_dark_test, "object/tangible/jedi/shared_jedi_holocron_dark_test.iff")
I don't know if im missing anything maybe in .tre archives or what but if I try and give myself the said item I get no errors, command shows it ran ok in terminal but I get no item.

I just wanted to see if anyone has tried messing with anything like this before with success.
 

Lasko

Moderator
Staff member
Moderator
Joined
Feb 13, 2012
Messages
295
Have you given the new .iff a new CRC to differentiate it from the old one?

You will also need to copy the object template from the original and add the new details for your new object in the objects.lua file

Check out this for more detailed info on how to add new stuff from existing items.

http://forum.modsource.org/index.php?topic=1307.0

Theres a PDF guide in the sig of one of the posts.

Hope this helps...... and could you please let me know if it works:)
 
Top Bottom