Dungeon Keeper

Dungeon Keeper

16.10.2013 01:42:11
SCRIPTING THE LEVELS FROM DUNGEON KEEPER
by The Avatar



Scripting a level actualy is more like editing a text
file which is required by that level. The text file is
scripted using some special commands and variables
which you will learn by reading this file. But before
starting to script a level there are some things that
we should do first.

If you only have Dungeon Keeper, you will only need to
read those passages which refer to installing
Dungeon Keeper for the Editor. If you also have
The Deeper Dungeons data disk, you need to read both
the Dungeon Keeper passages and the Deeper Dungeons
passages.

=======================================
INSTALLING DUNGEON KEEPER FOR SCRIPTING
=======================================

First make sure that you have Dungeon Keeper installed
on your machine. If you do not, install it now,
otherwise you will not be able to proceed.

Once you have installed Dungeon Keeper, copy over the
entire Levels, Ldata and Data directories from your
Dungeon Keeper CD to the Keeper directory on your
hard disk.


=============================================
INSTALLING THE DEEPER DUNGEONS FOR SCRIPTING
=============================================

If you have The Deeper Dungeons data disk, follow the
instructions below. If you do not have The Deeper
Dungeons, just skip this passage.

Install Deeper Dungeons as normal. Now copy over the
contents of the Levels, Ldata and Data directories of
your Deeper Dungeons CD to theLevels, Ldata and Data
directories of the Keeper directory on your hard
disk.

=================
FINAL PREPARATION
=================

Once all this is done, go to the Keeper directory on
your hard disk. You will see a file called keeper.cfg.
Open this and find the line starting with
INSTALL_PATH=. This tells the computer where the Data
and Levels directories are on the CD. Now that you have
copied them to your hard disk, you will need to alter
this line. Change it so that it points to your Keeper
directory e.g. INSTALL_PATH=c:\program files\bullfrog\keeper\

Lastly, and most importantly, all the files in the
Levels directory are currently set to read only because
you copied them from the CD. This will cause problems
with the Editor if you want to alter them. To change
this, go to the Levels directory and select all the
files in it. Then right click on the files to bring up
the menu. This may take a while owing to the number of
files in the directory. When the menu appears, click on
Properties. The Properties panel will appear and you
will see at the bottom a tick box with 'Read Only'
next to it. Click on the box to remove the tick and
click on OK.

============
FURTHER MORE
============

Make sure that you have followed all the instructions
carefully and correctly.

1. SCRIPTING A LEVEL

1.1 ABOUT SCRIPTING

You can script a map so that some special features about
it can be changed. The script will tell Dungeon Keeper
what spells are available on the level, what creatures
appear and other settings that are unique to the level.

A level contains a number of files which are placed in
the Levels directory. For example, for level 200, are
the following files:

Map00200.apt
Map00200.clm
Map00200.dat
Map00200.inf
Map00200.lgt
Map00200.lif
Map00200.own
Map00200.slb
Map00200.tng
Map00200.txt
Map00200.wib
Map00200.wlb

You will notice that there is a .txt file included in
the list. This is the script file which you will edit.

If you open it, you will see that it contains many
commands which the game uses to create the level.
When you have looked at the example script, open the
script file of the level you want to change.

Note: You can enter commands into the script in any
order. The script does not run like a proper program or
an HTML script. Instead, Dungeon Keeper stores it all
in memory. This means that IF commands will be
triggered immediately when their conditions are met.
Bear this in mind when you are writing your scripts.

The example scripts are laid out in the following way:

Setup Commands

Set up Generation Speed
Set up Computer Players (is applicable)
Set up Starting Gold
Set up Maximum Creatures

Set up Creature Pool
Set up available Creatures
Set up available Rooms
Set up available Doors
Set up available Traps
Set up available Spells

Adjust any creature statistics
Adjust any research values

Set up Flags
Set up Timers

Setup Parties
Add all creatures to Parties

Main Script

IF commands

IF commands for Objectives
IF commands for Information Icons

IF command resulting in a lost level (if necessary)
IF command resulting in a won level (if necessary)

This is done to keep the script readable and easy to
look at when searching for errors. Although not
necessary, it is good practice to keep to this format
so others can look at your script without finding it
incomprehensible.

1.2 ADJUSTING THE CREATURE STATISTICS

In the Data directory of Dungeon Keeper is a file
called creature.txt. This is a text file that
Dungeon Keeper looks at every time it loads to find
out all the statistics for all the creatures and rooms
etc. in the game. You can adjust these easily in any
text Editor and they will directly affect the game.

Make a copy of the file first before making any changes.
You may need a backup if something goes wrong. This
info will not explain the features of the creature.txt
file but will leave you to experiment with it.

1.3 SCRIPT COMMANDS

This section will describe all the script commands
available to use in Dungeon Keeper. Each subsection has
a different theme and you should try and go through each
subsection and place the commands into your script in
the same order. This is to keep the scripts similar
so that other people can reference them easily.

Note: All action commands in the script (such as
ADD_PARTY_TO_LEVEL) will only be triggered once.
IF commands will keep triggering every time their
conditions are met but the commands inside them
will only trigger the one time. You will need to use
the NEXT_COMMAND_REUSABLE command if you want them
to keep triggering.

Below are a few common references explained:

1.3.1 GAME TURNS

A game turn is a counter that counts how many times
Dungeon Keeper has run through its main loop. The
main loop is a series of commands which tells the
game to update and then draw everything on the screen.
Each time it runs through these instructions, the game
turn counter increases by one and the loop is run again.

On slower PCs, the game turns will increase slowly,
while on fast machines the game turns will increase
faster. To stop the game becoming too fast, there is
a limit of 12 game turns a second. Bear these things
in mind when you write your script so that timers
are balanced on all machines.

1.3.2 PLAYERS

There are six players in the Editor. Each has a
number and colour.

Player
Player Command
Colour

Player 1 (single player)
PLAYER0
red

Player 2 (enemy)
PLAYER1
blue

Player 3 (enemy)
PLAYER2
green

Player 4 (enemy)
PLAYER3
yellow

Hero Dungeon
PLAYER_GOOD
white

Neutral
no colour/multicoloured

All Players
ALL_PLAYERS

Neutral is used for creatures and rooms that have not
been claimed by any players, e.g. unclaimed Portals
and bonus creatures hidden on the level.

