DEdit – Database Editor

Documentation version 1.0 , 2004-02-29


PickPocket-Item Tutorial 2: How to find the proper PPItem syntax

Why bother ?

When creating new pick-pocket item databases it is essential that all entries are fitting together in their gramatical syntax. Only then they can be properly used in a $DB command. I will give you a short negative example:

Consider a PPItem database with the follwoing two entries for the type "weapon" and the subtype "longsword":

Both look very nice, don't you think? But now think on how they might be used in a descirption:

Now what would be the possible results at tavern generation?

As you can see, the second description would read fine, but the first one would create a double "a".

This is just one simple example, but it should demonstrate that it is very important to think before starting to write lots of descriptions.

 

All database entries of the same TYPE have to have exactly the same syntax!

 

Starting out

When you create a new database you have to ask yourself:

Do I want to create a new item type?

or

Do I want to contribute to already existing types?

A lot of troubles can be spared, if you create your own item types. Now you only have to make sure you are using your own syntax always in the same way. However, you have to make sure that the item type you create is really new and genuine. More about that later.

Though more care has to be taken, it would be much better to contribute to already existing item types. Why? Because now, by adding new items, you not only improve 'your own' description datasets, but those of others as well! Suddenly items appear in their descriptions, which have not been there before...

So, the following rule should be followed:

If there already exists a item type which describes what I want, ADD to that type.

Only if you create a completely new set, CREATE new item types.

 

One additional rule is of big importances:

By creating a new subtype only, you must not change the used syntax!

All items of the same item type regardless of their subtype have to have exactly the same syntax!

Adding to existing item types - which do exist?

So you want to contribute to exsiting types, how do you start? First thing, how do you know, which item types / subtypes do already exist?

The question can be easily answered: Whenever you add a new item wit hthe "New.." button, the presented dialog for the item type and item subtype presents you with a combined listbox. The list you can choose from contains all currently available item types! So, simply choose and select...

Note that the "Subtype" list will be updated depending on what you have chosen in the first listbox.

There are two other ways to find out about what item types already exist. For both you need to switch to the "description tab" of DEdit first.

You can now either use the two "Add $DB" dropdown lists to see all available types / subtypes, or - maybe the better way - you can hit F2 to enter the Comand Syntax Help window. There you can choose "PPItems" tab to get a complete listing of all loaded databases with their item types and subtypes.

 

This window can be very useful! It not only lists you all items, it also tells you in which databases the item types appear! So you now know which database you should load to see, how datasets for the given item types are written!

Adding to existing item types - How to write them?

The next question is, "How do I find out about the syntax?"

The easiest way would be: Read the TavernMaker-FeedbackForum. Here, all PPItem-types/subtypes should be listed in the developer section. If not, you can always write an email to the project leader.

 

A "I do it my in my own"-solution would be to open an existing database and simply "have a look". Which databases hold entries of the item type can be found out by using the Command Syntax Help as described above.

However, there is maybe an even better - and faster - way to do it: Switch to the Description Tab of DEdit. Then add a new description set. (It is just a dummy, so don't be concerned about anything like "type" etc.) Click into one of the text fields and use the "Add $DB" button and dropdown lists to insert a $DB command which will select a dataset of the wanted PPItem type and subtype.

 

example: If you want to find out about "weapon/longsword" do the following:

1) Select "weapon" in the first box

2) Select "longsword" in the second box

3) make sure you have 100 % and two numbers in the three number boxes

4) Click into the PPI text field

5) Click on the $Add DB button

Now click into the PPL field again and change the line to look as following:

Whenever you now hit F4 to enter preview mode, you get a randomly selected item which tells you nicely, how the syntax should look like. Maybe also try to write sentences using both the shorttext (%s) and the longtext (%l) to test how different items "fit" into that sentence. All the items you write will have to fit to those sentences as well!

 

The method just described should also be used for testing your own datasets! As soon as you have saved your database, the items will be available from the "describtion tab" and the $DB command. Always test whether or not your own items fit to sentences which can be built by "old items". If they do, you can be sure that your items would fit to descriptions already in the databases...