Seite 1 von 3 123 Letzte »
Ergebnis 1 bis 20 von 49
  1. #1 Zitieren
    research Avatar von NicoDE
    Registriert seit
    Dec 2004
    Beiträge
    7.409
    lianzifu (连字符) has been developed for Risen 3, but the binary string table format hasn't been changed for ELEX.

    Main thread: [release] Risen 3 string table [un]packer (lianzifu)

    Please use this thread for ELEX-related discussions.

    ELEX-specific issues:
    • PB changed the STB version with a patch (from 6 to 7)
      (the BIN isn't accepted by the game if the version doesn't match)
    • there is no string identifier hash map for ELEX yet
      (ask Piranha Bytes to create them with lianzifu or create your own)
    • there were some damaged strings in the original BINs
      (has been fixed by PB with one of the latest patches)
    "Unter diesen schwierigen Umständen bin ich mir sicher, daß diese guten Menschen meinen augenblicklichen Bedarf an deren Gold verstehen werden." -- Connor
    NicoDE ist offline Geändert von NicoDE (01.02.2018 um 11:54 Uhr)

  2. #2 Zitieren
    research Avatar von NicoDE
    Registriert seit
    Dec 2004
    Beiträge
    7.409
    With the current patch (2955) the string tables are split into several files (still STB file format with version 7):

    data/compiled/localization/de.str German(_Text|_StageDir)
    data/compiled/localization/en.str English(_Text|_StageDir)
    data/compiled/localization/fr.str French(_Text|_StageDir)
    data/compiled/localization/it.str Italian(_Text|_StageDir)
    data/compiled/localization/sp.str Spanish(_Text|_StageDir)
    data/compiled/localization/pl.str Polish(_Text|_StageDir)
    data/compiled/localization/ru.str Russian(_Text|_StageDir)
    data/compiled/localization/cz.str Czech(_Text|_StageDir)
    data/compiled/localization/ch.str Chinese(_Text|_StageDir)
    data/compiled/localization/kor.str Korean(_Text|_StageDir)

    It might make sense to add an optional column filter to lianzifu's --save-bin command...
    "Unter diesen schwierigen Umständen bin ich mir sicher, daß diese guten Menschen meinen augenblicklichen Bedarf an deren Gold verstehen werden." -- Connor
    NicoDE ist offline Geändert von NicoDE (07.02.2018 um 16:14 Uhr)

  3. #3 Zitieren
    research Avatar von NicoDE
    Registriert seit
    Dec 2004
    Beiträge
    7.409
    Zitat Zitat von NicoDE Beitrag anzeigen
    It might make sense to add an optional column filter to lianzifu's --save-bin command...
    done, has been added in version 2.1
    "Unter diesen schwierigen Umständen bin ich mir sicher, daß diese guten Menschen meinen augenblicklichen Bedarf an deren Gold verstehen werden." -- Connor
    NicoDE ist offline

  4. #4 Zitieren
    research Avatar von NicoDE
    Registriert seit
    Dec 2004
    Beiträge
    7.409
    Example script (lianzifu-unpack.elex.cmd) to unpack the current string tables:
    Code:
    @ECHO OFF
    VERIFY OTHER 2>NUL
    SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
    IF "%ERRORLEVEL%"=="0" GOTO BEGIN
    ECHO.
    ECHO This script requires command extensions and
    ECHO delayed environment variable expansion [NT].
    ECHO.
    IF NOT "%1"=="--no-prompt" PAUSE
    EXIT
    :BEGIN
    REM 'run as admin' and UNC paths require manually switching into the directory
    PUSHD "%~dp0"
    
    SET LIANZIFU_ARGS=--read-ini "data/ini/loc.ini"
    REM load id name map files if present
    FOR %%B IN ("%~dpn0*.csv") DO (
      ECHO # found idmap file ^(%%~nxB^)
      SET LIANZIFU_ARGS=!LIANZIFU_ARGS! --read-map "%%~nxB"
    )
    REM read (old) full string table if present
    REM (to include Korean strings if kor.str is missing)
    FOR %%B IN (data/compiled/localization/?_strings.bin) DO (
      ECHO # found full table ^(data/compiled/localization/%%~nxB^)
      SET LIANZIFU_ARGS=!LIANZIFU_ARGS! --read-bin "data/compiled/localization/%%~nxB"
    )
    REM read (new) language specific string tables if present
    FOR %%L IN (de en fr it sp pl ru cz ch kor) DO (
      IF EXIST "data/compiled/localization/%%L.str" (
        ECHO # found lang table ^(data/compiled/localization/%%L.str^)
        SET LIANZIFU_ARGS=!LIANZIFU_ARGS! --read-bin "data/compiled/localization/%%L.str"
      )
    )
    
    IF NOT "%1"=="--no-prompt" (
      ECHO.
      ECHO Existing data/raw/strings/*.csv will be overridden!
      ECHO -----  press [Ctrl+C] to cancel this script  -----
      ECHO.
      PAUSE
    )
    
    ECHO running lianzifu...
    lianzifu.exe %LIANZIFU_ARGS% --save-csv --exit 1> "%~dpn0.log" 2>&1
    
    SET /A EXITCODE="%ERRORLEVEL%"
    IF NOT "%EXITCODE%"=="0" (
      TYPE "%~dpn0.log"
      IF NOT "%1"=="--no-prompt" PAUSE
    )
    POPD
    ENDLOCAL && EXIT /B %EXITCODE%
    Without a map file (lianzifu-unpack.elex.csv) all the strings will be in the data/raw/strings/strings.csv
    "Unter diesen schwierigen Umständen bin ich mir sicher, daß diese guten Menschen meinen augenblicklichen Bedarf an deren Gold verstehen werden." -- Connor
    NicoDE ist offline Geändert von NicoDE (13.02.2018 um 21:22 Uhr) Grund: support multiple idmap files

  5. #5 Zitieren
    research Avatar von NicoDE
    Registriert seit
    Dec 2004
    Beiträge
    7.409
    Attached you'll find string identifier map files that include two-thirds of the current x64 release (the batch script from the previous post is also included).

    lianzifu-unpack.elex.zip

    Put all the files and the lianzifu.exe in the root directory of the game, extract the BIN and/or all STR into data/compiled/localization and run the lianzifu-unpack.elex.cmd .

    Well, two-thirds is better that nothing. If you want a complete map, you'll have to ask PB (they could run lianzifu --read-ini data/ini/loc.ini --read-csv --save-map lianzifu-unpack.elex.[platform].csv for every platform).

    ps: My map files contain more information than required (everything after the first | is ignored). To support later merging I included the hash value and the source file, where the string has been found.
    NicoDE ist offline Geändert von NicoDE (22.06.2018 um 10:57 Uhr)

  6. #6 Zitieren
    Lehrling
    Registriert seit
    Jun 2011
    Beiträge
    38
    I started to figure out in this, extracted strings to csv, & managed to write a cmd file to put it back to the bin. It worked in game, but I have a few questions about it, to be shoore everything is okey.

    1) As I understand, everything which not present in map csv files, goes to strings.csv.
    This file has a lot of empty lines with addres. Is it normal?

    2) Order of text fields is different from the map csv. Mostly it just turned upside down. It makes uncomfortable to work with it, especially with dialogs. Could it be fixed somehow?

    3) Here is my cmd script, is everything okey in it?

    Spoiler:(zum lesen bitte Text markieren)
    @ECHO OFF
    ECHO Packing Elex (Windows 64-bit) string table...

    CD /D "%~dp0"
    lianzifu.exe ^
    --read-ini "data/ini/loc.ini" ^
    --read-csv ^
    --save-bin x64 7 "data/compiled/localization/ru.str" ^
    --save-map "#%~n0.csv" ^
    --exit 1> "%~dpn0.log" 2>&1

    IF ERRORLEVEL 1 (
    TYPE "%~dpn0.log"
    PAUSE
    )

    4) After pack string back to the bin, it's size is different from the original bin:
    1.45 mb vs 1.55 (org). That part troubles me. Although the game works fine with it, I fear that something may be missed or assemble not properly. I'll put here an archive with this files & will be wait for your opinion.
    elex_ru_loc.rar
    STARK1LLER ist offline Geändert von STARK1LLER (20.06.2018 um 18:43 Uhr)

  7. #7 Zitieren
    research Avatar von NicoDE
    Registriert seit
    Dec 2004
    Beiträge
    7.409
    Zitat Zitat von STARK1LLER Beitrag anzeigen
    1) As I understand, everything which not present in map csv files, goes to strings.csv.
    They are added to the first entry in the loc.ini.

    For most users this is
    Code:
    [default]
    prefix=default
    csv=#G3:/Data/Raw/Strings/strings.csv
    bin=#G3:/Data/Compiled/Strings/strings.tab
    During testing I used:
    Code:
    [unknown]
    prefix=unknown
    csv=#G3:/Data/Raw/Strings/unknown.csv
    bin=#G3:/Data/Compiled/Strings/unknown.tab
    You are completely free to organize your CSVs. In the end the prefix doesn't matter for the game, because all CSV entries are merged into one big table with identifier hashes as rows and the language(s) as columns.

    The map file feature is only present to restore the identifier strings from the hashes in the compiled BIN files.

    Zitat Zitat von STARK1LLER Beitrag anzeigen
    This file has a lot of empty lines with addres. Is it normal?
    Yes, there are a lot of empty values in the table. That's normal and expected.

    Zitat Zitat von STARK1LLER Beitrag anzeigen
    2) Order of text fields is different from the map csv.
    As mentioned above, the map files are only of interest for unpacking compiled BINs.
    (usually you unpack the original BINs once and start working with the CSVs, and later to track the changes in the official patches - well, I don't expect that many in the future...)

    The identifier hashes in the BINs have to be stored in descending order. There is no information left from which CSV the entry was read (in fact, for multi-language BINs the values for one identifier could be read from different CSVs).
    I don't want to change the order on unpacking or map file export, because it would make it harder to track the changes (I recommend using a version control system like Subversion, Git, ...).

    Zitat Zitat von STARK1LLER Beitrag anzeigen
    3) Here is my cmd script, is everything okey in it?
    The script is fine.

    But you can skip the map file export (you already have the CSVs with the identifiers - however, a map file would be useful for other users if you introduce new identifiers and want to share it with the community ).

    Since you're creating a single language BIN, you might add a column filter for the --save-bin. Add 9 (the current default compression level) and "Russian_Text" (AFAIK the game doesn't use the *_StageDir columns - the default is "*_Text;*_StageDir").

    Zitat Zitat von STARK1LLER Beitrag anzeigen
    4) After pack string back to the bin, it's size is different from the original bin:
    That's fine
    I implemented several compression methods in lianzifu. The current default compression level is 9 (best), which usually results in a better compression ration than the method that PB used. The PB-like compression method is currently selected with level 4. However, to get the same out, you have to have the same CSV files in the same order as PB (with this method the encoding dictionary is full after 25% of the data and the following entries have to be encoded with this dictionary).

    I'm working on an even better compression method, but don't expect a public release soon (currently it's too slow and I'm on vacation for several weeks).
    "Unter diesen schwierigen Umständen bin ich mir sicher, daß diese guten Menschen meinen augenblicklichen Bedarf an deren Gold verstehen werden." -- Connor
    NicoDE ist offline Geändert von NicoDE (21.06.2018 um 10:12 Uhr)

  8. #8 Zitieren
    Lehrling
    Registriert seit
    Jun 2011
    Beiträge
    38
    Thanks for the reply. After my previous post, I started to fix some localization errors. It works fine.
    I wonder how to add new text variables properly? As I understood, game uses text line addresses to identify them. And the most properer way is to declare new csv at the end of ini? For example:
    Spoiler:(zum lesen bitte Text markieren)
    [new]
    prefix=new
    csv=#G3:/Data/Raw/Strings/new.csv
    bin=#G3:/Data/Compiled/Strings/new.tab

    Then add new text variables to that csv file. And when it'll be pack to the bin, it should be at the end, and do not interfere with the rest data.
    How much memory is available for this?
    STARK1LLER ist offline

  9. #9 Zitieren
    research Avatar von NicoDE
    Registriert seit
    Dec 2004
    Beiträge
    7.409
    Zitat Zitat von STARK1LLER Beitrag anzeigen
    I wonder how to add new text variables properly?
    You're free to put them everywhere. Of course it makes sense to create a my_mod.csv for your new strings.
    The separation into different CSV files just helps finding things.
    You could use a single CSV with all strings and all languages if you like.
    For the game it doesn't matter: It loads the column for the selected language from the BIN on start, and when a localized string is requested, the hash of the identifier is calculated, and the value for the hash is read.
    "Unter diesen schwierigen Umständen bin ich mir sicher, daß diese guten Menschen meinen augenblicklichen Bedarf an deren Gold verstehen werden." -- Connor
    NicoDE ist offline

  10. #10 Zitieren
    Lehrling
    Registriert seit
    Jun 2011
    Beiträge
    38
    So it's a hash of a variable. I thought it some king of an address.
    So knowing of the hash algorithm may help to restore missing string variable names?
    STARK1LLER ist offline

  11. #11 Zitieren
    research Avatar von NicoDE
    Registriert seit
    Dec 2004
    Beiträge
    7.409
    Zitat Zitat von STARK1LLER Beitrag anzeigen
    So it's a hash of a variable. I thought it some king of an address.
    So knowing of the hash algorithm may help to restore missing string variable names?
    It's the DJB2 hash of the lower-cased string identifier (first column in the CSV).

    Have a look at post #5.
    Extract the latest BIN and all the latest STRs and run the script. This will create CSVs with all languages (and many hashes are resolved to identifier strings). The German_StageDir and English_StageDir might give you additional hints what the string is used for. Since all languages are included, you should specify the filter Russian_Text for the --save-bin command when creating the ru.str.
    "Unter diesen schwierigen Umständen bin ich mir sicher, daß diese guten Menschen meinen augenblicklichen Bedarf an deren Gold verstehen werden." -- Connor
    NicoDE ist offline Geändert von NicoDE (21.06.2018 um 19:07 Uhr)

  12. #12 Zitieren
    Ranger Avatar von InnerMoon
    Registriert seit
    Feb 2008
    Beiträge
    194
    Hello there.

    I've managed to modify (and enhance) the Spanish text of the game (I've been fixing a lot of errors and things that were not translated correctly). Howeve I have a problem:

    I tried to fix the subtitles of the intro video but the changes I made do not work. When I start a new game the subtitles of the intro video are still the vanilla ones (not the ones I change in the mod).

    How can I fix this?
    InnerMoon ist offline

  13. #13 Zitieren
    Lehrling
    Registriert seit
    Nov 2017
    Beiträge
    47
    Zitat Zitat von InnerMoon Beitrag anzeigen
    Hello there.

    I've managed to modify (and enhance) the Spanish text of the game (I've been fixing a lot of errors and things that were not translated correctly). Howeve I have a problem:

    I tried to fix the subtitles of the intro video but the changes I made do not work. When I start a new game the subtitles of the intro video are still the vanilla ones (not the ones I change in the mod).

    How can I fix this?
    Здравствуйте..
    Для того чтобы изменить субтитры в интро видео вам необходимо изменить их в следующем файле prologue.spanish.srt расположенном по следующему пути Elex\data\extern\video. Их можно изменить с помощью простого блокнота.

    Yandex-Translation: Hello there.In order to change the subtitles in the Intro video you need to change them in the following file prologue.spanish.srt located on the following path Elex\data\extern\video.
    They can be changed with a simple Notepad.
    Asloner ist offline

  14. #14 Zitieren
    Ranger Avatar von InnerMoon
    Registriert seit
    Feb 2008
    Beiträge
    194
    Man, I love you. Thanks.
    InnerMoon ist offline

  15. #15 Zitieren
    Abenteurer
    Registriert seit
    Jul 2020
    Beiträge
    71
    can someone tell me how to pack the changed csv files back to the game?
    DarthNihilus ist offline

  16. #16 Zitieren
    General Avatar von tombom81
    Registriert seit
    Jun 2015
    Beiträge
    3.129
    Use the cmd file here:
    https://forum.worldofplayers.de/foru...1#post25856902

    (I used one different line, though: )
    --save-bin x64 7 "#X64:/data/compiled/localization/w_strings.bin" ^

    This post is useful, too.
    https://forum.worldofplayers.de/foru...1#post25857507

    (Maybe read the whole thread again?)
    "in der Erkundung dieser weiten und wunderbaren Welt" (post #70, höre link unten)
    TAS for Elex 2 at ELEX II Nexus - Mods and Community (nexusmods.com)
    Umsturz bei den Morkons: best PB quest ever!
    "Hört mir bloß auf mit "Stormson".
    "In Toussaint wird schon für kleinere Schmähungen als diese Satisfaktion verlangt."
    Genug der "Blumensträuße". Ich WILL MadBob! Beugt die Realität!
    tombom81 ist offline

  17. #17 Zitieren
    Abenteurer
    Registriert seit
    Jul 2020
    Beiträge
    71
    ok , i packed it, now i have a question about the new lines. how do i create a hash for a new line? can i simply write some unique value there?
    DarthNihilus ist offline

  18. #18 Zitieren
    General Avatar von tombom81
    Registriert seit
    Jun 2015
    Beiträge
    3.129
    Zitat Zitat von DarthNihilus Beitrag anzeigen
    ok , i packed it, now i have a question about the new lines. how do i create a hash for a new line? can i simply write some unique value there?
    Guess you're asking for strings.csv, do you?
    lianzifu uses a djb2 hashing formula, so you don't need to care in case you provide
    your own gCInfoLocString strings (with preceeding "INFO_").

    Example for original one:
    gCInfoLocString INFO_PANKRATZI7_00005699 is automatically converted to a hash (0x10115597) (but lower case: info_pankratzi7_00005699 is used, afaics)

    The hash can be found in w_strings.bin (97551110).
    "in der Erkundung dieser weiten und wunderbaren Welt" (post #70, höre link unten)
    TAS for Elex 2 at ELEX II Nexus - Mods and Community (nexusmods.com)
    Umsturz bei den Morkons: best PB quest ever!
    "Hört mir bloß auf mit "Stormson".
    "In Toussaint wird schon für kleinere Schmähungen als diese Satisfaktion verlangt."
    Genug der "Blumensträuße". Ich WILL MadBob! Beugt die Realität!
    tombom81 ist offline Geändert von tombom81 (11.08.2020 um 10:48 Uhr)

  19. #19 Zitieren
    Abenteurer
    Registriert seit
    Jul 2020
    Beiträge
    71
    *bumping the head into the table*
    why why why my dialog strings stopped showing ingame?
    DarthNihilus ist offline

  20. #20 Zitieren
    General Avatar von tombom81
    Registriert seit
    Jun 2015
    Beiträge
    3.129
    Which language? "Russian" worked for you, didn't it?
    Might be possible that en.str works with the english ELEX version only.

    (For me new (english) dialogues are working again. Had to rename w_strings.bin to en.str, as simple as this.)

    (btw: having two paks with the same modded file/different contents was often causing errors for me.)
    "in der Erkundung dieser weiten und wunderbaren Welt" (post #70, höre link unten)
    TAS for Elex 2 at ELEX II Nexus - Mods and Community (nexusmods.com)
    Umsturz bei den Morkons: best PB quest ever!
    "Hört mir bloß auf mit "Stormson".
    "In Toussaint wird schon für kleinere Schmähungen als diese Satisfaktion verlangt."
    Genug der "Blumensträuße". Ich WILL MadBob! Beugt die Realität!
    tombom81 ist offline

Seite 1 von 3 123 Letzte »

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •