twinstar6980 / Twinning

https://github.com/twinstar6980/Twinning.Documentation
GNU General Public License v3.0
58 stars 12 forks source link

Unpack RSB Bug #6

Closed Haruma-VN closed 1 year ago

Haruma-VN commented 1 year ago

After drag "RSBRepair.js" to TwinStar, use execute JS and apply the changes to the RSB, the tool still failed to unpack this RSB. Can you check it? Here is the RSB: https://drive.google.com/file/d/1TukHfBcftROW_bhzhBSH1-cjuf-5D__6/view?usp=sharing

image

Haruma-VN commented 1 year ago

Here is the proof after executing "RepairRSBPopCap.js" image image

twinstar6980 commented 1 year ago

This error is caused by an etc1-ptx in rsb not being filled to a 2^n square, perhaps the unpacking logic really needs to be changed. If the game allows non-square etc1 textures, some logic in the script will also need to be changed. I don't have time to fix this issue at the moment, please keep the issue open.

twinstar6980 commented 1 year ago

There is a wrong in the unpacking logic, but the fix for this wrong will not solve the unpacking error for the rsb you provided, because the data in it is logically wrong, and the tool will strictly throw an exception. To fix this, I'll be updating RepairPopcapRSB.js to fix the logic error in the rsb.

Haruma-VN commented 1 year ago

I kinda want the RSB being similar to PopCap's RSB. Can you make the RepairPopcapRSB.js delete all comments in the rsb and rsgp header?

twinstar6980 commented 1 year ago

The current version update has fixed the RSB unpacking logic error related to this issue, but this fix will not allow your RSB to be unpacked, because there is a logic error in the RSB, you need to use the new version of the RepairPopcapRSB script to repair the RSB.

twinstar6980 commented 1 year ago

I kinda want the RSB being similar to PopCap's RSB. Can you make the RepairPopcapRSB.js delete all comments in the rsb and rsgp header?

This is meaningless, the purpose of the repair script is to allow disturbed packets to be unpacked, nothing more.

twinstar6980 commented 1 year ago

The current version update has fixed the RSB unpacking logic error related to this issue, but this fix will not allow your RSB to be unpacked, because there is a logic error in the RSB, you need to use the new version of the RepairPopcapRSB script to repair the RSB.

There is no error in the data package. I made a wrong judgment before, and the error update introduced by it has been fixed in the new version.