Page 2 of 3

Re: NieR Replicant ver.1.22 .arc

Posted: Tue Apr 27, 2021 8:04 am
by vvampii
DaniZaya wrote: Tue Apr 27, 2021 7:49 am
Ekey wrote: Mon Apr 26, 2021 1:44 pm https://github.com/yretenai/kaine
That's great! Works perfectly fine! Any idea about when the meshes can be exportable?
from discord server - its being worked on at the moment

Re: NieR Replicant ver.1.22 .arc

Posted: Tue Apr 27, 2021 11:34 am
by WoefulWolf
DaniZaya wrote: Tue Apr 27, 2021 7:49 am
Ekey wrote: Mon Apr 26, 2021 1:44 pm https://github.com/yretenai/kaine
That's great! Works perfectly fine! Any idea about when the meshes can be exportable?
Currently working on reversing meshes, but fresh eyes can always help! Here's the templates we've been working on:
https://github.com/WoefulWolf/replicant ... templates/
and like rotteneyed mentioned, we work from the NieR:Modding Discord server.

Re: NieR Replicant ver.1.22 .arc

Posted: Tue Apr 27, 2021 2:20 pm
by DaniKH
Currently working on reversing meshes, but fresh eyes can always help! Here's the templates we've been working on:
https://github.com/WoefulWolf/replicant ... templates/
and like rotteneyed mentioned, we work from the NieR:Modding Discord server.
[/quote]

Wheres that Discord Server?? Im iterested

Re: NieR Replicant ver.1.22 .arc

Posted: Tue Apr 27, 2021 2:34 pm
by WoefulWolf
DaniZaya wrote: Tue Apr 27, 2021 2:20 pm Wheres that Discord Server?? Im iterested
I hope Discord server invite links aren't against the rules: https://discord.gg/QBZZZvTeRa

Re: NieR Replicant ver.1.22 .arc

Posted: Tue Apr 27, 2021 3:05 pm
by LinkOFF
My updated suggestion about table in info.arc:
4 - unknown (grow up with each cycle)
4 - name offset
4 - offset*16
4 - compressed chunk length
4 - uncompressed length
4 - if > 0 uncompressed data length, previuos value is PACK header length (with all information besides data)
1 - arc index (0 - lang1.arc, 1 - lang2.arc, 2 - common.arc, 3 - param.arc, 4 - init.arc, 5 - stream.arc)
1 - flag (compression 0 or 1; common.arc compressed exactly like info.arc and always have flag 0)
2 - padding (40 40)

Anyone have any idea what the first value is?

Re: NieR Replicant ver.1.22 .arc

Posted: Tue Apr 27, 2021 8:18 pm
by infogram
Something interesting, game seems to try loading a non-existent "directory.arc" file, the same code that loads info.arc (@ 1408EBAE0) also tries loading that too, wonder if it might be something for loading loose files outside of the main arcs.

Seems they use similar code for reading it as BXON like info.arc - in info.arc's case it checks for 0x276C7934 ID (probably hash of 'tpArchiveFileParam'), while directory.arc is looking for 0x1B7BB062, no idea what struct name that's meant to be though.

Procmon also shows it trying to load some loose bnk files too, I guess maybe movies could be replaced without needing repack, didn't see anything like it for sound files though sadly.

E:
LinkOFF wrote: Tue Apr 27, 2021 3:05 pm My updated suggestion about table in info.arc:
4 - unknown (grow up with each cycle)

Anyone have any idea what the first value is?
My guess is hash, you can compare the value of that in entries with very similar filenames (eg. the first mot_dyw010/mot_dyw011 entries, or msh_spl_visivle003_1, msh_spl_visivle003_2, msh_spl_visivle003_3) the unknown value only increases by 1 on each, but it's much different when entry names aren't similar, maybe gives a clue about the hasher they use.

E2: actually, you were right about the value increasing with every entry too, eg. the last entry has something like 0xFFFF85E2 as the value. Very strange, really can't explain that stuff about similar names still only increasing by 1. Maybe will need to look into info.arc loading code (nasty stuff tho ;_;)

Re: NieR Replicant ver.1.22 .arc

Posted: Tue Apr 27, 2021 8:56 pm
by rhadamants
Has anyone figured out which file the game texts are in?

I extract all the files using the emil.exe tool, but I have not found anything like Lang, Language, Localization, etc.

The lang_en directory has 1kb files.

Re: NieR Replicant ver.1.22 .arc

Posted: Tue Apr 27, 2021 9:14 pm
by LinkOFF
rhadamants wrote: Tue Apr 27, 2021 8:56 pm Has anyone figured out which file the game texts are in?

I extract all the files using the emil.exe tool, but I have not found anything like Lang, Language, Localization, etc.

The lang_en directory has 1kb files.
param\snow\text if you use my tool on previous page.

Re: NieR Replicant ver.1.22 .arc

