DwDNPC

Commands & Permissions

Commands & Permissions

Commands & Permissions Configuration



Basic Commands

CommandPermissionHelpExecute via
/dwdnpc create <name>dwdnpc.createCreates a new NPCPlayer Only
/dwdnpc delete <name>dwdnpc.deleteDeletes an NPCPlayer & Console
/dwdnpc reloaddwdnpc.reloadReloads the entire config.yml and reloads all NPCsPlayer & Console
/dwdnpc radius <radius> (-id/-name) (id/name)dwdnpc.radiusSets the look at radius for all (or a specific) NPCPlayer & Console
dwdnpc.setarmorAllows you to set armor for an NPCRight Click NPC

NPC Armor & Item In Hand

For NPCs to wear armor be sure you have the dwdnpc.setarmor perm and just right click on any npc with any armor in hand. That piece of armor will then be copied to the NPC (it will not be removed from your hand).

To set an item in an NPCs hand is the same way. Just right click an NPC while holding the item in your hand.

To remove armor or the item in hand from an NPC, just right click the NPC with the exact *same* item and it will be removed.

1-Liner Messages

Currently these are only configurable via the config.yml - I have not got around to making an in-game command to control this (my next update will include this one).

Configuration is easy, however. Just hop on over to the Configuration page from the red link above to see an example.

As you can see, there are 2 variables under the "messages" section. Make sure that you use a DOUBLE for the radius instead of an INTEGER.

Example of Integer: 10 Example of Double: 10.0

The say variable does support color and style codes (0-9,a-f,k-o,r) and have a few swap-able variables you can use outlined here:

{npc}Will output the NPC's name
{name}Will output the Player's name that triggered the message
{dispname}Will output the Player's Display Name (if its set, otherwise it will default to the regular name)
{world}Will output the current world name the NPC is standing in

You can configure these settings in the config.yml file while the server is running, just be sure you do the /dwdnpc reload command after you save your changes.

Mob Types

v2.3.0 introduces the ability to add mob types as NPCs. There are currently no commands to control the mob type, and it must be done directly inside the config.yml (future update will add commands for this)

Take a look at the example config.yml (linked above in the red button) to get an understanding on how to use them. As you can see the mobtype is just a simple string of which mob the NPC will be. Some mob types have a few issues. I have yet been able to create a zombie NPC without crashing the connected clients (I'll figure this out asap). Here is a full list of the available mobs (not all of them have been tested):

Bat, Blaze, CaveSpider, Chicken, Cow, Creeper, EnderDragon, Enderman, Ghast, Giant, IronGolem, MagmaCube, MushroomCow, Ocelot, Pig, PigZombie, Sheep, Silverfish, Skeleton, Slime, Snowman, Spider, Squid, Villager, Witch, Wither, Wolf ,Zombie

The skin-mobs-radius and skin-mobs-delay are very important here, and if you set the values to low or too high you will less than desirable results. The delay is the number of ticks that pass before packets are sent out to the clients to force the mob skin over the NPCs. the range is the number of blocks away from the NPC that a client must be within in order to be sent that packet. The range needs to be close to, but not greater than your viewing distance settings, otherwise the NPCs may disappear completely to some clients. The delay needs to be low enough to send packets often enough that player entering the radius will get sent a packet quickly, but not too low as it may increase your server's bandwidth usage (i'd monitor this just in case). Setting the delay too high will cause the NPCs to never show up to some clients entering the radius for quite some time. There is a happy medium for every server, but no server will be alike. My default "safe" values are 50.0 for radius and 100 (5 seconds) for delay.

The names above the NPC's heads will disappear when changed to a Mob type. Also, right clicking them doesnt bring up the ID in the chat bar (I'm working on fixing this).

Facts

Date created
Oct 10, 2012
Last updated
Dec 30, 2012