Post Pacific

Post Pacific (https://postpacific.mmorpg-game.online/index.php)
-   Lineage 2 General (https://postpacific.mmorpg-game.online/forumdisplay.php?f=31)
-   -   geodata my share (https://postpacific.mmorpg-game.online/showthread.php?t=1741)

red 07.09.2005 16:58

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.

bwgreen 07.09.2005 19:06

Wow...... I'll give feedback ASAP!

dragoon69 07.09.2005 21:25

No config.php?

torune 07.09.2005 21:32

config.php are just basic settup for sql database
*good share and agree with the no future thinking

elcapo 07.09.2005 22:17

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.

s00r 07.09.2005 22:41

hm..
the phps.rar work with mYsql db,
sql-geodata.rar - for mSsql...
why?

elcapo 07.09.2005 22:46

Quote:

-2692 => F8EA in the map if the indicator is greater than 64
but, what is the "formula" for indicators greaters than 64?

red 08.09.2005 06:42

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

elcapo 08.09.2005 09:13

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.

UStas 08.09.2005 10:52

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 08.09.2005 10:53

s00r - You can use locations.sql from l2j...

elcapo 08.09.2005 11:55

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)).

red 08.09.2005 14:03

[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 08.09.2005 14:14

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

UStas 08.09.2005 23:20

red - Why do you think so ? :) I think i can create multilayer geo from bmp... But not from one bmp :wink:

torune 08.09.2005 23:55

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

UStas 09.09.2005 00:02

Good idea... Dut i try to make from many bmp... With (for example geen corol) where layer no have hight...

torune 09.09.2005 00:05

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.

fflam 09.09.2005 05:34

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.

red 09.09.2005 05:58

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

elcapo 09.09.2005 06:16

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.

fflam 09.09.2005 06:24

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

red 09.09.2005 06:29

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...

elcapo 09.09.2005 06:44

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.

torune 09.09.2005 06:45

what you guys gotta do, fix grid by grid? omg


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