Results 1 to 16 of 16

Thread: descr_geography.db Editor

  1. #1
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,760
    Blog Entries
    3

    Default descr_geography.db Editor

    Requires: .Net Framework 4.0 or better

    Here's a little tool that displays the descr_geography.db in human readable format. Any setting from descr_geography.txt as well as the colours associated with each texture can be modified. You can change the texture names, the colours associated with each texture, any value in any of the tables and the global generation values. This includes the ability to enable textures that previously did not exist for a particular climate (i.e. forest_dense texture for the swamp climate).

    Download here.
    Last edited by Squid; June 09, 2010 at 04:10 PM. Reason: Added link
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  2. #2

    Default Re: descr_geography.db Editor




  3. #3
    Ramashan's Avatar Artifex
    Join Date
    Apr 2007
    Location
    Los Angeles, CA
    Posts
    4,991

    Default Re: descr_geography.db Editor

    Holy moly!!!! I can't wait to use this. Great thanks to ya Squid!
    Under the Patronage of Lord Condormanius

  4. #4

    Default Re: descr_geography.db Editor

    It works really well


    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: descr_geography.db Editor

    Noticed this a bit late, downloaded. Many thanks.
    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
    Augustus Lucifer's Avatar Life = Like a beanstalk
    Patrician Citizen

    Join Date
    Aug 2006
    Location
    Mote of Dust
    Posts
    10,725

    Default Re: descr_geography.db Editor

    Does this work with M2 as well? I know we have the same two files, but I seem to remember Kingdoms 1.5 adding rebuild_db support of some sort. I haven't really looked into it, so maybe you could help a young fool figure out if this will work/is necessary.

  7. #7
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,760
    Blog Entries
    3

    Default Re: descr_geography.db Editor

    You shouldn't need this for M2TW as you can rebuilt the descr_geography_new.db (the M2TW version of descr_geography.db), which can't be done in RTW. Just make changes to descr_geography_new.txt (I believe that's the equivalent file to descr_geography.txt) and add the following to your cfg file:

    Code:
    [misc]
    rebuild_geography_db = true
    show_hud_date = true
    I don't know if the show_hud_date is required as I haven't played around with M2TW climates enough to know.

    The last couple of posts in http://www.twcenter.net/forums/showthread.php?t=109482 talk about rebuilding the db.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  8. #8
    Augustus Lucifer's Avatar Life = Like a beanstalk
    Patrician Citizen

    Join Date
    Aug 2006
    Location
    Mote of Dust
    Posts
    10,725

    Default Re: descr_geography.db Editor

    Makes sense then, thanks.

  9. #9
    Chernish's Avatar Decanus
    Join Date
    Feb 2010
    Location
    dream city Ukek, Golden Horde
    Posts
    568

    Default Re: descr_geography.db Editor

    Sqυιd,
    Thanks you, it`s really very useful program!
    Do what must be and let be what will

  10. #10

    Default Re: descr_geography.db Editor

    does this work with darthmod ?

  11. #11

    Default Re: descr_geography.db Editor

    This is a tool that opens a specific type of file and presents it in a readable form. What mod that file is in is irrelevant.

  12. #12

    Default Re: descr_geography.db Editor

    Thank you for these useful tools, Squid.

  13. #13

    Default Re: descr_geography.db Editor

    Let me some questions:

    1) If I want to copy all the parameters from one climate to another, do I need to change all the values with this editor one by one? Or in this case it is easier to copy and paste them manually with a hex editor?
    Same question about texture colour: if I want to copy the same colours from summer to winter, do I need to write the RGB values one by one, or do you know a way to copy them all at once.
    Note I did not know it was possible to change this colour until I use your editor, so thanks also for that.

    2) Do you know if the .txt file included next to each ground texture with the content:
    Code:
    ;;colour 100, 96, 63
    is used by the game? I have not noticed any difference if I change or delete them, but I'm curious to know the use of that file.

    3) I have seen it is possible with yor editor to change the length of the name of textures, something not possible with manual hex editing. Do you know if it would be possible to write there the path to a mod folder?
    If I'm right, until now the only way to change vanilla textures was to replace them in vanilla folder, or to include them into mod_0.pak. It could be a mayor improvement to move them to a mod folder.

    4) How can I know if a certain texture is being used by a certain climate. My guess is to look at "Table" table. But I think I have seen the texture "shrub_sparse" and "forest_sparse" being used even when they do not appear in the table.

    5) Do you know which texture is used at cross of rivers?
    I'd say the texture "rock" is always used for riversides and "mud" for river crosses. But I have seen climates that do not use any texture to mark the cross, or they use "dirt" instead of mud.
    I have same confusion about which sand or rock is used for beaches and coasts.

    6) I have tried to read Muzier's guide, but I still do not understand the ground generation... if I want a climate with more ammount of forest terrain when ground_type= FOREST_sPARSE, which parameter should I change?
    If I want for a climate a ground_type where it never appears any tree. For example I want forests in all terrain types except SWAMP, what should I change?

    I understand if you do not answer every question, but I would thank any of them.

  14. #14
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,760
    Blog Entries
    3

    Default Re: descr_geography.db Editor

    Quote Originally Posted by Bardo View Post
    Let me some questions:

    1) If I want to copy all the parameters from one climate to another, do I need to change all the values with this editor one by one? Or in this case it is easier to copy and paste them manually with a hex editor?
    Same question about texture colour: if I want to copy the same colours from summer to winter, do I need to write the RGB values one by one, or do you know a way to copy them all at once.
    Note I did not know it was possible to change this colour until I use your editor, so thanks also for that.
    Yes, you'd need to move it one piece of information at a time, currently doing it via hex editing would probably be faster, but not necessarily more accurate. This applies whether copying a texture, colour or even an entire climate.

    I'll have to look into adding the ability to copy settings from one climate/season to another.

    2) Do you know if the .txt file included next to each ground texture with the content:
    Code:
    ;;colour 100, 96, 63
    is used by the game? I have not noticed any difference if I change or delete them, but I'm curious to know the use of that file.
    As far as I'm aware those files are redundant left overs from earlier builds of the game.

    3) I have seen it is possible with yor editor to change the length of the name of textures, something not possible with manual hex editing. Do you know if it would be possible to write there the path to a mod folder?
    If I'm right, until now the only way to change vanilla textures was to replace them in vanilla folder, or to include them into mod_0.pak. It could be a mayor improvement to move them to a mod folder.
    It actually is possible with hex editing, as I figured out how to do it via hex editing before incorporating it into the editor.

    That being said as the path is a relative path from the data folder I see no reason why you wouldn't be able to have the path read something like: ../mymod/terrain/battlefield/..... I haven't tried this but if you do try it, post and let us know if it works.

    The limit of course is 255 characters long for the entire path name. I still think even that is not fixed but I haven't played around with making the path longer than that.

    4) How can I know if a certain texture is being used by a certain climate. My guess is to look at "Table" table. But I think I have seen the texture "shrub_sparse" and "forest_sparse" being used even when they do not appear in the table.
    Depends on the settings you chosen for each ground type. If they have no variance then they will only use the texture of the corresponding location in the lookup table. If they have variance they will use textures in adjacent spots of the lookup table where adjacent is both orthogonal and diagonal neighbours.

    5) Do you know which texture is used at cross of rivers?
    I'd say the texture "rock" is always used for riversides and "mud" for river crosses. But I have seen climates that do not use any texture to mark the cross, or they use "dirt" instead of mud.
    I have same confusion about which sand or rock is used for beaches and coasts.
    I have no idea. As with the last question it probably depends on the settings of the various ground types. Somethings I don't have a good answer to, just that the details within the file can be changed.

    6) I have tried to read Muzier's guide, but I still do not understand the ground generation... if I want a climate with more ammount of forest terrain when ground_type= FOREST_sPARSE, which parameter should I change?
    If I want for a climate a ground_type where it never appears any tree. For example I want forests in all terrain types except SWAMP, what should I change?
    This is mostly due to which textures you choose to populate the table table with. As only certain textures (the two forest and two shrub textures) put vegetation onto a climate not including those in the square where a particular ground type of a particular climate is pointing will prevent vegetation like trees and shrubs from appearing. Similarly if you increase the number of times the sparse_forest texture for example appears in that 9 block square you will increase the number of trees.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  15. #15

    Default Re: descr_geography.db Editor

    Thanks for the answers, I start to understand a bit better this tricky file.

    I asked about hex copy-paste because I never tried it, just in case there were an easier way than to copy values one by one. Anyway, it'd be a great addition to the editor if you were able to add the capability to copy the table cells that can be selected with the mouse: paths and colours in "Textures" table, and the values in "Generation Table". For me, the rest dropdown menus are ok, it is not that hard to change them manually.

    About the relative path, I tried to test it, but the editor sends an error message "Invalid texture!" and it does not allow me to change the path to something like:
    ../alexander/mymod/data/terrain/battlefield/sub_arctic/summer/rock.tga

  16. #16
    z3n's Avatar State of Mind
    Moderator Emeritus

    Join Date
    Aug 2011
    Posts
    4,640

    Default Re: descr_geography.db Editor

    Great tool. Thanks. & Bardo described the file perfectly.

Tags for this Thread

Posting Permissions

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