ArthurHeitmann / MrubyDecompiler

Decompiler from Mruby generated mrb bytecode (version from 2015)
5 stars 1 forks source link

Bugs #2

Closed WLongSAMA closed 3 months ago

WLongSAMA commented 3 months ago

PC File: data012.cpk\st1\r110.dat\r110_4ebc3b22_scp.bin data012.cpk\st1\r110.dat\r110_7a562cb9_scp.bin

These two files, converted to rb, unmodified, and then converted to bin, I won't be able to talk to NPCs in the game

QQ20240715-175007 QQ20240715-175024

r110(original).zip rbfile(NOT MODIFIED).zip binfile(recompile).zip

SlotData_2.zip

ArthurHeitmann commented 3 months ago

I had encountered this issue recently too, but didn't look further into it. Now I've looked a bit closer and the issue is related to case/when statements and their else part. case statements are quite difficult to untangle, but I'll try to come up with a fix.

Problem:

image
WLongSAMA commented 3 months ago

https://github.com/synspawacza/nier_automata_localization/blob/master/tools/format/bin.py

This script is barely usable, but modifying languages other than English will also give errors.

WLongSAMA commented 3 months ago

I had encountered this issue recently too, but didn't look further into it. Now I've looked a bit closer and the issue is related to case/when statements and their else part. case statements are quite difficult to untangle, but I'll try to come up with a fix.

Problem: image

Fill in 'call' and it seems to work! But I don't know if the code logic is complete. QQ20240716-124615 QQ20240716-124723

ArthurHeitmann commented 3 months ago

For that specific function, that is all that is needed. In the meanwhile, I'll try to come up with a fix. Once it's out, you will have to decompile the original .bin files again and then add your changes to them.

WLongSAMA commented 3 months ago

For that specific function, that is all that is needed. In the meanwhile, I'll try to come up with a fix. Once it's out, you will have to decompile the original .bin files again and then add your changes to them.

Thanks for your help.

ArthurHeitmann commented 3 months ago

I've fixed it now and updated it in the latest version of F-SERVO.

If you have any more issue, please let me know.

The following files were previously decompiled incorrectly. To avoid any problems, you will have to restore the origin .bin files and then decompile them. If you've already made any changes to them, make sure to save them somewhere and then apply them again.

data002.cpk/core/corehap.dat/global_5be16b92_scp.bin.rb data002.cpk/ph1/p100.dat/p100_47a5d6eb_scp.bin.rb data002.cpk/ph1/p100.dat/p100_4aa7dace_scp.bin.rb data012.cpk/ph3/p300.dat/p300_4716685f_scp.bin.rb data012.cpk/ph3/p300.dat/p300_fe415e44_scp.bin.rb data012.cpk/quest/q330.dat/q330_21f485e_scp.bin.rb data012.cpk/quest/q330.dat/q330_70a701da_scp.bin.rb data012.cpk/quest/q330.dat/q330_9bafd382_scp.bin.rb data012.cpk/quest/q330.dat/q330_b853020f_scp.bin.rb data012.cpk/quest/q400.dat/q400_1f6199eb_scp.bin.rb data012.cpk/quest/q400.dat/q400_21ca35cb_scp.bin.rb data012.cpk/quest/q400.dat/q400_48d76c20_scp.bin.rb data012.cpk/quest/q400.dat/q400_fc5b48ad_scp.bin.rb data012.cpk/quest/q550.dat/q550_688e8050_scp.bin.rb data012.cpk/st1/r110.dat/r110_4ebc3b22_scp.bin.rb data012.cpk/st1/r110.dat/r110_6b1cbecb_scp.bin.rb data012.cpk/st1/r110.dat/r110_7a562cb9_scp.bin.rb data012.cpk/st1/r110.dat/r110_7fe2a715_scp.bin.rb data012.cpk/st2/r200.dat/r200_d52e3bf5_scp.bin.rb