Gaming
 

How do I know if items belong to this module

From NWNWiki


[edit] How do I know if Items belong to this module

Checking the ResRef is probably the easiest way, if not the best way to do this. However, there are a few things to remember when creating Items.

  • Don't use the "right click > Edit Copy" method when creating Items. Doing this only adds a 001 or 002 to the end of the existing ResRef. This makes it very easy, and common place to duplicate. I'm willing to bet most Modules have very simulare, if not Identical ResRef for severl different Items. If you do use edit copy to create Items, be sure to edit the ResRef before Clicking "OK".
  • When creating Items, placeables, Areas ect. it is best to always name the object what you want the ResRef to be. This will automaticaly make the Object ResRef the same as the name, then, rename the object. Keep ResRefs unique amoung themselves as well, i.e. doun't use a incrementing number like "boots001", "boots002" ect. Very easy to figure out.

The Basic Idea here is to keep your ResRefs Unique as possible from one world to the Next. The More Unique they are, the less chance any given Item will have the same ResRef as what you have in your world.

When you join a world, Items you have that do not match any Item ResRef on your custom palett, will not have a ResRef. This is why you would want to keep your ResRefs Uniquely as possible. You can simply check for a ResRef. The only time this methode will fail is if an Item I have happens to match a ResRef you have So keeping them Unique as possible will prevent 99% of it.

A few other ways of checking for legit Items is to place some kind of "code" numbers or a word in the ResRef. Then also check for that code. Useing GetString* Functions. You can also compare base Item types. GetResRef is probably your best bet.

There is no real fool-proof way of doing this, so if it is a Local vault, (wich it must be since you are asking this question), then server be-ware.

If I think of anything further, I'll let you know.