Debuting 10 years of Phoenix Wright - Ace Attorney Script Editor 0.2.1

Discussion in 'NDS - Tutorials' started by pinet, Oct 19, 2017.

  1. pinet

    pinet Member

    Feb 3, 2015
    Samba Land
    This simple tutorial aims to show you a step-by-step how to translate the texts inside the PWAA game,
    using the "PWSE 0.2-1" (by deufeufeu) and the "DsBuff" (by WB3000) tools to extract,
    edit, and reinsert these texts inside the game.

    (This tutorial is free to copy, share, modify and distribute.)

    Hold it!:

    This thread is a tutorial! If you already read it and want help on the translation project, here is the thread link:
    :arrow: More one Phoenix Wright Translation Project for DS [PT-BR]

    For this tutorial, before start, lets check the pre-requisites and download the software.

    [​IMG] Minimum System Requirements:

    - Microsoft Windows 98, Me, XP, 2000, 7 or better:
    - 300 MB disk space
    - 512 MB RAM (> 1GB recommended)

    [​IMG] Minimum Software Requirements:

    1. A Zip/Unzip program with support for 'zip', 'rar' and '7z' files
    - name: (any) 7-zip, Winzip, etc…
    - description: you will need it to unzip the programs below.
    - link:,
    - type: zip programs
    - size: may vary.

    2. Phoenix Wright Script Editor 0.2.1
    - name: PWSE_0.2-1_win32.rar (by deufeufeu)
    - description: a not so much intuitive program for NDS pwaa game.
    - link:
    - type: Script Editor to this game, for extract and re-insert text in ".bin" files.
    - size: - 5.6 MB

    3. A Pack/Unpack NDS tool.
    - name: (by WB3000)
    - description: compatible with old and new Windows version
    - link: dsbuff 0.61 BETA, alternative link: dsbuff 0.61 BETA
    - type: Utility tool for unpack/pack NDS ROM
    - size: ~750 KB

    4. The game:
    - name: 0127 - Phoenix Wright - Ace Attorney (U)(Legacy).7z
    - description: the english version of the game.
    - link: (not available here).
    - type: NDS compacted file.
    - size: ~34 MB

    5. A DS Emulator:
    - name: (any) DeSmume, No$GBA, iDeaS, etc...
    - description: a DS emulator of your preference
    - link:,, (etc.)
    - type: NDS emulator
    - size: ~1.5 MB to 10MB

    6. Phyton 2.7 (optional)
    - python-2.7.14.msi
    - the Program Language package, for debug or development
    - link:
    - size: ~20 MB

    7. Any simple text editor.

    Let's do it!

    [​IMG] Attentions
    a. The icon files and images showed in the example may vary between systems
    b. Follow the steps without jump any part. These are connected.

    Part 1 of 7: Preparing the enviroment:

    1.1. Create a folder:
    - for this tutorial, let's create in "C:\" a folder called "PwaaProject"
    - now create two sub-folders:
    - ScriptsBin (we will use it to save the text files in binary format)
    - ScriptsTxt (we will use it to save text files in readable text format)

    1.2. Prepare NDS rom:
    - Unzip the "0127 - Phoenix Wright - Ace Attorney (U)(Legacy).7z".
    - for this tutorial, rename the file to "pwaa.nds"
    - and move the "pwaa.nds" into "PwaaProject" folder.

    (the image above is showing the nds extract file)

    1.3. Prepare the Phoenix Wright Script Editor:
    - unzip the program PWSE_0.2-1_win32.rar into a PWSE_0.2-1 folder.
    - for this tutorial, move this folder into "PwaaProject"
    - the program is "pwse.exe". Do not open it yet!

    1.4. Prepare the DSBuff:
    - Unzip the program into a "DsBuff" folder
    - For this tutorial, move this folder into "PwaaProject"

    (the image above is showing the folders after this steps.)

    End of this part.

    Part 2 of 7: Extracting de pwaa.nds internal files:

    2.1. open "DsBuff" folder and execute the program "d s b u f f.exe"
    2.2. locate and open the rom "pwaa.nds"
    2.3. press the "UnPack" button.
    2.4. the rom files was unpacked on folder "C:\dsbuff\ NDS_UNPACK\"
    2.5. enter in the folder "C:\dsbuff\NDS_UNPACK\data"
    2.6. copy the "mes_all.bin" into "C:\dsbuff\" for backup reasons

    End of this part.

    Part 3 of 7: Extracting the pwaa bin's text dialogues from "mes_all.bin" file:

    3.1. open the folder "PWSE_0.2-1" and run the program "pwse.exe"
    3.2. in the dialog window, locate and select the file rom "pwaa.nds"
    (Obs. if the dialog window is not showed, close the program, locate and
    delete this two files "" and "config.pyc")
    3.3. select "Show advanced commands"
    3.4. select "Extract script archive to a folder"
    3.5. in the dialogue window, select the folder "C:\dsbuff\NDS_UNPACK\data"
    3.6. open the file "mes_all.bin"
    3.7. select the destination folder: "C:\PwaaProject\ScriptsBin"
    3.8. the program extract all script texts in this folder,
    with pattern "script-00.bin", "script-01.bin", "script-02.bin" and so on…
    End of this part

    Part 4 of 7: Converting Binnary Text Scripts into Human Readable Text Files:

    4.1. In the "pwse.exe" program, select "Show advanced commands"
    4.2. select "Convert binary script to text"
    4.3. in the dialogue window, select the folder "C:\PwaaProject\ScriptsBin"
    4.4. let's open the file "script-01.bin"
    4.5. select the destination folder: "C:\PwaaProject\ScriptsTxt"
    4.6. the program will convert "script-01.bin" into "script-01.txt".

    Obs.: when a file is not conversible, the program save a 0 byte .dec file

    End of this part.

    Part 5 of 7: Translating the text file to other language:

    Now you can translate the English text "script-01.txt" to another Latin or Roman
    compatible language, like Brazilian Portuguese (PT-BR).

    <bgcolor:769,8,31><shake:30,0><speed:2>Dammit!<wait:34> <speed:6>
    <bgcolor:769,8,31><shake:30,0><speed:2>Droga!!<wait:34> <speed:6>

    ...Why me?<wait:70><bgcolor:514,1,31><wait:15><nextpage_nobutton>
    ...Porque eu?<wait:70><bgcolor:514,1,31><wait:15><nextpage_nobutton>

    [​IMG] Tips:
    - the script supports Character Encoding, (for example, {384} = "-")
    - but, for our convenience in this tutorial, it's recommended you suppress the
    diacritical signs (accent acute, grave, cedilla etc.).
    - to start, try translate the words to the same length and space available in
    the sentence (max 30 chars lenght).
    - it's good respect the order of the lines, in this first moment, for not crash
    accidentally the game.

    End of this part.

    Part 6 of 7: Recompiling text file to binary file:

    6.1. Copy all txt translated files to the "C:\PwaaProject\ScriptsBin"
    6.2. if you want, move the old "bin" file, for backup.
    6.3. In the "pwse.exe" program, select "Show advanced commands"
    6.4. select "Make a script archive from a folder"
    6.5. in the dialogue window, select the folder "C:\PwaaProject\ScriptsBin"
    6.6. in the next window, select "C:\dsbuff\NDS_UNPACK\data" and "mes_all.bin"
    6.7. the program will convert all text scripts and save it on "mes_all.bin".

    End of this part.

    Part 7 of 7: Repack the NDS rom:

    (If "dsbuff" is already running, jump to 2.3.)
    2.1. open the program "d s b u f f.exe"
    2.2. locate the rom "pwaa.nds"
    2.3. press the "Pack" button.
    2.4. select the folder "C:\PwaaProject\". Choose other name, like "pwaa2.nds" and save.
    2.5. close "dsbuff".

    End of this part.

    Some Evidences:

    [​IMG] [​IMG] [​IMG] [​IMG]
    [​IMG] [​IMG] [​IMG] [​IMG]

    Any objection?

    Please, fell free to comment in this thread

    That's it.
    I hope this tutorial has been useful.
    My next desire is to find people who can translate the other episodes, because there are so many scripts to translate.
    I would like to thank everyone, and keep alive the hope of one day seeing this fantastic story being translated into all languages.
    Last edited by pinet, Oct 24, 2017
  2. pinet

    pinet Member

    Feb 3, 2015
    Samba Land
  3. Zense

    Zense GBAtemp Regular

    Apr 20, 2008
    *Python :)

    If I were confident enough in my linguistical capabilities, I'd give this a shot.

    Great tutorial! Even if the windows pics' theme make it seem very outdated.
  4. Jacklack3

    Jacklack3 ( ゚ヮ゚) buddie was here

    Oct 6, 2015
    In your basement Dick Size: 5 meters.
    I would plan a kidnapping for a Ace Attorney Editor which instead of fan-cases on fan-games, it'd be fan-cases using rom hacks!
  5. Mr Skinner

    Mr Skinner Member

    Jul 12, 2010
    Bananna Land.
    There are very few opportunities to be Brazilian in an online community and feel pride in the achievements of your compatriots. This is one of those rare opportunity to thank you, @pinet for the exceptional work done here.

    Feel proud of your own effort.
  6. MUDD_BR

    MUDD_BR GBAtemp Regular

    Nov 17, 2008
    Awesomewok, mate. If I haven't played this jewel years ago and if the others wasn't in my list... I'll certainly try sometime.