Zone settings

This article is for advanced DAOC users and for informational purpose only. If you want to discover how an open field zone is created and defined in the game, you are in the right location.

Let explain how a zone is described…

The most little unit of the game area is defined by what is called a « zone ».

For instance, the Albion realm and rvr maps are grouped together under a « region » named « Albion » and composed with 14 zones :

Camelot Hills, Salisbury Plains, Black Mtns. South, Black Mtns. North, Dartmoor, Cornwall, Llyn Barfog, Campacorentin Forest, Avalon Marsh, Lyonesse, Forest Sauvage, Snowdonia, Pennine Mountains, Hadrian’s Wall

All the zones in the game are described under the « zones » folder as below :

List of zone ids

Each zone has a specific id composed of 3 digits.

The meaning of each id is as below for each realm :

Zone preloading data

When you entered the Camelot Hills zone, a splash screen is loaded as per below :

You can notice the name of the region « Albion » is displayed above the splash screen.

The list of loading data is defined as :

  • data\loading\
    • alb1.mpk : archive file containing the various splash images required for the loading of the zone
  • gamedata.mpk : archive file containing various game data including:
    • loading.dat : data file containing the possible splash screens for the zone in the format below:
[region001]
name=Albion
screen01=archive://data/loading/alb1.mpk:alb0
screen02=archive://data/loading/alb1.mpk:alb1
screen03=archive://data/loading/alb1.mpk:alb3
screen04=archive://data/loading/alb1.mpk:alb4
screen05=archive://data/loading/alb1.mpk:alb5
screens=5

Please note each screen (like « alb0 ») is in DDS format (1024×256)

  • localdata.mpk : local archive file game data

Zone map data

The map for the zone is available under the directory :

  • ui/maps
    • z000.dds : image of the map for zone « 000 »

The map is in DDS format 256×256

Zone general data

When you look at the « zone » folder, you will find the below files providing general data for the zone :

  • zone/sky/
    • sky.mpk : file archive for the sky setup
      • sky_albion.dat : give sky setup in ca of sun, moon, cloud, rain, snow conditions, etc.
  • zone/zones.mpk : file archive containing general data for the region and zone
    • zone.dat : this file is describing the general data of the zone :
[region001]
entry_music=2
expansion=0
grasscsv=grass_alb.csv
grassmap=grass_alb.dds
skydome=sky_albion.dat

