• Tutorials

  • Home
  • Text Spell 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 spell is defined by the following fields:

    Name - text, required. Each spell must have a uniue name. You may add a qualifier to a name (separated with a vertical bar) to make it unique. For example:

    		Dimwittify
    		Dimwittify|sorta
    		Dimwittify|really
    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 spells. During gameplay they are identified by a binary integer 'key' so there is no confusion between the three Dimwittifies even though they are all printed as 'Dimwittify'.
    default - all blanks (which makes the entire spell a comment)
    eg:
    		name = subliminal flash

    Cast Msg - text. This is the text displayed when the spell is cast. You can substitute the names of the target, caster, and spell by using /t, /c, and /s.
    default - none
    eg:

    		/c blasts /t with /s

    Casting sound - file name, or "none", or "Default".
    default - DEFAULT
    eg:

    		zap.wav

    Missile sound - file name, or "none", or "Default". default - DEFAULT
    eg:

    		zap.wav

    Coverage sound - file name, or "none", or "Default". default - DEFAULT
    eg:

    		zap.wav

    Hit sound - file name, or "none", or "Default". default - DEFAULT
    eg:

    		zap.wav

    Linger sound - file name, or "none", or "Default". default - DEFAULT
    eg:

    		zap.wav

    school - Cleric, Druid, Magic User or user defined. Only one school allowed this determines which school of magic the spell belongs to.
    default - Cleric
    eg:

    		school = Cleric

    Cast by - cleric, druid, magicUser, paladin, ranger. Combine multiple classes using the + sign.
    default - cleric
    The following example creates a spell that can only be cast by clerics and rangers. Also, 'school = Cleric' should preceed this.
    eg:

    //		Cast by = cleric + ranger 
    You can create spells that only Rangers can cast, which still belong to the cleric school, with.
    eg:
    		Cast by = ranger

    Friendly Fire ok - yes or no. Can this spell be cast on a party member?
    default - no
    eg:

    		friendly fire ok = yes

    Combat Only - yes or no. Is this spell castable only during combat?
    default - yes
    eg:

     		in camp = no
    		in combat = yes

    Cumulative - yes or no. Will this spell affect a target that already has the same spell active?
    default - yes
    eg:

    		cumulative = yes

    Usable By Party - yes or no. Can party members memorize and cast this spell? If not, only monsters/NPCs can use it.
    default - yes
    eg:

    		can memorize = yes

    Can Scribe - yes or no. Should this spell be made available for scribing by MU at level change?
    eg:

    		allow scribe = no

    Auto Scribe - yes or no. MagicUsers are automatically given spells with this property enabled when they advance to a new level (or start anew at level 1.
    default - no
    eg:

    		auto scribe = no

    Save Versus - "Par/Pois/DM" or "Pet/Poly" or "Rod/Staff/Wand" or "spell" or "Breath Weapon". Par/Pois/DM = Paralysis/Poison/DeathMagic. Pet/Poly = Petrification/Polymorph. Which table of saving throws will be used default is spell.
    eg:

    		save versus = pet/poly

    Save Result - none, Negates, Half Damage, Use THAC0.
    default - none
    eg:

    		save result = half damage

    Special Ability - name of Special Ability.
    eg:

    		Special Ability = SA_Bless

    Targeting type - self, selectByCount, party, touch, areacircle, SelectByHitDice, arealinepickstart, arealinepickend, areasquare, areacone.
    default - self
    eg:

    		targeting type = areacircle

    Duration units - rounds, damage taken, hours, days, or instantaneous.
    default - rounds
    instantaneous equates to permanent, the spell effect never expires
    eg:

    		duration units = days

    Level - integer 1-9.
    default - 1
    eg:

    		level = 4

    Casting Time - integer.
    default - 1
    eg:

    		casting time = 2

    Casting Time Units - Immediate, Initiative, Rounds, Turns.
    default - Immediate
    eg:

    		casting time units = rounds

    Number of targets ( d + [+ *level] [>| ]
    default - 0d0
    eg:

    		Number of targets = 2d4 - 2 + level >| 2
    		Number of targets = 1d4 - 1

    Duration ( d + [+*level] [>| ]
    default - 0d0
    eg:

    		Duration = 2d6 + 1 >| 4

    Target Range ( d + [+*level] [>| ]
    default - 0d0
    eg:

    		target range = 2d4 + 0 + level

    Price (integer, base coin unit), charged by temple priest in temple event (integer)
    default - zero
    eg:

    		price = 200

    Cast Art - Displayed over caster when spell is cast, 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 (must be 0 for spells). Num frames is total frames in image. Width is pixel width of single frame in image. Height is pixel height. Style is animation style, must be 0 for spells. 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 spells, 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:

    		Cast art = c:\sprites\fireball.bmp,0,1,16,16,0,0,0

    Missile Art - isplayed while spell is in-route to spell target. 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 (must be 0 for spells). 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 spells, 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:

    		missile art = c:\sprites\fireball.bmp,0,1,16,16,1,0,0

    Target Cover Art - Displayed over target after spell hits target, 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 (must be 0 for spells). Num frames is total frames in image. Width is pixel width of single frame in image. Height is pixel height. Style is animation style (must be 0 for spells). 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 spells, 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:

    		Target Cover Art = spell_missile_twinkle.png,0,1,16,16,0,0,0

    Target Hit Art - Displayed when spell hits target, 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 (must be 0 for spells). Num frames is total frames in image. Width is pixel width of single frame in image. Height is pixel height. Style is animation style (must be 0 for spells). 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 spells, 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:

    		target hit art = c:\sprites\wham.bmp,0,1,16,16,0,0,0

    Target Linger Art - Displayed over area of effect for spell duration, 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 (must be 0 for spells). Num frames is total frames in image. Width is pixel width of single frame in image. Height is pixel height. Style is animation style (must be 0 for spells). 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 spells, 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:

    		target linger art = c:\sprites\stinkingcloud.bmp,0,1,16,16,0,0,0

    Spell Effect - Specify which character attributes are modified by this spell. To modify multiple attributes, add multiple 'spell effect' lines.
    Format: Attribute,Change Amount(diceplus format),Change Units, Targeting, Cumulative, Script1, Script2, Script3
    Attribute = attribute keyword affected, such as $CHAR_THACO. Change Amount = how much to change attribute value, such as 1d4 + level + 2. This is a signed number. To decrease the current value, use a negative Change Amount. Change Units = 'delta', 'percent', or 'absolute'. Delta value is added to current value, Percent changes current value by given percentage, Absolute changes current value to given value. Targeting = 'target','targeter','alltargettypes'. target = affects spell target, targeter = affects whomever targets the spell target (combat only). alltargettypes = all of the above. Cumulative = 'yes' or 'no', will this attribute change have affect if same attribute already modified from same or different spell? Script1 = optional, A GPDL script that is evaluated at runtime to determine if spell will affect targets. Script2 = optional, A GPDL script that is evaluated at runtime to determine how the Change Amount is modified based on current game data. Script3 = optional, A GPDL script that is evaluated at runtime to determine how the saving throw of the spell target is modified based on current game data. Script4 = optional, A GPDL script that is evaluated at runtime - but only if the spell target failed the saving throw.
    Scripts are optional and can be left blank. However, if Script3 is used and the others are not, placeholder commas must be used.
    eg:

    		spell effect = $CHAR_AC, 1d4+2, delta, target, yes
    		spell effect = $CHAR_THACO, 1d6, percent, alltargettypes, no
    next one shows Script1 and Script2 as being empty, while Script3 is not
    		spell effect = $CHAR_THACO, 1d6, percent, alltargettypes, no,,,$RETURN true;
    Key is the index number for the spell, and is in the range of 1 to 2,000,000,000. 1 to 1,000 are reserved for use by the default spells if left blank, the editor will automatically assign an unassigned number when this database is imported into your design


    Example:
    \(BEGIN)
    name = Cause Light Wounds
    casting sound = sound_Cast.wav
    cast msg = /c casts Cause Light Wounds on /t
    missile sound = none
    coverage sound = none
    hit sound = sound_Hit.wav
    linger sound = none
    cast art = spell_cast_Priest.png,210,2,48,48,0,1,4
    missile art = spell_missile_Priest.png,100,4,48,48,0,1,0
    target cover art = none
    target hit art = none
    target linger art = none
    school = Cleric
    Cast by = cleric
    friendly fire ok = yes
    cumulative = yes
    can memorize = yes
    allow scribe = yes
    auto scribe = yes
    in combat = yes
    in camp = no
    can be dispelled = no
    lingers = no
    linger affects once = no
    save versus = spell
    save result = use THAC0
    Special Ability = Caster,$cleric$11
    Special Ability = DamageMagical,wound
    Special Ability = spell_Attack,1
    targeting type = touch
    level = 1
    casting time = 5
    casting time units = initiative
    Number of targets = 1
    duration = 
    duration units = instantaneous
    target duration = 
    target range = 1
    price = 0
    spell effect 1 = $CHAR_HITPOINTS,-1d8,delta,target,yes
    activate script 1 = $IF ($GET_CHAR_UNDEAD($IndexOf($TargetContext())) \=\= 0){$RETURN 1;};
    begin script = 
    end script = 
    \(END)