Note: The player numbers start at 0 and not 1. The main
(red) player is player 0 and the one you will always
use for single player games.

1.3.3 VARIABLES

Variables are names that have a number associated with
them, e.g. the MONEY variable contains the amount of
gold that player has. Most variables in Dungeon Keeper
are individual to each player and are constantly updated
with the correct information. Some, such as the
FLAGS (See section 13.4 for more information) need to be
created and updated by the script.

The following variables are used by Dungeon Keeper:

Command
Description

MONEY
The amount of money the player has

GAME_TURN
The current game turn (player independent)

TOTAL_IMPS
The number of Imps that player has got

TOTAL_CREATURES
The number of creatures that player has got

TOTAL_RESEARCH
The amount of research points that
player has got (see section 5.2.6 for
more information)

TOTAL_DOORS
The amount of doors that player has got

TOTAL_AREA
The amount of tiles that player owns

TOTAL_CREATURES_LEFT
The amount of creatures that have left
that player's dungeon because they
were annoyed

CREATURES_ANNOYED
The number of creatures annoyed in that
player's dungeon

BATTLES_WON
The number of battles won by that player

BATTLES_LOST
The number of battles lost by that player

ROOMS_DESTROYED
The number of rooms destroyed by that player

SPELLS_STOLEN
The number of spells stolen by that player

TIMES_BROKEN_INTO
The number of times that players walls
have been breached

DUNGEON_DESTROYED
Whether that players Dungeon Heart has
been destroyed (0 if still active, 1 if destroyed)

CREATURES_SCAVENGED_LOST
Number of creatures lost by that player
due to scavenging

CREATURES_SCAVENGED_GAINED
Number of creatures gained by that player
through scavenging

ALL_DUNGEONS_DESTROYED
Whether all the players Dungeon Hearts
has been destroyed (0 if still active,
1 if destroyed)(player independent)

FLAGn
FLAG number: n is a number
between 0 and 7

TIMERn
TIMER number: n is a number
between 0 and 7

1.4 COMPARISONS

The Comparisons are symbols which you can use to compare
two values. These will be mainly used by the IF commands.

Command
Description

==
Equal to

!=
Not equal to

<
Less than

>
Greater than

<=
Less than or equal to

>=
Greater than or equal to

Note: If possible, use 'Less than or equal to' or
'Greater than or equal to' instead of the 'Equal to'
command because the IF command isn't checked every game
turn. This may cause the game to miss things and
therefore cause errors. For example, instead of asking
whether the player has 30 creatures, ask if the player
has 30 creatures or more.

1.5 ACTION POINTS

Action points are areas set in the Game that are
triggered if a creature steps
into it. The Action Point can only be triggered once
(unless you use the RESET_ACTION_POINT command) and is
player independent so you can only detect which player
triggered it.

Each Action Point has a number which you will have to
remember. You will use this number in the script later.

Hero Doors are special Action Points that act as
Portals for Heroes. They do not have trigger areas so
you cannot use them as traps, only as entry points for
parties or new creatures. Like the Action Points, each
Hero Door has a number and you will need to use this
number in the script later.

1.6 CREATURE NAMES

All the creatures in the Dungeon Keeper have special
names which you have to use when referring to them in
the script. The following list shows you their proper
name and the script name you should use.


Heroes
Command

Wizard
WIZARD

Barbarian
BARBARIAN

Archer
ARCHER

Monk
MONK

Dwarf
DWARFA

Knight
KNIGHT

Avatar
AVATAR

Tunneller Dwarf
TUNNELLER

Witch
WITCH

Giant
GIANT

Fairy
FAIRY

Thief
THIEF

Samurai
SAMURAI

Evil Creatures
Command

Imp
IMP

Horned Reaper
HORNY

Skeleton
SKELETON

Troll
TROLL

Dragon
DRAGON

Demonspawn
DEMONSPAWN

Fly
FLY

Dark Mistress
DARK_MISTRESS

Warlock
SORCEROR

Bile Demon
BILE_DEMON

Bug
BUG

Vampire
VAMPIRE

Spider
SPIDER

Hellhound
HELL_HOUND

Ghost
GHOST

Tentacle
TENTACLE

Orc
ORC

How you design your level is up to you but when Dungeon
Keeper was being developed, it was decided that some
creatures should not come through the Portals (although
they can be placed on the map for the player to find).
The reasons for this are: Ghosts are created when a
creature dies on a torture table and Skeletons are
created when a creature dies in a Prison. Horned Reapers
are only available through a sacrifice in the Temple
and Vampires only rise from the Graveyard. Tentacles
like water and are only bonuses on those levels with
water. Bear this in mind when you are scripting a level.

1.7 ROOM NAMES

Like the creatures, the rooms in Dungeon Keeper have
special script names.

Room
Command

Portal
ENTRANCE

Treasure Room
TREASURE

Dark Library
RESEARCH

Prison
PRISON

Torture Chamber
TORTURE

Training Room
TRAINING

Workshop
WORKSHOP

Scavenger Room
SCAVENGER

Temple
TEMPLE

Graveyard
GRAVEYARD

Barracks
BARRACKS

Hatchery
GARDEN

Lair
LAIR

Bridge
BRIDGE

Guard Post
GUARD_POST

1.8 DOOR AND TRAP NAMES

Doors and Traps have script names which must be used
when referring to them.

Door or Trap
Command

Wooden Door
WOOD

Braced Door
BRACED

Steel Door
STEEL

Magic Door
MAGIC

Boulder Trap
BOULDER

Alarm Trap
ALARM

Poison Gas Trap
POISON_GAS

Lightning Trap
LIGHTNING

Word of Power Trap
WORD_OF_POWER

Lava Trap
LAVA

1.9 SPELL NAMES

Spells have script names which must be used when
referring to them.

Spell
Command

Create Imp
POWER_IMP

Obey
POWER_OBEY

Sight of Evil
POWER_SIGHT

Call to Arms
POWER_CALL_TO_ARMS

Cave-in
POWER_CAVE_IN

Heal Creature
POWER_HEAL_CREATURE

Hold Audience
POWER_HOLD_AUDIENCE

Lightning Strike
POWER_LIGHTNING

Speed Creature
POWER_SPEED

Protect Creature
POWER_PROTECT

Conceal Creature
POWER_CONCEAL

Disease
POWER_DISEASE

Chicken
POWER_CHICKEN

