Saturday, 9 July 2011

Moving to Edit Files

Following much thought, I've decided to move to Edit Files to store at least the Monster Definitions, instead of in an SQLLite Database. The main reason is actually flexibility.

The model I've chosen is something similar to the Angband edit file, with a few modifications. Here is the template:

# Each creature has an individual entry in the following format:
#
# N: ID : singlular name : plural name
# L: Creature Level : Rarity : Uniqable?
# E: Ecology : Type: Pickup Items?
# G: Display Character : Display Colour
# I: Hit Dice : Armour Class : Evasion : Speed
# V: Initial Alertness Level
# A: Action Frequency : Action Text
# S: Speech Frequency : Speech Text
# B: Attack Method : Attack Effect : Damage
# M: Spell | Spell | Spell | etc
# F: Flag | Flag | Flag | etc
# C: Class | Class | etc
# D: Description

Anyone familiar with the Angband source should recognise most of these options, although I've enhanced a couple, and added a few additional sections.

Below I give a couple of excerpts of 2 creatures already in Kharne translated over to the new format:

N: 2 : Kobold : Kobolds
L: 1 : Common : Yes
E: Fortress: Goblinoid: Yes
G: k: $004080
I: 1: 5: 11: 12
V: 255
A: 10: "picks a chunk of rotten meat from its teeth"
A: 10: "yips noisily"
S: 20: "I'm gonna kill you! Yip yip!"
B: HIT: HURT: 1d6
B: SHOOT: HURT: 1d6
F: COWARDLY | FLEE | OPEN_DOOR | GREEDY
F: EVIL | POISONOUS | CORPSES
F: DROP_ITEMS_POOR | DROP_CASH
C: Commando | Archer | Lurker
D: "Kobolds are short, ugly goblinoid humanoids."
D: "They are known to have cowardly and sadistic tendencies."

N: 23 : Ogre Mage : Ogre Magi
L: 4 : Rare : Yes
E: Fortress: Giant : Yes
G: O: $FF00FF
I: 4: 6: 12: 12
V: 255
A: 10: "waves a magic stick"
A: 10: "yells a magic word"
S: 20: "dis two and dat two make four, right?"
B: HIT: SLAM: 1d6
M: MAGIC_MISSILE | HEAL | HOLD | TELEPORT
F: RANGED | BESERK | OPEN_DOOR | GREEDY
F: EVIL | CORPSES
F: DROP_ITEMS_POOR | DROP_ITEMS_GOOD | DROP_CASH
D: "Ogre Magi are hideous and deformed ogres wrapped in deathly black robes"
D: "They are known to be cruel and masters of deadly arcane magics."

2 comments:

RedFoxOne said...
This comment has been removed by the author.
RedFoxOne said...

I thought your article was really good and have used it as a basis for a follow up design article for my own roguelike Veneficus Schola, my article is at Monster edit files