View Full Version : geodata 40 00+ block format
greetengs
need lil help with geodata format for 40 00+ type blocks
here is the example data:
h: -3657/-7313
-7313 => value in _conv.dat
-3657 => value>>1 (actual height)
but they shift in moving probability
few months ago i saw article here where possible values for moving directions in cell was explaind, bot looks like its del;eted now...
so, can anyone please help to extract 'moving' lfag from this data?
height is 16 bit as always
but it has format
hhhh hhhh hhhh nsew
h - height
n-north
s - south
e - east
w - west
yup i've already explained it myself, thanks :D
last think what i didnt understand - multifloor data, how to determine heights array length, can u please help me?
it is easy
for example 41 00 block means you will have totally 65 height words in this block
then sub-blocks follows each headed with word 01 00 or 02 00 for our example where header is count of heights in this subblock
so for 41 00 you will have 63 * 01 00 subblocks and 1 * 02 00 subblock
thanks for explanation Stazis :)
gamedeveloper
24.01.2006, 07:40
Two russians can't meet each other on russian forums :))
so this means that height ( z ) changes every 16 units since 4 last bits are not taken into consideration :
0x0000 = 0
0x0010 = 16
0x0020 = 32
...
( four last bits are one hex digit )
but if this is the case why the stairs change their Z by 8 units ?
I think we have 2x multiplier for more accuracy....
but the moving probability.... I thought it calculated form subtraction heights of neighbour cells....
so Stazis, if you say that format is hhhh hhhh hhhh nsew
then for hight 1FE3 we have binary data - 1111111100011
real hight is 111111110 - 01FE. smth strange...... it will be -511.
wtf ? :shock: or I smth miss ? :cry:
take value from block
4000
1FE3 2FE3 3FE3 4FE3 6FE3 7FE3 8FE3 9FE3
1FE3 2FE3 3FE3 5FE3 6FE3 7FE3 8FE3 9FE3
1FE3 2FE3 4FE3 5FE3 6FE3 7FE3 9FE3 AFE3
1FE3 3FE3 4FE3 5FE3 6FE3 8FE3 9FE3 AFE3
2FE3 3FE3 4FE3 5FE3 7FE3 8FE3 9FE3 AFE3
2FE3 3FE3 4FE3 6FE3 7FE3 8FE3 9FE3 BFE3
2FE3 3FE3 5FE3 6FE3 7FE3 8FE3 AFE3 BFE3
2FE3 3FE3 5FE3 6FE3 7FE3 9FE3 AFE3 BFE3
ameron dont forget that numbers in .dat are saved as SIGNED short, not unsigned.
we finally managed to sort out most of the things for the mysterious 4000++ layers that the "elite" didn't share :
1.) set height from your source ( bmp etc. ) ( height = greyscale* 76 -9567 )
2.) heights in .dat are x2. so you will have to do a *2 multiplication
3.) set four final bits of height equal to 0
3.) add FLAG to height
flags :
#define NEU 5
#define NWU 6
#define NU 7
#define SEU 9
#define SWU 10
#define SU 11
#define EU 13
#define WU 14
#define ALLW 15
N=North, S=South, etc.
NE=NorthEast
U=Unawlkable
ALLW=All Walkable
abt
2)
as far as i know its not x2, its just shifted left by 1
so just height>>1 (which equals to h/2 lol)
if you want a height of -3000 you will have to make it -6000.
so it's x2
dat.height=real.height * 2
nope.... the 1 layer block are 1x multiplier. so it calculated with height = greyscale* 76 -9567 fourmula.... and no multiplier !
I have generate 1layer map and turn on ///geodata in game.
the 1 layer block lokate on gorund. seems to be right generated.
but 4000+ blocks are seems to multiply by 2.
Another way you can comapre your geodata height with client by turn on ///stat l2 and use /loc command. so comapre what do you see on screen with /loc. And see.... there will be no multiplier.
2 Mirror. I know it. Use winhex that allow to see signed format...
Another question is how many blocks there have 4000 block ?
I figured that 64. Do you have the same ?
Seems Mirror was wright.
For example take from 4000 block value 1FE3=>-7393
So convert to binarey - 1110001100011111. Last 4 bits indicates that block are walkable in all directions. So to evaluate the real hight have to set this 4 bits to 0. Get value 1110001100010000. It will be 10E3. So we have value -7408. Real height will be -7408/2 => -3704 => 88F1. It's the value of last 1layer cell. So it can be true. (not always it will be equal to last cell of 1 layer).
Another question. How we can know the condition where have to put 4000 blocks ?
Just guess, that when we have Z changed on a big value - have to put 4000 block.
Have someone another way ?
Two russians can't meet each other on russian forums :))
wow wow wow who's there?
big thanks for being before me.
hope if you see any whole on the way - tell me to stop.
sorry for offtopic.(btw thats my first offtopic post)
gamedeveloper
26.01.2006, 02:56
Two russians can't meet each other on russian forums :))
wow wow wow who's there?
big thanks for being before me.
hope if you see any whole on the way - tell me to stop.
sorry for offtopic.(btw thats my first offtopic post)You are on the right way, you know Stazis ;)
Ok then
CSG - where the hell CSG operations sequence can be found in .unr
and how to perform CSG operations under non-convex models.
short dat_height_value;
short real_height_value;
bool e,w,n,s;
bool sign;
sign = dat_height_value & 0x8000;
real_height_value = dat_height_value>>4;
if ( sign ) real_height_vlue |= 0x8000;
n = dat_height_value & 8;
s = dat_height_value & 4;
e = dat_height_value & 2;
w = dat_height_value & 1;
?
While decoding _conv.dat files, after a lot of standart "00 00" and "40 00+" blocks, i see such block: "80 03 0E 00 AF 4E", and a lot of digits with no block limiters... Anybody can tell what is this?
The full string from file looks like: "00 00 F0 F0 E8 F0 80 03 0E 00 AF 4E 4F 46 6F 3E 9F 36 BF 2E..."
Please, any information :)
Thanks a lot :)
<rus>
Во время "разбора" .dat-файлов после обычных 00 00 и 40 00+ блоков был замечен такой блок: "80 03 0E 00 AF 4E", и куча символов дальше, без каких-либо разделителей блоков...
Может кто-нибудь подсказать что это? :)
Буду весьма благодарен за любую информацию.
Спасибо :)
</rus>
gamedeveloper
15.02.2006, 02:30
This is kind of 41+ block, 0x380 block. Seems it is from TOI :)
Yes, this is many many floors block , for example the first one is 14 (0E00) floors have - this is really may be only TOI geo
dont confuse man!
Yes, it's from TOI :)
Thanks a lot!!!