Destroy Walls
POWER_DESTROY_WALLS

Armageddon
POWER_ARMAGEDDON

1.10 MISCELLANEOUS COMMANDS

These commands can be placed anywhere in your script
and do not directly affect the level.

1.10.1 REM

This can be placed at the start of a line to tell
the game to ignore any text after it.

Example:

REM ***** Setup Level Section *****

1.10.2 WIN_GAME

Tells the game that you have won the level.

This command must be included in single player games
to tell the player he has won. In multiplayer levels, it
is not necessary. You should always use them with IF
commands to make sure something happens to cause the
game to end.

Example:

REM ***** Win the level if Player 1's *****
REM ***** dungeon is destroyed *****

IF(PLAYER1,DUNGEON_DESTROYED==1)

WIN_GAME

ENDIF


1.10.3 LOSE_GAME

Tells the game you have lost the level.

This command does not always need to be included as you
will automatically lose the level if you Dungeon Heart
is destroyed. You should include it if there is a strict
goal the player needs to attain.

Example:

REM ***** Lose the level if Player 0's *****
REM ***** total battles lost is 30 *****

IF(PLAYER0,BATTLES_LOST>=30)

LOSE_GAME

ENDIF


1.10.4 SET_FLAG([player],[flag],[a])

Sets up a flag that is assigned a number.

[player] - The player's name, e.g. PLAYER1.

[flag] - The flag's name. There are eight flag names
which can be used for multiple players:

FLAG0
FLAG1
FLAG2
FLAG3
FLAG4
FLAG5
FLAG6
FLAG7

[a] - The number assigned to the flag. This can be
between 0 and 255.

Example:

REM ***** Setup FLAG0 *****

SET_FLAG(PLAYER0,FLAG0,0)

..

REM ***** If Player 0's total creatures *****
REM ***** is larger than 40 then set the *****
REM ***** flag to 1 *****

IF(PLAYER0,TOTAL_CREATURES>40)

SET_FLAG(PLAYER0,FLAG0,1)

ENDIF

..

REM ***** If FLAG0 is equal to 1 then win *****
REM ***** the game *****

IF(PLAYER0,FLAG0==1)

WINGAME

ENDIF



1.10.5 SET_TIMER([player],[timer])

Sets up a timer that increases by 1 every game turn from
when it was triggered.

[player] - The player's name, e.g. PLAYER1.

[timer] - The timer's name. Each player has their own
set of eight timers you can trigger.

TIMER0
TIMER1
TIMER2
TIMER3
TIMER4
TIMER5
TIMER6
TIMER7

Example:

REM ***** Setup Player 0's TIMER0 *****

SET_TIMER(PLAYER0,TIMER0)

..

REM ***** When TIMER0 reaches 1000, win *****
REM ***** the game *****

IF(PLAYER0,TIMER0>=1000)

WIN_GAME

ENDIF



1.10.6 IF([player],[variable][comparison][a])

This is used to test the differences between two values
([variable] and [a]). If those two values agree with the
comparison, the script will continue. If the two values
do not agree with the comparison, the script will find
the next ENDIF and continue from there.

[player] - The player's name, e.g. PLAYER1.

[variable] - The name of a variable used by
Dungeon Keeper.

[comparison] - A comparison, e.g. == (equal to).

[a] - A number to compare the variable to.

Note: You can only have a maximum of 48 IF
conditions (all types) in your script.

Example

REM ***** Detect whether Player 0's total *****
REM ***** number of creatures is larger *****
REM ***** than 40. If so, win the game, if *****
REM ***** not, continue *****

IF(PLAYER0,TOTAL_CREATURES>=40)

WIN_GAME

ENDIF

..

REM ***** If Player 0's Dungeon Heart is *****
REM ***** destroyed then lose the game *****

IF(PLAYER0,DUNGEON_DESTROYED==1)

LOSE_GAME

ENDIF


1.10.7 IF_ACTION_POINT([action point],[player])

Detects whether an Action Point has been trigger by one
of that players creatures. The Action point is only
triggered once (unless you use the RESET_ACTION_POINT
command) and you can only detect which player
triggered it.

[action point] - Action Point number.

[player] - The player's name, e.g. PLAYER1.

Note: You can only have a maximum of 48 IF
conditions (all types) in your script.

Example:

REM ***** If Action Point 2 has been *****
REM ***** triggered by one of Player 1's *****
REM ***** creatures then perform the *****
REM ***** following tasks *****

IF_ACTION_POINT(2,PLAYER1)

..

ENDIF


1.10.8 IF_AVAILABLE([player],[name],[comparison],[a])

Allows you to ask whether something is available to that
player. If it is not, then the answer will be 0. If it
is then the answer will be 1.

[player] - The player's name, e.g. PLAYER1.

[name] - The name of a creature, spell, trap or door.

[comparison] - A comparison, eg == (equal to).

[a] - A number to compare the variable to

Note: You can only have a maximum of 48 IF
conditions (all types) in your script.

Example:

REM ***** If Player 2 has a Temple then *****
REM ***** perform the following tasks *****

IF_AVAILABLE(PLAYER2,ROOM_TEMPLE>=1)

..

ENDIF


1.10.9 ENDIF

This command must be placed at the end of all IF
statements. This tells the IF command where to jump to
when the comparisons in the statement are not met.

See IF commands for examples.

1.10.10 RESET_ACTION_POINT([action point])

Once an Action Point has been triggered, it cannot be
triggered again unless it has been reset by this command.

[action point] - Action Point number.

Example:

RESET_ACTION_POINT(3)

1.10.11 NEXT_COMMAND_REUSEABLE

Once any action command, such as ADD_CREATURE_TO_LEVEL
or SET_TIMER, has been triggered once, it cannot be
triggered again. This means that you cannot create loops
or generators that add heroes to the level each time one
of your creatures steps foot in a room. To get around
this, the Dungeon Keeper script has a special command
to get around this called NEXT_COMMAND_REUSEABLE. You
will need to place this in front of every command in
the loop to make it work (it does not need to be placed
in front of IF commands)

Example:

REM ***** This loop adds a new hero to the *****
REM ***** level at Action Point 5 while a *****
REM ***** creature belonging to Player 0 *****
REM ***** is within the boundaries of *****
REM ***** Action Point 5. It will only *****
REM ***** stop when the Hero Dungeon Heart *****
REM ***** has been destroyed *****

