Results 1 to 7 of 7

Thread: How do I add new entries in a hex editor?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Éorl's Avatar Domesticus
    Join Date
    Jun 2009
    Location
    Germany
    Posts
    2,295

    Default How do I add new entries in a hex editor?

    A quick search did not produce any results, so I will post my simple question here:

    I'm tinkering with a .db file and need to know how to add new entries (not editing existing ones - I know how to do that), for example in the descr_geography.db. I'm using the XVI32 hex editor.
    I read this so called Bible, and found it to be a third rate story in which this so called 'jesus' is nothing more than a shameless lampooning of Brian, which has inspired joy and laughter in millions.
    -unknown YouTube user

  2. #2
    makanyane's Avatar Praeses
    Content Emeritus

    Join Date
    Feb 2006
    Posts
    9,093
    Blog Entries
    1

    Default Re: How do I add new entries in a hex editor?

    If XVI32 isn't letting you add anything at all then you're probably in overwrite mode, go to 'Tools' and untick 'Overwrite', you can then type in new entries and the file length will extend

    however if you're changing length of file names etc, remember that you need to update the number before the string that gives the string length.... in some of the M2 files there's quite often other numbers to watch out for that give a count of the number of things to follow, I'm not sure if geog.db has any of that


    XV132 won't let you copy and paste chunks of hex file, if you need something that will you need to use another editor, eg. HxD http://mh-nexus.de/en/
    lets you copy and paste and has a basic file compare function too (doesn't have the data inspector though)......

  3. #3
    dvk901's Avatar Consummatum est
    Patrician

    Join Date
    Mar 2006
    Location
    Michigan
    Posts
    20,984

    Default Re: How do I add new entries in a hex editor?

    Unfortunately, in the RTW descr_geography.db you cannot 'add' anything to it. The file has a certain size limitation or something specified (I imagine in the EXE). However, you can change values that exist, and you can change texture names referred to where there are multiple instances of 'sand', for example, in a given climate, you can change one to 'san1.tga' or 'san2.tga' if you wanted to use different textures....and then of course create those textures and put them in the appropriate climate folders.

    The one to talk to who is a 'Guru' at this is Tone. He has done a lot more of this than I have.

    Creator of: "Ecce, Roma Surrectum....Behold, Rome Arises!"
    R.I.P. My Beloved Father

  4. #4

    Default Re: How do I add new entries in a hex editor?

    What are you trying to add?


    Under patronage of Spirit of Rob; Patron of Century X, Pacco, Cherryfunk, Leif Erikson.

  5. #5
    Éorl's Avatar Domesticus
    Join Date
    Jun 2009
    Location
    Germany
    Posts
    2,295

    Default Re: How do I add new entries in a hex editor?

    Thanx guys (edit: and GALS!!! - sorry Mak), your replies helped.

    What are you trying to add?
    A climate, though I'm sceptical it'll work. I have already heavily edited the descr_geography.db for Fourth Age and it now produces much more dramatic looking mountain ranges with sharp small scale relief and real peaks and ridges, as well as hills with steeper and more detailed slopes or even cliffs in some instances, plus I fixed the ground type distribution to get more rock on mountain slopes and rid of small clumps of forests clinging unrealistically to steep slopes - the landscapes created by the vanilla .db are just boring, unnatural and definitely not fitting Tolkien's descriptions. This is finished, and I'm just tinkering a little bit.

    Again, thanx.
    Last edited by Éorl; December 17, 2009 at 03:01 PM.
    I read this so called Bible, and found it to be a third rate story in which this so called 'jesus' is nothing more than a shameless lampooning of Brian, which has inspired joy and laughter in millions.
    -unknown YouTube user

  6. #6
    makanyane's Avatar Praeses
    Content Emeritus

    Join Date
    Feb 2006
    Posts
    9,093
    Blog Entries
    1

    Default Re: How do I add new entries in a hex editor?

    It's always worth trying things.... Tone can probably advise better on the file length problem. I don't want to discourage you but Wilddog spent a while trying to get new climate into M2 (which should be a bit easier on the geog. front as it can be recreated back from .txt file) but he decided in the end that climate names were hard coded in .exe in M2 - some files would seem to take new climate names, but what that actually did was just give you 'default' climate for the new ones, when you finally got to point of trying new name in all relevant files, you just got CTD

    M2 and RTW do vary though, and its still worth re-trying things even if others haven't got them to work... its quite possible to miss solutions for quite a long while!

  7. #7
    Éorl's Avatar Domesticus
    Join Date
    Jun 2009
    Location
    Germany
    Posts
    2,295

    Default Re: How do I add new entries in a hex editor?

    Yeah, that's exactly what this is all about as of now: Tinkering, trial and error, experimentation... maybe it's worth the effort, maybe not. Oh, and thanx for the hex editing advice, Mak, I'm downloading HxD now and will have a look into it this night.
    I read this so called Bible, and found it to be a third rate story in which this so called 'jesus' is nothing more than a shameless lampooning of Brian, which has inspired joy and laughter in millions.
    -unknown YouTube user

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •