Page 1 of 4 1234 LastLast
Results 1 to 20 of 80

Thread: Using Taws Tools On Windows

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

    Join Date
    Oct 2009
    Location
    England
    Posts
    5,875

    Default Using Taws Tools On Windows

    Hi all. As there seems to be some confusion floating around i thought i would make a quick guide to using Taws scripts on windows (7/vista) to help people out.

    What you need
    Ruby And Taws Tools Jruby (once again grab the windows install and it does it all for you. Note i used jruby (1.5.3 which certainly works) while making this tutorial and it seems to work with all the required libruaries so i recomend this one).

    OR

    Ruby (get a windows installer and it should do it all for you) As mentioned before though this tutorial is using Jruby so commands may be slightly different for some things.


    Taws Tools (get the .zip from the top right and extract it with 7zip)


    Stuff you may need
    Additional Ruby Libruaries Additional Ruby Libruaries

    Warning: Commands here apply only to Jruby
    i do not know then for ruby

    These are:
    Nokogiri beta
    -Esf2xml
    -Db converter

    faster csv
    -loc-tsv converter

    To install either open a command promt and type either
    jgem install fastercsv
    or
    jgem unistall nokogiri (make sure to do this first)
    jgem install nokogiri --pre


    Also for the ui converter you need Python (must be 3.x.x not 2.x.x series)

    Windows Ruby Additional Libruaries Nokogiri With ruby (not Jruby)
    Open a ruby command prompt (NOT a normal command prompt). You can find this on the start menu under 'ruby' (+install version) or simply running the ruby exe from where ever you installed it.


    Then simply type gem
    gem install nokogiri
    Seems to work well with the tools too .

    Recomended programs to use as editors.
    Microsoft Excel
    Notepad++

    Installation verification Verifying you install of Ruby or Jruby

    1:Open command prompt
    2: Type Ruby -v or jruby -v
    3:It should return somthing like this (just note i blacked out my name because im stingy like that )



    The Tutorial

    Im using .unit_variant but the usage is the same (pretty much) accross all the tools so it should be possible to follow this for almost any of them. Of course substitute the names correctly .

    1: Get the Converter you want along with the file you want to convert into a single folder (doesnt matter where it is, because im lazy im just using the folder i extracted the tools to.
    Spoiler Alert, click show to read: 


    2:Hold down shift and right click (make sure you dont have any files selected while you do this or it wont work). Choose open new command window here.
    Spoiler Alert, click show to read: 

    This should open a command promt with the address of the folder your in in the command line already. This means any adresses you type must be relative to the folder you in (will make sense later).
    Spoiler Alert, click show to read: 


    3: This is where it gets a little complex. Type the usage commands.
    These are

    • name of the program which executes the converter either jruby or ruby depending on what you installed (underlinedblue).
    • A space then the name of the file you are executing (the converters name). Underlined in red here. Do remember you can copy and paste if its a long fidley name like this one...
    • Space then the name of the file you are converting from (underlined in green) AND the file extension (underlined in yellow)
    • Space then the name of the file you are converting to (underlined in purple) AND the file extension (normally .txt or .csv, says in the readme) (underlined in yellow)

    Spoiler Alert, click show to read: 


    So in this case that leaves us with jruby uv_unpack ashigaru_inf_yari_ashigaru.soldier.unit_variant ashigaru_inf_yari_ashigaru.soldier.txt

    Once thats typed in hit enter.

    You know when its complete because A: A new file is completed and B: the command prompt comes up with a new lines allowing you to enter a new command like this...
    Spoiler Alert, click show to read: 


    Now you do whatever editing you want.

    Converting back

    This is pretty much the same. Open a command window (shift+ right click as before) then simply type

    • Program that executes the files name (ruby/jruby) (underlined blue)
    • File to be executed (in this case uv_pack) (underlined red)
    • File converting from (underlined green) and the extension (underlined yellow)
    • File converting too and (underlined purple) the extension (underlined yellow)

    Then hit enter and hope for the best (note if you have made a mistake editing then the file will most likely not convert back to watch out for stray ',' or ' '.

    Spoiler Alert, click show to read: 

    Should result in
    Spoiler Alert, click show to read: 



    Db converter example

    The db converter confused me a little at first so ill put up some specific instructions here.

    So i extracted the entire db to the converter folder leaving me with the db tables in their sub folders all in the folder called db.

    Now to convert kv rules tables or any other table one would type
    Spoiler Alert, click show to read: 




    • Executing program name
    • Program being executed (once again check the readme if your not sure)
    • Path of folder containing the table from root folder you opened the command prompt in. Note folders DO NOT require a file extension.
    • Path where you want to place the file from where you opened the cmd promt this DOES require a file extension



    As you can see that makes a folder which the converted db files is placed in. But as you can see this converters also capable of mass conversion...

    The usage for this is

    • Executing program name
    • program being executed
    • folder containing the db files (db)
    • folder you want to extract them too (avoid spaces like i have, they get ignored )

    This should result in all the tables the converter can convert being converted to that folder
    Spoiler Alert, click show to read: 
    .


    As you can see there were quite a few errors due to missing schema's shown by the purple arrow (205 to be precise), nothing can be done about that until the tables are parsed but the remaining tables were placed in the mass folder.

    To remake the db from these is equally simple
    Spoiler Alert, click show to read: 




    • Program to execute the file
    • Converter
    • Folder name that the db tsv's are in (green)
    • folder name you want the tables put in (purple)

    Should result in a nice folder full of reconverted db's . Note however not all dbs convert back yet.
    Spoiler Alert, click show to read: 



    Specific usage examples

    Format here is:
    decompile command
    compile command
    Note that * means file name f* means folder name

    Anim sound event
    jruby ase_unpack *.anim_sound_event *.txt
    jruby ase_pack *.txt *.anim_sound_event

    Atlas
    jruby atlas_pack *.atlas *.tsv
    jruby atlas_unpack *.tsv *.atlas

    Esf
    jruby esf2xml *.esf *.xml WARNING May take a while
    jruby xml2esf *.xml *.esf WARNING may take even longer than esf2xml

    Groupformations
    Jruby gf_unpack *.bin *.txt
    jruby gf_pack *.txt *.bin (very tempramental to wrong digits )

    Loc (requires fastercsv libruary, see top of page)
    jruby loc2tsv *.loc *.tsv
    jruby tsv2loc *.tsv *.loc

    Markers
    jruby markers_unpack bridges.markers *.txt
    jruby markers_pack *.txt bridges.markers


    See all pretty similar. Not sure on the python ui converter right now though .


    Readme's

    I would advise reading these but somtimes the formats a little complex so here are a few rough notes on them

    Foo= anything that varies so usualy a filename/address
    / normally means space



    What to do if you get some strange error

    This is always annoying but.

    1:check your spelling (90% of the time is this or no.2)
    2:check your usage, is the command promt telling you you are missing somthing
    3:check the files isnt corrupted or the wrong sort of file for the converter (some files have more than one version with the same extension.
    4:check you have not altered the format somehow while modifying it.
    5:check you have the right libruaries, does the forum tell you to install nokogiri or faster tsv?
    6:If all else fails take a picture of the command promt (printscreen) and upload it to twc and beg for help


    Credits: Only one Credit - Taw for making these great tools.
    Last edited by The Hedge Knight; April 16, 2011 at 10:03 AM.

  2. #2

    Default Re: Using Taws Tools On Windows

    Hello Josst, thanks a lot for your very detailed and useful tutorial! Absolutely amazing! +rep
    I read through the whole tutorial but I still getting this error message below.

    Here is my complete step by step installation.
    Spoiler Alert, click show to read: 

    1. installed Java runtime engine: jre-6u24-windows-i586-s.exe

    2. installed Jruby: jruby_windows_1_6_0_RC2.exe to this folder
    C:\Program Files (x86)\jruby-1.6.0.RC2\

    3. downloaded and unzipped taw's "taw-etwng.zip" to this folder
    C:\Program Files (x86)\jruby-1.6.0.RC2\bin\etwng\

    4. extracted the complete db tables from the "patch.pack" to this folder
    C:\Program Files (x86)\jruby-1.6.0.RC2\bin\etwng\db\db

    5. created an empty "tsv" folder here
    C:\Program Files (x86)\jruby-1.6.0.RC2\bin\etwng\db\tsv

    6. executed the "cmd.exe" with full admin rights and opened this folder:
    cd C:\Program Files (x86)\jruby-1.6.0.RC2\bin\etwng\db

    7. executed these two commands:
    jgem install nokogiri --pre
    jgem install fastercsv

    7. jruby db_unpack db/ tsv/



    What am I doing wrong? Thanks a lot in advance to any suggestions.

  3. #3

    Default Re: Using Taws Tools On Windows

    Thank thank thank i love you ^^

  4. #4

    Default Re: Using Taws Tools On Windows

    Thank you for your tutorial. Unfortunately I still dont get the converter to work.
    I followed your tut step by step and encounter a problem:

    I always receive this in cmd
    Code:
    c:\TWS2\db>jruby db_unpack db\_kv_rules_tables demo\kv_rules_tables\kv_rules.tsv
    
    null:-1:in `setName': org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is mad
    e to create or change an object in a way which is incorrect with regard to names
    paces.
            from null:-1:in `rename'
            from null:-1:in `renameNode'
            from XmlDocument.java:354:in `removeNamespceRecursively'
            from XmlDocument.java:360:in `removeNamespceRecursively'
            from XmlDocument.java:340:in `remove_namespaces'
            from nokogiri/XmlDocument$i_method_0_0$RUBYINVOKER$remove_namespaces.gen
    :65535:in `call'
            from CachingCallSite.java:262:in `cacheAndCall'
            from CachingCallSite.java:105:in `call'
            from CallNoArgNode.java:62:in `interpret'
            from NewlineNode.java:103:in `interpret'
            from BlockNode.java:71:in `interpret'
            from ASTInterpreter.java:74:in `INTERPRET_METHOD'
            from InterpretedMethod.java:169:in `call'
            from DefaultMethod.java:171:in `call'
            from CachingCallSite.java:272:in `cacheAndCall'
            from CachingCallSite.java:114:in `callBlock'
            from CachingCallSite.java:118:in `call'
            from RubyClass.java:814:in `call'
            from DynamicMethod.java:197:in `call'
            from CachingCallSite.java:262:in `cacheAndCall'
            from CachingCallSite.java:105:in `call'
            from db_unpack:183:in `__file__'
            from db_unpack:-1:in `load'
            from Ruby.java:667:in `runScript'
            from Ruby.java:571:in `runNormally'
            from Ruby.java:420:in `runFromMain'
            from Main.java:278:in `doRunFromMain'
            from Main.java:198:in `internalRun'
            from Main.java:164:in `run'
            from Main.java:148:in `run'
            from Main.java:128:in `main'
    And cmd tells that jruby cannot be found when I dont start it as administrator. I really really hope someone manages to get dbeditor or pfm working with these new dbs, its a pain in the ass currently
    Don't smoke the seed

  5. #5
    Artifex
    Patrician

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

    Default Re: Using Taws Tools On Windows

    Thanks.

    A few corrections:


    • It's a huge huge pain to install nokogiri with Windows Ruby properly. That's the main reason I ensure all my tools work with JRuby. On Linux and OSX you can use either, on Windows just ignore "normal" Ruby and go for JRuby. Nokogiri is pain no matter what, but the only alternative is 10x slower XML parsing and you do not want that.
    • You need Python 3, Python 2 is too incompatible.
    • This `setName': org.w3c.dom.DOMException is some new bug I need to check. Except update as soon as I have some free time, hopefully in a day or two.

  6. #6

    Default Re: Using Taws Tools On Windows

    Quote Originally Posted by taw View Post
    Thanks.
    A few corrections: It's a huge huge pain to install nokogiri with Windows Ruby properly. That's the main reason I ensure all my tools work with JRuby. On Linux and OSX you can use either, on Windows just ignore "normal" Ruby and go for JRuby. Nokogiri is pain no matter what, but the only alternative is 10x slower XML parsing and you do not want that.
    Hello taw, thanks a lot that you mentioned Linux! Amazing tools from you! +rep

    I have "Ubuntu Linux 10.4" on my second PC and it worked immediately with Ruby/Nokogiri.

    For all Linux users here is the way to go:
    Spoiler Alert, click show to read: 

    - run your "Paket Management Utility"
    - search for "ruby" and mark it for installation
    - search for "nokogiri" and mark it for installation

    Or you can use the command line option in a terminal window:
    apt-get install ruby
    apt-get install nokogiri

    Finally I can look into the exported TSV files and start to mod.

  7. #7

    Default Re: Using Taws Tools On Windows

    Hello world!

    So already for this wonderful tutorial, so I was to walk up two fingers two times he told me:
    org / jruby / Ruby_kernel.java 1038 "in require ': no such file to load

    What to do?

  8. #8
    Inevitability won
    Patrician Citizen

    Join Date
    Mar 2010
    Posts
    9,594

    Default Re: Using Taws Tools On Windows

    Taw, is it a possibilty for you to use the Rubyscript2exe gem? I'v heard good things about that.

  9. #9

    Default Re: Using Taws Tools On Windows

    Mr .Mitch. You speak to me ?

  10. #10
    Artifex
    Patrician

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

    Default Re: Using Taws Tools On Windows

    Quote Originally Posted by .Mitch. View Post
    Taw, is it a possibilty for you to use the Rubyscript2exe gem? I'v heard good things about that.
    Does it work with JRuby? Otherwise no, as Windows Ruby fails with nokogiri.

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

    Join Date
    Oct 2009
    Location
    England
    Posts
    5,875

    Default Re: Using Taws Tools On Windows

    Quote Originally Posted by taw View Post
    Thanks.

    A few corrections:


    • It's a huge huge pain to install nokogiri with Windows Ruby properly. That's the main reason I ensure all my tools work with JRuby. On Linux and OSX you can use either, on Windows just ignore "normal" Ruby and go for JRuby. Nokogiri is pain no matter what, but the only alternative is 10x slower XML parsing and you do not want that.
    Seems simple enough to me? Or do you mean with ruby as opposed to Jruby. I made Jruby more prevelant than Ruby now anyway in the order.
    Quote Originally Posted by taw View Post

    • You need Python 3, Python 2 is too incompatible.
    [/QUOTE]
    Will Add.
    Last edited by The Hedge Knight; March 01, 2011 at 11:57 AM.

  12. #12
    Artifex
    Patrician

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

    Default Re: Using Taws Tools On Windows

    Quote Originally Posted by 'The Hedge Knight View Post
    Seems simple enough to me?
    You managed to have xml2esf or db_pack/db_unpack (programs which need nokogiri)
    working on Windows Ruby?

    Make a tutorial out of that, I never managed to do that.
    Everything else should work fine with Windows Ruby.

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

    Join Date
    Oct 2009
    Location
    England
    Posts
    5,875

    Default Re: Using Taws Tools On Windows

    Well jruby, yes i have never had a hitch. All it took was typing jgem install nokogiri --pre into a cmd promt which seemed pretty simple.

    Actually i cant remember, does one uninstall nokogiri before installing the beta?

    Try this those with problems

    jgem unistall nokogiri
    jgem install nokogiri --pre
    Last edited by The Hedge Knight; March 01, 2011 at 12:09 PM.

  14. #14
    Artifex
    Patrician

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

    Default Re: Using Taws Tools On Windows

    Ruby (get a windows installer and it should do it all for you) As mentioned before though this tutorial is using Jruby so commands may be slightly different for some things.
    This.

    I know it's theoretically possible to install nokogiri with Windows Ruby, but I never managed to do that.

    JRuby nokogiri is Java library with the same interface as original nokogiri (based on C++ libxml-something-something).
    If you do `jgem install nokogiri --pre' you'll only have nokogiri for JRuby not for Ruby.

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

    Join Date
    Oct 2009
    Location
    England
    Posts
    5,875

    Default Re: Using Taws Tools On Windows

    Yeah just realised how silly what i wrote looks, ill fix it to be clearer.

    Btw as requested in the other thread is there any chance of the unit variant unpacker being able to convert directorires rather than induvidual files as it quite fidly (though extremelly useful atm)
    Last edited by The Hedge Knight; March 01, 2011 at 12:32 PM.

  16. #16

    Default Re: Using Taws Tools On Windows

    Python finally given link and mandatory to convert files DB?

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

    Join Date
    Oct 2009
    Location
    England
    Posts
    5,875

    Default Re: Using Taws Tools On Windows

    No as stated thats only for the ui converter.

  18. #18

    Default Re: Using Taws Tools On Windows

    Ok thank you but when I get my data to convert a DB (like the example in the tutorial to convert a DB) it makes me java error 1038: (

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

    Join Date
    Oct 2009
    Location
    England
    Posts
    5,875

    Default Re: Using Taws Tools On Windows

    Well its nothing to do with python and not somthing i personally have experienced.

  20. #20

    Default Re: Using Taws Tools On Windows

    Ok thank you but I suggest you do? For I am lost unless you can make me a great service I'll be in sandstone (which is my mod ...)

Page 1 of 4 1234 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
  •