IF_ACTION_POINT(5,PLAYER0)

IF(PLAYER_GOOD,DUNGEON_DESTROYED==0)

NEXT_COMMAND_REUSEABLE

ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,ARCHER,5,1,3,300)

ENDIF

ENDIF

..

REM ***** This loop adds a new hero to the *****
REM ***** level at Hero Door 3 every 1000 *****
REM ***** game turns. This is done by *****
REM ***** starting a timer, adding the *****
REM ***** hero when it reaches 1000 and *****
REM ***** then resetting it again *****

SET_TIMER(PLAYER0,TIMER0)

IF(PLAYER0,TIMER0>=1000)

NEXT_COMMAND_REUSEABLE
ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,WITCH,-3,1,6,600)

NEXT_COMMAND_REUSEABLE
SET_TIMER(PLAYER0,TIMER0)

ENDIF

1.11 SETUP COMMANDS

These commands set up your level and initialise your
computer players (if you have any).

1.11.1 SET_GENERATE_SPEED([a])

This command tells the game how long to wait before
generating a new creature for each player. The type of
creatures that appear cannot be scripted and will depend
on the rooms the player has built. This is a global
setting and will apply to all Portals.

[a] - The number of game turns between each creature.

Example:

REM ***** Create a new creature for each *****
REM ***** player every 500 game turns *****

SET_GENERATE_SPEED(500)

1.11.2 COMPUTER_PLAYER([player],[a])

If you have placed down an enemy dungeon heart
(not a hero dungeon heart) this command tells
Dungeon Keeper that a computer player needs to
be assigned.

[player] - The player's name, e.g. PLAYER1. See section 5.2.1.2 for more
information.

[a] - A single number telling the game what attitude the computer player has:

Computer Player
Description

0
A general computer player with everything turned on.

1
An aggressive computer player.

3
A defensive computer player that only builds rooms
3x3 tiles in size.

4
A defensive computer player that only builds rooms
4x4 tiles in size.

5
A aggressive computer player that only builds rooms
4x4 tiles in size.

10
A medium computer player.

Do not use any other numbers for computer players as the game will not
work properly.

Example:

REM ***** Set up and aggressive computer *****
REM ***** that uses Player 2's dungeon *****

COMPUTER_PLAYER(PLAYER2,1)

1.11.3 START_MONEY([player],[a])

How much gold each player has at the start of the level.

[player] - The player's name, e.g. PLAYER1.

[a] - The amount of gold for that player.

Example:

REM ***** Give all players 40000 in gold *****
REM ***** at the start of the level *****

START_MONEY(ALL_PLAYERS,40000)

1.11.4 MAX_CREATURES([player],[a])

The maximum number of creatures a player can have. The
player can still gain creatures through Scavenging and
Torturing but no more will come through the portal
until the number of creatures drops below the maximum
again.

[player] - The player name, e.g. PLAYER1.

[a] - The maximum number of creatures. This must be a
number below 255.

Example:

REM ***** Player 1 will not gain any more *****
REM ***** creatures through his Portal *****
REM ***** once he has 40 creatures in his *****
REM ***** dungeon *****

MAX_CREATURES(PLAYER1,40)

1.11.5 ALLY_PLAYERS([player],[player])

This command sets two players as allies at the start of
the game.

[player] - The player's name, e.g. PLAYER1.

Example:

ALLY_PLAYERS(PLAYER1,PLAYER2)

1.12 CREATURES, SPELLS, TRAPS AND DOORS

These commands set what creatures, spells, traps and
doors appear on the level and whether they need to be
researched or not. You do not need to use these commands
for Heroes and their traps and doors.

1.12.1 ADD_CREATURE_TO_POOL([creature],[a])

The creature pool is a set number of creatures that can
be attracted by all the players. Imagine a large group
of creatures waiting outside the Dungeon Area (all
Portals share this group). A player puts down a room,
e.g. a Torture Chamber, and a creature (Dark Mistress)
is attracted. The Mistress is taken from this group.
If there are no more Mistresses in the group then the
player will not be able to gain any more unless he uses
other means, e.g. scavenging. This is a first come,
first serve system so players will need to hurry if
they want to gain the rarest creatures. If a creature becomes angry,
it will exit via an Portal and return to the pool.
Dead creatures do not return to the pool so be careful
the players do not run out.

This command sets the number of creatures that are
placed in this pool. If you leave any creatures off
the list then they will not appear in the pool.

[creature] - The creature's name, e.g. BILE_DEMON.

[a] - The number of creature's of that type in the pool.

Example:

ADD_CREATURE_TO_POOL(BILE_DEMON,20)

1.12.2 CREATURE_AVAILABLE([player],[creature],[can be available],[is available])

This command tells the game that a specific creature
can come through that player's Portal.

[player] - The player's name, e.g. PLAYER1.

[creature] - The creature's name, e.g. WARLOCK.

[can be available] - This value should always be set
to 1. Creatures, unlike spells and rooms,
do not have to be pre-enabled.

[is available] - This value should either be 0 or 1.
Set it to 1 to enable the creature to appear
from the Portal.

Since the default value for [can be available] is 0,
you can just include in the script file only those
creatures you want the player to be able to attract.
This will cut down your script file considerably.

Remember, you can use the ALL_PLAYERS option for
[player] to cover all the players with one command.

Example:

REM ***** A Warlock can now appear at the *****
REM ***** Portal if owned by player 2 *****

CREATURE_AVAILABLE(PLAYER2,SORCEROR,1,1)

1.12.3 ROOM_AVAILABLE([player],[room],[can be available],[is available])

This command tells the game that a specific room is
available for the player to place down.

[player] - The player's name, e.g. PLAYER1.

[room] - The room's name, e.g. TEMPLE.

[can be available] - This value can be set to 0 or 1.
If it is 1 then you are telling the game that the room
may be researched at some point.

[is available] - This value should either be 0 or 1.
If it is 1 then the room is available straight away.
If it is 0 then the room cannot become available until
it is set to 1 or it is researched.

Since the default value for [can be available] is 0,
you can just include in the script file only those rooms
you want the player to be able to research. This will
cut down your script file considerably.

Remember, you can use the ALL_PLAYERS option for
[player] to cover all the players with one command.

Example:

REM ***** This Treasure Room has been set *****
REM ***** so that it is available from *****
REM ***** the start of the level. *****

