Get Coordinates & Moving an Object

Last modified: February 24 2014 12:53:09.        
For infos or suggestions, see the credits page        
  File System structure Editing Basics Hex/DC examples RevEngEd 2

Support Wikipedia

The world of H&D2 is plunged into a 3-coordinates system. Every point in space is identified by 3 numerical values, X, Y and Z, where Y is the height. Every map has a different center, a different size and possibly a different height for ground. The scale, instead, is always the same, and a unit of the coordinates system of H&D2 corresponds roughly to a meter.
To have an idea of the map coordinates system is the first step to place or move objects, so here's an example on how to do it in missions where the "map" works (for more complex cases, see the RevEngEd guide).

We learnt how to get the map texture in the "Changing Texture" example, so get a copy of the Normandy2_Mp_Zone map texture: MAPA_N2_1.BMP. Copy also the extracted mission folder "NORMANDY2_MP_ZONE" inside the mission folder (see filesystem structure and installing new maps for further references).

Now enter in-game and go around, finding some of the crates and, with the help of the map, mark them on the copy of MAPA_N2_1.BMP (ammo crates with blue spots and medikit crates with red spots): image.

Now open "Actors.bin" from Normandy2_Mp_Zone with DC||ED and locate all the model objects which have "la_ammo01" (ammo) or "la_ammo02" (medikit) as "Model": image. Copy all X and Z values from "position" to an excel sheet, distinguishing between ammo and medikit. Then make a dispersion graphic with the two series, taking care of putting X values horizontally and Z values vertically: image. Try to have a square graph and set the same range of values for X and Y (-40.0 to 60.0 = 100.0 and 20.0 to -80.0 = 100.0 in the previous image).

Superimpose the graphic to the map with blue/red spots, trying to arrange them (postion, scale, etc.) to make points to collimate. You can also label same of the graphic points, determinating them by coordinates: image. Now you have an image that tells you X and Z coordinates in-game. For Y (height), 0.0 is usually the ground.

Now select "la_ammo_7" (an ammo crate with coordintes 25.21, 0.19, -24.75) in DC||ED. Change its coordinates to 30.0, 1.0, -10.0 and save: according to this image, the crate will be moved in front of the Bank, floating at a meter of height.

Enter in game and have a look. The crate is no more in the corner on the south side of the plaza: image. Instead, it is where it was supposed to be (I was crouching taking this screenshot): image. Et voilá.