Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 07.09.2005, 16:58   #1
red
Архивный участник
 
Join Date: Sep 2005
Posts: 15
Default geodata my share

thats all my work i have done so far... dont complain about shitty php code -> feel free to make it better and share it with others! also dont pm me!
if u got a question -> ask here.

im giving it out since i think l2off got no future - my opinion, and im starting to work on l2j...

some explainations and theory...

i have seen that many ppl do application to generate geodata 'on the fly', i dont think its a good idea, it will be complicated to code and even if u try to create map grid-only based as result u will have hell buggy map and if u try to create 64 or 3type(flor) header map based it will couse great load to server... thats why i made it sql based (to clean up 0,64 and 3type header)

attachments:
- sql-geodata.rar is the empty mysql database
- load.php loads existent geodata into sql
- check.php calculate new header
- write.php write new map from sql
- flat_flors_fix.php not done, grid only based - allow to change existent data into solid area or bridges (if this one dosnt work i got somewhere older version)
- load-l2j.php a sample script to load heights from l2j dump, decompress the bin file with winrar first!

how to calculate bridges height -> ((ingame_height*2)/16-1)=> remove after point number and do this -> *16+1
this formula will give u a height that have to be used in geodata

flat_flors_fix.php does work - parttly, after fucking around with it, i got an idea to use pictures to generate map, theory:
1024x1024 bmp will allow to create 1 layer of geodata, 1pixel=1subgrid, different colors will allow to define height; such script should allow for example to load bmp generated from l2j, without bridge and lower flors but those r simple to add
i think there is no need for further explanation?

later i will post my theory about client side bmp textures..

sry for my bad eng.
red is offline  
Old 07.09.2005, 19:06   #2
bwgreen
Архивный участник
 
Join Date: Sep 2005
Posts: 408
Default

Wow...... I'll give feedback ASAP!
bwgreen is offline  
Old 07.09.2005, 21:25   #3
dragoon69
Архивный участник
 
Join Date: Sep 2005
Posts: 2
Default

No config.php?
dragoon69 is offline  
Old 07.09.2005, 21:32   #4
torune
Архивный участник
 
Join Date: Jul 2005
Posts: 371
Default

config.php are just basic settup for sql database
*good share and agree with the no future thinking
torune is offline  
Old 07.09.2005, 22:17   #5
elcapo
Архивный участник
 
Join Date: Mar 2005
Posts: 107
Default

good job red, but, i have a doubt about the heights in 64 and 64+ floors (40 00 and 4+ ++), about the way of calculating the height.

I mean, i think the heights of this floor types (64 and 64+) are "variations of height" between the 00 00 floors around it. Im trying to figure out it.

for example:
in a 64 floor type, -2692 is NOT -1 * 65536 - 62840 (F578)

i think it in depends of the floors around it.
elcapo is offline  
Old 07.09.2005, 22:41   #6
s00r
Архивный участник
 
Join Date: Jul 2005
Posts: 47
Default

hm..
the phps.rar work with mYsql db,
sql-geodata.rar - for mSsql...
why?
s00r is offline  
Old 07.09.2005, 22:46   #7
elcapo
Архивный участник
 
Join Date: Mar 2005
Posts: 107
Default

Quote:
-2692 => F8EA in the map if the indicator is greater than 64
but, what is the "formula" for indicators greaters than 64?
elcapo is offline  
Old 08.09.2005, 06:42   #8
red
Архивный участник
 
Join Date: Sep 2005
Posts: 15
Default

Quote:
Originally Posted by elcapo
Quote:
-2692 => F8EA in the map if the indicator is greater than 64
but, what is the "formula" for indicators greaters than 64?
0 and 64 are 1:1
flors (64++) need this formula: ((ingame_height*2)/16-1)=> remove after point number and do this -> *16+1

24_19 coliseum have been made this way...


Quote:
Originally Posted by elcapo
for example:
in a 64 floor type, -2692 is NOT -1 * 65536 - 62840 (F578)

i think it in depends of the floors around it.
where did u get that from? :s
red is offline  
Old 08.09.2005, 09:13   #9
elcapo
Архивный участник
 
