Anything you put in <code>define.dat</code>, you can refer to in your other script files. This is a general rule and is applicable to any of the data files. For example, if you want to create another config of a guard, then you just put a new <code>#define</code> in <code>define.dat</code>, and you can now refer to it in <code>char.dat</code> and your dungeon data file. So it follows that you can <code>#define</code> your own dungeon name, which will be essential when we come to link the dungeon data file to the terrain data file.
Stick to upper case lettering when adding a new <code>#define</code>, and be sure to put an underscore when separating words. Be sure items that are enumerated follow a nice numerical sequence e.g. <code>1, 2, 3, 4, 5;</code> or <code>2, 4, 8, 16, 32;</code>, rather than <code>1, 2, 5, 7, 8;</code>. For programmers: note Note that if we wish to refer to a particular dungeon in the ''code'' itself, for example to do something special say in <code>game.cpp</code>, then the code will need to know about it, and so a <code>#define</code> will also need to appear in <code>ivandef.h</code> before ''compiling'' the game.
=== owterra.dat ===
The data file <code>owterra.dat</code> contains the "over-world terrains" of the IVAN world map. These are so named, because they become the little pictures that sit over the ground terrain on the world map. They denote the places - cities or dungeons - you can visit when adventuring in the world map, and so they need to be linked up to the dungeon data files.
Here are some pictures showing famous owterrains:
! Gloomy Caves
|-
| [[File:Ownewattnam.png|80px160px]]| [[File:Owattnam.png|80px160px]]| [[File:Owgloomycaves.png|80px160px]]
|}
As of IVAN 0.50.6, there are exactly 32 slots (<code>dungeonAA</code> up to <code>dungeonBF</code>) available for use as the over-world linkages to your dungeon. Simply pick one out that is free and modify it to link together with your dungeon data file by specifying which <code>DEFINED_VALUE</code> you introduced in define.dat This table shows the control variables for each over-world terrain. You can configure your over-world terrain with the ground terrain type of your choice, and a bunch of other things besides.:
{| class="wikitable"
| <code>BitmapPos</code>
| <code>x, y;</code>
| This determines the bitmap position of the picture of the terrain in <code>WTerra.pcx</code>. You can create your own picture by modifying <code>WTerra.pcx</code>.
|-
| <code>NameStem</code>
| <code>"string"</code>
| This is a string, beginning with a lowercase word, usually a noun or an adjective, for example, "mighty cathedral" or "cave entrance".
|-
| <code>UsesLongArticle</code>
| <code>true</code> or <code>false</code>
| Specify whether to prefix the name stem with the english language short article, "a", or the long article, "an".
|-
| <code>IsAbstract</code>
| <code>true</code> or <code>false</code>
| Do not worry about this. An over-world terrain has no other config than the base config and only the protoype is abstract, if that means anything.
|-
| <code>CanBeGenerated</code>
| <code>true</code> or <code>false</code>
| Set this value to true if you want your user defined dungeon to appear in the world map. It is not applicable to core locations.
|-
| <code>AttachedDungeon</code>
== A worked example ==
=== A Dungeon data file ===
(Attachement)
=== In define.dat ===
{| class="wikitable"
! Script
! Result
|-
|
<tt>Room
{
Size = 5,9;
AltarPossible = false;
DivineMaster = MELLIS;
Type = ROOM_SHOP;
GenerateFountains = false;
AllowLockedDoors = false;
AllowBoobyTrappedDoors = false;</tt>
| [[File:ShopBare.png|160px]]
|}
=== In owterra.dat ===
{| class="wikitable"
! Before
! After
!
|-
|
<tt>locationAA
{
BitmapPos = 0, 64;
NameStem = "empty area";
UsesLongArticle = true;
AttachedDungeon = EMPTY_AREA;
AttachedArea = 0;
CanBeGenerated = false;
NativeGTerrainType = JUNGLE;
}</tt>
|
<tt>locationAA
{
BitmapPos = 0, 64;
NameStem = "<span style="background:palegreen">house on the steppe</span>";
UsesLongArticle = <span style="background:yellow">false</span>;
AttachedDungeon = <span style="background:yellow">EMPTY_AREA</span>;
AttachedArea = 0;
CanBeGenerated = <span style="background:yellow">true</span>;
NativeGTerrainType = <span style="background:yellow">STEPPE</span>;
}</tt>
| [[File:ShopBare.png|160px]]
|}
== What's this about "core locations" ==
Core locations are the original ones from IVAN 0.50. These are New Attnam, Under water tunnel, Attnam and Gloomy Caves. Their generation on the world map is not handled in the generic way covered by the means of adding places to the world map described here.
== Known limitations ==