AzerothCore
Pages (Latest 10 updated) :

Add a module

  1. Get the module from the catalogue: https://www.azerothcore.org/catalogue (For this example, we'll be using this module: mod-npc-services)

    • Clone it using Git as you did during the core installation. Set the Destination to "C:\Azerothcore\modules\mod-npc-services" (Recommended method) [Jump to step 9 to make sure it cloned correctly]
    • Use the download button on the catalogue page
    • Use Download ZIP button on the module's Github page
  2. If in the previous step you chose not to clone the repo, you'll need to extract the downloaded ZIP archive. Once this is done, your resulting folder should look like this: img1

  3. Due to a discrepancy between the way AzerothCore loads modules and how Github names ZIP code archives, you will need to rename the directory name. The folder will have the branch name placed onto the end of it, as in mod-npc-services-master. You will need to remove this branch name, leaving only mod-npc-services: img2 edit

  4. Copy the renamed folder, as you'll be pasting it into the modules folder

  5. Navigate to your AzerothCore modules folder (C:\Azerothcore)

  6. You will see in that directory the modules folder: img3 edit

  7. Open the modules folder, it should look quite sparse: img4

  8. Paste the module folder into the modules folder, it should now look like this: img5

  9. Now to recompile! Open CMake and configure. If the module has loaded correctly, you should now see it in the CMake log as well: img6 edit

  10. Then generate: img7 edit

  11. Now open the generated project file, clean, and build the solution

SQL Queries

  • If your module contains a sql folder, you will need to run the queries inside for the module to function correctly: img8 edit

    • Opening this folder, we should then see any of these three folders: auth, characters, or world. In the example module, it contains a world folder: img9

    • Depending on the module, there could be more than one query file you would need to execute. Refer to the readme of the module for information regarding this. In our case, there is only one .sql file to run, so our job is easy: img10

  1. Open your SQL editor of choice. In this case, we will be using HeidiSQL. You will need to select the database the query applies to on the left before you run the query. Since our query was in the world folder, we will select acore_world. Once the database is selected, we will then load the SQL file: img11

  2. Once you navigate to the SQL file and open it up, it will open the query in a new tab. Double check that the database tab is pointing to the right database, then run the query using the marked button above the tabs: img12 edit

With that, the module is installed! In the case of mod-npc-services, we'd then launch our server and run the command .npc add 55002 (The NPC Entry) to spawn the NPC.