« skydome » indicates the sky setup for the region (referencing « sky_albion.dat »

[zone000]
enabled=1
entry_music=2
height=8
name=Camelot Hills
region=1
region_offset_x=67
region_offset_y=59
type=0
width=8

This data file is describing the name of the zone (« name »), the offset in the region in case of region composed of multiple zones (« region_offset_x », « region_offset_y ») and region width and height (« width », « heigth ») which is 8×8 in general.

The type=0 is for open fields.

Zone offset explained

The region offset is expressed in what I would call a « block ». A standard zone is made of 8 x 8 blocks. So when the zone offset in the region is 67, it means it’s starting at block 67 for the « x » part.

If we check the first starting zones from west to east on the global map, we can see they are « Lyonesse » and then « Cornwall » :

In the « zones.dat », the initial x offset for « Lyonesse » is 35 while the y offset is 77 :

[zone010]
enabled=1
entry_music=2
height=8
name=Lyonesse
region=1
region_offset_x=35
region_offset_y=77
type=0
width=8

As « Cornwall » is the next zone on the east, we will have x offset 35+8=43, while the y offset remains the zame as both zones are aligned on the y coordinates :

[zone006]
enabled=1
entry_music=2
height=8
name=Cornwall
region=1
region_offset_x=43
region_offset_y=77
type=0
width=8

Zone overview for Camelot Hills

Now let’s see how the « Camelot Hills » zone is structured.

If you go into the « zone000 » folder you will see the below contents :

Each file contains a compressed content :

  • dat000.mpk : data relative to the zone’s description (objects location, lights, water areas, relief, …)
  • csv000.mpk : same as dat000.mpk but containing only csv files
  • lod000.mpk : terrain textures
  • tex000.mpk : terrain textures
  • ter000.mpk : textures list index
  • sound.dat : music and ambiance sounds

Zone detailled data for Camelot Hills

Now let’s see how each part is structured in the « zone000 » folder :

Terrain texture

The definition of the terrain’s texture is done via two archive files :

  • lod255.mpk : archive file containing the DDS images of the terrain
  • tex255.mpk : archive file containing the DDS images of the terrain

As Camelot Hills is a 8×8 zone, it means the terrain is described with 8×8 pictures as below (256×256 pixels for each picture) :

If you have created a global BMP picture (2048×2048 pixel), then you can create the corresponding splitted images with the ImageMagick tool.

For splitting into 8×8:

magick convert source_image.bmp -crop 12.5%x12.5% target/target_image.bmp

For converting to DDS format :

magick mogrify -format "dds" *.bmp

On a testing terrain picture, you will have the below result :

Map boundaries

The boundaries are defined in the archive file :

  • dat000.mpk : archive
    • bound.csv : file describing the map boundaries

If we look at the bottom left of the Camelot Hills zone, we can see the boundaries with the red dots as below :

The first dot of the boundary is in blue at the bottom of the picture and the definition of each dot is with (x,y) coordinates.

If we check at the « bound.csv » file, each line is defining a specific boundary, and the first boundary contains 64 points :

  • The first two data indicate the range (up to 64 points)
  • The remaining data indicate the (x, y) coordinates for each point of the boundary

You can notice the first point in blue on the terrain picture is having coordinate (7680, 65535)

Terrain heightmap

The terrain heightmap is defined in the files :

  • dat000.mpk : archive
    • offset.pcx : heightmap offset picture (color intensity)
    • terrain.pcx : heightmap terrain picture (color intensity)
  • sector.dat : setup the scale and offset factors of the zone

For Camelot Hills, the scale factor and offset factor are as below :

[terrain]
scalefactor=8
offsetfactor=32

If we open the offset.pcx and terrain.pcx pictures, we have the below details :

The height of the terrain for the zone depends of the pixel for the terrain.pcx picture (multiplied by zone’s scale factor) and the pixel for the offset.pcx picture (multiplied by zone’s offset factor) :

$height_pixel=(imagecolorat($terrain,$x,$y)*$scalefactor) + (imagecolorat($offset,$x,$y)*$offsetfactor);

It means when you have black pixels, it will correspond to the lowest heights in the map, while the white pixels bring to high mountains :

Terrain grass

The terrain grass is defined in the archive file :

  • dat000.mpk : archive
    • densemap.pcx : how dense the grass « layer » is
    • grassmap.pcx : the type of grass (can be high herbs, little stones, etc)

For Camelot Hills, the pictures are as below :

If we go under the river in Camelot Hills (purple spot below in the map) :

Then we will see some aquatic herbs all along the river :

Terrain shadows

The terrain shadow is defined in the archive file :

  • dat000.mpk : archive
    • shadow.pcx : to put some static shadows on the map (used with trees locations)
    • shademap.pcx : for shadow mapping (exact behavior to confirm)

For Camelot Hills, the pictures are as below :

Terrain lights

The lights of a zone are defined in the archive file :

  • dat000.mpk : archive
    • lights.csv : define the lights coordinates and color

If we check at the graveyard zone in Camelot Hills, we can see two ligths are defined :

These two lights are in Orange Yellow color and are setup on line 36 and 37 of the lights.csv file :

Each light is having (x,y,z) coordinates plus a color type (9 is for OrangeYellow).

If we look at the graveyard during the night, we can notice these two lights:

Objects location

That’s the interesting part : )

The objects location is defined in the archive file :

  • dat000.mpk : archive
    • fixtures.csv : for objects location linked to models
    • nifs.csv : for models definition linked to NIF files

If we check again the graveyard part, we can see it’s defined by only one object under the name « Graveyard (Instance 2) » :

If we check the two files, we will have :

  • fixtures.csv : the NIF object « Graveyard » number 1649 referencing the NIF model 433 and located at <17536, 45056, 2172> in the map
ID,NIF #,Textual Name,X,Y,Z,A,Scale,Collide,Radius,Animate,Ground,Flip,Cave,Unique ID,3D Angle,3D Axis X,3D Axis Y,3D Axis Z
1649,433,Graveyard (Instance 2),17536.00,45056.00,2172.00,90,100,4000,0,0,1,0,0,1759,1.570796,0.000000,0.000000,-1.000000
  • nifs.csv : the NIF model 433 corresponding to file « gyard1.nif »
Grid Nifs,,,Ambient,MerlinDataNIF,TextualName,Filename,Only,Shadow,Color,Animate,Collide,Ground,MinAngle,MaxAngle,MinScale,MaxScale,Radius,LOD 1,LOD 2,LOD 3,LOD 4,Ref Height,Ref Width,Unique,Local,Terrain
433,Graveyard,gyard1.nif,0,0,16744703,0,1,1,0,0,100,100,0,0,0,0,0,2048,2048,0,0,0

The fixtures.csv is designed to put objects on the terrain and link them to models, while the nifs.csv is useful to link the model to their corresponding NIF files.

