Page 12 of 13 FirstFirst ... 2345678910111213 LastLast
Results 221 to 240 of 242

Thread: DB<->TSV converter for Shogun 2 Total War [released!]

  1. #221
    Artifex
    Patrician

    Join Date
    Oct 2008
    Location
    London, UK
    Posts
    1,332

    Default Re: DB<->TSV converter for Shogun 2 Total War [released!]

    Quote Originally Posted by daniu View Post
    I did look at the xmls, but had forgotten about the xsd schemata. I'll check them out.

    Well a string is a string, not a different data type; and including the possibility of having other data optional although it isn't used is just more flexible and has no disadvantages.
    But you know, I doubt the "optional" string idea to begin with. It doesn't make any sense at all: if it's there, it's just a byte more; if it's not there, you still have to include the 0 byte which you would need anyway to denote the empty string.

    I'm quite certain that this isn't an "optional" string at all, but a string array. This would fit the "sequence" elements in the xsd files (and there are array types in ESF as well).
    If you think about it, an "optional string" is just a special case of an array allowing only length of 0 or 1.
    I haven't gone too deep into looking at the data files in a hex editor, but if arrays of ints were also possible, that would easily confuse people trying to analyse the structure.
    I opened loads of binary formats used by Total War, and they don't code arrays like that ever.

    Arrays are always: [uint32le element count] [element 0] [element 1] etc.

    Strings are always [uint16le codepoints count] [uint16le codepoint 0] [uint16le codepoint 1] etc.

    Single byte 0/1 prefix is just for optstrings, or nullable strings, or whatever you want to call them. They are not arrays.

    They only example of array indexes being not uint32le are ESF tag numbers, counts of which is uint16le, but they are all uint16le numbers, so there's literally no way it can exceed this number.

    Quote Originally Posted by daniu View Post
    Just to be sure: those are included in the schema.xml you checked in at github yesterday, right? Because that's what I'm working with right now.
    It's all on github, you can always check latest version and history of every file if you need to.

  2. #222

    Default Re: DB<->TSV converter for Shogun 2 Total War [released!]

    Okay, the array thing was just an idea.

    I now finished transferring the DBFileTypes into the schema format. I also "unified" names (lowercase and underscores for spaces) in both files and sorted yours by table name so I'll have an easier time comparing them. The zip file I attached contains both xmls.
    There are still a lot of differences between the two, I'll just test both by brute force opening all db files in all pack files to find the ones that work best. Probably yours since you said you tested those already

    Once I got all the data consistent, I can start working on integrating them into the GUI tools.
    Tools: PFM 4.1 - EditSF 1.2.0
    (Download PFM - Download EditSF)
    Warscape Modding Guide
    Join the PFM User Group on Steam to receive PackFileManager update notifications.

    Respecto Patronum

  3. #223

    Default Re: DB<->TSV converter for Shogun 2 Total War [released!]

    Okay it looks to me like I got the reading of the schema.xml right.
    I think I changed it in some places along the way, if you could run the tests you do with the one I attached, that would be good as a double-check.
    I added the tag "version_end" which is analogous to "version_start" to be able to remove columns in later versions; but that was only really needed once in an NTW agents_tables.
    Oh, I did strip the references for now.

    I can open a large range of db files for all of etw, ntw and stw now.
    Here are my test results; "passed" means I saved and reloaded the files, to verify I got the same content and don't corrupt it along the way.
    I used the most recent patches for all TWs and, for S2, threw in Radious' mod for good measure.
    I only checked the db/* subtree.

    ETW testing pack file /opt/mono/packs/etw/etw-patch2.pack
    type: Patch/1, supersedes patch.pack, contains 2414 files
    passed 108/108
    unknown files: 1
    models_building

    NTW testing pack file /opt/mono/packs/ntw/ntw-patch2.pack
    type: Patch/1, supersedes patch.pack, contains 770 files
    passed 19/19
    testing pack file /opt/mono/packs/ntw/ntw-patch4.pack
    type: Patch/1, supersedes patch3.pack, contains 2554 files
    passed 117/117
    unknown files: 0

    STW testing pack file /opt/mono/packs/stw/Radious_Total_War_Mod.pack
    type: Movie/0, supersedes , contains 386 files
    passed 56/56
    testing pack file /opt/mono/packs/stw/Radious_Total_War_RotS.pack
    type: Movie/0, supersedes , contains 407 files
    passed 76/76
    testing pack file /opt/mono/packs/stw/s2-patch.pack
    type: Patch/0, supersedes , contains 13081 files
    passed 428/428
    testing pack file /opt/mono/packs/stw/s2-patch10.pack
    type: Patch/1, supersedes patch9.pack, contains 608 files
    passed 517/517
    testing pack file /opt/mono/packs/stw/s2-patch12.pack
    type: Patch/1, supersedes patch11.pack, contains 698 files
    passed 517/517
    testing pack file /opt/mono/packs/stw/s2-patch9.pack
    type: Patch/1, supersedes patch8.pack, contains 7922 files
    passed 517/517
    unknown files: 23
    avatar_ancillaries_to_categories_juncs
    avatar_campaign_maps
    avatar_dojo_codependencies
    avatar_gempei_dojos
    avatar_skill_sets
    campaign_bonus_value_ids_unit_records
    cdir_events_mission_incidents
    events_effect_group_junct
    events_hist_chars_junct
    faction_variables
    faction_variables_optional_overrides
    groupings_cultures_junct
    groupings_empires_junct
    groupings_subcultures_junct
    models_building
    models_naval
    mp_force_gen_upgrade_junctions
    resource_effects
    sea_climate_details
    ship_names
    small_vegetation_climates_jct
    trigger_event_to_excluded_agent_types
    uniform_naval_to_faction_colours


    I've done all this on a command line interface; I'll start integrating it into the UI of PFM and later DBE now.
    Last edited by daniu; December 07, 2011 at 07:22 AM.
    Tools: PFM 4.1 - EditSF 1.2.0
    (Download PFM - Download EditSF)
    Warscape Modding Guide
    Join the PFM User Group on Steam to receive PackFileManager update notifications.

    Respecto Patronum

  4. #224
    Artifex
    Patrician

    Join Date
    Oct 2008
    Location
    London, UK
    Posts
    1,332

    Default Re: DB<->TSV converter for Shogun 2 Total War [released!]

    Hi there,

    I've been busy and then away on holidays, and this fell through cracks.

    What are we doing here again? Should I take the last schema.zip you sent (from this post), test it against all db tables in all games,
    fix any problems that occur, and upload it to etwng?

  5. #225

    Default Re: DB<->TSV converter for Shogun 2 Total War [released!]

    No, hold on, I think I have a newer version that I didn't upload because you didn't respond, but I don't have access to it right now.
    Tools: PFM 4.1 - EditSF 1.2.0
    (Download PFM - Download EditSF)
    Warscape Modding Guide
    Join the PFM User Group on Steam to receive PackFileManager update notifications.

    Respecto Patronum

  6. #226
    Artifex
    Patrician

    Join Date
    Oct 2008
    Location
    London, UK
    Posts
    1,332

    Default Re: DB<->TSV converter for Shogun 2 Total War [released!]

    I've waited over a month, I can wait a bit more ;-)

  7. #227

    Default Re: DB<->TSV converter for Shogun 2 Total War [released!]

    Okay, here we go. I hope it's the correct one, but I think so.
    The tests I wrote for it were running fine, but it's obviously possible I did something wrong writing them.
    What I (hope I) do in them is
    - load the db file with the schema.xml
    - verify that the entry count is correct
    - write the file into a temp one, then compare the two

    I run this with all these packs:
    etw:
    patch2.pack

    ntw:
    patch2.pack patch4.pack

    stw:
    Radious_Total_War_Mod.pack patch10_mod.pack patch12.pack patch.pack
    Radious_Total_War_RotS.pack patch10.pack patch9.pack


    I probably introduced the index difference back into the xml, but I didn't know how else to handle this; after all, some older packs don't even have a version so I need to assume something (chose 0), and otherwise I use the value from the pack file. I don't know why the DBEditor uses a different indexing, didn't check the code.
    Tools: PFM 4.1 - EditSF 1.2.0
    (Download PFM - Download EditSF)
    Warscape Modding Guide
    Join the PFM User Group on Steam to receive PackFileManager update notifications.

    Respecto Patronum

  8. #228
    Artifex
    Patrician

    Join Date
    Oct 2008
    Location
    London, UK
    Posts
    1,332

    Default Re: DB<->TSV converter for Shogun 2 Total War [released!]

    Two problems:
    * My converter doesn't support version_end yet sadly. Now I get it that it's needed for S2TW but your schema seems to be using it even for ETW/NTW versions, where it is definitely not used ever. A lot of your version_end entries seem incorrect (things like version_end=5 optstring, followed by version_start=5 boolean "unused" in the same place - yeah right...)
    * All your version numbers are off by one

    There's no such thing as db files that don't have versions. No version header means version 1 (by DBEditor convertion). Version headers start with version 2 (which is encoded as hex 01) and go on.

    Could you upload schema with version numbers fixed?

    Once you do that, I'll test tables that don't rely on version_end first. Once I have a bit more free time, I'll add support for version_end (without breaking DB.xsd conversion I mean, that's the main hard part, I'll need to make something that exports multiple DB.xsd versions from one schema.xml or somesuch).
    Last edited by taw; January 16, 2012 at 03:45 PM.

  9. #229
    Bad213Boy's Avatar Semisalis
    Join Date
    Nov 2011
    Location
    Chicago
    Posts
    411

    Default Re: DB<->TSV converter for Shogun 2 Total War [released!]

    Sorta new to modding S2TW. If I understand this correctly, this tool will allow new textures for units? What kind of file does this edit and where can I locate these files in the games pack files? I would like to start playing around with all these tools so I can get a better understanding of modding. Thx.


  10. #230
    Artifex
    Patrician

    Join Date
    Oct 2008
    Location
    London, UK
    Posts
    1,332

    Default Re: DB<->TSV converter for Shogun 2 Total War [released!]

    I've added support for a bunch of new tables from DB.xsd I got sent ages ago ;-)

  11. #231

    Default Re: DB<->TSV converter for Shogun 2 Total War [released!]

    Can you support a UI converter for STW2 ?

  12. #232
    Artifex
    Patrician

    Join Date
    Oct 2008
    Location
    London, UK
    Posts
    1,332

    Default Re: DB<->TSV converter for Shogun 2 Total War [released!]

    It would probably take a lot of time and effort to support that, and I cannot currently do that.

  13. #233

    Default Re: DB<->TSV converter for Shogun 2 Total War [released!]

    have a tsv file, with ripple tool I can open the tsv file????

    and how do I make a tsv file from a. pack file?

  14. #234
    Artifex
    Patrician

    Join Date
    Oct 2008
    Location
    London, UK
    Posts
    1,332

    Default Re: DB<->TSV converter for Shogun 2 Total War [released!]

    I think you need to unpack it first, get Pack File Manager for easy user interface for that.

  15. #235

    Default Re: DB<->TSV converter for Shogun 2 Total War [released!]

    Hey taw,
    been looking into your code to unpack the models_building tables to add an editor to PFM. Looks like you only handle up to NTW right now?
    If I'm not entirely off, all you have to do to get the S2 ones going is to just read the start of the file like a normal DB file header (GUID, version etc) and the rest will work with the code you already have.
    Tools: PFM 4.1 - EditSF 1.2.0
    (Download PFM - Download EditSF)
    Warscape Modding Guide
    Join the PFM User Group on Steam to receive PackFileManager update notifications.

    Respecto Patronum

  16. #236
    Artifex
    Patrician

    Join Date
    Oct 2008
    Location
    London, UK
    Posts
    1,332

    Default Re: DB<->TSV converter for Shogun 2 Total War [released!]

    You are correct, and S2 tables are now supported - it was just extra GUID.

    Does anybody ever use models_building tables anyway...?

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

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

    Default Re: DB<->TSV converter for Shogun 2 Total War [released!]

    Ehh... which file should we download to turn ESF to XML and vice versa?
    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. #238

    Default Re: DB<->TSV converter for Shogun 2 Total War [released!]

    how to install this?? in the download page there are many files but i have no idea how to download them...

  19. #239
    Junaidi83 de Bodemloze's Avatar Dont Mess With Me
    Join Date
    Feb 2011
    Location
    Indonesia
    Posts
    2,616

    Default Re: DB<->TSV converter for Shogun 2 Total War [released!]

    Quote Originally Posted by 007Jua007 View Post
    how to install this?? in the download page there are many files but i have no idea how to download them...
    DB <-> TSV is kind of old method back when pfm not perfect like now when most modder just try modding shogun 2 , maybe i wrong , its just my mind is foggy.

    Is just like old version of pfm maybe ?
    Modding is like accursed wine, you try a sip and you ended empty the whole glass
    Under Proud Patronage of Shankbot de Bodemloze

  20. #240

    Default Re: DB<->TSV converter for Shogun 2 Total War [released!]

    hmm, anyway, I cannot use PFM here, im on a mac, PFM works only for extracting tables.. so I was extracting and editing with text editor directly but it would not work, I thought maybe I had to convert first... do you know any other method of editing S2 tables without PFM??

Posting Permissions

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