• Tutorials

  • Home
  • Text Special Ability 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 ***********

    Name - text, required. Unlike the other databases, 'name' is the only required keyword for a special ability. There are certain naming conventions used in the default special abilities database, but they are for ease of use and are not required, i.e. using "spell_" in front of a special ability intended for a spell, "monster_" for one intended for a monster, etc.
    default - none
    eg:

    		name = spell_LimitedWish

    For ease of reading, many of the special abilities make use of line returns (pressing Enter) to start a new line. If this is done, the line must begin with a dash ( - ). The line returns are not necessary in the scripts as far as Dungeon Craft is concerned. Note: the dashes for a new line are only used in the text version of the database, not the version entered in the editor

    Hooks - one of several keywords found on the Special Ability Scripts page. The name must be enclosed in brackets ( [ ] )
    eg:

    		[CureOrWhatever]

    Integer Tables - designer designated term in between less than and greater than symbols ( < > ). Lines of the script must be integers.
    eg:

    		<BigTop>

    Constants - designer designated term. All things on the right side of the equals sign are essentially treated as notes at this time, as Dungeon Craft is not looking at constants at this time.
    eg:

    		Notes


    Example:
    \(BEGIN)
    name = class_Thief
    [CharDisplayStatus] = $IF ($GET_HOOK_PARAM(5) == "DISPLAY")
    -	{
    -		$SET_HOOK_PARAM(7,"Pocket "+ $SkillAdj($CharacterContext(),"PickPockets","","F","")+ "\n" +"Lock "+ $SkillAdj($CharacterContext(),"OpenLocks","","F","")+ "\n" +"Trap "+ $SkillAdj($CharacterContext(),"FindTraps","","F","")+ "\n" +"Move "+ $SkillAdj($CharacterContext(),"MoveSilent","","F","")+ "\n" +"Hide "+ $SkillAdj($CharacterContext(),"HideInShadows","","F","")+ "\n" +"Hear "+ $SkillAdj($CharacterContext(),"HearNoise","","F","")+ "\n" +"Climb "+ $SkillAdj($CharacterContext(),"ClimbWalls","","F","")+ "\n" +"Read "+ $SkillAdj($CharacterContext(),"ReadLanguages","","F",""));
    -		$SET_HOOK_PARAM(6,"Thief");
    -	}
    -$ELSE
    -	{
    -		$SET_HOOK_PARAM(7,"");
    -		$SET_HOOK_PARAM(6,"");
    -	};
    -$RETURN 1;
    [PostCreateCharacter] = $SET_CHARACTER_SA($CharacterContext(),"class_ThiefSkills",1);
    \(END)