ROOM_AVAILABLE(ALL_PLAYERS,TREASURE,1,1)

REM ***** This Torture Chamber has been *****
REM ***** set do that it needs to be *****
REM ***** researched before it becomes *****
REM ***** available. *****

ROOM_AVAILABLE(ALL_PLAYERS,TORTURE,1,0)

Note: The Treasure Room, Lair, Hatchery, Training Room
and Research Room should all be available at the start
of each level.

1.12.4
MAGIC_AVAILABLE([player],[spell],[can be available],[is available])

This command tells the game that a specific spell is
available for the player to cast.

[player] - The player's name, e.g. PLAYER1.

[spell] - The spell's name, e.g. POWER_LIGHTNING.

[can be available] - This value can be set to 0 or 1.
If it is 1 then you are telling the game that the spell
may be researched at some point.

[is available] - This value should either be 0 or 1.
If it is 1 then the spell is available straight away.
If it is 0 then the spell cannot become available until
it is set to 1 or researched.

Since the default value for [can be available] is 0, you can just include in the
script file only those spells you want the player to research. This will cut
down your script file considerably.

Remember, you can use the ALL_PLAYERS option for [player]
to cover all the players with one command.

Example:

REM ***** This Speed Creature spell has *****
REM ***** been set so that it is available *****
REM ***** from the start of the level. *****

MAGIC_AVAILABLE(ALL_PLAYERS,POWER_SPEED,1,1)

REM ***** This Conceal Creature spell has *****
REM ***** been set do that it needs to be *****
REM ***** researched before it becomes *****
REM ***** available. *****

MAGIC_AVAILABLE(ALL_PLAYERS,POWER_CONCEAL,1,0)

1.12.5 DOOR_AVAILABLE([player],[door],[can be available],[number available])

This command tells the game that a specific door is
available for the player to construct.

[player] - The player's name, e.g. PLAYER1.

[door] - The door's name, e.g. BRACED.

[can be available] - This value can be set to 0 or 1.
If it is 1 then you are telling the game that the door
can be constructed.

[number available] - The number of doors available to
the player at the start of the level or when they become
available.

Since the default value for [can be available] is 0,
you can just include in the script file only those
doors you want the player to construct. This will cut
down your script file considerably.

Remember, you can use the ALL_PLAYERS option for
[player] to cover all the players with one command.

Example:

REM ***** The Wooden Door is now available *****
REM ***** to the player to manufacture *****
REM ***** and none have been given to him *****
REM ***** at the start *****

DOOR_AVAILABLE(PLAYER1,WOOD,1,0)

1.12.6 TRAP_AVAILABLE([player],[trap],[can be available],[number available])

This command tells the game that a specific trap is
available for the player to construct.

[player] - The player's name, e.g. PLAYER1.

[trap] - The trap's name, e.g. LAVA.

[can be available] - This value can be set to 0 or 1.
If it is 1 then you are telling the game that the trap
may be constructed at some point.

[number available] - The number of doors available to
the player at the start of the level or when they become
available. Bear in mind that without a Workshop, the
traps cannot be armed. This may cause problems in the
game. It is best to leave this at 0 when you write your
scripts.

Since the default value for [can be available] is 0,
you can just include in the script file only those traps
you want the player to construct. This will cut down
your script file considerably.

Remember, you can use the ALL_PLAYERS option for [player]
to cover all the players with one command.

Example:

REM ***** The Word of Power Trap is now *****
REM ***** available to the player to *****
REM ***** manufacture and none have been *****
REM ***** given to him at the start *****

TRAP_AVAILABLE(PLAYER1,WORD_OF_POWER,1,0)

1.13 MANIPULATING CREATURES

With the following commands, you can manipulate the
creature statistic directly and alter them specifically
for your level. This will not affect the statistics in
the creature.txt file and can be set for a specific
player.

1.13.1 SET_CREATURE_MAX_LEVEL([player],[creature],[max experience])

This command sets the maximum experience level the
creature can train to. You can use this to stop certain
creatures from becoming too powerful.

[player] - The player's name, e.g. PLAYER1.

[creature] - The creature's name, e.g. SKELETON.

[max experience] - The maximum experience level for
that creature. The maximum experience level of any
creature is 10.

Example:

SET_CREATURE_MAX_LEVEL(PLAYER0,HELL_HOUND,5)

1.13.2
SET_CREATURE_STRENGTH([creature],[a])

This command sets the strength of all the creatures of
that type on the level. Each creature has a default
strength which can be found in the creature.txt file,
e.g. the BILE_DEMON has a strength level of 80.

[creature] - The creature's name, e.g. HORNED_REAPER.

[a] - The new strength of that creature. The strength
must be between 0 and 255.

Example:

SET_CREATURE_STRENGTH(DEMON_SPAWN,190)

1.13.3 SET_CREATURE_HEALTH([creature],[a])

This command sets the health of all the creatures of
that type on the level. Each creature has a default full
health level which can be found in the creature.txt file,
e.g. the DRAGON has a full health level of 900.

[creature] - The creature's name, e.g. ORC.

[a] - The new health level of that creature.
The health level must be between 0 and 1024.

Example:

SET_CREATURE_HEALTH(ORC,1000)

1.13.4 SET_CREATURE_ARMOUR([creature],[a])

This command sets the armour of all the creatures of
that type on the level. Each creature has a default
armour level which can be found in the creature.txt
file, e.g. the Dark Mistress has a armour level of 50.

[creature] - The creature's name, e.g. HORNED_REAPER.

[a] - The new armour level of that creature.
The armour level must be between 0 and 255.

Example:

SET_CREATURE_ARMOUR(DEMON_SPAWN,60)

1.13.5 SET_CREATURE_FEAR([creature],[a])

This command sets the fear of all the creatures of that
type on the level. Each creature has a default fear
which can be found in the creature.txt file,
e.g. the FLY has a fear level of 30.

[creature] - The creature's name, e.g. BUG.

[a] - The new fear level of that creature.
The fear level must be between 0 and 255.

Example:

SET_CREATURE_FEAR(SPIDER,190)

1.14 MANIPULATING RESEARCH

When you put creatures into the Library and they start
to research, a research counter will start to increase.
The rate at which it increases depends on the number of
creatures in the Library and their individual abilities
and experience levels. Each spell and room has a research
number assigned to it. When this number is reached by
the research counter, the room or spell is deemed to be
researched. All the rooms and spells have default
research values (see below) but you can adjust these
for individual levels if you want to.

