bw logo

Chapter 8. .chunk

Table of Contents

8.1. TransformSection

Named as <chunk>o.chunk (for outside chunks) and <chunk>i.chunk (for inside chunks), these files are defined under folder <res>/spaces/<space>.

Contains list of scene objects, texture sets, collision scene, etc...

The .chunk file format specification is illustrated below:

<fileName> ?label

  ?<terrain>
     <resource> [file.terrain|file.cdata/terrain] </resource>
   </terrain>

  ?TransformSection  1

  *<model> ?label
    +<resource>  file.model  </resource>
    ?<animation>
       <name>     string  </name> 
       <frameRateMultiplier> float </frameRateMultiplier>
     </animation>
     TransformSection  2
    *<staticLighting>3
       <offset>     int  </offset> 
       <size> int </size>
     </staticLighting>
   </model>

  *<entity>
    ?<id>          string  </id>
     <type>        string  </type>
     TransformSection  4
    ?<instantiation>  integer  </instantiation>
    ?<tag>            string   </tag>
     <properties>
       PropertiesList
     </properties>
   </entity>

   *<particles>
     <resource>   file.xml  </resource>
     TransformSection  5
   </particles>

  <boundingBox>
    <min> float  float  float  </min>
    <max> float  float  float  </max>
  </boundingBox>

  ?AmbientLightSection  67

  *DirectionalLightSection  8

  *FlareSection  9

  *OmniLightSection  10

  *SpotLightSection  11

  *<water>
     <position>      float float float  </position>
     <orientation>   float              </orientation>
     <size>          float float float  </size>
     <tessellation>  float              </tessellation>
     <consistency>   float              </consistency>
   </water>

  ?<navmesh>
     <resource>  file.cdata/navmesh  </resource>
   </navmesh>

   <waypointGenerationTime>
     <hi>  integer  </hi>
     <lo>  integer  </lo>
   </waypointGenerationTime>

</fileName>

Grammar of chunk file

1

See TransformSection.

2

See TransformSection.

3

Inside chunks only.

4

See TransformSection.

5

See TransformSection.

6

Inside chunks only.

7

See <light>.xml.

8

See <light>.xml.

9

See <light>.xml.

10

See <light>.xml.

11

See <light>.xml.

