![]() |
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
|
Quote:
|
first, i wanna fix some estructures, like castles. almost all of them are "moved".
|
Quote:
|
but, a subgrid (8x8) is bigger than the castles are moved.
This is the why of my trouble. |
moving a grids is a lot easier then subgrids...
if you have some sql experiences and had a look on my shares you will find a way to do it ;) 1subgrid = 16pixel 1grid = 128pixel |
you cant just "move" castles. in c2 thay added alot to castles. thay made the wyvren entrance (up top) and the breakable walls (witch im assumeign are the same as bridges (type 3 headder) and a cupple changes inside most the castles. so to get castles workign correctly you cant just "move" the castle.
Quote:
so in all honestly the BEST way to make geodata, would be to take a clinet map, upen it in a map editer, remove all non esentual data (lights, sounds, bushes, trees, EVERYTHING that doesetn have a hight (im 99% shure trees are client side only)), and then make a program to convert the unreal map file to hight only data stored the same way geodata is stored. but thats WAY beyond my programing lvl. |
infact in my snoopign around i found
http://www.unrealtechnology.com/flas...logy/ue2.shtml reading that makes me assume that epic has a editer that will convert unreal maps (what the lineage2 client is) into hight data (what geodata is).. if that is so just need to get ahold of it ;) |
upps didnt know that, its a long time since i played l2...
k, from now on EOT |
lol, my l2j when i active the ActivatePositionRecorder option, and move around some map and shutdown the server, my l2j grabs 2 files, a universe.png and a universe1126380210750.fin, and this fin file cant be opened with winrar, and there isnt any bin file. Maybe is the version of this l2j server :S.
|
A little help please?
Hello:
We are Trying to understand the way to obtain correct maps using this utility. We have runned correctly the load.php and load the data on the SQL using the 24_17_conv.dat that are in the ProjectC2Beta3.rar. We don't know if we must use these files. Really we don't know what .dats files must use. Question 1. After that, we've runned the check.php and get the new header. I noted that no updates where realized on the BD, so what must do with the new headers??. Question 2. Last, we have runned the write.php and have obtained the map.dat, that is binary identical to that 24_17_conv.dat that we introduce in the load.php. Is must be so????Question 3. So, we would advance in the develop of the new maps, but we need a little help. Thanks for all, and sorry for be so newbie and for my english, of course ;) Bye, I hope someone help me a bit. |
:arrow: SoaPy
yeah, its seems like l2j dump function has changed.. check l2j sources... :arrow: montejo1974 Ad1. i sgguest u to get some info about geodata itself.. with my scripts u can edit maps without hexing, php-sql knowledge is reuiqred.. Ad2. update manually headers table in geodata db Ad3. did u made any changes to the data? no? so it must be the same :D |
| All times are GMT. The time now is 16:27. |