How to use Rochet2’s DressNPCs Patch

Published

Before I start typing out this guide, I must note that this tutorial is only on how to use the patch to create new NPCs and that it requires the use of the stored procedure found here. I will not be explaining how to compile the DressNPCs patch into your core.

In this tutorial I will assume that you know enough to be able to use WoWModelViewer and to execute a query on your database.

Just in case anyone wants to know what I’m running:


Now that you have WMV downloaded and open, begin by selecting a playable race (it may work for unplayable races, but I haven't tested) and customizing the look and equipment. When choosing skins, hair, faces, etc... you may only use those which are available for players to use, this is the first limitation of the DressNPCs patch. The second limitation is that you may only use weapons that have both a displayID and an equipmentID listed as the weapons cannot work if you use a displayID.

After creating your NPC, take the query from here and copy-paste it into your text editor of choice. You simply need to copy the v alues from WMV into the query and execute the query onto your world database. As an example of how to fill out the file...

    
        /*
        You can use either the displayID of the item or the spawnID of the item.
        The majority of good looking items will not have a spawnID, so just use
        the displayID in almost every case.
        When using a displayID, you need to make the displayID negative.
        When using a spawnID, you do not make the spawnID negative.

        To use this query, just type in the numbers and execute it into the world datbase.
        */

        SET
        @NPC_ENTRY_ID := 80000,
        @NPC_RACE_ID := 1,
        @GENDER := 1, -- 0 = male 1 = female
        @SKIN_ID := 0,
        @FACE_ID := 0,
        @HAIR_COLOR_ID := 9, -- Applies to head and facial hair.
        @HAIR_ID := 5,
        @FACIAL_FEATURE_ID := 1, -- Beards, earrings, etc...
        @HEAD := 0,
        @SHOULDERS := -5316,
        @BODY := -32362, -- This is for shirts.
        @CHEST := 36076,
        @WAIST := -37348,
        @LEGS := -27289,
        @FEET := -51992,
        @WRISTS := -28382,
        @HANDS := -15816,
        @BACK := -28693,
        @TABARD := 7725,
        @MAIN_HAND := 24034,
        @OFF_HAND := 31200,
        @RANGED := 0;


        CALL createNPCModel(
        @NPC_ENTRY_ID,
        @NPC_RACE_ID,
        @GENDER,
        @SKIN_ID,
        @FACE_ID,
        @HAIR_ID,
        @HAIR_COLOR_ID,
        @FACIAL_FEATURE_ID,
        @HEAD,
        @SHOULDERS,
        @BODY,
        @CHEST,
        @WAIST,
        @LEGS,
        @FEET,
        @WRISTS,
        @HANDS,
        @BACK,
        @TABARD,
        @MAIN_HAND,
        @OFF_HAND,
        @RANGED
        );
    

When the query above is executed onto the database, you will need to restart your server for the display to be usable, but before restarting the server, you need to apply the display to a creature.

A creature can use up to four displays which can include either all custom displays, all pre-existing displays, or a mix of the two. A creature can also have just a single display. When entering the display ID onto creature a creature in world.creature_template, we will use the display -80000 and place it into the column modelid1. All custom displays made using the process in this tutorial must be the negative of the value that is used as the display ID in the query above. The ID in the query does not need to be the same as the ID of the creature it is being applied to, this is just a convention that I've grown to use.

Once the query has been executed, the display ID set, and the server restarted; the finished model should looks like the following.

Additional Notes:

As you may already know, you can save and load created NPCs in WMV through Character -> Save Character and Character -> Load Character. When you load a character, the values for skin color, face, hair, etc... will be wrong, so you'll need to change one of these values and then change it back to get the correct values. You can see the difference in the image below if you compare it to the almost identical image near the beginning of this post.