Posted: Tue Apr 27, 2021 10:03 pm
by LinkOFF
infogram wrote: Tue Apr 27, 2021 8:18 pm My guess is hash, you can compare the value of that in entries with very similar filenames (eg. the first mot_dyw010/mot_dyw011 entries, or msh_spl_visivle003_1, msh_spl_visivle003_2, msh_spl_visivle003_3) the unknown value only increases by 1 on each, but it's much different when entry names aren't similar, maybe gives a clue about the hasher they use.
I tried to reimport modified data but game wont start if compressed chunk changes even by one byte (i added it to lang1.arc). But It works with original compressed chunks. I tried to rewrite offset and size in info.arc.

Re: NieR Replicant ver.1.22 .arc

Posted: Wed Apr 28, 2021 5:19 am
by rhadamants
LinkOFF wrote: Tue Apr 27, 2021 9:14 pm
rhadamants wrote: Tue Apr 27, 2021 8:56 pm Has anyone figured out which file the game texts are in?

I extract all the files using the emil.exe tool, but I have not found anything like Lang, Language, Localization, etc.

The lang_en directory has 1kb files.
param\snow\text if you use my tool on previous page.
It's appear to be in the same format as the PS3 version.
Is there any parse for these texts?

Re: NieR Replicant ver.1.22 .arc

Posted: Wed Apr 28, 2021 8:33 pm
by lehieugch68
rhadamants wrote: Wed Apr 28, 2021 5:19 am It's appear to be in the same format as the PS3 version.
Is there any parse for these texts?
Can you upload a sample file?

Re: NieR Replicant ver.1.22 .arc

Posted: Thu Apr 29, 2021 1:31 pm
by infogram
Petra on the discord found a way to load up loose files without needing to repack to arc, maybe pointless to repost since anyone interested is probably on there already, but is always good to keep info stored somewhere searchable outside of discord though:
Loading (pseudo) loose files for NieR Replicant ver.1.22474487139

Requirement:
https://github.com/yretenai/kaine/releases (emil.exe specifically)

-Extract all .arc files using emil.exe to a temp destination of your choice. You should end up with a folder that contains 15 folders and a single .bxon file. (maybe more if you unpack DLC)

-Copy the contents of \steamapps\common\NieR Replicant ver.1.22474487139\data\sound TO <<your temp extracted path>>\sound

-Remove the .xap file extension for all extracted files. Do not do what I did and do each one-by-one manually.

Batch remove all .xap file extensions

-Windows command prompt in the folder that contains the 15 folders you extracted and run the following command and grab lunch/coffee/whatever. Will take a good 20-30 min. Maybe @Yretenai can add a flag to ignore file extensions on export if the idea pans out?

forfiles /S /M *.xap /C "cmd /c rename @file @fname"

-Create the following folder structure on the same drive Nier Replicant is installed:

<<Steam Install>>
-steamapps
-common
-build_assets
-rom
-pc

-Copy/Paste/Cut the 15 folder and single .bxon folder into the pc folder created above

-Rename your current \steamapps\common\NieR Replicant ver.1.22474487139\data folder to anything other than data

-Launch the game via Steam as per usual.

YMMV, but my experience has been no different playing this way thus far.

Edit 1: Currently getting a black screen in intro and cut-scenes. Likely a missed or additional export/extract and will look into tomorrow. Audio files needed some additional work so these needing that as well would not be surprising.

Edit 2: Confirmed \data\movie\*.arc did not extract .
Workaround - copy contents of NieR Replicant ver.1.22474487139\data\movie TO \steamapps\common\build_assets\rom\pc\movie
Sounds like game checks for "..\build_assets\rom\pc\" folder, if it exists then it'll load files from there instead of from *.arc.
Would be nice if there was a way to let the game load *.arc but override with loose files if they exist, so full arc extracting wouldn't be needed. I've done something like that with UE4 on the past, probably no chance I could figure that with this Denuvo-mess of an EXE though :(

Maybe it'd be interesting to see if load times change at all with this?

Re: NieR Replicant ver.1.22 .arc

Posted: Sun May 02, 2021 4:38 pm
by rhadamants
lehieugch68 wrote: Wed Apr 28, 2021 8:33 pm
rhadamants wrote: Wed Apr 28, 2021 5:19 am It's appear to be in the same format as the PS3 version.
Is there any parse for these texts?
Can you upload a sample file?
Nier_Replicant_BLJM60223.rar

Re: NieR Replicant ver.1.22 .arc

Posted: Mon May 03, 2021 2:39 am
by lehieugch68
rhadamants wrote: Sun May 02, 2021 4:38 pm
lehieugch68 wrote: Wed Apr 28, 2021 8:33 pm
rhadamants wrote: Wed Apr 28, 2021 5:19 am It's appear to be in the same format as the PS3 version.
Is there any parse for these texts?
Can you upload a sample file?
Nier_Replicant_BLJM60223.rar
If I'm not mistaken, are these tab-delimited values (0x09) plain text files?

Re: NieR Replicant ver.1.22 .arc

Posted: Mon May 03, 2021 4:15 am
by rhadamants
lehieugch68 wrote: Wed Apr 28, 2021 8:33 pm
If I'm not mistaken, are these tab-delimited (0x09) plain text files?
It's ps3 jpn and en patch files.