|
How to design buildings
|
All buildings are specified in the town-files. All available modifications
for the townfiles like including other files and conditional parsing are possible.
The easiest way to create a new building is to use the
Building Creator.
Just fill out the form, select Build, and copy the result into the town-definition.
Every line of a building-definition starts with B (for Building). The different
values in a line are seperated by colons ":".
The next value is the number of the building. It can be a number between 0 and 31 (this means
that you can define up to 32 buildings per town). The number of the terrain feature for
a building (used in the terrain feature definitions) is calculated by adding 128 to the
number of the building.
Then comes a letter describing what you are defining in this line.
The other values in the definition depend on this value.
- N - Names
- Building name
- Building owner name
- Name of the owners race
Example: B:0:N:Library:Astinus:Human
- A - an action in the building
- Number of the action (between 0 and 5)
- Name of the action
- Cost of the action if the player belongs to the members of the guild
- Cost of the action if the player is not a member of the guild
- The keyboard command for the action
- The code for the action
- The restriction of the action (0 = all allowed, 1 = members only, 2 = premium members only)
Example: B:0:A:0:Research item:2000:2000:a:1:0
- C - The member and owner classes of the building
- Member values for all available classes
(0 = not a member, 1 = normal member, 2 = premium member)
Example: B:0:C:1:1:1:1:1:1:1:1:1:1:1
- R - The member and owner races of the building
- Member values for all available races
(0 = not a member, 1 = normal member, 2 = premium member)
Example: B:0:R:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0
- M - The member and owner magic realms of the building
- Member values for all magic realms
(0 = not a member, 1 = normal member, 2 = premium member)
Example: B:0:M:0:0:0:0:0:2:0
Example definition for the "Trump Tower":
B:13:N:Trump Tower:Algo:Amberite
Building definition for building number 13 (the associated terrain feature is 128+13=141).
It is named "Trump Tower" and headed by "Algo" the "Amberite".
B:13:A:0:Recall to dungeon:0:100:r:33:0
The first action is named "Recall to dungeon", costs nothing for members,
100 for non-members, is activated by pressing "r" in the building,
activates the building action number 33 = "Recall to dungeon",
and is available for everybody.
B:13:A:1:Teleport to dungeon-level:0:10000:t:34:0
The second action is named "Teleport to dungeon-level", costs nothing for members,
10000 for non-members, is activated by pressing "t" in the building,
activates the building action number 34 = "Teleport to dungeon level",
and is also available for everybody.
B:13:C:0:0:0:0:0:0:0:0:0:0:0
No class gets member status in the building.
B:13:R:0:0:0:0:0:0:0:0:1:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0
Amberites (index 9) are normal members of the "Trump Tower".
B:13:M:0:0:0:0:0:2:0
You are a premium member if you can use Trump spells (index 6).
Action codes:
- Research Item
- Town history
- Race Legends
- Greet King
- King legends
- Quest
- Share gold
- Read arena poster
- Read arena rules
- Arena legends
- Play In-Between
- Read gamble rules
- Play Craps
- Play Spin Wheel
- Play Dice Slots
- Rest for the night
- Buy food
- Listen to rumors
- Research monster
- Compare weapons
- Show legends
- Enchant weapon
- Enchant armor
- Recharge
- Identify
- Learn spell (not used in ZAngband)
- Healing
- Restore
- Enchant arrows
- Enchant bows
- Greet building owner
- Recall to dungeon
- Teleport to dungeon level
ZAngband classes:
- Warrior
- Mage
- Priest
- Rogue
- Ranger
- Paladin
- Warrior Mage
- Chaos Warrior
- Monk
- Mindcrafter
- High Mage
ZAngband races:
- Human
- Half Elf
- Elf
- Hobbit
- Gnome
- Dwarf
- Half Orc
- Half Troll
- Amberite
- High Elf
- Barbarian
- Half Ogre
- Half Titan
- Cyclops
- Yeek
- Klackon
- Kobold
- Nibelung
- Dark Elf
- Draconian
- Mind Flayer
- Imp
- Golem
- Skeleton
- Zombie
- Vampire
- Spectre
- Sprite
- Beastman
ZAngband magic realms:
- Life
- Sorcery
- Nature
- Chaos
- Death
- Trump
- Arcane