![]() |
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. |
Wow...... I'll give feedback ASAP!
|
No config.php?
|
config.php are just basic settup for sql database
*good share and agree with the no future thinking |
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. |
hm..
the phps.rar work with mYsql db, sql-geodata.rar - for mSsql... why? |
Quote:
|
Quote:
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:
|
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. |
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 |
s00r - You can use locations.sql from l2j...
|
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)). |
[quote="elcapo"]thats the formula!
I read in ur code this: Quote:
Quote:
|
Quote:
|
red - Why do you think so ? :) I think i can create multilayer geo from bmp... But not from one bmp :wink:
|
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 |
Good idea... Dut i try to make from many bmp... With (for example geen corol) where layer no have hight...
|
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.
|
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. |
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: ((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. |
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
|
Quote:
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... |
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. |
what you guys gotta do, fix grid by grid? omg
|
| All times are GMT. The time now is 16:19. |