Lnd File Format

Junior Spellweaver
Joined
Sep 16, 2006
Messages
107
Reaction score
10
Still isn't 100% complete and parts of object and sfx might be wrong as they are not tested, I'll update object and sfx as I start adding them to the map editor.

Feel free to post any of the unknowns you've figured out.

Code:
DWORD version

:IF(version >= 1 )
    DWORD offset_x
    DWORD offset_y
:ENDIF

:FOREACH( 129 )
    :FOREACH( 129 )
        FLOAT height

        :IF( height >= 4000.0f ) // Die
            height -= 4000.0f
        :ENDIF

        :IF( height >= 3000.0f ) // NoMove
            height -= 3000.0f
        :ENDIF

        :IF( height >= 2000.0f ) // NoFly
            height -= 2000.0f
        :ENDIF

        :IF( height >= 1000.0f ) // NoWalk
            height -= 1000.0f
        :ENDIF
    :ENDFOR
:ENDFOR

:FOREACH( 16 )
    :FOREACH( 16 )
        BYTE height
        patch_type[BYTE] type
    :ENDFOR
:ENDFOR

:IF(version >= 2 )
    :FOREACH( 16 )
        :FOREACH( 16 )
            BYTE unknown
        :ENDFOR
    :ENDFOR
:ENDIF

BYTE layer_count

:FOREACH( layer_count )
    SHORT tile_id

    :FOREACH( 16 )
        :FOREACH( 16 )
            DWORD patch_visible
        :ENDFOR
    :ENDFOR

    :FOREACH( 128 )
        :FOREACH( 128 )
            BYTE r
            BYTE g
            BYTE b
            BYTE a
        :ENDFOR
    :ENDFOR
:ENDFOR

DWORD object_count

:FOREACH( object_count )
    DWORD type // Must be 0
    FLOAT angle
    FLOAT unknown1
    FLOAT unknown2
    FLOAT unknown3
    FLOAT position_x
    FLOAT position_y
    FLOAT position_z
    FLOAT scale_x
    FLOAT scale_y
    FLOAT scale_z
    DWORD unknown4
    DWORD mesh_id
    DWORD unknown5
    DWORD unknown6
:ENDFOR

DWORD sfx_count

:FOREACH( sfx_count )
    DWORD type // Must be 3
    FLOAT angle
    FLOAT unknown1
    FLOAT unknown2
    FLOAT unknown3
    FLOAT position_x
    FLOAT position_y
    FLOAT position_z
    FLOAT scale_x
    FLOAT scale_y
    FLOAT scale_z
    DWORD unknown4
    DWORD sfx_id
    DWORD unknown5
    DWORD unknown6
:ENDFOR

:ENUM patch_type
    NONE = 0
    WATER = 1
    CLOUD = 2
:ENDENUM
 
unknown 5 and 6 for object id could refrence textures for the model id, not sure just a guess off the top of my head
 
Wow this is definitely one of the better releases ever I must say, or at least heading in that direction to say the least. I'd seen your post in the Dev section yesterday and almost couldn't believe my eyes. Keep up the great work, it's good to see even more people making contributions. It is definitely starting to turn around some finally (the forum I mean, just for clarification), slowly but surely.
 
Bounding box would have to be 3 minimum values and 3 maximum values though.

Well not sure what else the 3 could be I'm sure it has to define what file it pulls from but that's most likely done via the type.

Hmm, What about weather it's animated or not/How many bones it has or anything along those lines?

I doubt the texture for it would be in there like the other guy said and you've already got the mesh and type so not sure what the extra values could be aside from assuming those would be bounds box.
 
I am truly impress. By far one of the best releases is this map editor. Keep up the good work. And deadly I am pleased that you support something of this nature.

and yes you are right about not releasing it, but if he wants to its his choice. just remember that even though you can give such clear details you still will get hundreds of threads asking for help on setting it up upon release. A select few will be able to get it running and those are the ones who will be able to produce worthy maps.

I have my eye on this project.
 
Well not sure what else the 3 could be I'm sure it has to define what file it pulls from but that's most likely done via the type.

Hmm, What about weather it's animated or not/How many bones it has or anything along those lines?

I doubt the texture for it would be in there like the other guy said and you've already got the mesh and type so not sure what the extra values could be aside from assuming those would be bounds box.
Could be some type of bounding sphere with an x offset, y offset and a radius but usually collision type and values, bones, textures etc would all be held in the actual 3D file.
 
you were talking about it going to be open source in the developement section if it does become open source when might that be?

and when I had said "script" I ment the source and the code within a source is known as script

im not too familiar with C# but I can learn it quite quikly im familiar with several programing languages and ive heard this one was one of the easier to learn
 
Oh, It'll be open source when it's released, if you're asking for a date I can't give one because this is a hobby and I never work to deadlines :P:.
 
Very nice of you deadly to help the develpming community. I a, getting more into the emulators with some friends and its going good. in a few monthes of hard work ill probably have atleast 80% done :)
And I wish good luck to the map editor project.
 
so your not gonna release until its done? I thought you ment open source as in you were gonna let other people help you make it
I prefer not using svn type open source when it comes to big 3D projects, personally I find it easier and quicker by myself to get it done then release the source for people to do what they like with it.
 
Very nice of you deadly to help the develpming community. I a, getting more into the emulators with some friends and its going good. in a few monthes of hard work ill probably have atleast 80% done :)
And I wish good luck to the map editor project.

I've never had a problem with helping the dev community it's the leeching community I hate.

and I've been helping him with this since the beginning of the app originally when I discussed it with him however I wasn't aware it was going to be disclosed I still believe in disclosure to a private few.
 
I've never had a problem with helping the dev community it's the leeching community I hate.

and I've been helping him with this since the beginning of the app originally when I discussed it with him however I wasn't aware it was going to be disclosed I still believe in disclosure to a private few.

yeah stuff like that happens sometimes you go along and help some one but forget to ask what they are planning with it

I hope I dont become of the leaching community you hate...
 
From you're post i assume people think you are one..

But yeah, I truly am impressed xadet

ive had credits stolen countless times on other developement sites that are more private and I didnt feal like giveing the address just to have more people steal more of my organizations work...
 
Can you name one example, Kingblazer AKA ClownOfValetine?

What other development sites are you talking about?

And what's the name of your so-called organization?
 
Back