Page 1 of 13 1 2 3 4 5 6 7 8 9 10 11 ... LastLast
Results 1 to 20 of 242

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

  1. #1
    Artifex
    Patrician

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

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

    I've looked at DB format for S2TW, and it is very similar to ETW/NTW.

    • Optional GUID: - the only thing new in S2TW, everything else is old
      • Bytes FD FE FC FF
      • uint16 GUID length in UTF-16 characters (always 36)
      • UTF-16 String guid 3913248c-da3e-4fe9-889b-e018ef212bfd

    • Version number, either:
      • Byte 01

    • or:
      • Bytes FC FD FE FF
      • Byte - version number minus one (so 01 here is newer than previous 01)
      • Bytes 00 00 00 01

    • Uint32 number of rows
    • data

    EDIT: Converter now works, and is available here.
    I broke far too many ETW tables in process (due to using very strict table version checks),
    so I'll have to go back and fix them soon.

    195 of S2TW tables with ETW-compatible schemas are supported.

    No new S2TW are supported yet, but I have db schema autodetector
    I'll use to quickly add support for them at some point (definitely after fixing ETW tables I broke).

    Any volunteers to update DB Editor as well (and does it at least handle NTW yet)?
    Last edited by taw; February 27, 2011 at 07:01 AM.

  2. #2
    The Hedge Knight's Avatar Fierce When Cornered
    Artifex

    Join Date
    Oct 2009
    Location
    England
    Posts
    5,864

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

    Amazing job taw. Greatly looking forward to it...

    Any chance you could crack open the changed .unit_variant files as well?

    Dbe isnt open source btw.

  3. #3
    Artifex
    Patrician

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

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

    Quote Originally Posted by 'The Hedge Knight View Post
    Amazing job taw. Greatly looking forward to it...

    Any chance you could crack open the changed .unit_variant files as well?

    Dbe isnt open source btw.
    Isn't DBEditor totally open source and available via svn on source forge?
    Like here?

    Here's how you get DBEditor's source code:

    svn co https://etw-mod-tools.svn.sourceforg.../etw-mod-tools etw-mod-tools

    My current list of priorities is something like this:

    • Any really quick requests I can finish in one quick go (like loc<->tsv converter yesterday) always get top priority
    • Then I want to modify all tools to work with S2TW (possibly also fixing some NTW compatibility issues along the way) to help jumpstart S2TW modding. I don't plan to do anything big here, there's plenty of low-hanging fruit.
    • Then add a lot of annotations for xmls for ETW startpos.esf
    • Then there's a lot of stuff I want to do with ETW esf transformations scripts (annotations will help a lot here, so I want to do them first)
    • And finally - either some really simple gui for all converters, so normal people can use them - or some sort of self-update feature so guis written by other people (like EsfTotalEditor) don't get outdated too quickly.

    Model converters are a lot of work, and I want to do these first. I'd like to take all old converted, update them from Python 2 to Python 3, clean them up etc., but that'd be a lot of work, so it has much lower priority than stuff listed above.

  4. #4
    The Hedge Knight's Avatar Fierce When Cornered
    Artifex

    Join Date
    Oct 2009
    Location
    England
    Posts
    5,864

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

    No .unit variant isnt a model ( See attached)


    Its a file which tells the game which model parts to use in each unit for ntw/etw.

    So with this you could take any of the units in the demo and change how they looked using the parts ca provide.
    Last edited by The Hedge Knight; November 09, 2012 at 11:51 AM.

  5. #5

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

    Great news indeed! I would really like to play my first Shogun 2 campaign with slower battle speed.

  6. #6
    Artifex
    Patrician

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

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

    Quote Originally Posted by 'The Hedge Knight View Post
    No .unit variant isnt a model ( See attached)

    Its a file which tells the game which model parts to use in each unit for ntw/etw.

    So with this you could take any of the units in the demo and change how they looked using the parts ca provide.
    What's our current converter?

    And by the way, db converter works now. Enjoy.

    Also, TSV format it uses is still quirky, as there's no sensible way to differentiate null string (00, NULL)
    from empty string (01 00 00, "") in anything like standard TSV.

    I need to figure out some way to do that which doesn't confuse too many TSV editing tools.

  7. #7
    The Hedge Knight's Avatar Fierce When Cornered
    Artifex

    Join Date
    Oct 2009
    Location
    England
    Posts
    5,864

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

    Well pfm opens opens the old .unit_variants for ntw but the new ones (some of which open fine for campaign map models) just show up as a load of unicode charecters.

    Last edited by The Hedge Knight; February 27, 2011 at 07:13 AM.

  8. #8

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

    Hello,

    Sorry I do not understand all (I'm french) but once the download is actually what?

  9. #9
    Artifex
    Patrician

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

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

    Quote Originally Posted by 'The Hedge Knight View Post
    Well pfm opens opens the old .unit_variants for ntw but the new ones (some of which open fine for campaign map models) just show up as a load of unicode charecters.

    It doesn't look too complicated, but it would probably be a lot easier if I actually had a legit copy of NTW ;-)
    Anyone in giving spirit today? (I'm t_a_w on Steam)

    Quote Originally Posted by Hammer-17 View Post
    Hello,

    Sorry I do not understand all (I'm french) but once the download is actually what?
    Go here and press download. You'll also need JRuby installed and it's a command line tool, so it has some learning curve.

  10. #10

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

    Ok thank TW

  11. #11
    Artifex
    Patrician

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

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

    Quote Originally Posted by 'The Hedge Knight View Post
    Well pfm opens opens the old .unit_variants for ntw but the new ones (some of which open fine for campaign map models) just show up as a load of unicode charecters.

    S2TW unit_variant unpacker is ready, packer coming soon.

  12. #12

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

    I'm back with a difficulty

    uh once you download the "DB" and "jruby" what should I do or the set of all sorry that question but can someone explain the process to be as letter or files

    thank you very much

  13. #13
    Artifex
    Patrician

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

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

    Quote Originally Posted by Hammer-17 View Post
    I'm back with a difficulty

    uh once you download the "DB" and "jruby" what should I do or the set of all sorry that question but can someone explain the process to be as letter or files

    thank you very much
    Did you unpack db files from S2TW's packs? There's db directory in them somewhere, you need to extract it.

    Then run this command:
    jruby db_unpack C:\path\to\where\you\extracted\db c:\path\where\you\want\tsvs

  14. #14

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

    Yes I unpacked or so as I extract the db I put the STW with JRuby's it wholesale?

  15. #15
    Artifex
    Patrician

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

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

    Quote Originally Posted by Hammer-17 View Post
    Yes I unpacked or so as I extract the db I put the STW with JRuby's it wholesale?
    JRuby installs itself into PATH, so it doesn't matter where it is.

    Put unpacked db somewhere inside etwng/db's directory, that's easiest.

  16. #16

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

    Whenever I try to use it, it gives me a Syntax error.

    I use this command, using the Ruby 1.9.2 command prompt:

    jruby db_unpack H:\Program Files\db\ H:\Program Files\db\db\

    Any suggestions? I do hate being a bother...

    EDIT: When I enter the above, I have to hit enter twice for it to go through, at which point it gives me this error:

    SyntaxError: (irb):1: syntax error, unexpected null

    jruby db_unpack H:\Program Files\db\ H:Program Files\db\db\
    ^
    from org/jruby/RubyKernel.java:1093:in `eval19'
    from org/jruby/RubyKernel.java:1418:in `loop'
    from org/jruby/RubyKernel.java:1205:in `rbCatch19'
    from org/jruby/RubyKernel.java:1205:in `rbCatch19'
    from C:\jruby-1.6.0.RC2\/bin/jirb_swing:65:in `(root)'
    irb(main):003:0>


    Kurtis
    Regards from Kurtis, a.k.a. The Grand Emperor

  17. #17
    Artifex
    Patrician

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

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

    Quote Originally Posted by Kurtisb View Post
    Whenever I try to use it, it gives me a Syntax error.

    I use this command, using the Ruby 1.9.2 command prompt:

    jruby db_unpack H:\Program Files\db\ H:\Program Files\db\db\

    Any suggestions? I do hate being a bother...

    EDIT: When I enter the above, I have to hit enter twice for it to go through, at which point it gives me this error:

    SyntaxError: (irb):1: syntax error, unexpected null

    jruby db_unpack H:\Program Files\db\ Hrogram Files\db\db\
    ^
    from org/jruby/RubyKernel.java:1093:in `eval19'
    from org/jruby/RubyKernel.java:1418:in `loop'
    from org/jruby/RubyKernel.java:1205:in `rbCatch19'
    from org/jruby/RubyKernel.java:1205:in `rbCatch19'
    from C:\jruby-1.6.0.RC2\/bin/jirb_swing:65:in `(root)'
    irb(main):003:0>


    Kurtis
    Start Menu > run > cmd

    You don't need Ruby prompt, just plain old operating system's command line.

  18. #18

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

    Yes, but first of all, I have to have a separate .bat file to start CMD in the target directory (which, naturally, is where the db_unpack file is), otherwise it won't find the db_unpack file. And when I do that, I get the error in the screenshot below.
    Regards from Kurtis, a.k.a. The Grand Emperor

  19. #19
    Artifex
    Patrician

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

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

    Quote Originally Posted by Kurtisb View Post
    Yes, but first of all, I have to have a separate .bat file to start CMD in the target directory (which, naturally, is where the db_unpack file is), otherwise it won't find the db_unpack file. And when I do that, I get the error in the screenshot below.
    Run this command once to install necessary libraries:
    jgem install nokogiri --pre

  20. #20
    The Hedge Knight's Avatar Fierce When Cornered
    Artifex

    Join Date
    Oct 2009
    Location
    England
    Posts
    5,864

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

    So how would one go about parsing these tables? I had a look but all i could recognise was thrings. Got all the kv tables working though .

    Is it somthing that a tutorial could be written on (if there is any point) or is it more complex.

Page 1 of 13 1 2 3 4 5 6 7 8 9 10 11 ... LastLast

Posting Permissions

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