Those 4 numbers are quite familliar, aren't theyThis is position of the center of the box on 256x256 tile
X Y
256.000000 X=136.000000 Y=137.000000
if 256x256 tile was to represent 2000mx2000m (as it does in the game) center of the box wil be :
X Y
2000.000000 X=1062.500000 Y=1070.312500
and the corners:
-7.500000 -7.500000
7.500000 7.500000
1055.000000 1062.812500
1070.000000 1077.812500
The Forum is up for sale: XeNTaX Forum looking for new owner
Help to decipher hex values in simple file
Getting closer:

Well thank you, but still someGood work!
Well, that seems to be all finished now.
Why we have as many as 20 records for something which is 5 polygon box shape w/o the bottom. My theory is that each polygon of that box is treated and displayed as separate entity: 5x4 =40. Do you see any other possibility?
If then each record is description of the vertexes how the texture coordinates are noted? If the above theory was correct I would need 3 coordinates for each vertex and I think I am finding only 2 . Unless....
I know that I am on the right track.
This much I know: 20 records describe each of the vertex. Combine them into groups of 4 and you get 5 polygons. 4 walls and 1 for roof.
In each recors first are XYZ coordinates in TILE area measuring 2000x 2000 units (m). I have build the cube based on the coordinates - ALL WORKS
Drawing to follow.
Then something to do with .... maybe angle (I think, not sure yet
) Front wall has 4 vertexes marked 0,1,0 (looks like x=0, y=1, z=0). Back wall would have vertexes marked 0,-1,0 (looks like x=0, y=-1, z=0).
Side walls 4 vertexes marked 1,0,0 (looks like x=1, y=0, z=0). and
-1,0,0 (looks like x=-1, y=0, z=0). Roof 0,0,1.
I can imagine that by proper coding you could determine how the object is oriented. I will make one test object at random angle to see what happens.
And finally the UV texture coordinates. You do not have the texture
, but I do. So I can check and verify that all I am telling you here works and confirms nicely.
This much I know: 20 records describe each of the vertex. Combine them into groups of 4 and you get 5 polygons. 4 walls and 1 for roof.
In each recors first are XYZ coordinates in TILE area measuring 2000x 2000 units (m). I have build the cube based on the coordinates - ALL WORKS
Then something to do with .... maybe angle (I think, not sure yet
Side walls 4 vertexes marked 1,0,0 (looks like x=1, y=0, z=0). and
-1,0,0 (looks like x=-1, y=0, z=0). Roof 0,0,1.
I can imagine that by proper coding you could determine how the object is oriented. I will make one test object at random angle to see what happens.
And finally the UV texture coordinates. You do not have the texture
Code: Select all
This is 2nd vertex named "01"
00 ba 86 44 1.07781250E+003 1077.8125
00 c0 85 44 1.07000000E+003 1070.0000
00 00 00 00 0.00000000E+000 0.0000
00 00 00 00 0.00000000E+000 0.0000
00 00 80 3f 1.00000000E+000 1.0000
00 00 00 00 0.00000000E+000 0.0000
00 00 00 00 0.00000000E+000 0.0000
00 00 40 3f 7.50000000E-001 0.7500
XYZ Coordinates of Vertex 01
00 ba 86 44 1.07781250E+003 X= 1077.8125
00 c0 85 44 1.07000000E+003 Y= 1070.0000
00 00 00 00 0.00000000E+000 Z= 0.0000
Something to do with Center of The Object, orientation or ANGLE :!:
X
Y
Z
00 00 00 00 0.00000000E+000 0.0000
00 00 80 3f 1.00000000E+000 1.0000
00 00 00 00 0.00000000E+000 0.0000
UV Texture Coordinate corresponding to Vertex 01
00 00 00 00 0.00000000E+000 0.0000
00 00 40 3f 7.50000000E-001 0.7500
I will make the drawing shortly. At this junction of time I cannot say what are those 0,1,0 bits mean, but after some consideration they are unlikely to be conveying orientation information. For that just set of coordinates X, Y surely do nicely enough.
0,1,-1 etc. is probable way to establish Normals.
What else?
You got vertex location in 3D space, then you build triangle /faces, then out of them construct polygons, polygons gets textures so the ONLY informations missing is facing of all that stuff. Those are what normals are for. We'll hopefully see.

FRONT: 00, 01,02,03 polygones always clockwise
LEFT SIDE: 04,05,06,07
BACK: 08,09,0A,0B
RIGHT SIDE: 0C,0D,0E,0F
ROOF: 10,11,12,13
In the file there are triangles listed, check them out - they are counterclockwise:
00 02 00 01 00 00
00 03 00 02 00 04
00 06 00 05 00 04
00 07 00 06 00 08
00 0a 00 09 00 08
00 0b 00 0a 00 0c
00 0e 00 0d 00 0c
00 0f 00 0e 00 10
00 12 00 11 00 10
00 13 00 12 00 00
NOTE: in the previous post with floats translation to DEC there were some mistakes-they have been now corrected and post edited.
Sooo what is that 0,1,0 and etc
0,1,-1 etc. is probable way to establish Normals.
What else?
You got vertex location in 3D space, then you build triangle /faces, then out of them construct polygons, polygons gets textures so the ONLY informations missing is facing of all that stuff. Those are what normals are for. We'll hopefully see.

FRONT: 00, 01,02,03 polygones always clockwise
LEFT SIDE: 04,05,06,07
BACK: 08,09,0A,0B
RIGHT SIDE: 0C,0D,0E,0F
ROOF: 10,11,12,13
In the file there are triangles listed, check them out - they are counterclockwise:
00 02 00 01 00 00
00 03 00 02 00 04
00 06 00 05 00 04
00 07 00 06 00 08
00 0a 00 09 00 08
00 0b 00 0a 00 0c
00 0e 00 0d 00 0c
00 0f 00 0e 00 10
00 12 00 11 00 10
00 13 00 12 00 00
NOTE: in the previous post with floats translation to DEC there were some mistakes-they have been now corrected and post edited.
Sooo what is that 0,1,0 and etc
Coming to the end of this quest. I hope I did not bore you to death.
Or so it seems.
Anyway... I made new building box this time I postioned it at angle 30deg. Center of it is also in new location, but this I can recognise now quickly from XYZ coordinates.
What is puzzling still is that 4th, 5th and 6th line with 0 and 1 coordinates. So I have compared both situations for two walls of the box : FRONT and REAR in both instancies. Here are results:
Box @ angle 0 deg
FRONT
0,1,0 for the 1st vertex 00
0,1,0 for the 2nd vertex 01
0,1,0 for the 3rd vertex 02
0,1,0 for the 4tht vertex 03
the wall is pararel to x axis
Box @ angle 0 deg
REAR
0,-1,0 for the 9st vertex 09
0,-1,0 for the 10nd vertex 0A
0,-1,0 for the 11rd vertex 0B
0,-1,0 for the 12tht vertex 0B
the wall is pararel to x axis, but on the opposite side
Now for Box @ angle 30 deg
FRONT
0.5,0.86602539, 0 for the 1st vertex 00
0.5,0.86602539, 0 for the 2nd vertex 01
0.5,0.86602539, 0 for the 3rd vertex 02
0.5,0.8660253, 0 for the 4tht vertex 03
the wall is not pararel to x axis but what is this meaning of 0.5,0.86602539, 0
Box @ angle 30 deg
REAR
-0.5,-0.86602539, 0 for the 1st vertex 09
-0.5,-0.86602539, 0 for the 2nd vertex 0A
-0.5,-0.86602539, 0 for the 3rd vertex 0B
-0.5,-0.8660253, 0 for the 4tht vertex 0C
Or so it seems.
Anyway... I made new building box this time I postioned it at angle 30deg. Center of it is also in new location, but this I can recognise now quickly from XYZ coordinates.
What is puzzling still is that 4th, 5th and 6th line with 0 and 1 coordinates. So I have compared both situations for two walls of the box : FRONT and REAR in both instancies. Here are results:
Box @ angle 0 deg
FRONT
0,1,0 for the 1st vertex 00
0,1,0 for the 2nd vertex 01
0,1,0 for the 3rd vertex 02
0,1,0 for the 4tht vertex 03
the wall is pararel to x axis
Box @ angle 0 deg
REAR
0,-1,0 for the 9st vertex 09
0,-1,0 for the 10nd vertex 0A
0,-1,0 for the 11rd vertex 0B
0,-1,0 for the 12tht vertex 0B
the wall is pararel to x axis, but on the opposite side
Now for Box @ angle 30 deg
FRONT
0.5,0.86602539, 0 for the 1st vertex 00
0.5,0.86602539, 0 for the 2nd vertex 01
0.5,0.86602539, 0 for the 3rd vertex 02
0.5,0.8660253, 0 for the 4tht vertex 03
the wall is not pararel to x axis but what is this meaning of 0.5,0.86602539, 0
Box @ angle 30 deg
REAR
-0.5,-0.86602539, 0 for the 1st vertex 09
-0.5,-0.86602539, 0 for the 2nd vertex 0A
-0.5,-0.86602539, 0 for the 3rd vertex 0B
-0.5,-0.8660253, 0 for the 4tht vertex 0C
.....and after submitting the last post, I got this, even the post was actually submitted:
Could not insert new word
DEBUG MODE
SQL Error : 1016 Can't open file: 'phpbb_search_wordlist.MYI'. (errno: 145)
INSERT IGNORE INTO phpbb_search_wordlist (word_text, word_common) VALUES ('came', 0), ('delete', 0), ('post', 0), ('pressed', 0), ('submit', 0), ('twice', 0)
Line : 234
File : functions_search.php
Could not insert new word
DEBUG MODE
SQL Error : 1016 Can't open file: 'phpbb_search_wordlist.MYI'. (errno: 145)
INSERT IGNORE INTO phpbb_search_wordlist (word_text, word_common) VALUES ('came', 0), ('delete', 0), ('post', 0), ('pressed', 0), ('submit', 0), ('twice', 0)
Line : 234
File : functions_search.php
And finaly the last lines of the file: here I am stumped
by two values:
92 0a 06 3f 0.52359879
a4 b4 29 41 10.60660170
I am enclosing excerpts of both files box at 30deg first and then 0deg following it. That 0.52359879 has to have something to do with angle as it is present in first and absent in second.
by two values:
92 0a 06 3f 0.52359879
a4 b4 29 41 10.60660170
I am enclosing excerpts of both files box at 30deg first and then 0deg following it. That 0.52359879 has to have something to do with angle as it is present in first and absent in second.
Code: Select all
00 00 00 00 0.00000000
00 00 f0 40 7.50000000
00 00 f0 40 7.50000000
00 00 70 41 15.00000000
92 0a 06 3f 0.52359879
a4 b4 29 41 10.60660170
00 ec 29 44 679.68750000
00 ac 8a 44 1109.37500000
00 00 00 00 0.00000000
00 00 00 00 0.00000000
[city1.bmp]
ObjectCount=1
Object000.TypeName=BoxBuilding1
Object000.MapClass=0
Object000.Chance=100
Object000.PositionX=87.000000
Object000.PositionY=142.000000
Object000.Angle=30.000000
*********************************************
00 00 00 00 0.00000000
00 00 f0 40 7.50000000
00 00 f0 40 7.50000000
00 00 70 41 15.00000000
00 00 00 00 0.00000000
a4 b4 29 41 10.60660170
00 ca 85 44 1070.31250000
00 d0 84 44 1062.50000000
00 00 00 00 0.00000000
00 00 00 00 0.00000000
[desert1.bmp]
ObjectCount=4
Object000.TypeName=Box Building1
Object000.MapClass=0
Object000.Chance=100
Object000.PositionX=137.000000
Object000.PositionY=136.000000
Object000.Angle=0.000000
Chip , chip, chip ....I am still on it
Trying to figure out any significance of those two numbers :
92 0a 06 3f 0.52359879
a4 b4 29 41 10.60660170
I 'll deal perhaps with the 1st one because I maybe have found out something:
0.52359879 was in the file when angle was 30 deg. So I created another file with angle 135deg. The number there I found was 2.35619450
Then I divided both numbers by respective angles in deg and the result was 0.01745329 for both. At least the changes are linear here.
So what is peculliar about this 0.01745329? Only this, perhaps that when you multiply it by 180 deg the result is 3.14159 ... a famous number pi. So my question, please refresh my geometry and tell me something about: n=pi/180 or n=2pi/360. Is there anything to it?
Trying to figure out any significance of those two numbers :
92 0a 06 3f 0.52359879
a4 b4 29 41 10.60660170
I 'll deal perhaps with the 1st one because I maybe have found out something:
0.52359879 was in the file when angle was 30 deg. So I created another file with angle 135deg. The number there I found was 2.35619450
Then I divided both numbers by respective angles in deg and the result was 0.01745329 for both. At least the changes are linear here.
So what is peculliar about this 0.01745329? Only this, perhaps that when you multiply it by 180 deg the result is 3.14159 ... a famous number pi. So my question, please refresh my geometry and tell me something about: n=pi/180 or n=2pi/360. Is there anything to it?

