I wanted to create a new item that spawns a new creature by using the 'Rat Cage' that spawns 'Whiskers' as a template. These are the steps.
I used dbutils to unpack from dbc to csv and repack from csv to dbc. Also used CVSed to edit the csv file.
1. created a new item in the mangos db and also added the new item id in item.dbc (both at client and server). When type ".additem #itemid 1" in the game, it worked.
2. created a new creature in the mangos db. When type ".npc add #creatureid", it spawns.
The hard part that I am tried and still trying, is to spawn the creature from the item, which requires a new spell. Steps are,
a) created new spell in spell.dbc at client side. I just copy an existing spell and add into a new row and edit 3 fields,
i) the spell id
ii) column 128 - the spell name and
iii) column 192 - the spell instruction.
b ) did the same as a) for the spell.dbc , server side
The I ran mangos. When reach at part where it loads the spell.dbc, it hang at 66% with message,
"This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information."
c) Then I used the original spell.dbc at server side and got this message when loading the item
"Item (Entry: 40001) has wrong (not existing) spell in spellid_1 (60001)"
This not existing error appear probably because the new spell does not exist in the spell.dbc on the server as when i tried add it in has error as how seen in b )
d) I tried unpacking and repacking the spell.dbc without making any change. When ran mangos has same error as b )
Question:
1. Since i did not make any changes to the spell.dbc file (just unpack and repack), how come mangos could not recognize the file when loading? Does this mean dbutils did not repack the csv properly? Is there a way around this?
2. Is there another way of making new items to spawn a new creature, other than via spells?