[Guide] NPC Positions

Joined
Apr 28, 2005
Messages
7,112
Reaction score
3,714
Just a brief run-through of how to edit NPC locations.

First off, you need to find the index number of the NPC you want to edit.

In your client, convert NDStore.edf to DAT, then open it with a hex editor. Search for the name of the NPC you want to edit. This name will be the name you see in-game when standing next to it.

A few bytes before the name you will find an ID number. The ID number goes up by 1 for each NPC, starting from 0. The best way to find out which byte is the ID number is to start from the top and find a value that increments by one before each name. Save the ID number.

Next, open StoreList.dat in the server scripts with Stream editor or Structorian, then scroll down to the ID number you saved. You will see two values in the row, sdXXXXXX and bdXXXXXX where X represents a number. Save both of these values.

The last step is to go to "ZoneServer\RF_bin\Map", then browse to the map folder the NPC you want to edit is in, NeutralB for Bellato HQ for instance.

Open NeutralB.spt (or the map you are using) with Notepad++. The SPT file will always be named after the folder name.

Press CTRL + F and search for the sdXXXXXX number you wrote down. You will see something like this,

Code:
    *sd03002    -25    -25    -25        25    25    25    -node_tm
    1.000000 0.000000 -0.000000 0.000000
    0.000000 1.000000 0.000000 0.000000
    0.000000 0.000000 1.000000 0.000000
    [COLOR=#ff0000]4940.231934[/COLOR] [COLOR=#0000ff]1781.817383[/COLOR] [COLOR=#ffa500]982.663818[/COLOR] 1.000000
sdXXXXXX represents the spawn location of the NPC. The red number is the X coordinate, blue is the Y coordinate, and orange is the Z coordinate. You can replace the decimals with 0's (1781.817383 -> 1781.000000) if you want. You wont notice a difference in-game.

All you do to edit the location is change these coordinate values to ones you get in-game from using the %xyz GM command.

bdXXXXXX represents the binding location for that NPC. When you click "Bind" on a NPC, the bdXXXXXX is the location you will spawn at if you die.

In order to move NPCs to other maps, you need to edit the map code number in the StoreList.dat to the new map you want the NPC on.

To remove a NPC, you can simply delete the line. Or if you're like me and like to have all the codes still there, you can set the Z value to 9999.000000 to have it spawn in an unreachable location.

I used this method to completely reorganize the NPCs on PlayRFO. Some like it, some hated it, but it was a fun project for me.

Good luck guys. Feel free to post any questions below. Sorry I couldn't add images.
 
Last edited:
what is this for code
*sd03000 -25 -25 -25 25 25 25
-node_tm
0.985019 0.000000 -0.172446 0.000000
0.000000 1.000000 0.000000 0.000000
0.172446 0.000000 0.985019 0.000000
-4990.091797 575.539246 6546.778809 1.000000
 
someone enlighten me what files to edit when creating / adding an npc on server and client files?

edited : sorry for a noob question, mod may remove this post, the answer already gave above
 
Last edited:
When adding a new NPC, when I relog the bind point gets removed and defaults back to HQ. What could causes this, the bind point works fine until you log out.

Thanks for any help or direction people could push me in.
 
When adding a new NPC, when I relog the bind point gets removed and defaults back to HQ. What could causes this, the bind point works fine until you log out.

Thanks for any help or direction people could push me in.

Your question won't be answered here since its not related to this guide. Please make a help thread and include more detailed information such as what server version you are running and what ODCB option you had chosen and if your database was clean or not.
 
Thought i might add this to the guide to for removing npcs.

If you remove the npc code and cords from the spt file you will also need to go into your storelist.dat find the npc code and remove the map name just leave it blank.

This way you run no risk of relocating npcs and having people flyhack to it ect.
 
Back