Join Date: Mar 2005
Posts: 107
Default

thats the formula!
I read in ur code this:

[quote="ur code"]if ($hex_a > "32767") {$hex_a = -1 * (65536 - $hex_a);} else {};[/qoute]

and i tought u was in the same error than me.

i think even 64's floor type are like this, but, maybe im wrong, i will check in a minute.
elcapo is offline  
Old 08.09.2005, 10:52   #10
UStas
Архивный участник
 
Join Date: Sep 2005
Posts: 20
Default

This is good share /// But we cannot user this for castles, toi, etc...

L2J dont have walls, so if we create (sample) geodata for castle all mob`s from castle bean goin over wall.

Any one have formula for calculate height from bmp scale?

To Digital - I lost my pass for acc and my acc is blocked now My prev name anrysys// Help me plz
UStas is offline  
Old 08.09.2005, 10:53   #11
UStas
Архивный участник
 
Join Date: Sep 2005
Posts: 20
Default

s00r - You can use locations.sql from l2j...
UStas is offline  
Old 08.09.2005, 11:55   #12
elcapo
Архивный участник
 
Join Date: Mar 2005
Posts: 107
Default

red, u said that 0 and 64 are 1:1 , and 64+ are 2:1 (aprox), are u sure of that? i mean, 64 are 1:1 ? im checking it on 20_22 geo, and 64 appers to be 2:1.
I have modified this geo with 2:1, and the heighs are "some good", but not exactly the same. (im trying to take the inverse formula (from geo to ingame_height)).
elcapo is offline  
Old 08.09.2005, 14:03   #13
red
Архивный участник
 
Join Date: Sep 2005
Posts: 15
Default

[quote="elcapo"]thats the formula!
I read in ur code this:

Quote:
Originally Posted by ur code
if ($hex_a > "32767") {$hex_a = -1 * (65536 - $hex_a);} else {};[/qoute]

and i tought u was in the same error than me.

i think even 64's floor type are like this, but, maybe im wrong, i will check in a minute.
that convert unsigned short into signed :s



Quote:
Originally Posted by elcapo
red, u said that 0 and 64 are 1:1 , and 64+ are 2:1 (aprox), are u sure of that? i mean, 64 are 1:1 ? im checking it on 20_22 geo, and 64 appers to be 2:1.
gimme offset
red is offline  
Old 08.09.2005, 14:14   #14
red
Архивный участник
 
Join Date: Sep 2005
Posts: 15
Default

Quote:
Originally Posted by UStas
This is good share /// But we cannot user this for castles, toi, etc...

L2J dont have walls, so if we create (sample) geodata for castle all mob`s from castle bean goin over wall.

Any one have formula for calculate height from bmp scale?

To Digital - I lost my pass for acc and my acc is blocked now My prev name anrysys// Help me plz
u can create ur own own bmp with ur own color scale, with such script toi and catacombs can be made easly... 1color = 1subgrid, its simple
red is offline  
Old 08.09.2005, 23:20   #15
UStas
Архивный участник
 
Join Date: Sep 2005
Posts: 20
Default

red - Why do you think so ? I think i can create multilayer geo from bmp... But not from one bmp :wink:
UStas is offline  
Old 08.09.2005, 23:55   #16
torune
Архивный участник
 
Join Date: Jul 2005
Posts: 371
Default

nah, its possbile to get them all on one bmp
i actually tried it 2 monthes ago, but turn out, unable to connect everything together
bmp from client doesnt really solve things, in my opinion
torune is offline  
Old 09.09.2005, 00:02   #17
UStas
Архивный участник
 
Join Date: Sep 2005
Posts: 20
Default

Good idea... Dut i try to make from many bmp... With (for example geen corol) where layer no have hight...
UStas is offline  
Old 09.09.2005, 00:05   #18
torune
Архивный участник
 
Join Date: Jul 2005
Posts: 371
Default

lol, its time consuming work, i spent 2hr+ just for taking height from 25_17 by l2j, but still fail to get a bugfree version.
torune is offline  
Old 09.09.2005, 05:34   #19
fflam
Архивный участник
 
