Results 1 to 30 of 75

Thread: Settlements: File Formats; Take 2

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Member Member KnightErrant's Avatar
    Join Date
    Jan 2007
    Location
    Huntsville, Alabama USA
    Posts
    458

    Default Settlements: File Formats; Take 2

    Hi all,

    This is a continuation of a thread that had some formatting problems.
    Hope this thread doesn't. I'm going to try a quick test in this post,
    then post the real question. Here's a chunk of the settlement header,
    hopefully it will come out ok with linebreaks:

    Code:
    serialization::archive
    3 4 4 4
    264 0
    267 0 0 0
    2 0 184.550750732 0
    40 0 -7.09150409698 1.21208238602 -2.87348890305
    That's the test; I'll log out and log back in to see how it goes.

  2. #2
    Member Member KnightErrant's Avatar
    Join Date
    Jan 2007
    Location
    Huntsville, Alabama USA
    Posts
    458

    Default Re: Settlements: File Formats; Take 2

    Ok, that seems to work! Many thanks to alpaca and to TosaInu for running tests to see what was wrong. Here's where I am: The fun starts at where tell says t
    Code:
    ell says 3863224
    That's for the hexedit gurus: this is the byte location for where it starts getting interesting. There seems to be some 4x4 homogeneous coordinate matrices here before the float data starts. (I have been reading up on this.) Here's the float data: Edit: Line-Break test by alpaca:
    Code:
    +1.0000000000  +0.0000000000  +0.0000000000  +0.8681725860   
    +0.0000000000  +1.0000000000  +0.0000000000  -2.2101776600   
    +0.0000000000  +0.0000000000  +1.0000000000  +1.2806341648   
    +0.0000000000  +0.0000000000  +0.0000000000  +1.0000000000   
    +1.0000000000 1 0 0 1 0 0 0 0 0 57 0 0 0 0 0 4 0 0 0 2 0 0 0 0 0 0 0 3 0 0 0 57 0 0 0  
    +1.0000000000  +0.0000000000  +0.0000000000  +0.1207747832   
    +0.0000000000  +1.0000000000  +0.0000000000  +0.4997914732   
    +0.0000000000  +0.0000000000  +1.0000000000  +1.9928042889   
    +0.0000000000  +0.0000000000  +0.0000000000  +1.0000000000   
    +1.0000000000 0 0 0 0 0 84 0 0 0   
    +1.0000000000  +0.0000000000  +0.0000000000  +0.8747580051   
    +0.0000000000  +1.0000000000  +0.0000000000  +0.8698613048   
    +0.0000000000  +0.0000000000  +1.0000000000  -1.4081792831   
    +0.0000000000  +0.0000000000  +0.0000000000  +1.0000000000   
    +1.0000000000 0 0 0 0 0 111 0 0 0   
    +1.0000000000  +0.0000000000  +0.0000000000  -0.1258755475   
    +0.0000000000  +1.0000000000  +0.0000000000  -0.1756218821   
    +0.0000000000  +0.0000000000  +1.0000000000  -3.3048241138   
    +0.0000000000  +0.0000000000  +0.0000000000  +1.0000000000   
    +1.0000000000 0 0 0 0 0 2 0 0 0 0 0 0 0 1 0 0 0 25 0 0 0   
    +1.0000000000  +0.0000000000  +0.0000000000  -0.9229867458   
    +0.0000000000  +1.0000000000  +0.0000000000  -4.0490546227   
    +0.0000000000  +0.0000000000  +1.0000000000  +1.6631650925   
    +0.0000000000  +0.0000000000  +0.0000000000  +1.0000000000   
    +1.0000000000 1 2 0 0 0 200 1 0 0 49 0 0 0 1 2 0 0 66 0 0 0 2 0 0 0 0 0 0 0 1 0 0 0 139 0 0 0    
    +1.0000000000  +0.0000000000  +0.0000000000  +0.5850151777   
    +0.0000000000  +1.0000000000  +0.0000000000  -1.8052126169   
    +0.0000000000  +0.0000000000  +1.0000000000  +0.7539926171   
    +0.0000000000  +0.0000000000  +0.0000000000  +1.0000000000   
    +0.6999999881 1 8 0 0 0 202 1 0 0 50 0 0 0 204 1 0 0 51 0 0 0 2 2 0 0 67 0 0 0 3 2 0 0 68 0 0 0 21 2 0 0 76 0 0 0 31 2 0 0 78 0 0 0 203 2 0 0 129 0 0 0 209 2 0 0 130 0 0 0 2 0 0 0 0 0 0 0 3 0 0 0 111 0 0 0   
    +1.0000000000  +0.0000000000  +0.0000000000  -0.1258755475   
    +0.0000000000  +1.0000000000  +0.0000000000  -0.1756218821   
    +0.0000000000  +0.0000000000  +1.0000000000  -3.3048241138   
    +0.0000000000  +0.0000000000  +0.0000000000  +1.0000000000   
    +1.0000000000 0 0 0 0 0 84 0 0 0   
    +1.0000000000  +0.0000000000  +0.0000000000  +0.8747580051   
    +0.0000000000  +1.0000000000  +0.0000000000  +0.8698613048   
    +0.0000000000  +0.0000000000  +1.0000000000  -1.4081792831   
    +0.0000000000  +0.0000000000  +0.0000000000  +1.0000000000   
    +1.0000000000 0 0 0 0 0 57 0 0 0   
    +1.0000000000  +0.0000000000  +0.0000000000  +0.1207747832   
    +0.0000000000  +1.0000000000  +0.0000000000  +0.4997914732   
    +0.0000000000  +0.0000000000  +1.0000000000  +1.9928042889   
    +0.0000000000  +0.0000000000  +0.0000000000  +1.0000000000   
    +1.0000000000 0 0 0 0 0 2 0 0 0 0 0 0 0 1 0 0 0 25 0 0 0   
    +1.0000000000  +0.0000000000  +0.0000000000  +0.8681725860   
    +0.0000000000  +1.0000000000  +0.0000000000  -2.2101776600   
    +0.0000000000  +0.0000000000  +1.0000000000  +1.2806341648   
    +0.0000000000  +0.0000000000  +0.0000000000  +1.0000000000   
    +1.0000000000 1 1 0 0 0 68 2 0 0 91 0 0 0 2 0 0 0 0 0 0 0 1 0 0 0 157 0 0 0   
    +1.0000000000  +0.0000000000  +0.0000000000  -0.2069556862   
    +0.0000000000  +1.0000000000  +0.0000000000  -2.0798547268   
    +0.0000000000  +0.0000000000  +1.0000000000  -1.6279093027   
    +0.0000000000  +0.0000000000  +0.0000000000  +1.0000000000   
    +1.0000000000 1 1 0 0 0 69 2 0 0 92 0 0 0 2 0 0 0 0 0 0 0 3 0 0 0 111 0 0 0   
    +1.0000000000  +0.0000000000  +0.0000000000  +0.1647853851   
    +0.0000000000  +1.0000000000  +0.0000000000  +0.2269621640   
    +0.0000000000  +0.0000000000  +1.0000000000  +2.0150504112   
    +0.0000000000  +0.0000000000  +0.0000000000  +1.0000000000   
    +1.0000000000 0 0 0 0 0 84 0 0 0   
    +1.0000000000  +0.0000000000  +0.0000000000  -1.0282818079   
    +0.0000000000  +1.0000000000  +0.0000000000  +0.8543335795   
    +0.0000000000  +0.0000000000  +1.0000000000  -1.4318115711   
    +0.0000000000  +0.0000000000  +0.0000000000  +1.0000000000   
    +1.0000000000 0 0 0 0 0 57 0 0 0
    Code:
    +1.0000000000  +0.0000000000  +0.0000000000  +1.2263863087   
    +0.0000000000  +1.0000000000  +0.0000000000  -0.3336898088   
    +0.0000000000  +0.0000000000  +1.0000000000  -2.3126564026   
    +0.0000000000  +0.0000000000  +0.0000000000  +1.0000000000   
    +1.0000000000 0 0 0 0 0 2 0 0 0 0 0 0 0 1 0 0 0 139 0 0 0
    +1.0000000000  +0.0000000000  +0.0000000000  +0.2344752252  
    +0.0000000000  +1.0000000000  +0.0000000000  -1.9429701567   
    +0.0000000000  +0.0000000000  +1.0000000000  +2.2158527374   
    +0.0000000000  +0.0000000000  +0.0000000000  +1.0000000000   
    +0.8000000119 1 3 0 0 0 208 1 0 0 52 0 0 0 23 2 0 0 77 0 0 0 37 2 0 0 83 0 0 0 2 0 0 0 0 0 0 0 2 0 0 0 111 0 0 0   
    +1.0000000000  +0.0000000000  +0.0000000000  +0.2340932637   
    +0.0000000000  +1.0000000000  +0.0000000000  -0.0248921812   
    +0.0000000000  +0.0000000000  +1.0000000000  -3.7247326374   
    +0.0000000000  +0.0000000000  +0.0000000000  +1.0000000000   
    +1.0000000000 0 0 0 0 0 84 0 0 0   
    +1.0000000000  +0.0000000000  +0.0000000000  -0.4714680314   
    +0.0000000000  +1.0000000000  +0.0000000000  -0.2671088576   
    +0.0000000000  +0.0000000000  +1.0000000000  +6.7157201767   
    +0.0000000000  +0.0000000000  +0.0000000000  +1.0000000000   
    +1.0000000000 0 0 0 0 0 1 0 0 0 1 0 0 0 188 0 0 0   
    +1.0000000000  +0.0000000000  +0.0000000000  +0.5613649487   
    +0.0000000000  +1.0000000000  +0.0000000000  +3.7120764256   
    +0.0000000000  +0.0000000000  +1.0000000000  -0.0595130324   
    +0.0000000000  +0.0000000000  +0.0000000000  +1.0000000000   
    +0.5000000000 0 0 0 0 0 2 0 0 0 0 0 0 0 1 0 0 0 25 0 0 0   
    +1.0000000000  +0.0000000000  +0.0000000000  +0.1719831526   
    +0.0000000000  +1.0000000000  +0.0000000000  -2.7414629459   
    +0.0000000000  +0.0000000000  +1.0000000000  -5.0158138275   
    +0.0000000000  +0.0000000000  +0.0000000000  +1.0000000000   
    +1.0000000000 1 1 0 0 0 94 2 0 0 94 0 0 0 2 0 0 0 0 0 0 0 1 0 0 0 212 0 0 0   
    +1.0000000000  +0.0000000000  +0.0000000000  +0.8394250870   
    +0.0000000000  +1.0000000000  +0.0000000000  -3.9999992847   
    +0.0000000000  +0.0000000000  +1.0000000000  +1.1408995390   
    +0.0000000000  +0.0000000000  +0.0000000000  +1.0000000000   
    +0.3000000119 1 5 0 0 0 101 2 0 0 95 0 0 0 102 2 0 0 96 0 0 0 124 2 0 0 105 0 0 0 16 3 0 0 170 0 0 0 17 3 0 0 171 0 0 0 2 0 0 0 0 0 0 0 1 0 0 0 139 0 0 0   
    +1.0000000000  +0.0000000000  +0.0000000000  +0.5850151777   
    +0.0000000000  +1.0000000000  +0.0000000000  -1.8052126169   
    +0.0000000000  +0.0000000000  +1.0000000000  +0.7539926171   
    +0.0000000000  +0.0000000000  +0.0000000000  +1.0000000000   
    +0.6999999881 1 1 0 0 0 104 2 0 0 97 0 0 0 2 0 0 0 0 0 0
    /Edit Doesn't this look like homogeneous coordinate data with weird granny bytes after it? I'm hoping GrumpyOldMan, Casuir, or zxiang1983 will take pity on me and find a pattern in the granny strings so I can go forward with some guidance but I can't see a pattern here. Hope this post comes out formatted alright. Many thanks for the interest in the subject If nothing else, it would be fun to make villages/towns etc. more tailored to the culture. Really, the interest is of course the fantasy mods with round doors for hobbit villages but better architecture for old (biblical, roman, etc.) mod types would be interesting too. Love this stuff , hope others do as well. KE Edit: Sigh, same problem, no line breaks....don't know what to do about this. I used Mozilla but I can also use IE or the latest Firefox. If anything occurs to people please let me know.
    Last edited by alpaca; 08-08-2007 at 21:20.

  3. #3
    Member Member KnightErrant's Avatar
    Join Date
    Jan 2007
    Location
    Huntsville, Alabama USA
    Posts
    458

    Default Re: Settlements: File Formats; Take 2

    Ok, for humour.

    Competititon announced. My birthday is tomorow.
    Cleverest entry wins; but no prize is announced.
    No credit for "Dude, you're really old" however, clever
    stuff like "Did you have hamburgers when you were
    growing up" is pretty good. You have to check the
    entry section to get the birthday announcements. If you
    get it wrong you don't get to play.

    Cheers,

    KE
    Last edited by KnightErrant; 08-04-2007 at 06:16.

  4. #4

    Default Re: Settlements: File Formats; Take 2

    KE, How did you find the Model T to handle when younger?

  5. #5
    feed me! Member Ashdnazg's Avatar
    Join Date
    Dec 2006
    Location
    Haifa, Israel
    Posts
    54

    Default Re: Settlements: File Formats; Take 2

    Yo KE, good sling job on that Goliath dude.
    Oh wait, confused you with your cousin, never mind then.
    a.k.a Lord hokomoko @ the Lordz Modding Collective

  6. #6
    Member Member KnightErrant's Avatar
    Join Date
    Jan 2007
    Location
    Huntsville, Alabama USA
    Posts
    458

    Default Re: Settlements: File Formats; Take 2

    Ok, only two entries in the competition but I liked them both.
    Model T handled well but it had nothing on my Stanley Steamer.
    Goliath was over-rated, taunting was good, a real clutch player
    with a sword but no shield control. If Ashur-Steinbrenner hadn't
    traded Marluk the Assyrian for Femnod the effeminant Babylonian
    he never would have made it out of the minors.

    Tried a few post previews using IE but the data came out all jumbled.
    I'll check out a couple of other options tomorrow.

  7. #7

    Default Re: Settlements: File Formats; Take 2

    Hi KE


    Quote Originally Posted by KnightErrant
    Ok, for humour.

    Competititon announced. My birthday is tomorow.
    Cleverest entry wins; but no prize is announced.
    No credit for "Dude, you're really old" however, clever
    stuff like "Did you have hamburgers when you were
    growing up" is pretty good. You have to check the
    entry section to get the birthday announcements. If you
    get it wrong you don't get to play.

    Cheers,

    KE
    I'm sorry I missed your birthday, I was away with the eldest at an athletics meet.

    As an act of contrition I do offer you a cyber present though, it's http://www.wsu.edu/~brians/errors/index.html , a web site with literally thousands of common errors (and corrections) in English. We both know that it's the natural state for a man of certain years to be pernickity and pedantic, and this is an admirable tool to assist in that regard .

    Back to the settlements, I honestly tried to look at the data you've posted but I get dizzy without line breaks. What are you copying from and pasting into? Sometimes there is a funny thing that happens with line breaks. Have you tried opening it in Notepad, saving it and then copying and pasting?

    From the settlement you've looked at, how many total verts and tris would be involved? Is it possible to set the individual models up as groups within a milkshape .ms3d? And positions based on bones/joints? Milkshape has the following limits:-

    #define MAX_VERTICES 65534
    #define MAX_TRIANGLES 65534
    #define MAX_GROUPS 255
    #define MAX_MATERIALS 128
    #define MAX_JOINTS 128

    Cheers

    GrumpyOldMan

  8. #8
    Member Member KnightErrant's Avatar
    Join Date
    Jan 2007
    Location
    Huntsville, Alabama USA
    Posts
    458

    Default Re: Settlements: File Formats; Take 2

    Hi GrumpyOldMan,

    Thanks for the web site and for trying to look at the posts without
    line breaks. Kind of reminds me of the vanilla battle_models.modeldb
    file. How did people actually mod it that way?

    Two thoughts on my problem: Easy way/hard way. (1) Maybe I just
    can't start a thread. Solution, hijack an old wiki thread and do settlements
    postings there. (2) Put it all in a pdf and just upload it. I'd rather do (1)
    because (2) is too hard.

    Good news though! I reached the end of the smallest village .world file today.
    I just programmatically hard coded through all the weird grannies near the
    end that were driving me crazy. ("Programmatically hard coded" is the worst
    oxymoron I've ever made up but what I mean is, rather than just put in the right
    byte numbers for the grannies between data, I kept making up rules until I
    got through the section just by doing a for loop.) I won't try to post anything
    because I'm basically where you were when you posted the mesh file stuff
    in February, I know where the data IS, I just don't know what all the stuff
    around it is. Also, I've made bad assumptions in the early part about what
    bytes should be integers/shorts/ etc that I should probably re-think.

    Without posting data and recalling Caliban's input the upshot is:
    Settlements contains vertex and triangle data that can be pulled out.
    The texture file paths are in there like siege weapons. No bone strings but
    there are other strings I'm not sure of (near the end). Caliban gave indications
    that some of the quad bytes sections are lighting models and animation
    place holders. This might be a problem as this doesn't mesh with Milkshape's
    allowed data.

    What I'd like to do next is just re-look at the data and grannies to make
    sure the file provides numbers to read it better; but not try to make sense
    of the header/footers yet (always too hard to start with). The data beyond
    just the settlement meshes seems to be 4x4 homogeneous coordinate
    affine transformations which I would not have recognized before.

    Without thinking further, at least it might be possible to modify what's there
    but not add new stuff (don't know what would have to change with the grannies). I.e. you have 30 and only 30 village types to choose from, BUT,
    you can make those 30 village types anything you want. Fingers crossed
    that that might be true.

    Regards,

    KE

  9. #9
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: Settlements: File Formats; Take 2

    Hmm these line-break problems are pretty weird. I played around with your above post and if you cut the entries somewhere linebreaks seem to work.

    Edit: All right, it seems the "[code]"-tags can't have more than 65 lines each (or there's a maximum number of letters), so you have to split very large ones up.
    Don't ask me why, though, maybe the programmer used a fixed-length array.
    I pretty arbitrarily split your post into 5-line-packages with 4 of your float entries and/or all the strings. It seems (if you interpreted the float/string stuff correctly) that this stuff usually consist of 17 floats and a granny string? 17 is really weird, being a prime number it doesn't make much sense for coordinates or anything unless one or two of the numbers mean something else

    Edit2: Meh damn pattern-detecting brain... For the granny strings, a subdivision into packages of four seems to make most sense, too (skipping the very first one). The first seems to differ most, the second one is often 0, sometimes 1 or 2 and very rarely 3 - and the third and fourth are always 0 I think. So #1 could be an id or a link or something, #2 could be a flag with three options and the other two are unused (in this file).
    I also read your post and you mentioned the 4x4 matrices
    Translation matrix, huh. Makes sense in a way. The question is: What does the 17th float do?
    Last edited by alpaca; 08-08-2007 at 21:44.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO