Results 1 to 20 of 20

Thread: [WIP - having technical difficulties] Updated DB Editor Schema based on the raw XML and XSD files released by CA

  1. #1
    Okmin's Avatar In vino veritas
    Join Date
    May 2010
    Location
    USA
    Posts
    7,506

    Default [WIP - having technical difficulties] Updated DB Editor Schema based on the raw XML and XSD files released by CA

    EDIT: Okay, I was about a third done when I realized I was updating the old schema, not taw's new one that has all but two tables unlocked. I tried to merge the two files to save what I'd gotten done... didn't work, gave me fatal errors with DBE. So I'm starting over tomorrow, and hopefully upload the file in the next few days.

    WIP post that I didn't feel like deleting
    I've gotten rid of 99.99% of the unknown columns in the DB editor. The reason it's not 100% is that there are a handful of columns that are still in hex. Interestingly, there are columns and even entire tables mentioned in CA's XML files that don't show up in the DB editor. I would add them, but I'd probably break something while trying, and they're generally unused or rarely used, so it's probably not worth the effort.

    Anyway, enjoy.

    Here's a select few tables that got significant updates:

    • agents
    • battle_cities
    • battle_climate_weather
    • battle_entities
    • battle_type_setup_limits
    • building_levels
    • campaign_map_playable_areas
    • campaign_walk_anim_sets
    • climate_to_erosion_settings

    Some interesting tables for feature that were never implemented:

    • battlefield_deployable_siege_items
    • battlefield_snow_props
    • disasters
    • diseases

    Last edited by Okmin; July 02, 2011 at 05:03 PM.
    IN VINO VERITAS
    IN CERVESIO FELICITAS

    Under the patronage of The Lizard King
    Patron of Narf
    and Starlightman

  2. #2
    alhoon's Avatar Comes Rei Militaris
    took an arrow to the knee

    Join Date
    Apr 2008
    Location
    Chania, Greece
    Posts
    24,781

    Default Re: [WIP] Updated DB Editor Schema based on the raw XML and XSD files released by CA

    Thank you a ton! +rep
    alhoon is not a member of the infamous Hoons: a (fictional) nazi-sympathizer KKK clan. Of course, no Hoon would openly admit affiliation to the uninitiated.
    "Angry Uncle Gordon" describes me well.
    _______________________________________________________
    Beta-tester for Darthmod Empire, the default modification for Empire Total War that does not ask for your money behind patreon.
    Developer of Causa Belli submod for Darthmod, headed by Hammeredalways and a ton of other people.
    Developer of LtC: Random maps submod for Lands to Conquer (that brings a multitude of random maps and other features).

  3. #3
    Okmin's Avatar In vino veritas
    Join Date
    May 2010
    Location
    USA
    Posts
    7,506

    Default Re: [WIP] Updated DB Editor Schema based on the raw XML and XSD files released by CA

    Progress update: This time I was about halfway through... and found out the DB editor refused to save the schema. Asked taw if he can help, but if it can't be fixed then I can't do this at all
    IN VINO VERITAS
    IN CERVESIO FELICITAS

    Under the patronage of The Lizard King
    Patron of Narf
    and Starlightman

  4. #4

    Default Re: [WIP] Updated DB Editor Schema based on the raw XML and XSD files released by CA

    Quote Originally Posted by Okmin View Post
    Progress update: This time I was about halfway through... and found out the DB editor refused to save the schema. Asked taw if he can help, but if it can't be fixed then I can't do this at all
    I've updated the schema. However, the keyref nodes will need to be redone as the column names have changed.

  5. #5
    Okmin's Avatar In vino veritas
    Join Date
    May 2010
    Location
    USA
    Posts
    7,506

    Default Re: [WIP] Updated DB Editor Schema based on the raw XML and XSD files released by CA

    You edited DB.xsd directly? About a quarter of the tables (mainly the larger ones) have columns in a different order than CA's XML files. So if you did that, part it's not gonna match up.
    IN VINO VERITAS
    IN CERVESIO FELICITAS

    Under the patronage of The Lizard King
    Patron of Narf
    and Starlightman

  6. #6
    Archimonday's Avatar Senator
    Join Date
    Jul 2008
    Location
    Massachusetts, United States
    Posts
    1,383

    Default Re: [WIP] Updated DB Editor Schema based on the raw XML and XSD files released by CA

    Well ive been editing the Schema by directly editing the column names after finding a series of five matching values in both the .csv's he provided and the .db tables already in the DB Editor. I've noticed that columns are not in order, and that some columns are non-existent.

    Are the non-existent columns because they are not being used by the game, or were they missed? Some are not important, like string descriptions, but, still would like to have them...im a bit OCD at times.

  7. #7

    Default Re: [WIP] Updated DB Editor Schema based on the raw XML and XSD files released by CA

    Quote Originally Posted by Okmin View Post
    You edited DB.xsd directly? About a quarter of the tables (mainly the larger ones) have columns in a different order than CA's XML files. So if you did that, part it's not gonna match up.
    You mean the files have the columns in a different order? I wrote a program to do this. Take a look at what I've got. It should be most of the worst part, though the keyref nodes are completely wrong. Also, the unique nodes are missing some column references.
    Last edited by erasmus777; July 03, 2011 at 05:13 PM.

  8. #8
    Okmin's Avatar In vino veritas
    Join Date
    May 2010
    Location
    USA
    Posts
    7,506

    Default Re: [WIP] Updated DB Editor Schema based on the raw XML and XSD files released by CA

    Quote Originally Posted by Archimonday View Post
    Well ive been editing the Schema by directly editing the column names after finding a series of five matching values in both the .csv's he provided and the .db tables already in the DB Editor. I've noticed that columns are not in order, and that some columns are non-existent.

    Are the non-existent columns because they are not being used by the game, or were they missed? Some are not important, like string descriptions, but, still would like to have them...im a bit OCD at times.
    Same. I'm guessing they were just missed, because they look like they'd be used. I've also seen some columns that are in the DB editor but not the XML. And one column that actually should've been split into about eight columns, at least according to the XML.
    Quote Originally Posted by erasmus777 View Post
    You mean the files have the columns in a different order? I wrote a program to do this. Take a look at what I've got. It should be most of the worst part, though the unique and keyref nodes are definitely missing some entries.
    Okay, send it to me and I'll look.
    IN VINO VERITAS
    IN CERVESIO FELICITAS

    Under the patronage of The Lizard King
    Patron of Narf
    and Starlightman

  9. #9

    Default Re: [WIP] Updated DB Editor Schema based on the raw XML and XSD files released by CA

    Sorry, the .xsd wasn't attaching to my post. It's there now.

  10. #10
    Okmin's Avatar In vino veritas
    Join Date
    May 2010
    Location
    USA
    Posts
    7,506

    Default Re: [WIP] Updated DB Editor Schema based on the raw XML and XSD files released by CA

    Okay, looks good. But yeah, some of the columns are out of order. I assume you wrote your program to read the XML tags and write it into DB.xsd (basically), right? So it's got the columns out of order in some tables (well, technically DBE has them out of order, but you know what I mean). For example, compare battle_terrain_farms_tables (the original one) to battle_terrain_farms.xml, and look at the actual file names. Different order. 'though for the majority of the tables (the one's that are in order), it worked perfectly.

    I've PMed LtChambers (since it's his editor) to see if he can help, but I don't know if he'll reply anytime soon.
    IN VINO VERITAS
    IN CERVESIO FELICITAS

    Under the patronage of The Lizard King
    Patron of Narf
    and Starlightman

  11. #11
    Archimonday's Avatar Senator
    Join Date
    Jul 2008
    Location
    Massachusetts, United States
    Posts
    1,383

    Default Re: [WIP - having technical difficulties] Updated DB Editor Schema based on the raw XML and XSD files released by CA

    That XSD crashed for me. hrmm

  12. #12

    Default Re: [WIP] Updated DB Editor Schema based on the raw XML and XSD files released by CA

    Quote Originally Posted by Okmin View Post
    Okay, looks good. But yeah, some of the columns are out of order. I assume you wrote your program to read the XML tags and write it into DB.xsd (basically), right? So it's got the columns out of order in some tables (well, technically DBE has them out of order, but you know what I mean). For example, compare battle_terrain_farms_tables (the original one) to battle_terrain_farms.xml, and look at the actual file names. Different order. 'though for the majority of the tables (the one's that are in order), it worked perfectly.

    I've PMed LtChambers (since it's his editor) to see if he can help, but I don't know if he'll reply anytime soon.
    Yes, that's what I did--I went through the xsds and pulled all the fields but the "s_" ones. Anyway, I've got the code for the DBEditor. However, I think all the issues are in the schema. We need to

    1. make sure all the keyref and unique nodes are pointing to the new column names
    2. get the columns in order

    After that, it should work.

  13. #13

    Default Re: [WIP - having technical difficulties] Updated DB Editor Schema based on the raw XML and XSD files released by CA

    Quote Originally Posted by Archimonday View Post
    That XSD crashed for me. hrmm
    Yes, it should. It's a WIP.

  14. #14
    Okmin's Avatar In vino veritas
    Join Date
    May 2010
    Location
    USA
    Posts
    7,506

    Default Re: [WIP] Updated DB Editor Schema based on the raw XML and XSD files released by CA

    Quote Originally Posted by erasmus777 View Post
    Yes, that's what I did--I went through the xsds and pulled all the fields but the "s_" ones. Anyway, I've got the code for the DBEditor. However, I think all the issues are in the schema. We need to

    1. make sure all the keyref and unique nodes are pointing to the new column names
    2. get the columns in order

    After that, it should work.
    I think taw can help with number one And I can get it in order in the next few days, if you want.
    IN VINO VERITAS
    IN CERVESIO FELICITAS

    Under the patronage of The Lizard King
    Patron of Narf
    and Starlightman

  15. #15

    Default Re: [WIP] Updated DB Editor Schema based on the raw XML and XSD files released by CA

    Quote Originally Posted by Okmin View Post
    I think taw can help with number one And I can get it in order in the next few days, if you want.
    Sounds good. If you want to focus on order, then I'll start working on the unique nodes. Maybe taw can do the keyrefs.

  16. #16
    alhoon's Avatar Comes Rei Militaris
    took an arrow to the knee

    Join Date
    Apr 2008
    Location
    Chania, Greece
    Posts
    24,781

    Default Re: [WIP - having technical difficulties] Updated DB Editor Schema based on the raw XML and XSD files released by CA

    So... it seems it wasn't that easy to put all those new data to the DB editor.
    It just makes me appreciate even more the work of those that made the DB editor in the first place.
    alhoon is not a member of the infamous Hoons: a (fictional) nazi-sympathizer KKK clan. Of course, no Hoon would openly admit affiliation to the uninitiated.
    "Angry Uncle Gordon" describes me well.
    _______________________________________________________
    Beta-tester for Darthmod Empire, the default modification for Empire Total War that does not ask for your money behind patreon.
    Developer of Causa Belli submod for Darthmod, headed by Hammeredalways and a ton of other people.
    Developer of LtC: Random maps submod for Lands to Conquer (that brings a multitude of random maps and other features).

  17. #17
    alhoon's Avatar Comes Rei Militaris
    took an arrow to the knee

    Join Date
    Apr 2008
    Location
    Chania, Greece
    Posts
    24,781

    Default Re: [WIP - having technical difficulties] Updated DB Editor Schema based on the raw XML and XSD files released by CA

    Is it/will it be possible with the new XML tables etc to change the turns needed for elections? I.e. change them to 20 or something?
    alhoon is not a member of the infamous Hoons: a (fictional) nazi-sympathizer KKK clan. Of course, no Hoon would openly admit affiliation to the uninitiated.
    "Angry Uncle Gordon" describes me well.
    _______________________________________________________
    Beta-tester for Darthmod Empire, the default modification for Empire Total War that does not ask for your money behind patreon.
    Developer of Causa Belli submod for Darthmod, headed by Hammeredalways and a ton of other people.
    Developer of LtC: Random maps submod for Lands to Conquer (that brings a multitude of random maps and other features).

  18. #18

    Default Re: [WIP - having technical difficulties] Updated DB Editor Schema based on the raw XML and XSD files released by CA

    Elections are easy to be changed in startpos.esf:





  19. #19
    alhoon's Avatar Comes Rei Militaris
    took an arrow to the knee

    Join Date
    Apr 2008
    Location
    Chania, Greece
    Posts
    24,781

    Default Re: [WIP - having technical difficulties] Updated DB Editor Schema based on the raw XML and XSD files released by CA

    Yes, but the NEXT time, they revert to the nomal 8 turns/elections. I was asking if you can change it for ever. I play with 4tpy and I have to periodically open the esf and change when the next elections will happen. Usually, instead of 2 4 year terms I place it to 1 6 year term and 1 2 year term. But I would much more prefer to set it to 2 x4 years and be done with it, without the need to open the ESF every 16 turns.
    alhoon is not a member of the infamous Hoons: a (fictional) nazi-sympathizer KKK clan. Of course, no Hoon would openly admit affiliation to the uninitiated.
    "Angry Uncle Gordon" describes me well.
    _______________________________________________________
    Beta-tester for Darthmod Empire, the default modification for Empire Total War that does not ask for your money behind patreon.
    Developer of Causa Belli submod for Darthmod, headed by Hammeredalways and a ton of other people.
    Developer of LtC: Random maps submod for Lands to Conquer (that brings a multitude of random maps and other features).

  20. #20

    Default Re: [WIP - having technical difficulties] Updated DB Editor Schema based on the raw XML and XSD files released by CA

    Hmm.. I didn't now that... I'll check it further.




Posting Permissions

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