Join Date: Jun 2005
Posts: 46
Default

the problem makeing geodata form bmp is the hight data bmp is only 256x256 pixle so thats 1 pixle per "grid" but what if you need a 64 type headder? need a much more detaled bmp then the ones providedform the client.

also it seems the hight data form l2j and official is diffrent. when red and i were makeign the colosium geodata the bridges were way diffrent in hight.
fflam is offline  
Old 09.09.2005, 05:58   #20
red
Архивный участник
 
Join Date: Sep 2005
Posts: 15
Default

not only bridges are different, for example in l2off the coliseum got -3440 and l2j -346x...

for detailed geodata you will need 2048x2048 bmp (256x8) not 1024x1024 as i said earlier lol
red is offline  
Old 09.09.2005, 06:16   #21
elcapo
Архивный участник
 
Join Date: Mar 2005
Posts: 107
Default

red: ((ingame_height*2)/16-1)=> remove after point number and do this -> *16+1

works great when u have ingame_heights, but, my idea is convert the 64+'s floors type height into 1:1, to make modifications, and merge it again.

i use h/2 but obviously it has a little convertion error, but, i think this LITTLE difference are making that every 64+'s floor type been unwalkeable. Just enter in the 64+'s type floor, and u will stuck.

I check it with //worlddebug, and the heigth is quite the same, with "may be", 10z of error.
I dont know what happends.
elcapo is offline  
Old 09.09.2005, 06:24   #22
fflam
Архивный участник
 
Join Date: Jun 2005
Posts: 46
Default

10z error is alot. when we wer working on the colosium and entered the l2j hight of -346X, and the ingame hight was suposed ot be around -3440 (dont rember exact numbers off the top of my head) i was a good 6 to 10 player hights (stack 6 to 10 player models on top of each other) above where i was suposed to be. so its got to be more or less dead on to work
fflam is offline  
Old 09.09.2005, 06:29   #23
red
Архивный участник
 
Join Date: Sep 2005
Posts: 15
Default

Quote:
Originally Posted by elcapo
red: ((ingame_height*2)/16-1)=> remove after point number and do this -> *16+1

works great when u have ingame_heights, but, my idea is convert the 64+'s floors type height into 1:1, to make modifications, and merge it again.

i use h/2 but obviously it has a little convertion error, but, i think this LITTLE difference are making that every 64+'s floor type been unwalkeable. Just enter in the 64+'s type floor, and u will stuck.

I check it with //worlddebug, and the heigth is quite the same, with "may be", 10z of error.
I dont know what happends.
i know, thats why you need this formula
flors seems to have "thickness" (its fflam idea) the height is the very top pixel of subgrid, exmaple:
-3440 is the first pixel of the 215subgrid, its range is -3440-3455 as you can see its the bridge itself and the range is not accessible for player, so to fix it put 215-1 subgrid into geodata

((ingame_height*2)/16-1)=> remove after point number and do this -> *16+1
((-3440*2)/16-1)=-6880/16-1=-429 and now *16+1
-429*16+1=-6863
-6863 its the height to put into geodata, you should be able to make backwards formula, but for what purpose...
red is offline  
Old 09.09.2005, 06:44   #24
elcapo
Архивный участник
 
Join Date: Mar 2005
Posts: 107
Default

yes.. backwards formula.. for what purpose? to fix invisible walls perhaps, to move estructures, etc.

* covert Geodata (.dat) into a big size matrix (2048*2048*x heights levels).
* all of this heights must to be in the same convertion, to forget the types.
* make changes (move, put something).
* merge it again into a Geodata (.dat).

thats is what im trying to do. I make an bmp converter, to see the changes, but, i cant figure out the formula to take the right height from the geodata.
I trying to work manipulating bits, but, i'm not very good on it.
elcapo is offline  
Old 09.09.2005, 06:45   #25
torune
Архивный участник
 
Join Date: Jul 2005
Posts: 371
Default

what you guys gotta do, fix grid by grid? omg
torune is offline  
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 18:46.