Jump to content

[TUTORIAL] Create a NPC (Quest Giver) + Quest + Custom Text


Recommended Posts

Posted

Good evening!

Here is a quick tutorial/guide on how to create a NPC that acts as a quest giver/receiver, has a custom quest, and some custom text.

You will need access to your WORLD database - this will work for all cores (M0 - M3). In my screenshots/links, I'm using M3 - so keep that in mind that there may be differences in columns/expected values.

 

STEP 1: CREATE YOUR NPC

We will start by using the "creature_template" table. This is the base information for your NPC.
Documentation Link: https://www.getmangos.eu/wiki/referenceinfo/dbinfo/mangosdb/mangosthreeworlddb/creature_template-r7028/

I gave the creature an entity value of 1,000,000 just so that it was far out of the way. But you can give it any unused value - regardless, you need to remember this number as you will use it a few times throughout the tutorial.
For the Modelid1 - I selected a Wolpertinger model by going to Wowhead and using the model number associated with an existing npc.
All other values are really up to you - refer to the documentation about expected values, masks, etc.

I've included all of my values here for your reference if you're wanting to replicate this exactly.

image.thumb.png.1827ea100f43e7b69a39faad84ee0448.png

image.thumb.png.f18718f0bf41327951d2723b16aea8e1.png

image2.thumb.png.834c4070507f8fe2bd6414fef760720b.png

image3.png.04ee41263119f174b9d2ab92b3852303.png

 

Start up your mangosd executable/binary, and in-game you should be able to use the following command to spawn the NPC. Use your entry id as appropriate.

.npc add 1000000

image4.thumb.png.187ecee6f719fec6abbe6db1ca749a57.png

 

STEP 2: GIVE IT SOME CUSTOM "GOSSIP" TEXT

When you right-click a NPC in game, it often provides you with a "gossip menu" window where you can see some playful text and/or interact with it through a menu. In order for us to replicate this we will need to use two more tables:

  1. npc_text (Documentation Link: https://www.getmangos.eu/wiki/referenceinfo/dbinfo/mangosdb/mangosthreeworlddb/npc_text-r7094)
  2. gossip_menu (Documentation Link: https://www.getmangos.eu/wiki/referenceinfo/dbinfo/mangosdb/mangosthreeworlddb/gossip_menu-r7068/)

We begin with the 'npc_text' table to actually put our string of text into the game.
The ID again needs to be unique, I've arbitrarily chosen 200,000. Most other values I just assigned 0 to -- I wasn't worried about them for this example.

image5.png.42d6cc01417872bdef1610b02b6a796c.png

 

The 'gossip_menu' table is next. This is where we tell the server to use our new text within a gossip menu window.
I found out that the entry value is a smallint(6) unsigned - meaning that it can only go up to 65,535. I chose to keep it below that value. 
The text_id is the ID from the `npc_text` entry that we just made.

image6.png.52182470fd33a08f3394a61c8155d8a2.png

 

Now we need to go back to our `creature_template` table and assign this gossip_menu entry to our buddy Wolper. You'll see that we've added 65,534 to the GoosipMenuID.

image7.thumb.png.0531962cb16d4782dfe62f7cf8acbf28.png

 

Give your mangosd executable/binary a restart, and just to be safe - I always close my client, delete the Cache folder, and re-open my WoW.exe.

Right click Wolper and we now have custom text in our gossip menu!

image8.thumb.png.85ba3b4f55a34a87e82466ec16861909.png

 

STEP 3: CREATE A QUEST!

What is a custom NPC without a custom quest?

We will need 2 more tables:

  1. quest_template (Documentation Link: https://www.getmangos.eu/wiki/referenceinfo/dbinfo/mangosdb/mangosthreeworlddb/quest_template-r7120/)
  2. quest_relations (Documentation Link: https://www.getmangos.eu/wiki/referenceinfo/dbinfo/mangosdb/mangosthreeworlddb/quest_relations-r7166/)

There are a LOT of fields that can be filled in for 'quest_template' depending on the type of quest, rewards (items, currency, gold, reputation, etc. etc. etc.) - I keep it fairly simple here with a quest that requires 1 item and has a 5 minute timer.
Once again, I've chosen an arbitrary entry value of 50,000.

Refer to the documentation for the fields - but you can see what I used below:

image9.thumb.png.90af0e825cda611cf02cc43ab8d63604.png

image10.thumb.png.1e40034a34bae21e054ed62c83b6416b.png

image11.thumb.png.b1c8920fd07631107073e68bb31ea371.png

image12.thumb.png.ed3c8acde458ead70fcb5e12116da117.png

image13.png.d836a947dabb6df071bbd23ec56bb1ac.png

 

That is the quest created. Now we need to setup the quest giver and quest receiver. That is where the 'quest_relations' table comes in.

We need to have TWO entries for this table.
Both will be using a creature (actor = 0), the custom npc (entry = 1,000,000), and the custom quest (quest = 50,000). The role 0 = quest giver, role 1 = quest receiver.

image14.png.280638cad9d8e1a51a9601c84b370c72.png

image15.png.306f756ed9af1e7458ffd1642bc46df2.png

Give your mangosd executable/binary a restart, and just to be safe - I close the client, delete the Cache folder, and re-open the WoW.exe.

Right click Wolper and we now have the custom quest in the gossip menu!!

Below are a few pictures to show how the quest presents itself in game.

image16.thumb.png.fd0c9d5ce78f38f801e605a2ea4dbb45.png

image17.png.23f6c24a15d62427543fcb46ac6e45ff.png

image18.png.6210a479c5c4e889e6e6dccda44fd720.png

image19.png.4bd7c232ad7c1925f3266b74a9c5445b.png

image20.png.1b517640b129db8b967623256aede731.png

image21.thumb.png.2fee760f6c1e9deb7ba3b7862e9275d4.png

 

And there you go! You've created a new NPC, given it some custom text, created a custom quest - and tied them all together.

Of course, there is SO much more that you can do with custom NPCs and custom quests - look at other examples in the database, look at the documentation, and never be afraid to experiment!

 

Share with us some examples that you make! We can all learn from each other!

 

All the best!
- Fyre

  • 4 months later...
Posted

Hey Fyre! Appreciate the guide. I've been playing around with private servers lately and learning how to do a few things. Your guide is super helpful! I created my first quest today and put my cat in the game. Super fitting for her lol.

image.thumb.png.104a63c195d04f452a44486275be8aec.png

  • Like 1
  • 1 month later...
Posted
On 2/3/2025 at 3:30 PM, Gooby said:

Hey Fyre! Appreciate the guide. I've been playing around with private servers lately and learning how to do a few things. Your guide is super helpful! I created my first quest today and put my cat in the game. Super fitting for her lol.

image.thumb.png.104a63c195d04f452a44486275be8aec.png

That's awesome!! Thank you for sharing your NPC + quest! :D

I really like the text for the quest too! Haha!

How was the guide - easy to follow? Anything that you think I could have presented in a different manner?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use