Editing .arc Files
From GameBrew
These .arc
files are archive files containing multiple icons, images, backgrounds, layouts and animations. They consist of multiple folders where the timg
folder contains .bclim
files holding an image each. Since the same .bclim
image is used in multiple .arc
files I recommend creating a directory for editing .bclim
files and then automatically replace them and archive them to create edited .arc
files. Note that this is not true for all .arc
files. The blyt
folder contains .bclyt
files storing the layout which defines how the individual images are shown on screen. The anim
folder contains .bclan
files which hold the animations.
Prerequisites
You need:
Karameru
andKukkii
from Kuriimu- Switch Toolbox (Download) if you want to edit Layouts or Animations
- Translation Toolkit
Extract Archives
The first step is to make sure all .arc
files are located in every's language folder. For that we copy the original files and apply all patches (again).
- Repeat this for all
<LANG>
you want to edit (e.g.EN
)- Go to
DQM2-Translation/Layout_JA
and copy all files - Go to
DQM2-Translation/Layout_<LANG>
and paste - Go to
DQM2-Translation/NaviMap_JA
and copy all files - Go to
DQM2-Translation/NaviMap_<LANG>
and paste
- Go to
- Run
TranslationToolkit.exe
- Enter
AP
to apply all patches - Enter
y
to start the script - Wait until the process is finished
- Enter
Now you can extract all .arc
archives using Karameru
.
- Run
Karameru.exe
from the previously downloadedKuriimu
- Select
Batch Extract
from the toolbar (not menubar)- Navigate to the folder
DQM2-Translation/Layout_<LANG>
and clickOK
- when asked to search subdirectories answer
Yes
- when asked to search subdirectories answer
- Navigate to the folder
- Select
Batch Extract
from the toolbar- Navigate to the folder
DQM2-Translation/NaviMap_<LANG>
and clickOK
- when asked to search subdirectories answer
No
(this speeds up the process)
- when asked to search subdirectories answer
- Navigate to the folder
- Repeat this for all
<LANG>
you want to edit
Edit .bclim
Images
As said before I recommend editing the .bclim
files in a different folder.
- Create a folder
_bclim_<LANG>
for every<LANG>
you want to edit (e.g._bclim_EN
)
Now is the time to select the images you want to edit.
- Copy the images you want from
DQM2-Translation/Layout_JA/**/**/timg/
toDQM2-Translation/_bclim_<LANG>
- Copy the images you want from
DQM2-Translation/NaviMap_JA/**/timg/
toDQM2-Translation/_bclim_<LANG>
Extract the PNG images from the .bclim
files can be done as follows.
- Run
Kukkii.exe
from the previously downloadedKuriimu
- Select
Batch Export PNG
from the toolbar - Navigate to the folder
DQM2-Translation/_bclim_<LANG>
and clickOK
You can now edit the PNG images with an image editor of your choice. It has to support transparency.
I recommend checking out GIMP.
When you're done editing you now have to pack all PNG images inside their corresponding .bclim
files.
- Run
Kukkii.exe
- Select
Batch Import PNG
from the toolbar - Navigate to the folder
DQM2-Translation/_bclim_<LANG>
and clickOK
Edit .bclyt
Layouts
More about this file format can be found at: CLYT format
To view and edit a .bclyt
Layout file do the following.
- Run
Switch Toolbox
- Click
File > Open
and select the.bclyt
Layout file- Alternatively you can select an
.arc
file and select the.bclyt
file inside that archive. This has the advantage of being able to view some of the Images and Animations.
- Alternatively you can select an
- In the middle you can see all border boxes from images and texts, on the left is the file
Hierarchy
and theProperties
window - To change the position or size of any element
- Select the element in the
Hierarchy
on the left- Text elements with their corresponding window pane for maps are located in
RootPane > Null_Map > Nl_plc_name > ** > Win_plc_**
- Text elements with their corresponding window pane for maps are located in
- In the
Properties
window select the tabPane
and change the values inPaneTransform
- Select the element in the
- To change the text of a text box
- Select the text element located in
Quick Access > Text Boxes
- In the
Properties
window select the tabText Pane
and enter theText
- Select the text element located in
- After editing the file select
File > Save As
to save the Layout file
Note 1: If you changed the text you need to update the 2-byte value at offset 0x4E
and set it to the value of the 2-byte value at offset 0x4C
counted from the index of the beginning of a text pane with the header txt1
. This can be automated by the following Python code:
from os import walk from os.path import join, splitext for bclyt_file in [join(dp, f) for dp, _, fn in walk('.') for f in [n for n in fn if splitext(n)[1] == '.bclyt']]: with open(bclyt_file, 'rb') as file: data = file.read() txt1_starts = [i for i in range(len(data)) if data[i:i+4] == b'txt1'] if not txt1_starts: continue txt1_texts = [data[s+0x74:(data.find(b'\x00'*2, s+0x74)+1)//2*2].decode('UTF-16') for s in txt1_starts] print(bclyt_file) for s, text in zip(txt1_starts, txt1_texts): size = data[s+0x4C:s+0x4E] data = data[:s+0x4E] + size + data[s+0x50:] print(s, int.from_bytes(size, 'little'), text) with open(bclyt_file, 'wb') as file: file.write(data) print('Saved.') print() input('Press enter to exit...')
Note 2: If you added images or want to change the order of appearance in case of an animation you may need to use a hex editor and change some bytes. In the hex editor you will see the names of the individual images. The value at offset 0x34
counted from the beginning of the image name holds information about the image index. You may need to mix those values up.
Edit .bclan
Animations
To view and edit a .bclan
Animation file do the following.
- Run
Switch Toolbox
- Click
File > Open
and select the.bclan
Animation file- Alternatively you can select an
.arc
file and select the.bclan
file inside that archive. This has the advantage of being able to view some of the Images and see Animations in action.
- Alternatively you can select an
- In the
Animation Hierarchy
on the left select the animation file - In the newly opened window you can see the hierarchy on the left and the individual attributes of each node on the right
**.bclan > Tag Info
stores the amount of frames**.bclan > Animation Info > **
store the individual animation actions- By right clicking on a node you can add new nodes by clicking
Add Animation Group/Target/Keyframe
- After editing the file right click the Animation file in the
Animation Hierarchy
and chooseExport
to save the Animation file
Archive Files
Now you have to replace all files from the .arc
files with the edited files.
- Run
TranslationToolkit.exe
- Enter
RF
to replace files- Enter
_bclim_<LANG>
as the source folder - Enter
Layout_<LANG>
as the destination folder - Enter
y
to start the script
- Enter
- Enter
RF
to replace files- Enter
_bclim_<LANG>
as the source folder - Enter
NaviMap_<LANG>
as the destination folder - Enter
y
to start the script
- Enter
- Repeat this for every
<LANG>
you edited
Once all files are replaced it is time to update the .arc
archives.
- Run
Karameru.exe
- Select
Batch Archive
from the toolbar- Navigate to the folder
DQM2-Translation/Layout_<LANG>
and clickOK
- when asked to search subdirectoreis answer
Yes
- when asked to search subdirectoreis answer
- Navigate to the folder
- Select
Batch Archive
from the toolbar- Navigate to the folder
DQM2-Translation/NaviMap_<LANG>
and clickOK
- when asked to search subdirectoreis answer
No
(this speeds up the process)
- when asked to search subdirectoreis answer
- Navigate to the folder
- Repeat this for all
<LANG>
you want to edit
You can now use Translation Toolkit
to send the edited files to your 3DS or create patches for contributing to this project. More information on that can be found in Developing Translations.