The list below describes the tags in the chunk file:

  • adjacentChunk (sections navPolySet/navPoly and waypointSet/waypoint)

    For details, see the document Server Overview's section Server Components CellApp Navigation System, and Content Tools Reference Guide's section NavGen Navpolys, vertices and adjacency.

    ID of the navpoly adjacent to this vertex.

  • AmbientLightSection

    For details, see <light>.xml.

  • animation (section model)

    Tag for model animation section, which specifies animation file and frame rate multiplier.

  • boundingBox

    Tag for chunk's bounding box section, which specifies its point of origin and end.

  • consistency (section water)

    Consistency of the water: 0=fluid, 1=rigid

  • DirectionalLightSection

    For details, see <light>.xml.

  • entity

    Tag for entity section, which specifies settings for the models to be placed in the chunk, such as entity id, type, transform, entity-specific properties, etc....

  • FlareSection

    For details, see <light>.xml.

  • frameRateMultiplier (section model/animation)

    The rate at which the animation will be sped up/slowed down.

  • girth (sections navPolySet and waypointSet)

    For details, see the document Server Overview's section Server Components CellApp Navigation System, and Content Tools Reference Guide's section NavGen Navpolys, vertices and adjacency.

    Girth for which the navigation mesh was generated. For details on the relation between entity girth and navigation mesh generation, see the document Content Tools Reference Guide, chapter NavGen, Changing settings.

  • height (sections navPolySet and waypointSet)

    For details, see the document Server Overview's section Server Components CellApp Navigation System, and Content Tools Reference Guide's section NavGen Navpolys, vertices and adjacency.

    Vertical range of the navpoly prism.

  • hi (section waypointGenerationTime)

    The high 32 bits of the waypoint generation time.

  • id (section entity)

    ID of the entity in the chunk. This can be used by scripts to reference the entity.

  • instantiation (section entity)

    Where the entity should be instantiated: 0=server, 1=client

  • lighting (section model)

    The size and offset of the vertex colour used for the static lighting of this model.

  • lo (section waypointGenerationTime)

    The low 32 bits of the waypoint generation time.

  • max (section boundingBox)

    End point of the chunk's bounding box.

  • min (section boundingBox)

    Starting point of the chunk's bounding box.

  • minHeight (sections navPolySet and waypointSet)

    For details, see the document Server Overview's section Server Components CellApp Navigation System, and Content Tools Reference Guide's section NavGen Navpolys, vertices and adjacency.

    The minimum height of values in the set.

  • model

    Tag for model section, which specifies settings for the models to be placed in the chunk, such as resource file, animation file, transform, lighting, etc....

  • name (section model/animation)

    File containing the animation for the model.

    The file will be located in the animations folder under the model file's folder, and the extension .animation will be automatically appended to it.

    For example if <model> is myFolder/example.model, and <animation> is myAnimation, then the complete path/filename for the animation file is <res>/myFolder/animations/myAnimation.animation.

  • navmesh

    For details, see the document Server Overview's section Server Components CellApp Navigation System, and Content Tools Reference Guide's section NavGen Navpolys, vertices and adjacency.

    Tag for navigation mesh section, which specifies its resource file.

  • navPoly (section navPolySet)

    For details, see the document Server Overview's section Server Components CellApp Navigation System, and Content Tools Reference Guide's section NavGen Navpolys, vertices and adjacency.

    Tag for navpoly section, which specifies height, minimum height, its delimiting vertices, and optionally the vertex's adjacent chunk ID.

  • navPolySet

    For details, see the document Server Overview's section Server Components CellApp Navigation System, and Content Tools Reference Guide's section NavGen Navpolys, vertices and adjacency.

    Tag for section specifying group of navpolys.

  • OmniLightSection

    For details, see <light>.xml.

  • orientation (section water)

    The yaw of the water.

  • particles

    Tag for particle section, which specifies settings for the particles to be placed in the chunks, such as resource file and transform.

  • properties (section entity)

    Tag for the entity-specific properties, containing PropertiesList section.

  • PropertiesList (section entity/properties)

    List of entity-specific properties, as specified by the entity definition file.

    These are the persistent properties defined by the entity or the entity that it inherits from.

    For details on entity definition files, see the document Server Programming Guide's section Directory Structure for Entity Scripting The Entity Definition File.

  • resource

    • Section model

      File containing the model. For details on format of model files, see .model. The path is relative to the game's resources folder (<res>).

    • Section navmesh

      For details, see the document Server Overview's section Server Components CellApp Navigation System, and Content Tools Reference Guide's section NavGen Navpolys, vertices and adjacency.

      Binary file containing navigation mesh data for the chunk. The path is relative to the chunk file's folder.

    • Section particles

      File containing the particle system. For details on format of particle system files, see <particle>.xml. The path is relative to the game's resources folder (<res>).

    • Section terrain

      File containing terrain settings such as height map, overlay data, and textures used. The path is relative to the chunk file's folder.

  • SpotLightSection

    For details, see <light>.xml.

  • tag (section entity)

    The tag of this instance, used to identify this particular instance of an entity.

  • terrain

    Tag for terrain section, which specifies settings for the terrain to be placed in the chunk, such as resource file.

  • tessellation (section water)

    The preferred distance between vertices in the water.

  • TransformSection (main section and entity, model, and particles sections)

    For details, see TransformSection.

  • type (section entity)

    Type of the entity to be placed.

    BigWorld uses this value to determine the path/name of the entity definition file: <res>/scripts/entity_defs/<type>.def

    For details on entity definition files, see the document Server Programming Guide's section Directory Structure for Entity Scripting The Entity Definition File.

  • vertex (sections navPolySet/navPoly and waypointSet/waypoint)

    For details, see the document Server Overview's section Server Components CellApp Navigation System, and Content Tools Reference Guide's section NavGen Navpolys, vertices and adjacency.

    XY position of the navpoly's vertex.

    The third coordinate is used to store adjacency information for the edge formed between this vertex and the next — it is either the navpoly ID of the adjacent navpoly, or an encoding of an obstacle type.

  • water

    Tag for water section, which specifies its position, orientation, size, etc...

    For details, see the document Client Programming Guide's section Chunks Sway items.

  • waypoint (section waypointSet)

    Tag for waypoint section, which specifies height, minimum height, its delimiting vertices, and optionally the vertex's adjacent chunk ID.

  • waypointGenerationTime

    The filetime of the chunk the last time the waypoint was generated.

  • waypointSet

    Tag for section specifying group of waypoint.

8.1. TransformSection

The transform information contained in TransformSection depends on which of the following sections of the chunk file it appears:

  • Main section

  • <model>

  • <entity>

  • <particles>

The grammar for the TransformSection is described below:

<transform>
  <row0>    float    </row0>
  <row1>    float    </row1>
  <row2>    float    </row2>
  <row3>    float    </row3>
</transform>

Grammar of TransformSection in visual file

The list below describes the tags in TransformSection.

  • row0, row1, row2, row3

    Transform matrices to be applied to chunk, model, entity, or particle system.