This manual is somewhat disorganized, 
but you MUST read it all.....



DK2MAPPER ==> ASCII BASED MAP TOOL FOR DK2


I do not guarantee anything will work. 
I have gahered the data via hacking, 
which means in the file generation process,
I have made certain assumptions (left values in)
that may break in the cases you try.
There are still some hacking mysteries in 
some files, even though I create all the
files for you. 'nuff said.


Since this is a hacking program, a certain knowledge of
navigating the DOS console window is required. If you do
not have this knowledge and are not interested in 
discovering how to do it, do not use this editor. If you
do not have this knowledge and are interested in discovering it, 
ask for help in the DK2 forum at Dark Sword(http://www.dkeeper2.net/).
Hopefully some one will assist you.
---------------------------------------------------

FAMILIAR USERS:
Read ASCII BASED MAP FORMAT GENERAL DESCRIPTION for new sections
Read ASCII BASED MAP FORMAT DETAILED DESCRIPTION for new sections
Read Triggers and Scenario Descriptions sections
Read New Terrain section
--------------------------------------------------------------
Fixes and Features in Version 1.3 from 1.2

Fixes
-Map Blackouts for DK2 v 1.6 fixed (Thanks Evil One)
(http://www.geocities.com/theEvilOnesDK2page/)
-Variable errors fixed

Fixes and Features in Version 1.2 from 1.1

Stability issues

Fixes and Features in Version 1.1 from 1.0

Fixes:
-Name with TOTURE changed to TORTURE
-NEUTRAL_OWNED_SQ changed to NEUTRAL_CLAIMED_SQ
-Bad values in DK2Edit.dat fixed and internalized.
-slightly better map bug reporting

Added features:
-Areas
-Gates
-Bands
-Triggers and actions
-Scenerio Description
-Hero Gate Terrain 7-10
-new example map with the new features
-added 1 player only capability (use the -level switch, does not show in skirmish)
-HERO_GATE_7 to HERO_GATE_10 terrain
--added FAQ

Except for the terrain name change fixes, version 1.0 maps should still work with 1.1

However, beware that if you add one of the new sections, (TRIGGERS, AREAS, HERO_GATES, SCENARIO_DESCRIPTION)
You must add them all.


Version 1.1 will work with Dk2MakeMap, by Anthony Affrunti, and dk2randommap by Mark Kinkead.
(random map generator and its GUI, found together at Dark Sword: http://www.dkeeper2.net/)


---------------------------------------------------------------------------------------------

The basic idea is that you build your map, place your creatures and magical items in a text file.
Save it, and run the program to create a new scenario with a name you specify. 
There is very little error checking done, SO DO THINGS RIGHT! Things will crash otherwise.
See the section on map debugging to give you hints on debugging maps.

You specify the terrain on the map by your own standards of using a printable character(except for SPACE (' ').
You will specify the type of terrain each character represents in the MAP_CODES section of the
file.

-----------------------------------------------------------------------------
ASCII BASED MAP FORMAT GENERAL DESCRIPTION:

The scenario is described in section The sections are 

1.General info at the beginning - name, # players
2.MAP - map size and actuall map terrain laid out
3.MAP_CODES - where you describe your mapping of the
		terrain laid out in the map section
4.THINGS - where you describe decorations and Magical Items
5.CREATURES - where you lay out the starting creatures in your dungeon,
	describing owner and level
6.DOORS - where you place doors, and describe the owner
7.TRAPS - Where you place Traps, and describe the owner
8.HEARTS_AND_GOLD - where you describe each player's heart center and starting gold

NEW SECTIONS IN VERSION 1.1

9. HERO_BANDS - where you describe the different groups of Heroes who will invade the dungeon
10.AREAS - where you describe areas that can be used in control triggers, or hero band release actions(or both)
11.HERO_GATES - where you define a Hero Gate that will be used for releasing hero bands.
12.TRIGGERS - where you define each trigger and the subsequent actions to be performed when they occur.
13.SCENARIO_DESCRIPTION - where you change the 'default scenario settings' to alter the traps/doors/creatures/rooms 
	used in the scenario
14.EOF  notes end of file.

--------------------------------------------------------
ASCII BASED MAP FORMAT DETAILED DESCRIPTION:

Use CAPITAL letters for names. (map codes can be any case or printable character besides space).
The program does a lot of string comparing, and is not case sensitive.
Sections must appear in order. All sections must be present.

The map file has the following format:

Scenario Name  <==must be the first thing This will also be the corresponding file names.
PLAYERS X      <==where x is number of players, word PLAYERS must be there, Range is 1 -4.

MAP            <==shows start of map section
W X H          <==where W is width, H is Height. You need to have the X symbol between them.
		  dunno the limits. Olympia was 105x105. Let me know if you hit 256+ in either direction...
MAP ROWS       <<==each row should have W (width) number of characters in it
	       <<==there should be H (height)rows. You may use any printable characters you wish, except for SPACE (' ').
	           You will describe what those characters mean in the following section.
	       
MAP_CODES	       <<==shows the start of your ascii mapping to terrain
                   this mapping must have every character you used in the 
                   map above mapped to a terrain piece. You can also have 
                   mappings that are not used on this particular map. This will
                   allow you to paste in your favorite codes before you create.
# of chars     
<char> <mapping>   <<== each char, followed by a Terrain name. 
			Valid Terrain names are in the Appendix.
			Names MUST be in CAPS.
			It is ok to have more codes than the number specified. They will be ignored.
			

THINGS         << == shows start of things section.(where items will be described)
# of things    << == an accurate count of how many things you want to have(0 min)
		It is ok to have more items listed than the number specified. 
		The excess will be ignored.
<name> <x> <y> << == the name is the mapping name from the appendix for the item.
               << x and y are the locations on the map. RANGE: 0 to w - 1 for x
               						0 to h -1 for y

CREATURES	<< == shows the start of the creatures description
# of creatures  << an accurate count of how many creaturs you want to have (0 min)
		It is ok to have more creatures listed than the number specified. 
		The excess will be ignored.
		
<name> <x> <y> <level> <owner>

		the valid type names for  creatures are listed in the appendix
               << x and y are the locations on the map. RANGE: 0 to w - 1 for x
               						0 to h -1 for y
		level is one of the following:
		L1, L2, L3, L4, L5, L6, L7, L8, L9, L10
		for levels 1 through 10 - do not just put numbers!
		
		owner is one of the following:
		P1, P2, P3, P4 (players 1 -4), PH (heroes), PN (neutral)

DOORS		<<== this shows the start of the door descriptions
# of doors	<<an accurate count of how many doors you want to place

<name> <x><y><owner><locked>

		the valid type names for  doors are listed in the appendix

               << x and y are the locations on the map. RANGE: 0 to w - 1 for x

		owner is one of the following:
		P1, P2, P3, P4 (players 1 -4), PH (heroes), PN (neutral)
		
		locked indicates if the door starts locked or not
		correct values are:
		L --> locked door
		U --> unlocked door

TRAPS		<<== this shows the start of the trap descriptions
# of traps	<<an accurate count of how many traps you want to place

<name> <x><y><owner>
		the valid type names for  traps are listed in the appendix

               << x and y are the locations on the map. RANGE: 0 to w - 1 for x

		owner is one of the following:
		P1, P2, P3, P4 (players 1 -4), PH (heroes), PN (neutral)
		
		
HEARTS_AND_GOLD <<==this shows the start of the heart and gold description
		the number of hearts defined MUST match the number of players listed above.
		My program will allow for you to use players 2 and 4 only, for example.
		I do not know if DK2 will let this run....
		
<heart center name> <x> <y>		
		Heart center names are:
		KPR1_HEART_CENTER --> player 1
		KPR2_HEART_CENTER --> player 2
		KPR3_HEART_CENTER --> player 3
		KPR4_HEART_CENTER --> player 4
		x and y are the CENTER of the 5x5 heart. The heart MUST be 5x5
		 and the center MUST be described accurately, or Kablooie!

<GOLD#>	 <x>
		GOLD# is the indicator of a player, x is the amount.
		Gold names are: 
		GOLD1 (player 1),
		GOLD2 (player 2),
		GOLD3 (player 3),
		GOLD4 (player 4)

HERO_BANDS 	<<== shows the start of the Hero Band Description
# of bands	<<= an accurate count of the number of bands you wish to describe.
		  The game seems to crash if you have more than 24
		  
(for each band:)		  
HEROES <number > <enemy> <id>
		<<== number is the number of creatures in the band. Max is 16
		<<== enemy is the player they hate the most, and will chase first.
		<<== id is the bands identification number. Id's start at 1 and increment by 1, and MUST BE in order.
			The Id's will be used in the Triggers 
		The members of these bands will always fight for Good.(wimps)

(for each creature in the band)
<creature name> <level>
		<< creature name is the type of creature that will be used. Valid names are in the appendix.
		<< level is the starting level of the creature.			
			level is one of the following:
			L1, L2, L3, L4, L5, L6, L7, L8, L9, L10
			for levels 1 through 10 - do not just put numbers!
		
AREAS 		<<== shows the start of the Areas Description
# of Areas	<< an accurate count of the number of areas you wish to describe
(for each area)
<id> <x1> <y1> <x2> <y2>
		<<== id is the areas identification number. Id's start at 1 and increment by 1, and MUST BE in order.
		<<== x1 is the upper left corner's x value for that area. (Areas must be rectangular). 
		<<== y1 is the upper left corner's y value for that area.
		<<== x1 is the lower right corner's x value for that area.
		<<== x1 is the lower right corner's y value for that area.
		Areas MUST NOT overlap.

HERO_GATES	<<== shows the start of the Hero Gate Descriptions
# of Gates	<< an accurate count of the number of gates you wish to describe
(for each gate)
<id> <x loc> <y loc>
		<<== id is the Gate's identification number. Id's start at 1 and increment by 1, and MUST BE in order.
		<<== x loc is the x location of the upper left corner of the gate. 
		<<== y loc is the y location of the upper left corner of the gate.
		Gates MUST be drawn rectangular. The terrain at <x loc, yloc> MUST be
		one of HERO_GATE_1, HERO_GATE_2, HERO_GATE_3, HERO_GATE_4, HERO_GATE_5 or
		HERO_GATE_6. Be aware that areas and other gates must have at least one tile between 
		any gate using the terrain HERO_GATE_3 (the round one).

TRIGGERS	<<== shows the start of the Trigger Descriptions
#of Triggers    <<an accurate count of the number of triggers you wish to describe.

(for each trigger)

<trigger name> <data> 	
		<<==trigger names describe the trigger to be setup. Data is the info
		associated with the trigger.
# of actions	<<==an accurate count of the number of actions that will occur when this trigger fires
(for each action)
<action name> <data>
		<<==action names describe the action to be setup. Data is the info
		associated with the action.
		
		Triggers and Actions are described in detail in another section.

SCENARIO_DESCRIPTION  <<==shows the start of the scenario description section		
		No count for description is needed is needed. Valid scenario descriptions are:
		
CREATURE_COUNT <player> <creature name> <number>
		<<== describes the number of an available Portal creatutres in a scenario
		<<== player is th player who will get the count amended. P1, P2, P3, P4 (players 1 -4)
		<<== creature name is the valid creature name whose count is to be amended
		<<== number is the new creature amount
		
STARTS_WITH  <player> <door/room/spell/trap name>
NO  <player>  <door/room/spell/trap name>
MUST_RESEARCH  <player>  <door/room/spell/trap name>
		<<==These describe what doors/traps/rooms/spells will be used/researched/excluded in the game.
		<<== player is th player who will get the count amended. P1, P2, P3, P4 (players 1 -4)
		<<the name is a valid name for a door./trap/spell or room. Names are listed in the appendix.

		more interesting details are described in  another section.
			
EOF            <<== shows the end of the data file. This Line should be at the end.

-----------------------------------------------------------------------------------


Triggers:

The triggers are set up as TRIGGER causes ACTION(s). 
There are three triggers avaialble to you:


TRIGGER_TIME is time in game seconds from the beginning of the game. Remember the clock moves faster/slower
depending on your game speed setting. 
Syntax is: TRIGGER_TIME <number of seconds into the game>
So "TRIGGER_TIME 60"  is one game minute.

TRIGGER_SLAP_COUNT_EQUALS is the trigger to happen after a certain number of slaps, accumulated from all players, 
Syntax is :TRIGGER_SLAP_COUNT_EQUALS <number of slaps>
has occured. I slap once, you slap twice, there are a total of 3 slaps.

TRIGGER_CONTROL_AREA happens when a player completely owns the sqares in an area. 
Syntax is: TRIGGER_CONTROL_AREA <player> <area id>
"TRIGGER_CONTROL_AREA P1 1" would fire when player one controls area 1


Actions:
ACTION_DESTROY_HERO_GATE
-makes a hero gate ineffective. Further trigger actions on it will be ignored. This can be used on any gate.
Syntax: ACTION_DESTROY_HERO_GATE < gate id>

ACTION_HERO_RELEASE
Releases the specified band in the specified area/gate
Syntax: ACTION_HERO_RELEASE <band id> <gate or area> <gate/area id>

<Band id> is the id for the band
<gate or area> is one of two values used to distinguish between an identified gate or area
These values are 'G' for gate, 'A' for area. so
"ACTION_HERO_RELEASE 1 G 3" releases band one in gate 3
"ACTION_HERO_RELEASE 2 A 4" releases band 2 in area 4

ACTION_ADD_ROOM
Adds the capability for this room to be built for the specified player.
syntax is : ACTION_ADD_ROOM <player> <room name>

ACTION_ADD_SPELL
Adds the capability for this spell to be used for the specified player.
syntax is : ACTION_ADD_SPELL <player> <spell name>

ACTION_ADD_TRAP
Adds the capability for this trap to be built for the specified player.
syntax is : ACTION_ADD_TRAP <player> <trap name>

ACTION_ADD_DOOR
Adds the capability for this door to be built for the specified player.
syntax is : ACTION_ADD_DOOR <player> <door name>



-----------------------------------------------------------------------------------

Scenario Description:

Scenario Description allows you to tweak the starting conditions of your scenario.
You are able to control the ability to build/research traps, doors, spells, and rooms, as
well as the default number of portal creatures.

All scenarios will be built with default settings for each player described shortly. If the default 
settings are satisfactory, not entries need to be in this section. This section is only needed 
if defaults are to be changed for a player.

There are 3 settings for each room, door, trap and spell. These are:

START_WITH
The scenario will begin with this item/spell ready for purchase/use.
Note the extra items STONE_BARRICADE, GRATED_DOOR, and TR_BIG_SENTRY
can be used here.
Example usage :  "START_WITH P1 TR_BIG_SENTRY"

NO 			
The scenario will start with no option or opportunity(except add room triggers)
to use this item in the game.
Example usage : "NO P2 LIBRARY"

MUST_RESEARCH		
The scenario will start with the question mark covering the items icon and the
item will become available for use after successful researching. Researching
does not seem to work like it did in DK1. Instead, it follows this order:

1. Research all necessary spells
2. Research all necessary rooms
3. Research all necessary doors
4. Research all necessary traps
5. Research all necessary spell upgrades

In other words, you must research chicken before you can research Treasury.
And of course, without a library, you can't research.

Note the extra items STONE_BARRICADE, GRATED_DOOR, TR_BIG_SENTRY, and 
SUMMON_HORNY_SPELL cannot be researched.

Example usage: "MUST_RESEARCH P4 WORKSHOP"


CREATURE_COUNT:
The number of available Portal creatutres in a scenario is overridden with CREATURE_COUNT.
This number will set the maximum number of creatures that can join each side via portals.
The number can be greater than 32, but other limits on the game prevent this amount from being realized.
Zero will not allow any such creature type to spawn form a portal. You are welcome to try to add the hero
creatures, but I have been unable to attract them from the portal.

-----------------------------------------------------------------------------------
Default settings for scenario descriptions for each player (Px)

CREATURE_COUNT Px MISTRESS 32
CREATURE_COUNT Px BILE_DEMON 32
CREATURE_COUNT Px WARLOCK 32
CREATURE_COUNT Px DARK_ELF 32
CREATURE_COUNT Px GOBLIN 32
CREATURE_COUNT Px TROLL 32
CREATURE_COUNT Px SALAMANDER 32
CREATURE_COUNT Px FIREFLY 32
CREATURE_COUNT Px BLACK_KNIGHT 32
CREATURE_COUNT Px DARK_ANGEL 32
CREATURE_COUNT Px ROGUE 32

START_WITH Px TR_GAS
START_WITH Px TR_BOULDER
START_WITH Px TR_SENTRY
START_WITH Px TR_ALARM
START_WITH Px TR_FIREBURST
START_WITH Px TR_LIGHTNING
START_WITH Px TR_FREEZE
START_WITH Px TR_FEAR
START_WITH Px TR_TRIGGER
START_WITH Px TR_SPIKE
START_WITH Px TR_GUARD_POST

START_WITH Px TREASURY	
START_WITH Px LAIR		
START_WITH Px HATCHERY	
START_WITH Px LIBRARY		
START_WITH Px TRAINING	
START_WITH Px WOOD_BR		
START_WITH Px GUARD_RM	
START_WITH Px WORKSHOP	
START_WITH Px PRISON		
START_WITH Px TORTURE		
START_WITH Px TEMPLE		
START_WITH Px GRAVEYARD	
START_WITH Px CASINO		
START_WITH Px COMBAT_PIT	
START_WITH Px STONE_BR	

START_WITH Px WOODEN_DOOR
START_WITH Px BRACED_DOOR
START_WITH Px STEEL_DOOR
START_WITH Px SECRET_DOOR
START_WITH Px MAGIC_DOOR
START_WITH Px WOOD_BARRICADE

START_WITH Px CREATE_IMP_SPELL
START_WITH Px POSESSION_SPELL
START_WITH Px SUMMON_HORNY_SPELL 
MUST_RESEARCH Px SIGHT_OF_EVIL_SPELL
MUST_RESEARCH Px CALL_TO_ARMS_SPELL
MUST_RESEARCH Px LIGHTNING_SPELL
MUST_RESEARCH Px TURNCOAT_SPELL
MUST_RESEARCH Px TREMOR_SPELL
MUST_RESEARCH Px INFERNO_SPELL
MUST_RESEARCH Px HEAL_SPELL
MUST_RESEARCH Px CHICKEN_SPELL
MUST_RESEARCH Px CREATE_GOLD_SPELL

---------------------------------------------------------------------------------
New Terrain:

HERO_GATE_7 & HERO_GATE_8 & HERO_GATE_9 & HERO_GATE_10

These are the gates coming out of Solid rock. (Like in Hero cove).
I had to make them differnt types to specify direction. The MUST be
3 tiles to look right, and MUST have solid rock behind them to look right.


Here are the directions (G = the Gate, S = solid Rock

HERO_GATE_7 (door faces North)

GGG
SSS

HERO_GATE_8 (door faces east)

SG
SG
SG


HERO_GATE_9 (door faces south)

SSS
GGG

HERO_GATE_10 (door faces west)

GS
GS
GS



MORE NOTES:
---------------------------------------------------------------------------------
Things to observe
-Placing things and creatures in rock is ok.
-Anything placed off the map will cause a crash.
-Hearts MUST be 5x5, and the CENTER must be described exactly. There is no room for error here.
-always use the MAP_BORDER at the perimeter of the map
-look at my map examples
-If you have less than four imps, the heart will quickly generate up to four.
You can never be out of imps for long...
---------------------------------------------------------------------------------

Unfortunately, Maps with just one player seem to be working, but 
they do not show up in the skirmish mode display. If you wish to make a 
single player map show up in skirmish mode, then just create the second player, 
put his heart in a corner, and wall him up with solid rock. Then you can play 
to your heart's content.

Hopefully Bullfrog's editor will have My Pet Dungeon capability.

To not use skirmish mode, just use the level switch on the command line.

For example, to play the "HomeAlone" scenario. I enter "Dkii.exe -level HomeAlone"

----------------------------------------------------------------------------------

Traps and doors need to be placed on claimed mana squares  for the player that owns 
them. They disappear instantly otherwise.

If four walls surround a door, it will default to facing West to East.
----------------------------------------------------------------------------------

I gave you the capability to play with a ton of things. I will let you
decide if you wish to clutter your dungeon.

----------------------------------------------------------------------------------
STEPS FOR SUCCESS: RUNNING DK2MAPPER

1. put dk2mapper.exe and DKEdit.dat in the DK2\Data\Editor\maps directory.
2. make a map file, like VerySimple.map, in the same directory
3. do your editing with that file. (with a text editor, not MS Word)
4. save, and run "dk2mapper VerySimple.map"
5. All needed files will be generated/overwritten in your maps dir:
	VerySimple.kwd
	VerySimpleThings.kld
	VerySimpleMap.kld
	VerySimpleVariables.kld
	VerySimplePlayers.kld
	VerySimpleTriggers.kld
	
	Be aware that the file names will be based on the name described in the file,
	not the name of the file itself.

6. You are good to go with a new scenario! Look for the map in skirmish mode, 
	or zip ALL 6 of the files and send it to your buddies for multi-play
-----------------------------------------------------------------------------

DEBUGGING HINTS

The most frustrating thing about dk2mapper is the debugging of your map. Remember,
Dk2mapper is based on hack information and so it allows you to create a map that may not
be correct in the eyes of the DKII game engine. Extreme attention to detail needs to be
paid when making a map. Here are a few hints that may help you:

-a map will cause the game to exit because you specified something out of bounds of the map

-you are confused by the coordinate system of the map. The origin point(0,0) is in the UPPER LEFT
CORNER. X increases going left to right. Y increases going down.

-bad things will happen if the number of entries in a section is greater than
what you specified (this is very common)

-creatures and traps may appear to have not been placed, because you messed up
the coordinates and put them in a wall.

-the wrong number of required parameters for something have been entered (like
leaving off the L or U for a door)

-incorrect spelling of neglecting the underscores ('_') when typing names

- inaccurate heart center placement

-be aware the the space character (' '), is not a valid character.

Here are some helpful tricks:

-start small, build just the terrain first and just place the player hearts.Make sure that 
map is stable before you move on to placement of other things.

-If your map is exiting in the game, replace the number of creatures/things/doors/traps
to 0 and slowly renumber each section to located the problem.

-When it believes it is finished with a section, dk2mapper will skip any lines before 
the next section name. So, for example, the following is fine:


CREATURES
2
GIANTS 1 1 L1 PH
GIANTS 1 1 L1 PH
GIANTS 1 1 L1 PH

Only 2 creatures will be loaded. You can also place junk under the EOF line and it
should never get read.

-being ascii based, there is no fancy editor GUI to tell you what square you are looking at
on the map you have built. Use a good editor. A good edito will tell you the row/column info
as to your position. As you will notice in my SimpleMap.map file, I have allowed for the
map data to be seperated by lines from the map section name and width X height numbers.
I placed the first line of the map on line 10 of the editor. I start with just a MAP_BORDER
surrounding ROCK for the proper width and height. Then I like to edit maps in overwrite mode.
To get the position  I subtract 10 from the row and subtract 1 from the column. For example,
when my editor tells me I am at row 33, col 12, on my map this would mean x = 23, y = 11.

-be patient and careful. I cannot stress this enough.
-----------------------------------------------------------------------------

The map file name does not have to match the name of the map to be generated,
nor does it require a .map extension. But this seems like a good practice.

-----------------------------------------------------------------------------

APPENDIX:

-------------------
Valid Terrain Names:


MAP_BORDER
SOLID_ROCK
ROCK
UNCLAIMED
WATER
LAVA
GOLD
GEMS

NEUTRAL_CLAIMED_SQ
NEUTRAL_OWNED_ROCK
NEUTRAL_TREASURY
NEUTRAL_LAIR
NEUTRAL_PORTAL
NEUTRAL_HATCHERY
NEUTRAL_HEART
NEUTRAL_LIBRARY
NEUTRAL_TRAINING
NEUTRAL_WOOD_BR
NEUTRAL_GUARD_RM
NEUTRAL_WORKSHOP
NEUTRAL_PRISON
NEUTRAL_TORTURE
NEUTRAL_TEMPLE
NEUTRAL_GRAVEYARD
NEUTRAL_CASINO
NEUTRAL_COMBAT_PIT
NEUTRAL_STONE_BR
NEUTRAL_MANA

HERO_CLAIMED_SQ
HERO_OWNED_ROCK
HERO_TREASURY
HERO_LAIR
HERO_PORTAL
HERO_HATCHERY
HERO_HEART
HERO_LIBRARY
HERO_TRAINING
HERO_WOOD_BR
HERO_GUARD_RM
HERO_WORKSHOP
HERO_PRISON
HERO_TORTURE
HERO_TEMPLE
HERO_GRAVEYARD
HERO_CASINO
HERO_COMBAT_PIT
HERO_STONE_BR
HERO_GATE_1
HERO_GATE_2
HERO_MANA
HERO_GATE_3
HERO_GATE_4
HERO_REST_AREA
HERO_GATE_5
HERO_GATE_6
HERO_GATE_7
HERO_GATE_8
HERO_GATE_9
HERO_GATE_10

KPR1_CLAIMED_SQ
KPR1_OWNED_ROCK
KPR1_TREASURY
KPR1_LAIR
KPR1_PORTAL
KPR1_HATCHERY
KPR1_HEART
KPR1_LIBRARY
KPR1_TRAINING
KPR1_WOOD_BR
KPR1_GUARD_RM
KPR1_WORKSHOP
KPR1_PRISON
KPR1_TORTURE
KPR1_TEMPLE
KPR1_GRAVEYARD
KPR1_CASINO
KPR1_COMBAT_PIT
KPR1_STONE_BR
KPR1_MANA

KPR2_CLAIMED_SQ
KPR2_OWNED_ROCK
KPR2_TREASURY
KPR2_LAIR
KPR2_PORTAL
KPR2_HATCHERY
KPR2_HEART
KPR2_LIBRARY
KPR2_TRAINING
KPR2_WOOD_BR
KPR2_GUARD_RM
KPR2_WORKSHOP
KPR2_PRISON
KPR2_TORTURE
KPR2_TEMPLE
KPR2_GRAVEYARD
KPR2_CASINO
KPR2_COMBAT_PIT
KPR2_STONE_BR
KPR2_MANA

KPR3_CLAIMED_SQ
KPR3_OWNED_ROCK
KPR3_TREASURY
KPR3_LAIR
KPR3_PORTAL
KPR3_HATCHERY
KPR3_HEART
KPR3_LIBRARY
KPR3_TRAINING
KPR3_WOOD_BR
KPR3_GUARD_RM
KPR3_WORKSHOP
KPR3_PRISON
KPR3_TORTURE
KPR3_TEMPLE
KPR3_GRAVEYARD
KPR3_CASINO
KPR3_COMBAT_PIT
KPR3_STONE_BR
KPR3_MANA

KPR4_CLAIMED_SQ
KPR4_OWNED_ROCK
KPR4_TREASURY
KPR4_LAIR
KPR4_PORTAL
KPR4_HATCHERY
KPR4_HEART
KPR4_LIBRARY
KPR4_TRAINING
KPR4_WOOD_BR
KPR4_GUARD_RM
KPR4_WORKSHOP
KPR4_PRISON
KPR4_TORTURE
KPR4_TEMPLE
KPR4_GRAVEYARD
KPR4_CASINO
KPR4_COMBAT_PIT
KPR4_STONE_BR
KPR4_MANA


---------------------
Valid Thing Names

TH_TARGET
TH_ROULETTE_WHEEL
TH_TOMB_STONE1
TH_TOMB_STONE2
TH_TOMB_STONE3
TH_TOMB_STONE4
TH_CHICKEN_COOP
TH_BOULDER_TR_CRATE
TH_FEAR_TR_CRATE
TH_A_BOX
TH_FREEZE_TR_CRATE
TH_GAS_TR_CRATE
TH_LIGHTNING_TR_CRATE
TH_SENTRY_TR_CRATE
TH_SPIKE_TR_CRATE
TH_TRIGGER_TR_CRATE
TH_FISH
TH_TABLE1
TH_VICTIM
TH_SKULL
TH_BONE1
TH_BOWL
TH_WOOD_DR_CRATE
TH_BRACED_DR_CRATE
TH_WOOD_DR_CRATE
TH_MAGIC_DR_CRATE
TH_BARRICADE_CR
TH_SECRET_DR_CRATE
TH_FLIPPING_BOOK
TH_BARREL
TH_IMP_STATUE
TH_ELECTRIC_CHAIR
TH_FLOOR_FURNACE
TH_SPIKE_POOL
TH_CHARTS
TH_WEAPONS1
TH_HAND
TH_TABLE2
TH_BARRELS
TH_ONE_ARM_BANDIT
TH_WEAPONS2
TH_ARCH_WAY
TH_BRACED_DOOR_WAY
TH_BOULDER_OF_DEATH
TH_COFFIN
TH_COLUMN_A
TH_COLUMN_B
TH_COLUMN_C
TH_COLUMN_D
TH_FURNACE
TH_SMALL_COLUMN
TH_LARGE_COLUMN
TH_MEDIUM_COLUMN
TH_TINY_COLUMN
TH_HEART_TOP
TH_ROULETTE_TABLE
TH_KT1_FLAG
TH_FREEZE_TR_CRATE
TH_HEART_CAP
TH_MANA_BURST
TH_SWINGING_DOOR
TH_LAMP_LIGHT
TH_TABLE3
TH_WEAPONS3
TH_MAGIC_SPARKLES
TH_DOOR_LOCK1
TH_SLOT_MACHINE
TH_GEM_VIEWER
TH_PENDULUM
TH_FLAG1
TH_FLAG2
TH_FLAG3

---------------------
Magical Item Names (treat as things)

MI_RAISE_LEVEL
MI_REVEAL_MAP
MI_BUILD_WALLS
MI_DESTROY_WALLS
MI_INFLUX_CASH
MI_INFLUX_MANA
MI_STUN_IMPS
MI_MAGIC_DRONES
MI_MAKE_HAPPY
MI_MAKE_SAD
MI_ASSASINATE
MI_RESTORE_HEALTH
MI_SECRET_LEVEL


---------------------
Valid Creature Names
IMP
PRINCE_TRISTAN
BILE_DEMON
MISTRESS
WARLOCK
DARK_ELF
GOBLIN
VAMPIRE
SKELETON
TROLL
SALAMANDER
FIREFLY
KNIGHT
DWARF
GIANT
WIZARD
ELVEN_ARCHER
THIEF
MONK
FAIRY
KING_REGINALD
BLACK_KNIGHT
DARK_ANGEL
ROGUE
GUARD
PRINCE_FELIX
HORNED_REAPER
STONE_GIANT
ROYAL_GUARD
LORD_OF_THE_LAND
PRINCE_BALDER


---------------------
Valid Door Names

WOODEN_DOOR
STEEL_DOOR
BRACED_DOOR
MAGIC_DOOR
SECRET_DOOR
WOOD_BARRICADE
STONE_BARRICADE
GRATED_DOOR

---------------------
Valid Trap Names


TR_GAS
TR_BOULDER
TR_SENTRY
TR_ALARM
TR_FIREBURST
TR_LIGHTNING
TR_FREEZE
TR_FEAR
TR_TRIGGER
TR_SPIKE
TR_GUARD_POST
TR_BIG_SENTRY


-------------------------------------------------------------------

Valid Room Names

TREASURY	
LAIR		
PORTAL		
HATCHERY		
HEART		
LIBRARY		
TRAINING	
WOOD_BR		
GUARD_RM	
WORKSHOP	
PRISON		
TORTURE		
TEMPLE		
GRAVEYARD	
CASINO		
COMBAT_PIT	
STONE_BR	
MANA		

------------------------------------------------------------------------


FAQ


#########################################################################################################

"Its broken!! Where is the window? When I double click on it, the
console window goes away real quick like"

This is not a program with a gui. I know DOS is a scary thing, but it has to be done......
There is a GUI effort underway, but it is still a ways off.

For those who have not experienced DOS, do the following:

Go to Start:Programs:MS-DOS prompt

Then type "cd C:\DK2\data\editor\maps" (substitute C:\Dk2 for where you put your DK
on your hard drive).(this puts you where you placed the program)

Then execute the command "dk2mapper VerySimple.map"
(or what ever your map name is.).

##########################################################################################################

I am getting an "error near Traps section" and have triple-checked
spelling and coordinates, as well as their number. Could there be any
other cause for error, or should I check again?



ANSWER

"Error near traps section" could be better written to say
"Error before traps section". This message occurs when
data from the previous section does not follow the proper format and
causes the reading of the file to stop. This usually happens when dk2mapper
is looking for a number and it gets a string instead.

There is a parameter in your previous section that is bad. Check your all 
entries for the preceding section (doors in this case) and make sure they 
have the propper format described in the README. For doors it is:

name
x
y
owner
locked/unlocked

I know it seems inane, but you must specify wheter barricades are locked/unlocked 
because they are considered doors.

############################################################################################################
I had placed some fireburst traps and some trigger traps, and they
didn't appear. I checked my coordiantes twice and they were right. I
changed the traps to FEAR traps and they showed up fine, I think your
editor has a problem placing Fireburst traps? I had the controller set
to PH for player hero, maybe that is what caused it? What do you think?
Let me know, I would like to put them in my level! 

ANSWER:

It seems that hero traps that are supposed to be hidden
are hidden even if you invoke the cheat to view all.

But when you march a creature over it, they appear(and work). Probably a "feature" in DK2.

In the VerySimple example, you will see the freeze traps are not visible
until you step on them. 

The sentry's are seen because that is not a hidden trap. Same with the fear trap......

############################################################################################################


I downloaded the editor and tried to figure it out but i didnt understand use text editor??? 
wordpad??? to write out map  Please try to explain the basic process to me and anyone else 
who didnt understand completely. 


Note: this answer is with the old version of map:


A 'text editor' is one that does not add anything to the text yuo are viewing to accent it(make works bold, etc). Wordpad and MS Word definitely accent. I believe all windows users also have Notepad, which does not accent text.

I personally use ultra edit, which does a lot more for me when I program. It is 30 bucks over the NET.

OK, that out of the way, use your notepad to open up the example I made, called VerySimple.map .
Read through the readme file with this example open and things should mostly make sense.

YOU define a map in the text file, then use dk2mapper.exe to 'compile' it into DK2 format.

Here is the smallest map one can make I imagine for 2 players:


------------------File begins--------------------
VerySmall
Players 2

MAP
12 x 12
000000000000
011111222220
011111222220
011111222220
011111222220
011111222220
000000000000


MAP_CODES
3
0 MAP_BORDER
1 KPR1_HEART
2 KPR2_HEART

THINGS
0

CREATURES
0


DOORS
0

TRAPS
0


HEARTS_AND_GOLD
KPR1_HEART_CENTER 3 3
KPR2_HEART_CENTER 3 8
GOLD1 3000
GOLD2 3000

EOF

--------------------------------------File ends----------------

Basically, All I have done is given the map:
-a name : "VerySmall"
-said the # of players: PLAYERS 2
-drawn the map with text characters:
MAP << section start 
12 x 12 <<giving the size(x needs to be in between)
000000000000 <<this is the first row of 12 rows. Note there are 12 characters. 
011111222220
011111222220
011111222220
011111222220
011111222220
000000000000

-defined the characters in the map
MAP_CODES <<notes definition start
3 <<number of definitions
0 MAP_BORDER <<definition character ('0' in this case), then associated terrain name, this one is for a border square
1 KPR1_HEART <<this is for player1's heart
2 KPR2_HEART <<this is for player2s heart

--specified no things,creatures, traps, and doors (must be specified in that order)
THINGS
0

CREATURES
0


DOORS
0

TRAPS
0

--specified the center location of each player's heart, and starting gold amounts:

HEARTS_AND_GOLD <<section name start
KPR1_HEART_CENTER 3 3 <<player1's heart center is at coordinate (3, 3) [0,0] being the origin, x increases to the right, y increases down
KPR2_HEART_CENTER 3 8 <<player 2 center at (3,8)
GOLD1 3000 <<player one starts with 3000 gold
GOLD2 3000 <<player one starts with 3000 gold



--mark the end of the file

EOF



That's as simple as it gets. I hope this clarifies it somewhat.


############################################################################################################

I just quick made two portals, two keepers, and some water and lava in
between with some patches of hero (white) claimed land in an encloses
space to see how it looks. I have no creatures (0) things (0) doors (0)
or traps (0) but I did have to add GOLD (I made it "X" in the MAP_CODES
section) and populated some gold around the portals and heart, and in
the middle of the map. 

My question is, when I "compiled" it with dk2mapper.exe, it warned me
that there were some "minor problem with terrain mapping" errors. It
scrolled for a while. Did I do something wrong? Can I ignore this
error then, since it was minor (remember, I am at work and cannot test
this...) or is it because I did something wrong with setting X to be
gold?


ANSWER:

In the readme, you will see the long list of Terrain names, including LAVA,
WATER, GOLD, KPR1_PRISON, etc. These are all of the
valid terrain squares you can use to make a map. As you see there are many,
while in each scenario you only use somewhere
between 10 and 20 generally.

The maps are ASCII based because I did not have time to build a front end
(was too lazy and too busy with life). But I did not want
to impose some symbol standard on you the map maker. That's where the
MAP_CODES come in.

For every terrain you from the list of terrain names use in that specific
map, you must give it a UNIQUE character. In the MAP_CODES
section, you list the terrain, and the character you have assigned to it.
The character does not have to appear in you map, but ALL
characters in the map must be listed in the MAP_CODES section.

The count in the MAP_CODES section is just the count of entries in that
section.


"minor problems" indicate a problem with the MAP_CODES section. You might
have
-a code in your map you have not specified
-added a terrain mapping but not changed the proper value for the count in
MAP_CODES
-assigned a character to two different map names.
-assigned the same map name to two different characters
-you have misspelled or used a non-existent terrain name
-The minor error message can also occur when your MAP has fewer characters 
per row than the width you specified.

The map may still compile, and you may even get to view it in DK. Sometimes, 
dk2mapper recovers and places SOLID_ROCK where it got confused about terrain 
and DK2 is able to digest the map.


############################################################################################################

I made a basic 100X100 map, with 2 keepers in the upper corner. There is
absolutely nothing in things, creatures, doors, and traps, besides a 0.
When I try to compile it, it says "Apparent Endless Loop when loading
things" I have gone over my map at least a million times, and cant
seem to find anything wrong. What does that message generally mean?



ANSWER:

An apparent Endless loop definitely means there is a syntax error somewhere.
In this case it is looking for the "THINGS" section name and not finding
it. If everything is set to 0,
check the line that has the word THINGS on it. If there is 'whitespace'
after the word (a space or two), then
the dk2mapper will not find it (it does a string compare on the line).

There should be NO EXTRA SPACES on the section names.

############################################################################################################
"Do I always have to go through the game to see the level?"

Please note in the strategy section on Dark Sword's Forum that David Amor posted the level switch for DKII.

This will enable you to quickly hop into the game without going into skirmish mode.

So if your map name is VerySimple , for example,
The command "dkii -level VerySimple" will take you right to that level.

Please note though, that no victory conditions (opponent anihilation) will ever be triggered and
Your computer opponents sit there like complete idiots.

But to 'check out' your level (using ctrl-alt-c NOW THE RAIN HAS GONE), this is a good option.

############################################################################################################

Ichimonji has just sent me a 300 x 300 map that compiles and works.

Man that is big.

So I take back what I said about 256x256.
He also came up with a splendid idea that works!
Indexing your map:


dk2mapper will digest the following MAP(terrain not important):

MAP
20 x 10
qqqqqqqqqqqqqqqqqqqq 0
qqqqqqqqqqqqqqqqqqqq 1
qqqqqqqqqqqqqqqqqqqq 2
qqqqqqqqqqqqqqqqqqqq 3
qqqqqqqqqqqqqqqqqqqq 4
qqqqqqqqqqqqqqqqqqqq 5
qqqqqqqqqqqqqqqqqqqq 6
qqqqqqqqqqqqqqqqqqqq 7
qqqqqqqqqqqqqqqqqqqq 8
qqqqqqqqqqqqqqqqqqqq 9

00000000001111111111
01234567890123456789


MAP_CODES
etc.....



Note the indexing at the BOTTOM and the RIGHT.
Dk2mapper does ignore these areas, so this is legal, and clever.

############################################################################################################

The maps that came with the map editor were only 50 x 50. 
I wanted to make a map at least double that size, so how do I go about doing it? 
Am I suppose to type the extra locations in the map one at a time? 
I don't think I can just cut and paste, and it is quite tedious to keep pressing F's. 

ANSWER:

Yes, Cut and Paste Technology is here to stay. :>

So use a good editor, one that does not WORD-WRAP. 
I would recommend you making a 100 x 100 template if you wish, which you will 
always use as a starting point for making a 100x100 map.

An excellent editor is Ultra Edit :: www.ultraedit.com.  I think it is 30 bucks.
This editor allows you to also use printable characters beyond what is normally on your keyboard.

Any simple free ware editor will also be up to the task.


############################################################################################################

--------------------------------------------------------------------------------

This is the standard disclaimer saying that I am not responsible for the 
damage done to your machine through your usage of this software.

This software can be freely distributed as long as all files are included and
no cost is being charged.


-----------------------------------------------------------------------------
Want to thank David Amor at Electronic Arts
Want to thank Bullfrog for their superior creative talents
Want to thank Daniel White for help with Creature Codes and Testing.
Want to thank Richard Wilson at Dark Sword for Distribution. 
	check out  http://www.dkeeper2.net/
Want to thank Anthony Affrunti for the Gui to dk2randommap.	
-----------------------------------------------------------------------------

If you have a problem with getting your map to work. Check your
ascii map file for errors. DO not send me you map files that do not work. Follow the 
debug tips and start small. Building on your map file.


This will probably be the last release of this map maker for the moment, and may be a patch release 
very quickly due to my minimal quality assurace techniques... :>

When Bullfrog distributes their editor, work on this one will most likely die.

DKII is a fairly robust program, and despite all the hacking I did, I only had
to reboot the box twice. This is a product of high quality.

Version 1.1

Mark
mok@mars.superlink.net
8/8/99
updates 8/25/99
------------------------------------------------------------------------
