TGDB.net - Game news, cheats, solutions, walkthroughs, trainers, saved games and much more!

Home » PC » Dungeon Keeper » Dungeon Keeper hints
Submitted by System on 09/03/2006, 09:50. Print file.
Jump to page:
01 · 02 · 03 · 04 · 05 · 06 · 07 · 08 · 09

Sponsors:


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.
Jump to page:
01 · 02 · 03 · 04 · 05 · 06 · 07 · 08 · 09

Sponsors:

Other files from this game:
  1. Dungeon Keeper editor by System on 14/03/2006, 06:30
    No information available
  2. Dungeon Keeper document by System on 14/03/2006, 06:30
    Gold cheat in GW format
  3. Dungeon Keeper editor by System on 14/03/2006, 06:30
    A scripter for the official Dungeon Keeper Editor
  4. Dungeon Keeper editor by System on 14/03/2006, 06:30
    Please read readme.txt for more information
  5. Dungeon Keeper trainer by System on 14/03/2006, 06:30
    Starte and read
  6. Dungeon Keeper document by System on 14/03/2006, 06:30
  7. Dungeon Keeper trainer by System on 14/03/2006, 06:30
  8. Dungeon Keeper hints by System on 09/03/2006, 09:50
  9. Dungeon Keeper hints by System on 09/03/2006, 09:50
  10. Dungeon Keeper hints by System on 09/03/2006, 09:50
  11. Dungeon Keeper cheats by System on 09/03/2006, 09:50