Welcome to the TWC Wiki! You are not logged in. Please log in to the Wiki to vote in polls, change skin preferences, or edit pages. See HERE for details of how to LOG IN.

Difference between revisions of ".world file - M2TW"

From TWC Wiki
Jump to navigationJump to search
(start of table explanation)
Line 1: Line 1:
 
==Overview==
 
==Overview==
The .world file forms the major part of the information controlling each settlement or ambient building in M2TW.  The file contains details of the 3d structures making up each building, wall or other static object.  It is very closely interelated to the [[.worldcollision]] file.
+
The .world file forms the major part of the information controlling each settlement or ambient building in M2TW.  The file contains details of the 3d structures making up each building, wall or other static object.  It is very closely interrelated to the [[.worldcollision]] file.
  
 
The 3d game elements are grouped into:
 
The 3d game elements are grouped into:
 
*'''Complexes'''  Each complex is numbered (0 to ''n'')in Table 1 and can comprise one or more structures.
 
*'''Complexes'''  Each complex is numbered (0 to ''n'')in Table 1 and can comprise one or more structures.
*'''Structures''' Each structure can comprise one or more objects, a structure can be viewed as a Milkshape ms3d file or in mayavi by use of the [[WorldEditor]] user developed modding tool.
+
*'''Structures''' Each structure can comprise one or more objects, a structure can be viewed as a Milkshape ms3d file or in Mayavi2 by use of the [[WorldEditor]] user developed modding tool.
 
*'''Objects''' Each object can comprise one or more groups, where an object contains more than one group the first will be the undamaged state of the 3d element and the successive groups will be the damaged states.  The most common object size is two groups - a pair of undamaged and damaged versions of an element.
 
*'''Objects''' Each object can comprise one or more groups, where an object contains more than one group the first will be the undamaged state of the 3d element and the successive groups will be the damaged states.  The most common object size is two groups - a pair of undamaged and damaged versions of an element.
 
*'''Groups''' In game groups are the same as Milkshape ms3d groups, they are organised into objects by the .world files.
 
*'''Groups''' In game groups are the same as Milkshape ms3d groups, they are organised into objects by the .world files.
  
Each of the above element stages will also have an invisible bounding sphere or box which effects where it can be viewed from in game (and probably other factors like collision and animation).  The complex bounding spheres are located within an octree structure of bounding boxes described by [[Argantonio]] [http://www.twcenter.net/forums/showthread.php?p=4273886&highlight=octree#post4273886 here].
+
Each of the above element stages will also have an invisible bounding sphere or box which effects where it can be viewed from in game (and probably other factors like collision and animation).  The complex bounding spheres are located within an Octree structure of bounding boxes described by [[Argantonio]] [http://www.twcenter.net/forums/showthread.php?p=4273886&highlight=octree#post4273886 here].
  
 
==File Structure==
 
==File Structure==
Line 15: Line 15:
 
This table deals with the inter-relation of the bounding boxes and Complex relative locations and bounding spheres.
 
This table deals with the inter-relation of the bounding boxes and Complex relative locations and bounding spheres.
  
 +
The image below shows a screen shot of Table 1 from Stone_Fort_C which has been coloured in Excel to try to attempt to explain contents.<br>
 +
[[File:World-table1.jpg]]
 +
 +
The numbers in red do not exist in the file - they are notional column and row numbers added to help explain things.  The notional row numbers (0-32 in the example) are used within the table to inter-relate components.
 +
 +
Column 19 gives the hierarchy level for each of the row contents. 
 +
:0 is the top level cube for the [http://www.twcenter.net/forums/showthread.php?p=4273886&highlight=octree#post4273886 Octree] structure - the dimensions of this should contain the entire 3d world for this settlement or building.
 +
:1 is the second level down, the up to eight smaller cubes that can fit within the largest cube
 +
:2 is the third level down, theoretically up to 64 smaller cube locations that can fit within the level 1 cubes.
 +
 +
Column 20 gives the Complex number (with the Complexes numbered 0-23 in this example, if column 20 has the entry "-1" the row doesn't reference a Complex but is instead a bounding box which contains other rows (a level 0 or 1 box as described above).  These rows have bounding box rows have been marked in light blue on the diagram.
  
  

Revision as of 22:52, 28 August 2009

Overview

The .world file forms the major part of the information controlling each settlement or ambient building in M2TW. The file contains details of the 3d structures making up each building, wall or other static object. It is very closely interrelated to the .worldcollision file.

The 3d game elements are grouped into:

  • Complexes Each complex is numbered (0 to n)in Table 1 and can comprise one or more structures.
  • Structures Each structure can comprise one or more objects, a structure can be viewed as a Milkshape ms3d file or in Mayavi2 by use of the WorldEditor user developed modding tool.
  • Objects Each object can comprise one or more groups, where an object contains more than one group the first will be the undamaged state of the 3d element and the successive groups will be the damaged states. The most common object size is two groups - a pair of undamaged and damaged versions of an element.
  • Groups In game groups are the same as Milkshape ms3d groups, they are organised into objects by the .world files.

Each of the above element stages will also have an invisible bounding sphere or box which effects where it can be viewed from in game (and probably other factors like collision and animation). The complex bounding spheres are located within an Octree structure of bounding boxes described by Argantonio here.

File Structure

The file layout (with names used in KnightErrant's WorldEditor is as follows:

Table 1

This table deals with the inter-relation of the bounding boxes and Complex relative locations and bounding spheres.

The image below shows a screen shot of Table 1 from Stone_Fort_C which has been coloured in Excel to try to attempt to explain contents.
World-table1.jpg

The numbers in red do not exist in the file - they are notional column and row numbers added to help explain things. The notional row numbers (0-32 in the example) are used within the table to inter-relate components.

Column 19 gives the hierarchy level for each of the row contents.

0 is the top level cube for the Octree structure - the dimensions of this should contain the entire 3d world for this settlement or building.
1 is the second level down, the up to eight smaller cubes that can fit within the largest cube
2 is the third level down, theoretically up to 64 smaller cube locations that can fit within the level 1 cubes.

Column 20 gives the Complex number (with the Complexes numbered 0-23 in this example, if column 20 has the entry "-1" the row doesn't reference a Complex but is instead a bounding box which contains other rows (a level 0 or 1 box as described above). These rows have bounding box rows have been marked in light blue on the diagram.



Modding Information

Implications of Group number changes