Hence, for instance, a tree model is only defined once in the nifs part, while it can be used several times in the fixtures part.

The « gyard1 » NIF file looks like the below in the game :

River and Ocean

The rivers and oceans are defined in the archive file :

  • dat000.mpk : archive
    • water.pcx : identify where to play water sounds (near river, ocean, swamp, etc)
    • sector.dat : define location of river, ocean, swamp etc

The water.pcx looks like below for the Camelot Hills (black color where water is) :

The definition of the river borders are available in the sector.bat.

If we take the river definition at the bottom of the zone (south part) we have it displayed with the green dots below :

If we check the « sector.dat » file, we have a [river00] paragraph indicating that we have a water area of type « river » and defined by 33 left and right points :

[river00]
texture=watery
multitexture=ripl
flow=-50
height=1916
bankpoints=33
color=16776960
Extend_PosX=0
Extend_PosY=0
Extend_NegX=0
Extend_NegY=0
Tesselation=9
name=river00
type=RIVER
left00=174,256,0
right00=192,256,0
left01=179,249,0
right01=199,250,0
[...]
left32=0,90,0
right32=0,70,0

Each left point references the left side of the river (leftxx), while the right point references the right side (rightxx). Note that left and right points should be paired.

The water for river, swap, ocean only appears when the heightmap is below a certain value so you will need to lower the heightmap if the water is not displayed as expected.

The start of the river is as per below in the game :

Jump points

The jump points are defined in the archive file :

  • dat000.mpk : archive
    • zonejump.csv : 2 x 2 points are needed for each jump area

If you look at the entrance of the Camelot city in Camelot Hills, we can see there’s a jump point area in orange below :

A jump area is a rectangle defined by two pairs of points :

  • A pair of points for the bottom part (index 1) :
  • A part of points for the top part (index 2) :

If we check at the « zonejump.csv » file, the first line is containing the bottom part while the second line is containing the top part for the jump area :

1,CamCity,3200,28712,3053,28712,2912,3072,6,,
2,CamCity,3053,28712,3200,28712,2912,3072,6,,

This jump area is referencing the jump point « 6 » which is corresponding to Camelot City as per below (Dawn Of Light database) :

Note that the source and target location (x,y) are expressed in global (x,y) coordinates.

As « Camelot Hills » is a zone with (x,y) offset of (67,59) blocks and each block equals 8192, it means the global coordinates for Camelots Hills zone starts at (67*8192= 548 864, 59*8192=483 328). Hence the values for SourceX and SourceY in this table.

A last note, the Target Region 10 is correctly corresponding to the Camelot City:

Sound ambiance

The sound ambiance is defined in the files :

  • zones\zone000 :
    • sounds.dat : defines the various sound areas in the zone
  • sounds :
    • cc_sounds.csv : index of the sound files

If we check around the grave yard in Camelot Hills, we can see a circle area where a sound ambiance is defined :

It means everytime a player enters this area, a specific sound setup will be played.

Let’s check the content of « sound.dat » for this sound setup :

[SoundRegion03];-----[feature:cemetary]
sound_type=1
version=2
random_sound_spacing=1
ignore_random_offset=0
instant_start=1
fade_on_mp3=0
fade_on_mp3_time=0
fade_time=8
fade_on_weather_time=5
fade_on_underwater_time=1
zone_wide_sounds=0

; SOUNDS 
Sound00=2, s_MusicComponent_CC12-01, 0, 100, 127, 0, 0, 0, 1 
; SHAPES 
Shape00=1, 17487, 45162, 1500 ; prydwen ossuary

We can see that a sound region for the cemetary is defined with :

  • A circle shape (Shape00=1) with (17487,45162) coordinates and a radius of 1500
  • A sound « s_MusicComponent_CC12-01 » linked to this circle area

Now we can see how « s_MusicComponent_CC12-01 » is defined in the « cc_sounds.csv » :

;,ID#,sound_ID,filename,rate,vol,pan,offset,r1,r2,,,polygroup,,
,2180,s_MusicComponent_CC12-01,MusicComponent_CC12-01.wav,,,.9L-.9R,,,,,,,,

« s_MusicComponent_CC12-01 » is referencing the sound file « MusicComponent_CC12-01.wav » and has the ID 2180.

Others

Some other archive files also exist :

  • zones\zone000 :
    • csv000.mpk : contains the csv part from dat000.mpk
    • ter255.mpk : textures index for the zones

Conclusion

With all these details in mind, the zone description should not have any secret anymore for you 🙂

Une réponse à “Zone settings”

Laisser un commentaire

Concevoir un site comme celui-ci avec WordPress.com
Commencer