1.14.1 DEFAULT VALUES

These are the default research values for the rooms.

Room
Command
Research Value

Treasure Room
TREASURE
1000

Hatchery
GARDEN
1000

Lair
LAIR
1000

Library
RESEARCH
1000

Training Room
TRAINING
1000

Bridge
BRIDGE
4600

Guard Post
GUARD_POST
6700

Workshop
WORKSHOP
9000

Barracks
BARRACKS
12000

Prison
PRISON
20000

Torture
TORTURE
20000

Temple
TEMPLE
25000

Graveyard
GRAVEYARD
25000

Scavenger
SCAVENGER
27500

These are the default research values for spells.

Spell
Command
Research Value

Create Imp
POWER_IMP
1000

Sight of Evil
POWER_SIGHT
3800

Speed Creature
POWER_SPEED
5700

Obey
POWER_OBEY
6000

Call to Arms
POWER_CALL_TO_ARMS
7400

Conceal Creature
POWER_CONCEAL
9400

Hold Audience
POWER_HOLD_AUDIENCE
11000

Cave-in
POWER_CAVE_IN
25000

Heal Creature
POWER_HEAL_CREATURE
14000

Lightning Strike
POWER_LIGHTNING
15000

Protect Creature
POWER_PROTECT
15000

Chicken
POWER_CHICKEN
20000

Disease
POWER_DISEASE
20000

Armageddon
POWER_ARMAGEDDON
100000

Destroy Walls
POWER_DESTROY_WALLS
750000

1.14.2 RESEARCH([player],[research type],[name of room or spell],[a])

This command allows you to adjust the research value
for individual rooms or spells and even for a
specific player.

[player] - The player's name, e.g. PLAYER1.

[research type] - Whether it is a room or spell you are
researching. Use one of the following commands:

Research Type
Command
Rooms
ROOM
Spells
MAGIC

[name of room or spell] - The name of the room or
spell you want to adjust, e.g. TEMPLE or MAGIC_LIGHTNING.

[a] - The new research value. This must be a number
below 16777216.

Example:

REM ***** Change the research value of the *****
REM ***** Scavenger Room from 27500 to *****
REM ***** 50000 *****

RESEARCH(PLAYER1,ROOM,SCAVENGER,50000)

1.15 ADDING NEW CREATURES AND PARTIES TO
THE LEVEL

As well as set the attributes for your level, the
Dungeon Keeper script allows you to add new creatures
to the level at specified points and times. In
conjunction with Action Points, you can trigger parties
of Heroes to appear when a players' creatures enter a
certain part of the level.

1.15.1 ADD_CREATURE_TO_LEVEL([player],[creature],[action point],[a],[experience],[gold])

This command will add a number of new creatures to the
level at the coordinates of a specifies Action Point.
You cannot set where the creatures head for so you may
need to use a party instead.

[player] - The name of the player, e.g. PLAYER1,
that the creatures belong to.

[creature] - The creature's name, e.g. DRAGON.

[action point] - The number of the Action Point where
the creatures will appear. If you want a creature to
appear at a Hero Door, you will need to enter the
Hero Door's number here. The number must have a minus
sign in front of it to distinguish it from the normal
Action Points. For example, if you want the creature
to appear at Hero Door 4, the [action point] number
will be -4.

[a] - The number of creatures that will appear at the
Action Point. This can be any number but remember that
you can only have up to 255 creatures on the map at any
one time so this number should not be too high.

[experience] - The experience level of the creatures.

[gold] - The amount of gold carried by the creatures.

Note: You can only have a maximum of 48
ADD_CREATURE_TO_LEVEL commands.

Example:

REM ***** Add 7 level 4 Hero Wizards who *****
REM ***** are carrying 400 gold at Action *****
REM ***** Point 3 *****

ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,WIZARD,3,7,4,400)

1.15.2 ADD_TUNNELLER_TO_LEVEL([player],[action point],[head for],[action point/target player],[experience],[gold])

This commands adds a number of Tunneller Dwarves to the
level. They will immediately start digging towards their
target. Tunneller Dwarves are the only creatures that
can tunnel towards a target.

[player] - The name of the player, e.g. PLAYER_GOOD,
that the creatures belong to.

[action point] - The number of the Action Point where
the creatures will appear. If you want the Tunneller
to appear at a Hero Door, you will need to enter the
Hero Door's number here. The number must have a minus
sign in front of it to distinguish it from the normal
Action Points. For example, if you want the Tunneller
to appear at Hero Door 4, the [action point] number
will be -4.

[head for] - This command tells the Tunneller what it
is tunnelling to. You will specify the exact
Action Point or Player number in the next command.
There are a number of commands you can use:

Description
Command (An Action Point)

ACTION_POINT
A Player's dungeon

DUNGEON
A Player's Dungeon Heart

DUNGEON_HEART
The dungeon of the player with the

highest score
APPROPIATE_DUNGEON

[action point/target player] - This command will tell
the Tunneller which Action Point
(if the [head for] command was ACTION_POINT)
or Player (if the [head for] command was DUNGEON or DUNGEON_HEART)
to go to. If the command was APPROPIATE_DUNGEON then
this will just be 0 as the APPROPIATE_DUNGEON command
sends the Tunneller to the dungeon of the player with
the highest score.

[experience] - The experience level of the Tunneller.

[gold] - The amount of gold carried by the Tunneller.

Note: You can only have a maximum of 16 ADD_TUNNELLER_TO_LEVEL
commands.

Example:

REM ***** Add a level 6 Hero Tunneller at *****
REM ***** Action Point 7. He will tunnel *****
REM ***** towards Action Point 5 *****

ADD_TUNNELLER_TO_LEVEL(PLAYER_GOOD,7,ACTION_POINT,5,6,400)

..

REM ***** Add a level 4 Hero Tunneller at *****
REM ***** Action Point 3. He will tunnel *****
REM ***** towards Player 2's Dungeon Heart *****

ADD_TUNNELLER_TO_LEVEL(PLAYER_GOOD,3,DUNGEON_HEART,PLAYER2,4,400)

..

REM ***** Add a level 9 Hero Tunneller at *****
REM ***** Action Point 5. He will tunnel *****
REM ***** towards the dungeon of the *****
REM ***** player with the highest score *****

