Posts: 36
Threads: 6
Thanks Received:
0 in 0 posts
Thanks Given: 0
Joined: Jul 2011
Reputation:
0
ive been making a program close to fast list but it types the commands in your client for you. I want to be able to load some of the lod files. binary is new to me i have been reading lots tuts and examples about it. I was wondering if i could get some help . if anyone has any tips or can point me in the right direction. i dont know how to find the binary structure.
Posts: 768
Threads: 40
Thanks Received:
0 in 0 posts
Thanks Given: 0
Joined: May 2011
Reputation:
0
Binary.lod is just a file that has some crc32 checks in it to check the validity of some of the files in the client.
Not really interesting to add in your program
Posts: 730
Threads: 36
Thanks Received:
0 in 0 posts
Thanks Given: 0
Joined: Aug 2011
Reputation:
0
I think he means all .lod files, not Binary.lod exactly
Posts: 36
Threads: 6
Thanks Received:
0 in 0 posts
Thanks Given: 0
Joined: Jul 2011
Reputation:
0
i mean like itemALL_usa.lod ,mobAll_usa.lod i want my tool to just open them and load into a listbox then you can click what you want click drop it will drop or summon or whatever.
Posts: 272
Threads: 21
Thanks Received:
0 in 0 posts
Thanks Given: 0
Joined: Jun 2012
Reputation:
0
i mean like itemALL_usa.lod ,mobAll_usa.lod i want my tool to just open them and load into a listbox then you can click what you want click drop it will drop or summon or whatever.
to read those files, first of all you need to know files structure
Posts: 36
Threads: 6
Thanks Received:
0 in 0 posts
Thanks Given: 0
Joined: Jul 2011
Reputation:
0
i know that i need to know the structure but i havent a clue on how to find out what it is.
Posts: 768
Threads: 40
Thanks Received:
0 in 0 posts
Thanks Given: 0
Joined: May 2011
Reputation:
0
To get the structure of a file, u need to know a little bit how to work with a hex editor.
Most lodfiles are almost the same structure like the corresponding database table, just with less info in it.
I would suggest to start with the most simple file, mobname.lod
Open that file with a hex editor.
Ignore the first 4 bytes for now.
The second 4 bytes are 01 00 00 00 which is the decimal value 1 this could be the ID of the monster
The second 4 bytes are 08 00 00 00 hmm what could this be, ok lets ignore that for now.
Then we see a whole bunch of weird bytes, but looking on the right we will see that it is text.
But how can your tool know, how long the name is, since a computer cant figure this out on its own, so let u count the length of the name.
Oh, exactley 8 letters, that reminds me on the 4 bytes before the name. so this must define the length of the name.
After the name comes 4 bytes again 02 00 00 00 (2), then 0b 00 00 00 (11) then again a name, the name is 11 characters long.
This keeps going on exactley like this, until the end of the file.
On the very last record in this file, we will notice that the id of the monster is, F3 05 00 00
Look again, to the first 4 bytes in the file, they match.
so probably this means that the first 4 bytes can tell the tool u are making to keep reading records, until u find a record with that id, read that and then end reading the file.
In this case it is easy because the file is pretty much straight forwards.
Now if u want to read itemAll.lod for example, u can just do the exact same, but then use the database as reference