Modcraft - The community dedicated to quality WoW modding!
Wrath of the Lich King Modding => Serverside Modding => Topic started by: Steff on February 03, 2013, 03:45:28 am
-
Is there a only DB driven way to creat NPC gossip. I want to integrate chats like in offline RPGs (Skyrim) where you find out more about the world.And for this I want to integrate an gossip editor into my genesis editor.
-
Yes there is, but you have to code it server side. Nothing too hard, I guess there are already existing example on trinitycore project.
-
I read once that there is an gossip plugin that ust read out DB so you dont need to do scrpiting stuff.
-
Which gossip do you mean steph? Simple click on npc and he has 'talk'? Thats simple. Go to 'gossip menu' in your database, put in a page text and coresponding id. (can be anything unused, aim higher with trinitys constant updates) =)
Now with those 2 little lines done. Go to 'npc_text' and put in whatever you want it to say on 'talking' to him.
Finally just go to creature_template entry and put the id you used in the first field of 'gossip_menu' into the 'gossip_menu_id' of the npc you want to display that.
Now want some 'click me ' options, leading to another page? Simple.
Enter the gossip_menu_option. Simply make the id the same as the above 'gossip_menu' id you made and point the 'action menu id' of it, to the next page you want displayed.
You can hook smart ai in using the 'on gossip function' here also.
Ie:if someone is bored enough to click thru all these options and hit the one I set smartai to summon the lich king upon them..they will die fast and not enjoy the gossip menu i just made
(http://imageshack.us/scaled/thumb/16/gossipmenu.jpg) (http://imageshack.us/photo/my-images/16/gossipmenu.jpg/)
^Easy to just use the same id and text id numbers. (Gossip_menu)
(http://imageshack.us/scaled/thumb/46/npctext.jpg) (http://imageshack.us/photo/my-images/46/npctext.jpg/)
^Here we use the same npc text id as the gossip menu field, and put in the text we want.(npc_text)
(http://imageshack.us/scaled/thumb/12/creaturetemplate.jpg) (http://imageshack.us/photo/my-images/12/creaturetemplate.jpg/)
^Here we put the gossip menu to the npc. (creature_template)
(http://imageshack.us/scaled/thumb/838/gossipmenuoption.jpg) (http://imageshack.us/photo/my-images/838/gossipmenuoption.jpg/)
^Here we use the gossip menu id so the option is on -that menu- but then we point it to the next menu we would want. (gossip menu option)
(http://imageshack.us/scaled/thumb/850/saiongossip.jpg) (http://imageshack.us/photo/my-images/850/saiongossip.jpg/)
^sai in use. No need for c++ Sai is to make it so user friendly. Which is it. =)
(http://imageshack.us/scaled/thumb/829/endeb.jpg) (http://imageshack.us/photo/my-images/829/endeb.jpg/)
^What it looks like on npc. And of course the sai options set are self explanatory.
(For those who havent done sai. Its set so when the option on the gossip menu is clicked it opens a door.)
=)
Tool in last screenshot is event horizon. A java sai tool which has alot of versatility.
Note:npc will have to be flagged at least 1 (gossip) or a combination of additional flags to display this.
And each additional page shall be handled the same way as the first. Using a gossip_menu entry.
Gossip_menu_option is merely the -link too- with of course the text, as to what the clickable option will say.
Also its all purely database.
Want to use this in one of your fab guides? go right on ahead.
Peace- Ela
-
I want to include this in my genesis editor. Thanks will test this out soon.
-
npc will have to be flagged at least 1 (gossip) or a combination of additional flags
Where to set the flag? DB DBC?
-
npc will have to be flagged at least 1 (gossip) or a combination of additional flags
Where to set the flag? DB DBC?
NPCs require npc_flag (1|...), everything else is optional.
-
I found 4 different flag cells. Witch one? In witch DB.
-
Creature_template. the 'npc_flag' field of the npc you want the gossip on. =)
-
Thank you it works. Now I implement it into genesis :)
Is it reasonable to cobine flags like gossip/quest/trainer/vendor?
Can a NPC not be only on of this kind?
(http://www.imagr.eu/up/515875a8aebe1_WoWScrnShot_033113_193925.jpg)
http://www.imagr.eu/up/515875a8aebe1_Wo ... 193925.jpg (http://www.imagr.eu/up/515875a8aebe1_WoWScrnShot_033113_193925.jpg" onclick="window.open(this.href);return false;)
-
Yes, its fine to combine flags in the 'creature_template', having things such as a npc who trains, has a vendor option, and also gives you gossip.
Thats where the gossip_menu_option ties in, to give you the clickable options on your gossip menu. Hit trinity wiki and look for the gossip_menu_option. It will make things crystal clear.
There is a notable drawback -explains- Flagging for vendor, even if you have a gossip menu hooked up,with correct gossip_menu_option, and flagged correctly, your npc will just open vendor and bypass gossip.
(basically a vendor flagged as vendor + gossip will just be a vendor without gossip unless he has something else on its list)
If you flag it to be a vendor and a quest giver, it will show your gossip and the quest+option to open vendor. BUT when you complete the quest, again the npc will railroad you..and just become a vendor with no gossip.
A workaround is adding a 'talk to me further' option as well as having the vendor option.
(i beleive there was a way to change the vendor issue in the core, moreso that its just default 3.3.5a behaviour)
Lastly im not sure your aware of this, and i have no idea how your giving out free npc id's for maruum, but if you want trainers to work, dont go high into the 6 figures. IE: npc id 800000, at that high of an id, flagging the npc to be a -trainer- will fail. At that point the npc will get upset saying things such as 'rack off' 'leave me be' as you click it wildly wanting it to teach you =P
-
As we will delete all existing NPCs we have much free space in db ;)
I only want to know this becaus the editor will set the flags autmaticly if you add an option like gossip entry or acti
vate as vendor.