 |
Dielantha Beginner
Joined: 29 Nov 2002 Posts: 12 Location: USA
|
Posted: Tue Jan 21, 2003 1:45 am
Help with equipment database |
Ok so I'm trying to setup an equipment database so when I cast the identify spell it will capture the text and store it in my equipment database. First I will show you what I have done.
The item I am trying to store is an ivory hilted dagger. Identify output looks like:
Object 'an ivory hilted dagger' is type weapon, extra flags magic bless anti-evil.
Weight is 1, value is 2100, level is 27.
Material is steel.
restrict flags none.
Weapon type is dagger.
Damage is 8d4 (average 20).
Weapons flags: sharp
Affects hit roll by 1.
Affects damage roll by 2.
I then created a serious of triggers:
#CLASS {identify}
#TRIGGER {Object &Item.Object is type &Item.Type extra flags &Item.Extraflags} {}
#TRIGGER {Weight is &Item.Weight value is &Item.Value level is &Item.Level} {}
#TRIGGER {Material is &Item.Material} {}
#TRIGGER {restrict flags &Item.Restrictflags} {}
#TRIGGER {Weapon type is &Item.Weapontype} {}
#TRIGGER {Damage is &Item.Damage} {}
#TRIGGER {Weapons flags &Item.Weaponflags} {}
#TRIGGER {Affects hit roll by &Item.Hitbonus} {}
#TRIGGER {Affects damage by &Item.Dambonus} {}
#CLASS 0
Which the end result turned into a variable flagged database record and looked like this:
NAME: ITEM
OBJECT='an ivory hilted dagger'
TYPE=weapon,
EXTRAFLAGS=magic bless anti-evil
WEIGHT=1,
VALUE=2100,
LEVEL=27.
MATERIAL=steel.
RESTRICTFLAGS=none.
WEAPONTYPE=dagger.
DAMAGE=8d4 (average 20).
HITBONUS=1.
DAMBONUS=2
All that is fine and good. I'm impressed I got that far. However when i click on the database it isn't in the list. What do I need to do to get this information into the actual database?
Dielantha |
|
|
 |
Kjata GURU

Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Tue Jan 21, 2003 2:16 am |
Use the #NEW command to add the new record to the database.
Kjata |
|
|
 |
linenoize Newbie
Joined: 03 Nov 2006 Posts: 3
|
Posted: Tue Jan 09, 2007 4:28 pm |
I am trying to do the same thing, i have read the manual over and over and am lost... I will show you examples of my armor and weapon then what i have already written.
armor:
Code: |
Object 'high elven neckband' (high elven neckband)
Weight [4] Value is [264] Level [22]
Wear bits: take neck
Extra bits: identified.
PC Races allowed: dwarf
Item type: armor
Base AC: 6 Damage: 0 Effective AC: 6 Dmg Reduction: 0 |
weapon:
Code: |
Object 'dagger' (dagger)
Weight [5] Value is [28] Level [8]
Wear bits: take wield
Extra bits: identified anti-good anti-neutral sharpened craftable.
PC Races allowed: halfling
Item type: weapon
Damage is 3 to 9 (average 6).
Weapon type: stab (backstabber).
Affects damroll by 2.
Affects hitroll by 2. |
current code:
Code: |
id %1
#TRIGGER {Object '*' (&Item.Name)} {} identify
#TRIGGER {Weight [&Item.Weight] Value is [&Item.Cost] Level [&Item.Level]} {} identify
#TRIGGER {Wear bits: &Item.Wear} {} identify
#TRIGGER {Extra bits: &Item.Comment} {} identify
#TRIGGER {Item type: &Item.Type} {} identify
#TRIGGER {Damage is &Item.Damage} {} identify
#TRIGGER {Weapon type: &Item.Type2} {} identify
#TRIGGER {Base AC: &Item. Damage &Item. Effective AC: &Item. Dmg Reduction: &Item.} {} identify
#TRIGGER {Affects damroll by &Item.Damroll} {} identify
#TRIGGER {Affects hitroll by &Item.Hitroll} {} identify
#TRIGGER {$} {
#T- identify
#IF (!%null( @NewItem)) {#NEW @ItemType @Item}
} identify |
I think my current confusion lies with the fact that the alias above creates those triggers. Is it supposed to do that?
Also here is my prompt in case that matters.
prompt:
Code: |
<292/292h 80/282m 417/417mv 0bld 12 gold> |
|
|
|
 |
|
|