ADD_TUNNELLER_TO_LEVEL(PLAYER_GOOD,5,APPROPIATE_DUNGEON,0,9,400)


1.15.3 CREATE_PARTY([party name])

This command tells the game to expect a party with a
specific name.

[party name] - The name of the party. You can use any
name you want but it must be in capitals.

Note: You can only have a maximum of 16 parties.

Example:

CREATE_PARTY(PARTY1)

1.15.4 ADD_TO_PARTY([party name],[creature],[experience],[gold],[objective],[0])

This command adds a number of creatures to a party
(maximum seven).

[party name] - The name of the party. This must have
been declared with the CREATE_PARTY command.

[creature] - The creature's name, e.g. HORNY.

[experience] - The creature's experience level.

[gold] - The amount of gold the creatures are carrying.

[objective] - The target of the creatures and where they
will make for when they enter the level. You will not
need to specify the target player yet. This will be done
when you place the party on the map.

Description
Command

Steal gold from the Treasure Room
STEAL_GOLD

Steal spells from the Library
STEAL_SPELLS

Attack any enemies
ATTACK_ENEMIES

Attack the nearest Dungeon Heart
ATTACK_DUNGEON_HEART

Attack the nearest rooms
ATTACK_ROOMS

Defend the other creatures in the party
DEFEND_PARTY

[0] - This number was originally a command that has
since been omitted. This should always be set to 0.

Note: You can only have a maximum of 7 in a party.

Example:

REM ***** Create a party called MY_PARTY. *****

CREATE_PARTY(MY_PARTY)

..

REM ***** Add to MY_PARTY a level 5 Fairy *****
REM ***** with 600 in gold who will attack *****
REM ***** the rooms of the target player *****

ADD_TO_PARTY(MY_PARTY,FAIRY,5,600,ATTACK_ROOMS,****)


1.15.5
ADD_TUNNELLER_PARTY_TO_LEVEL([player],[party name],[action point],[head for],[action point/target player],[experience],[gold])

This adds a specified party of creatures to the level
with a Tunneller Dwarf as its leader. The Tunneller
will immediately dig to its target and the other
creatures will follow.

[player] - The name of the player, e.g. PLAYER_GOOD,
that the creatures belong to.

[party name] - The name of the party. This must have
been declared with the CREATE_PARTY command.

[action point] - The number of the Action Point where
the party will appear. If you want the party to appear
at a Hero Door, you will need to enter the Hero Door's
number here. The number must have a minus sign in front
of it to distinguish it from the normal Action Points.
For example, if you want the party to appear at
Hero Door 4, the [action point] number will be -4.

[head for] - This command tells the Tunneller what it
is tunnelling to. You will specify the exact
Action Point or Player number in the next command.
There are a number of commands you can use:

Description
Command

An Action Point
ACTION_POINT

A Player's dungeon
DUNGEON

A Player's Dungeon Heart
DUNGEON_HEART

The dungeon of the player with the highest score
APPROPIATE_DUNGEON

[action point/target player] - This command will tell
the Tunneller which Action Point
(if the [head for] command was ACTION_POINT) or Player
(if the [head for] command was DUNGEON or DUNGEON_HEART)
to go to. If the command was APPROPIATE_DUNGEON then
this will just be 0 as the APPROPIATE_DUNGEON command
sends the Tunneller to the dungeon of the player with
the highest score.

[experience] - The experience level of the Tunneller.

[gold] - The amount of gold the Tunneller is carrying.

Note: The ADD_TUNNELLER_PARTY_TO_LEVEL command counts
as one ADD_TUNNELLER_TO_LEVEL command. Therefore, there
can only be a total of 16 of these commands in your
script.



Example:

REM ***** Add MY_PARTY to the level at *****
REM ***** Action Point 4 with a level 5 *****
REM ***** Tunneller as its leader. The *****
REM ***** party will head for Action *****
REM ***** Point 1 *****

ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,MY_PARTY,4,ACTION_POINT,1,5,600)

REM ***** Add MY_PARTY to the level at *****
REM ***** Action Point 10 with a level 4 *****
REM ***** Tunneller as its leader. The *****
REM ***** party will head for the dungeon *****
REM ***** of Player 1 *****

ADD_TUNNELLER_PARTY_TO_LEVEL(PLAYER_GOOD,MY_PARTY,10,DUNGEON,PLAYER1,4,600)



1.15.6
ADD_PARTY_TO_LEVEL([player],[name],[action point],[a])

Very similar to the ADD_TUNNELLER_PARTY_TO_LEVEL command,
this adds a party to the level but does not include a
Tunneller Dwarf. This means the party will not be able
to tunnel to their target.

[player] - The name of the player, e.g. PLAYER1, that
the creatures belong to.

[name] - The name of the party. This must have been
declared with the CREATE_PARTY command.

[action point] - The number of the Action Point where
the party will appear. If you want the party to appear
at a Hero Door, you will need to enter the Hero Door's
number here. The number must have a minus sign in front
of it to distinguish it from the normal Action Points.
For example, if you want the party to appear at Hero Door 4,
the [action point] number will be -4.

[a] - The number of copies of the party to be placed
down at the Action Point.

Note: The ADD_PARTY_TO_LEVEL command counts as one
ADD_CREATURE_TO_LEVEL command. Therefore, there can only
be a total of 48 of these commands in your script.
The [a] (number of copies) variable in the
ADD_PARTY_TO_LEVEL command does not affect this
number and you will only use up one command however
many copies you make.

Example:

REM ***** Add 2 copies of MY_PARTY to the *****
REM ***** level at Action Point 5. They *****
REM ***** belong to Player 3 *****

ADD_PARTY_TO_LEVEL(PLAYER3,MY_PARTY,5,2)

1.16. CUSTOM OBJECTIVES (DEEPER DUNGEONS ONLY)

If you have the Deeper Dungeons expansion pack installed
on your PC, you can include the following commands in
your script to display objectives for the player to
follow. Remember, if you give this level to another person,
they must also have the Deeper Dungeons expansion pack
installed on their machine.

1.16.1
QUICK_OBJECTIVE([a],["objective"],[player])

This command brings up the Objective Box at the bottom
of the game screen and displays the specified text. The
command will be triggered as soon as the game reaches it
in the script so you will probably need to trigger it
with an IF command.

[a] - The number of the objective. Each objective must
have a different number and you can only have a maximum
of 30.

