Open ioritree opened 3 years ago
This is due to unimplemented compression format (1). To resolve this, one should implement the format here https://github.com/wwylele/mhrice/blob/cb0ab6a40890e753201253a8cecc56150437ddaa/src/pak.rs#L110-L125
According to other information online, the format 1 is deflate (see QuickBMS comtype deflate
)
This is due to unimplemented compression format (1). To resolve this, one should implement the format here
https://github.com/wwylele/mhrice/blob/cb0ab6a40890e753201253a8cecc56150437ddaa/src/pak.rs#L110-L125
According to other information online, the format 1 is deflate (see QuickBMS
comtype deflate
)
謝謝,我試著增加"1" 於 pak.rs 但是編譯不了 use compress::flate; use std::fs::File; use std::path::Path; use std::io::Read;
.
.
1 => {
let stream = file.by_ref().take(len_compressed);
let mut decompressed = Vec::new();
flate::Decoder::new(stream).read_to_end(&mut decompressed);
if u64::try_from(decompressed.len()).unwrap() != len {
bail!("Expected size {}, actual size {}", len, decompressed.len());
}
Ok(decompressed)
}
Not sure what you mean. That code compiles on my end. Also the first rule of problem reporting: could you paste the error message?
I pushed your code in https://github.com/wwylele/mhrice/commit/2486fd954eb0973c9992563f29f011788afef752 (Thanks!) could you test if it works?
Not sure what you mean. That code compiles on my end. Also the first rule of problem reporting: could you paste the error message?
--> src\pak.rs:11:5 | 7 | use std::io::{Read, Seek, SeekFrom}; | ---- previous import of the trait Read here
...
11 |
use std::io::Read; | ^^^^^^^^^^^^^ Read reimported here |
---|
= note: Read
must be defined only once in the type namespace of this module
error[E0432]: unresolved import compress
--> src\pak.rs:8:5
|
8 | use compress::flate;
| ^^^^^^^^ use of undeclared crate or module compress
warning: unused import: std::fs::File
--> src\pak.rs:9:5 |
9 | use std::fs::File; | ^^^^^^^^^^^^^ |
---|
= note: #[warn(unused_imports)]
on by default
warning: unused import: std::path::Path
--> src\pak.rs:10:5
|
10 | use std::path::Path;
| ^^^^^^^^^^^^^^^
warning: unused import: std::io::Read
--> src\pak.rs:11:5
|
11 | use std::io::Read;
| ^^^^^^^^^^^^^
error: aborting due to 2 previous errors; 3 warnings emitted
Some errors have detailed explanations: E0252, E0432.
For more information about an error, try rustc --explain E0252
.
error: could not compile mhrice
sorry
I pushed your code in 2486fd9 (Thanks!) could you test if it works?
測試魔界村兩次,進度停在10200就不在動了 ^^
https://drive.google.com/file/d/1f9SisfUorIGZaf27QfMdGL8ePdUt7Uvx/view?usp=sharing 我傳一些小容量search-path有問題的文件上來。 mhr dlc >不知道是不是文件太小解析不出path。其他遊戲的dlc可以解析出path re_chunk_000.pak.patch_00x.pak>>開始解析時出現錯誤訊息,error訊息在文件裡頭 Ghosts n Goblins Resurrection>>停在100200 ,CPU已經沒有滿載感覺像是停止了,文件我沒上傳。
The way search-path works is based on inter-referencing between files, which doesn't guarantee to find all files and is expected to perform poorly for a very small subset of components like DLC.
Devil May Cry seems to be using some compression format unknown to me (17 & 18)
I am not sure what happened to Ghosts n Goblins Resurrection.
Overall, even though these game uses the same engine, there can be subtle difference between their data. I only have MHRise as the sample to research. Supporting other games is something nice to have accidentally, but it is really out of my scope to fix for them.
The way search-path works is based on inter-referencing between files, which doesn't guarantee to find all files and is expected to perform poorly for a very small subset of components like DLC.
Devil May Cry seems to be using some compression format unknown to me (17 & 18)
I am not sure what happened to Ghosts n Goblins Resurrection.
Overall, even though these game uses the same engine, there can be subtle difference between their data. I only have MHRise as the sample to research. Supporting other games is something nice to have accidentally, but it is really out of my scope to fix for them.
^_^ i see , thank for your hard work.
你好,這是我遇到的錯誤訊息,因為訊息太長,只有擷取部分
devil may cry D:\BaiduYunDownload\DEVIL MAY CRY 5\Devil May Cry 5\Devil May Cry 5 Vergil>mhrice search-path --pak re_chunk_000.pak > 12345.list thread 'thread 'thread 'thread '' panicked at 'called
Result::unwrap()
on anErr
value: Unsupported format: 1' panicked at '' panicked at '' panicked at '', calledResult::unwrap()
on anErr
value: Unsupported format: 1calledResult::unwrap()
on anErr
value: Unsupported format: 1calledResult::unwrap()
on anErr
value: Unsupported format: 1src\main.rs', ', ', :src\main.rssrc\main.rssrc\main.rs508::::50850850849::: 494949note: run withRUST_BACKTRACE=1
environment variable to display a backtracethread '' panicked at 'called ' panicked at '' panicked at '' panicked at 'called
Result::unwrap()
on anErr
value: Unsupported format: 1', src\main.rs:508:49 thread 'thread 'thread 'Result::unwrap()
on anErr
value: Unsupported format: 1calledResult::unwrap()
on anErr
value: Unsupported format: 1calledResult::unwrap()
on anErr
value: Unsupported format: 1', ', ', src\main.rssrc\main.rssrc\main.rs:::508508508:::494949thread '' panicked at 'called 49' panicked at '
thread 'called ', ' panicked at 'src\main.rscalled 508src\main.rs' panicked at '::called
:' panicked at 'thread '49called
', ' panicked at 'thread 'src\main.rscalled :', ' panicked at '508src\main.rscalled
Result::unwrap()
on anErr
value: Unsupported format: 1', src\main.rs:508thread ':Result::unwrap()
on anErr
value: Unsupported format: 1Result::unwrap()
on anErr
value: Unsupported format: 1thread ':',Result::unwrap()
on anErr
value: Unsupported format: 149508', src\main.rs:thread ':49508Result::unwrap()
on anErr
value: Unsupported format: 1Result::unwrap()
on anErr
value: Unsupported format: 1Result::unwrap()
on anErr
value: Unsupported format: 1::', 49508src\main.rs ::49508 :49thread '