.sec & .mob Files, Renaming, Replacing, Copying, etc.

Discussion in 'Modding and Scripting Support' started by RunAwayScientist, Aug 14, 2010.

Remove all ads!
Support Terra-Arcanum:

GOG.com

PayPal - The safer, easier way to pay online!
  1. RunAwayScientist

    RunAwayScientist Member

    Messages:
    229
    Likes Received:
    0
    Joined:
    Apr 20, 2003
    (Reference posts: http://www.terra-arcanum.com/phpBB/view ... mob#187546)


    In the above thread, rroyo and team a talk about .sec and .mob files briefly and how to use them to replace via a .patch Arcanum sectors and .mobs. As I understand it, Drog has done some work with .mobs as well.


    My objective is to figure out how to rename .sec files and edit .mob files so that they can be re-located to a different part of a map that is the same size as the one they came from or a smaller/larger map.


    What I have discovered thus far, precluding information from rroyo and team a, is a little puzzling. I will use the map Ashbury Haunted Castle as my example. If one were to take the .sec and .mob information from that map and paste it into another map which is 10x10, the sectors from Ashbury will show up at sectors 1,1 ; 3,1; 5,1



    It is understood that the sector name is a contiguous value, but how does WorldEd take a "67108867.sec" data name and then determine placement for it, considering that it is outside of the max of 99 sectors value when put in a much smaller map of 10x10?


    Ashbury Haunted Castle itself is a max of 21 sectors, so how did the sector name get so large? Unless this points to internal data being used to determine sector position instead of file name.


    Furthermore, I am at a complete loss as to how to relocate .mobs to their proper location in a sector without use of a hex editor, if that is even possible.


    Would anyone happen to have any information on this particular type of endeavor?


    Also, what is the mathematical formula for the continual coordinate grid system used with the expressed purpose of determining N linear grid number from x, y coords?
     
  2. Crypton

    Crypton Member

    Messages:
    589
    Likes Received:
    2
    Joined:
    May 22, 2008
    Well, I can give you a small tip :lol:

    As you already know, sector filenames are generated from its X and Y coord and file extension (.sec). What you may not know is that these coord are encoded (or "encrypted" if you wish) in sector's filename, so its not possible to determine these coords from its filename without having some decoding tool, obviously.

    But don't worry, decoding/encoding algorithm is pretty easy, won't took you more than one hour to reverse it, I guess :p

    However, if you want to relocate some sector, you'll need more than just rename it. You must also patch it, because sector may contain static objects which have their coords saved inside sector as well. So relocating sector is not so trivial as it seems.

    About patching mobiles coords, you'll need some batch tool to do that, because doing that manually will be suicidal, since there is a lot of offsets to patch.

    Thats all :p
    Have a nice day. :-o

    PS: Sorry for bad English :D
     
  3. RunAwayScientist

    RunAwayScientist Member

    Messages:
    229
    Likes Received:
    0
    Joined:
    Apr 20, 2003
    Your English is quite sufficient.

    Your help in this matter is much appreciated Crypton. Indeed, the matter is more complex than I had originally anticipated.
     
  4. Crypton

    Crypton Member

    Messages:
    589
    Likes Received:
    2
    Joined:
    May 22, 2008
    Yes, its kinda difficult to relocate any sector and patch its mobile and static objects, but I did that before when I needed to merge all singleplayer maps into one multiplayer map for my multiplayer module, the MultiArcanum. If you are familiar with MultiArcanum, you may know what I'm talking about. I made a tool that is able to merge all (selected) maps into one big map, so it realocates all sectors from different maps, rename them, patches all mobile and static objects, and also it patches all scripts, worldmap, and some other stuff...

    Here is link to MultiArcanum:
    http://arcanum.game-alive.com/forums/vi ... ?f=13&t=12

    You may use some files from it if you need them.
    See you.

    PS: Again, sorry for bad English, because I'm not yet sober :lol:
     
  5. RunAwayScientist

    RunAwayScientist Member

    Messages:
    229
    Likes Received:
    0
    Joined:
    Apr 20, 2003
    No problem. Drunk your English is still better than a great many sober American.


    I am quite familiar with Multiarcanum and your work on it. I downloaded it a month or so ago and discovered that you merged the maps together and patched up all the scripts and moved the mobs....a feat I thought was impossible, but you certainly did it.


    I didn't see that tool available on the website. Are you perhaps referring to qtScribe 0.8?
     
  6. Crypton

    Crypton Member

    Messages:
    589
    Likes Received:
    2
    Joined:
    May 22, 2008
    Not really, qtScribe is Arcanum editor made by guy called "radzh". Its able to edit .art, .pro, .mob, .mes and .src, but its all manual. That tool I'm talking about is called ModuleConvertor, and it was not yet released, due lack of interest from public in MultiArcanum. :( However, I might be able to merge your selected maps for you, if you wish. (It will probably require some major/minor modifications to my tool, so it wont be immediately, however if you are going to use that stuff for some new fancy module, I can ensure you that it will be soon).

    See you :D
     
  7. RunAwayScientist

    RunAwayScientist Member

    Messages:
    229
    Likes Received:
    0
    Joined:
    Apr 20, 2003
    What I'm trying to do is merge all the original Arcanum locations plus the new WIP locations that Rroyo made into the main map with the A:WIP modifications done to it.


    So I need to basically do what you did from scratch, coupled with the A:WIP changes Rroyo made.

    You know, now that I think about it, it might be benefitial to also give this tool to Rroyo....maybe if I'm lucky I can convince him to keep all future teleportable zones on the same map after I present him with this tool and a converted version of the main Arcanum map.
     
Our Host!