[objective] - The objective text,
e.g. "Your dungeon is doomed, Keeper".

[player] - If the player clicks on the zoom to icon on
the Objective Panel, this option will specify which
player's Dungeon Heart the Dungeon View will zoom to.
This should always be set to PLAYER0 in single player levels
unless the text requires it to go to a different
Dungeon Heart. You cannot use ALL_PLAYERS.

Example:

QUICK_OBJECTIVE(1,"Your dungeon is doomed, Keeper",PLAYER1)


1.16.2 QUICK_INFORMATION([a],["information"])

This command is similar to the QUICK_OBJECTIVE command
except that instead of an Objective Window, the text is
written on an Information Pop-up Icon. Again, this
command will be triggered as soon as the game reaches it
in the script so you will probably need to trigger it
with an IF command.

[a] - The number of the information. Each bit of information must have a
different number and you can only have a maximum of 30.

[information] - The information text, e.g. "Well done. You have researched
the Temple."

Example:

QUICK_INFORMATION(1,"Well done. You have researched the Temple.")


2. SINGLE PLAYER AND MULTIPLAYER LEVEL CHECKLIST

This section is a checklist for your finished Single
Player or Multiplayer level. Follow each one and
hopefully your level will be complete and ready to play.

2.1 SINGLE PLAYER LEVELS

2.1 THE MAP

The first thing to check is the map itself. Make sure
you haven't any unused areas that have loads of lights
and special effects. Also, make sure you don't have too
many creatures already on the map. There can only be 255
creatures on the map at any one time and if you try to
make any more, they will just not appear. The players
need to be able to attract creatures and gain more
through the Scavenger Room and Graveyard.

Check that your traps, creatures and doors are owned
by the right players. This is a common mistake and will
cause problems when you run the level.

Check that players cannot dig into your secret areas.
The best way to check this is to dig around them
yourself.


2.2 THE SCRIPT

If you have computer players on the map, make sure
you have initialised them with the COMPUTER_PLAYER
command.

Make sure all your players have the correct creatures,
rooms, doors, traps and spells available and make sure
the creature pool is large enough.

Check that your invading parties (if you have them)
are entering from the right Action Points and going to
their proper destinations.

Make sure that the player can win and check that you
have included the WIN_GAME command.

3. MULTIPLAYER LEVELS

3.1 THE MAP

Check that each player has a Dungeon Heart and an
Portal close by. Also, make sure that each player has a
large supply of gold. In multiplayer games the battles
are more fun, so you don't want the players to spend all
their time hunting for gold.

Make sure that each player has a good chance of
reaching a secret or a hidden creature. A good game is
based on skill, not on where you were placed on the map.


3.2 THE SCRIPT

Multiplayer maps are easier to script than single player
maps. Unless you want specific events to happen, you can
just script what creatures, rooms, traps and doors each
player has at the start and then what is required to
complete the level (usually one player conquering the
others by destroying their Dungeon Hearts). Look at the
multiplayer example map for more information.

Check that you have given all the players the right
rooms and creatures.

Make sure that each player can win, even if it simply
destroying the opposition's Dungeon Hearts.


4.0 OTHER STUFF

4.1 MULTIPLAYER TO SINGLEPLAYER

If you are playing the MS-DOS version of Dungeon Keeper,
go to the Dungeon Keeper directory, e.g. c:\keeper. Then
type the following:

keeper -1player

Then press Return to start Dungeon Keeper.

If you are playing the Windows 95 version of Dungeon
Keeper, click on the Start button on the taskbar and
select the Run program on the menu. A requester will
appear.

Type in the name of the keeper directory and also
add keeper95.exe on the end,
e.g. c:\program files\keeper\keeper95.exe.

Then, on the end of that, add the following text:

-1player

For example:

c:\program files\keeper\keeper95.exe -1player

Then press Return (Enter) or click on Run
to start Dungeon Keeper.

When you reach the Dungeon Keeper Main Menu, click on
the Multiplayer button. At the bottom of the list of
multiplayer options should be a new option called 1
player. This option enables you to play any multiplayer
map as a single player with computer players taking the
place of you absent human opponents. Click on the option
and you will be taken to the Multiplayer Levels Map.

4.2 TIPS FROM THE MASTERS

When scripting a level, work it out on paper first. This
way you can see if any player has an unfair advantage or
if your level will be too long.

Understand the script language well so that you can take
advantage of its varied features. The script will not be
checked for errors so make sure that it is written
correctly before you play.



this file was written by me but inspired
from the Dungeon Keeper Editor Manual.
The Avatar (my e-mail is antonm@flex.ro)
"The darkness is not what semes to be!" :o)
"I want to personaly thank Camelia (from
Irc.Dal.Net server on Chatzone channel with
the mIRC program) which teached me how to
do the smily face with the nose"

 
Комментарии:
Ваш комментарий сохранен!!!
The Captcha element applies the Captcha validation, which uses reCaptcha's anti-bot service to reduce spam submissions.

Cheats

18.Октябрь 2013
Engl. Leitaden

17.Октябрь 2013
Strategy guide
Engl. Leitfaden

17.Октябрь 2013
Dt. Geldtrainer
Trainer

17.Октябрь 2013
Trainer

17.Октябрь 2013
Geldtrainer für GameHack
Gamehack

16.Октябрь 2013
FAQ/Lösung

24.Сентябрь 2013
BlutPatch

10.Октябрь 2008
Scripting The Levels From Dungeon Keeper
Engl. Hinweise

16.Октябрь 2013
Lösung

17.Октябрь 2013
Starten und staunen
Trainer

18.Октябрь 2013
Engl. Hinweise

05.Октябрь 2013
Bitte readme.txt für mehr Infos lesen
Editor

16.Октябрь 2013
Ein Scripter für den Dungeon Keeper Editor
Editor

16.Октябрь 2013
Hinweise

17.Октябрь 2013
Marc hat wieder mal zugeschlagen: ein Gold-Patch im GW-Format
GW-Datei

18.Октябрь 2013
Leider keine weiteren Informationen verfügbar
Editor

17.Октябрь 2013
 
Популярное
30.Декабрь 2013
04.Март 2019
11.Июнь 2014
19.Февраль 2014
30.Июнь 2014
17.Февраль 2014
07.Июнь 2019
25.Сентябрь 2015
24.Июль 2014