• Tutorials

  • Home
  • Text Item Database

    Total validation is performed when reading this data. Nothing you do can cause the program to crash. It may spit error messages and quit for lack of something decent to do but it will not crash or do unexpected things. It shouldn't anyway. If it does, please let us know.

    The first item has the name "template" and will be ignored. You can use it as a 'template'. Copy it to the bottom of the file and edit the copy to add your item to the database.

    Each line is of the form name = value (value may be omitted) Eg:

    		Special Ability = 
    This line will be interpreted as setting 'Special Ability' to the empty string. This is commonly the default so in many cases it is the same as omitting the line entirely.

    White space is a bit important. Because names and values can contain blanks. So the rule is....leading and trailing whitespace are ignored. So, for example:

    		attack bonus         =     3         
    		attack bonus=3
    are equivalent. But,
    		attack    bonus = 3
    		attack bonus = 3
    are different.

    Lines starting with two slashes are comment lines.

    Attribute names are case-insensitive.

    		Name = Wimpy Axe
    		namE = Wimpy Axe
    		NAME = Wimpy Axe
    are equivalent.

    Text values retain their case. Values with enumerated possibilities are case-insensitive. Eg:

    		baseclass = PaLaDiN     + FiGhTeR+ThIeF

    File names can use the UNIX syntax with slashes because the backslash is used to escape special characters and it gets ugly to put double backslashes everywhere. If you like to use backslashes you may. We will accept either. Even mixed in a single filename. Eg:

    		C:/UAF\\src\\guild of ravens/release1/beta\\art/barkeep.bmp

    Item definitions are delimited by \(BEGIN) ........ \(END) which must start in column 1.

    ************ Now for the interesting part ***********

    Each item is defined by the following fields.

    Name (text, required - item record ignored if missing or blank). Each item must have a uniue name. You may add a qualifier to a name (separated with a vertical bar) to make it unique. For example:

    		Axe
    		Axe|Sharp
    		Axe|Dull
    The qualifier is only used when editing a design. The qualifier is discarded when the binary files for the design are created. But the unique name is necessary during the design stage to allow unambiguous references to the items. During gameplay they are identified by a binary integer 'key' so there is no confusion between the three Axes even though they all print as 'Axe'.
    default - no default value...required
    eg:
    		name = Axe of Partial Beheading

    Id Name (text, Name used for identified magical items - text, or NA)
    default - no default value
    eg:

    		Id Name = qwerty

    Hit Sound File (text, WAV file played when item hits opponent, or None).
    default is to use the default hit sound
    eg:

    		hit sound = C:/uaf/UAF/ouch.wav
    		hit sound = None
    		hit sound = 

    Miss Sound File (text, WAV file played when item misses opponent, None).
    default is to use the default miss sound
    eg:

    		miss sound = C:/uaf/UAF/swish.wav
    		miss sound = None
    		miss sound = 

    Launch Sound File (text, WAV file played when item attack is initiated on opponent, None).
    default is to use the default launch sound
    eg:

    		launch sound = C:/uaf/UAF/ShootArrow.wav
    		launch sound = None
    		launch sound = 

    Ammo Type (text - specifies ammo category). Before a weapon can use ammo, the Ammo Type text for both magicUserst match exactly. The Ammo Type can be any text string.
    eg:

    		ammo type = bow

    Experience - integer given to player when item received.
    default is 0 (zero)
    eg:

    		experience = 23

    Cost - integer in gold pieces.
    default is 0 (zero)
    eg:

    		cost = 12

    Encumbrance - integer of weight in gold pieces. The gp per pound is configured in the Global Data -> Global Settings
    default is 0 (zero)
    eg:

    		encumbrance = 20

    Attack Bonus - integer
    default is 0 (zero)
    eg:

    		attack bonus = 3

    Cursed - yes or no. If yes, item cannot be un-readied without magical intervention.
    default is no
    eg:

    		cursed = yes

    Non Lethal - yes or no. If yes, item cannot reduce target below 0 hit points.
    default is yes
    eg:

    		non lethal = yes

    Bundle Qty - integer. If higher than 1, item can be joined/halved and is purchased in this quantity.
    default is 1
    eg:

    		bundle quantity = 10

    Location Carried - weapon hand, shield hand, armor, on hands, head, waist, body, back, feet, fingers, quiver. Note: designers may define other areas such as ears, toes, etc.
    default is weapon hand
    eg:

    		readied location = QUIVER

    Hands to carry (0,1,2)
    default is 1
    eg:

    		hands to carry = 2

    Small/Medium damage dice - NumDice 'D' NumSides + Bonus - damage to small/medium creatures.
    default is 0D0+0
    eg:

    		small/medium damage dice = 1D8+3

    large damage dice - NumDice 'D' NumSides + Bonus - damage to large creatures.
    default is 0D0+0
    eg:

    		large damage dice = 1D6+2

    ROF per round - floating point number, 3 attacks every 2 rounds = 3/2 = 1.5
    default is 1.0
    eg:

    		ROF per round = 2.0

    AC base - integer.
    default is 0
    eg:

    		AC base = 1

    AC Bonus - integer.
    default is 0 (zero)
    eg:

    		AC bonus = 1

    Weapon Type - may be not weapon, hand held blunt, hand held cutting, hand held or thrown, sling, bow, crossbow, thrown only, ammo, spell caster.
    default - not weapon
    eg:

    		weapon type = sling

    baseclass - which baseclasses can ready this item: magicUser, cleric, thief, fighter, paladin, ranger, druid, assassin (using the default baseclass database). Multiple baseclasses can be declared by adding additional lines.
    default - all baseclasses
    eg:

    		baseclass = fighter
    		baseclass = thief

    Combat Range - integer, represented in squares.
    default is 1
    eg:

    		combat range = 3

    Special Abilities - represent Special Abilities for the item and refer to the Special Abilities database
    default is blank
    eg:

    		Special Ability = SA_Bless,1

    Spell effect - name of spell in spell database that this item can cast. default is none
    eg: spell effect = Cause Tonsillitus

    Usable - eitheryes or no.
    default is no
    eg:

    		usable = yes

    Number of Charges - integer
    default is 0 (zero)
    eg:

    		number of charges = 8

    Recharge Rate - how often item charges are restored to maximum. Man be 'never' or 'daily' default is never, and only has effect if 'usable = yes'
    eg:

    		recharge rate = daily

    Missile Sprite - comma-separated text: filename,delay,num frames, frame width, frame height, style, MaxLoops, flags. Filename can be blank to use DEFAULT or "none". Delay in millisecs where 1 sec=1000 ms (should be 0 for items). Num frames is total frames in image. Width is pixel width of single frame in image. Height is pixel height. Style is animation style where: 0=sequenced (sequences thru frames on way to target), 1=directional (like arrows, requires 8 frames for directions N,NE,E,SE,S,SW,W,NW). MaxLoops is the max nbr times the animation will loop, if looping enabled by flags. Flags is animation properties where: (flags are additive); 0=none, 1=not used for items, 2=loop only nbr times in Max Loops, 4=loop this animation. Flags can be combined, as in 4+2=6 gives looping (4) and uses MaxLoops (2).
    default - DEFAULT
    eg:

    		missle sprite = arrow.png,0,1,16,16,1,0,0

    Hit Sprite - comma-separated text: filename,delay,num frames, frame width, frame height, style, MaxLoops, flags. Filename can be blank to use DEFAULT or "none". Delay in millisecs where 1 sec=1000 ms (should be 0 for items). Num frames is total frames in image. Width is pixel width of single frame in image. Height is pixel height. Style is animation style, should be 0 for hit sprite. MaxLoops is the max nbr times the animation will loop, if looping enabled by flags. Flags is animation properties where: (flags are additive) - 0=none, 1=not used for items, 2=loop only nbr times in Max Loops, 4=loop this animation. Flags can be combined, as in 4+2=6 gives looping (4) and uses MaxLoops (2)
    default is none
    eg:

    		hit sprite = stone.png,0,1,16,16,0,0,0

    An item will be considered magical if any of the following are true:


    Example:
    \(BEGIN)
    name = Bardiche
    id name = Bardiche
    launch sound = none
    hit sound = sound_Hit.wav
    miss sound = sound_Miss.wav
    missile sprite = none
    hit sprite = none
    ROF per round = 0.000000
    combat range = 1
    cost = 2
    hands to carry = 2
    baseclass = assassin
    baseclass = fighter
    baseclass = paladin
    baseclass = ranger
    small/medium damage dice = 2D4 + 0
    large damage dice = 2D6 + 0
    AC base = 0
    AC bonus = 0
    attack bonus = 0
    experience = 0
    encumbrance = 125
    cursed = no
    non lethal = no
    readied location = WEAPON
    bundle quantity = 1
    Special Ability = item_WeaponType,piercing/slashing
    weapon type = hand held cutting
    ammo type = 
    usable = no
    scribtable = no
    can drop = yes
    CanHalveJoin = no
    number of charges = 0
    recharge rate = never
    spell effect = none
    \(END)