Home Risen Risen2 Forum English Russian

Register FAQ Calendar Today's Posts
Results 1 to 7 of 7
  1. #1 Reply With Quote
    Ritter Baltram's Avatar
    Join Date
    Jun 2006
    Posts
    1,032
    r2tab can turn Risen 2 .tab (found in strings.pak) and .csv files into each other.


    [05/14/2012] Update: New version.

    The .csv files use the Unicode character set (in the PC version of Risen 2) and tab stops as separators. They can be opened and edited in any text editor but it is more convenient to use programs like Microsoft Excel. Older Excel versions may have problems with saving UTF-16 .csv files. Changing the file extension from .csv to .txt before opening the file in Excel might help.

    Many thanks to NicoDE who documented the Risen 1 .tab format which is nearly the same as the Risen 2 .tab format!

    [Video tutorial]

    Example: (quests.tab)

    Baltram is offline Last edited by Baltram; 14.05.2012 at 18:13.

  2. #2 Reply With Quote
    Modderator  |Lorn|'s Avatar
    Join Date
    Aug 2007
    Location
    Gothic 3 - Editing
    Posts
    4,369
    Very nice. Already changed some strings Thanks!

    PS: It's pretty cool that you included im- and export functions, so there's no need to use 2 different tools like in Risen (1).
    |Lorn| is offline

  3. #3 Reply With Quote
    Rookie tehasut's Avatar
    Join Date
    May 2012
    Posts
    6
    Nice work, but it doesn't work with 4 files.
    When I repack the items.csv, hud3.csv, gui_prototype.csv and documents.csv, it says: "Missing record(s) at line x.
    (It seems the program can't handle the line breaks inside the cells.)
    tehasut is offline Last edited by tehasut; 24.05.2012 at 19:50.

  4. #4 Reply With Quote
    Research NicoDE's Avatar
    Join Date
    Dec 2004
    Posts
    6,604
    Quote Originally Posted by tehasut View Post
    Nice work, but it don't work with 4 files.
    Seems like r2tab...
    • ...does not escape special characters:
      The tabulator is used as separator, but is also used in the values. And not all CSV readers support multi-line values. The most compatible way would be escaping tabulators and line break characters (\t, \r, and \n) on export (and replacing them on import).
    • ...might not support Microsoft's way:
      Excel does not write empty columns at the end. The application has to add empty values if the row has missing values.


    ps: The double quote character is not (yet) used in values, but support might/should be implemented in r2tab.
    "Some components report an error/warning but you have decided to ignore them."
    NicoDE is offline Last edited by NicoDE; 14.05.2012 at 13:44.

  5. #5 Reply With Quote
    Ritter Baltram's Avatar
    Join Date
    Jun 2006
    Posts
    1,032
    Quote Originally Posted by tehasut View Post
    Nice work, but it don't work with 4 files.
    When I repack the items.csv, hud3.csv, gui_prototype.csv and documents.csv, it says: "Missing record(s) at line x.
    (It seems the program can't handle the line breaks inside the cells.)
    Quote Originally Posted by NicoDE View Post
    Seems like r2tab...
    • ...does not escape special characters:
      The tabulator is used as separator, but is also used in the values. And not all CSV readers support multi-line values. The most compatible way would be escaping tabulators and line break characters (\t, \r, and \n) on export (and replacing them on import).
    • ...might not support Microsoft's way:
      Excel does not write empty columns at the end. The application has to add empty values if the row has missing values.


    ps: The double quote character is not (yet) used in values, but support might/should be implemented in r2tab.
    Thanks for reporting! I uploaded a new version.

    Escaping of \r and \n characters (previously it was only \t) has been added aswell as support for missing columns (though at least Excel 2010 does write empty colums at the end).

    As for double quote characters I have no idea what the problem might be if there is any.
    Baltram is offline Last edited by Baltram; 14.05.2012 at 18:11.

  6. #6 Reply With Quote
    Rookie tehasut's Avatar
    Join Date
    May 2012
    Posts
    6
    Thanks for the new version, it's perfectly fine!
    tehasut is offline

  7. #7 Reply With Quote
    Research NicoDE's Avatar
    Join Date
    Dec 2004
    Posts
    6,604
    Quote Originally Posted by Baltram View Post
    As for double quote characters I have no idea what the problem might be if there is any.
    If the values include the separation character (tab in TSV, comma in CSV), line-break characters, or if the value starts and/or ends with white-space characters (normally ignored!) - they are quoted (double quote character). Some CSV/TSV quote all values by default. But to be able to include the quote character, it has doubled (e.g. a value with one double quote character would be stored as """").

    So much for the theory
    Personally I would not allow line-breaks in values, but would support writing/reading quoted values (on write only if the value starts/ends with white-space or if it contains doubled quote characters).
    "Some components report an error/warning but you have decided to ignore them."
    NicoDE is offline

Posting Permissions

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