If some error appears, make sure to read the error properly. Also make sure your file is not renamed in any way and shows up as the game creates them.
Note: Do not create the "empty" files manually in the explorer.
+
Note 2: If the savefile returns an error in-game, reach a save point and create a save slot on the empty savefile before conversion and try again.
diff --git a/test/copyHexOffsets.js b/test/copyHexOffsets.js
new file mode 100644
index 0000000..70d6103
--- /dev/null
+++ b/test/copyHexOffsets.js
@@ -0,0 +1,60 @@
+function areBaseNamesSame(name1, name2) {
+ const baseName1 = name1.split('.')[0].split('_')[0];
+ const baseName2 = name2.split('.')[0].split('_')[0];
+ return baseName1 === baseName2;
+}
+
+function copyHexOffsets() {
+ const fileInput1 = document.getElementById('file1').files[0];
+ const fileInput2 = document.getElementById('file2').files[0];
+
+ if (!fileInput1 || !fileInput2) {
+ alert("Please select two files.");
+ return;
+ }
+ else if (!areBaseNamesSame(fileInput1.name, fileInput2.name)) {
+ alert("Savefiles are not of the same game.");
+ return;
+ }
+
+ const reader1 = new FileReader();
+ const reader2 = new FileReader();
+
+ reader1.onload = function (e1) {
+ const arrayBuffer1 = e1.target.result;
+ const uint8Array1 = new Uint8Array(arrayBuffer1);
+
+ reader2.onload = function (e2) {
+ const arrayBuffer2 = e2.target.result;
+ const uint8Array2 = new Uint8Array(arrayBuffer2);
+
+ // Copy bytes at offsets from 00000000 to 00000160
+ for (let i = 0; i <= 0x160; i++) {
+ uint8Array1[i] = uint8Array2[i];
+ }
+
+ // Copy bytes at offset 006AB060
+ const offset = 0x6AB060;
+ for (let i = 0; i < 4; i++) {
+ uint8Array1[offset + i] = uint8Array2[offset + i];
+ }
+
+ // Create new file
+ const blob1 = new Blob([uint8Array1], { type: 'application/octet-stream' });
+ const downloadUrl = URL.createObjectURL(blob1);
+
+ // Trigger download
+ const a = document.createElement('a');
+ a.href = downloadUrl;
+ a.download = fileInput2.name;
+ document.body.appendChild(a);
+ a.click();
+ document.body.removeChild(a);
+ URL.revokeObjectURL(downloadUrl);
+ };
+
+ reader2.readAsArrayBuffer(fileInput2);
+ };
+
+ reader1.readAsArrayBuffer(fileInput1);
+}
\ No newline at end of file
diff --git a/test/index.html b/test/index.html
new file mode 100644
index 0000000..908ac5c
--- /dev/null
+++ b/test/index.html
@@ -0,0 +1,55 @@
+
+
+
+
+
+ Kingdom Hearts 1.5+2.5 Savefile Converter
+
+
+
+
+
+
Kingdom Hearts 1.5+2.5 Savefile Converter
+
Convert from (put your original savefile here):
+
+
+
+
+
Convert to (put your empty savefile here):
+
+
+
+
+
+
+
+
Usage Instructions
+
+
For this example, let's assume you want to convert an existing EGS KH2 savefile to Steam. Start a new game on Steam and make sure an empty KHIIFM_WW.png appears in the save location.
+
After you have located both your EGS savefile and your Steam savefile, put the EGS savefile on top and the Steam one on the bottom.
+
Press Convert. Your Steam savefile with EGS saveslots should now have been downloaded! Put it where you originally found the Steam savefile and you should be good to go.
+
If some error appears, make sure to read the error properly. Also make sure your file is not renamed in any way and shows up as the game creates them.
+
+
Note: Do not create the "empty" files manually in the explorer.
+
Note 2: If the savefile returns an error in-game, reach a save point and create a save slot on the empty savefile before conversion and try again.
+
+
+
+
Save File Locations
+
Savefiles can be found in:
+
+
EGS: Documents\KINGDOM HEARTS HD 1.5+2.5 ReMIX
+
Steam: Documents\My Games\KINGDOM HEARTS HD 1.5+2.5 ReMIX
+
Re:Fined: Documents\Kingdom Hearts
+
+
+
+
This can also be used to convert somebody else's savefile to yours.
+
If you only want to convert an individual save slot rather than the whole file, you can use Kingdom Save Editor instead.
+
If you wish to also carry over your achievements, you can do it manually using Steam Achievement Manager.