robertnunn / DRG-Save-Editor

Rock and stone!
GNU General Public License v3.0
104 stars 23 forks source link

Assistance offer for the recent update #37

Open Terrat0 opened 2 years ago

Terrat0 commented 2 years ago

Hi, I saw in the python code that you were having trouble with implementing addition of overclock matrices since your test save only had 1 weapon and 1 cosmetic. At the moment, my save has 2 unforged weapon, 1 skin, and 2 accessories sitting in the forge. I haven't run a deep dive yet, so I don't have any blank cores. Would it be helpful for me to share my save file with you? I'd offer to help with the coding itself but I have absolutely zero programming experience, sorry.

robertnunn commented 2 years ago

yeah, that might be helpful

Terrat0 commented 2 years ago

Great, should I put it up on google drive or something? I can do it midday tomorrow when I'm off work.

robertnunn commented 2 years ago

You should be able to attach your save file (or a zipped version) directly to this comment chain, but a google drive link is also fine. Thanks.

Erethiel commented 2 years ago

hi, i ll love to help too you can find my save with 4 weapons ,1 skin, 1 accessory and 10 blank 76561198083847333_Player_Slot_save_for_assistance.zip .

robertnunn commented 2 years ago

hi, i ll love to help too you can find my save with 4 weapons ,1 skin, 1 accessory and 10 blank 76561198083847333_Player_Slot_save_for_assistance.zip .

got it, thanks.

Duck-Kijora commented 2 years ago

Just in case it helps. This save has 4 Weapon , 2 Skin and 1 Resource OC :) 76561198998866463_Player_Slot_save-for-assistance.zip

Terrat0 commented 2 years ago

3 weapon, 2 skin, 3 cosmetic.zip Here's one with 3 weapons, 2 skins, and 3 cosmetics!

kagrith commented 2 years ago

4 weapon, 1 cosmetic.zip here is one of mine.

wahlp commented 2 years ago

Hi, I looked at all the above save files and it helped me find these patterns in the new file format. These are some notes I've taken and hopefully they lead to a fix.

Further testing may be required, but this is what I've surmised so far: there are some values tracking the quantity of OCs. Inspecting the data with a hex editor shows where these values are.

SchematicSave

After SchematicSave (first occurrence)

Location (search term) Offset (how many bytes after the search term) Data Format Examples
StructProperty second byte after Some kind of counter that increments when you get an OC 86 04 grows to 96 04, F6 04 grows to 06 05

OwnedSchematics

After OwnedSchematics (first occurrence)

Location Offset Data Format Examples
ArrayProperty second byte after \x{4+qty}D, where qty is the number of OCs waiting to be forged. \x5D for 1 OC, \xFD for 11, \x0D\x01 for 12
StructProperty third byte after \x{qty} \x01 for 1 OC, \x0C for 12, \x10 for 16

After OwnedSchematics (second occurrence)

Location Offset Data Format Examples
StructProperty second byte \x{qty 1s}0\x0{qty 16s} \x10\x00 for 1 OC, \xC0\x00 for 12, \x00\x01 for 16

Any of these values not meeting the format will result in the game resetting progress on the file.

AndiTera commented 2 years ago

6561198021787201_Player_Slot_save_for_assistance.zip.zip

17 weapon, 4 cosmetic, been grinding since the new season came out.

AnthonyMichaelTDM commented 2 years ago

so, after doing ALOT of digging, the values identified by @wahlp are storing the size (in bytes) of various parts of the file relating to the number of forged/unforged ocs, I detail the specifics in the code of my fork.

using this information, I believe I have fixed the issue, and my testing confirms this, I'll be creating a PR soon

now the only thing this project is missing is some of the most recent weapons and the OCs for them (specifically the "Nishanka Boltshark X-80", but there may be others)

AnthonyMichaelTDM commented 2 years ago

I'll be creating a PR soon

done, #45

for rock and stone!

kagrith commented 2 years ago

This is great news!

I think the save file I put up has a lot of the new overclocks. I think almost a dozen? I'm writing this via email, so I can't check.

Which hopefully helps in identifying.

On Thu., Jun. 30, 2022, 21:44 Anthony Rubick, @.***> wrote:

I'll be creating a PR soon

done, #45 https://github.com/robertnunn/DRG-Save-Editor/pull/45

for rock and stone!

— Reply to this email directly, view it on GitHub https://github.com/robertnunn/DRG-Save-Editor/issues/37#issuecomment-1171867242, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACIBQWBDVKI4AJDINHVCEXTVRZLRZANCNFSM5UXNOCHQ . You are receiving this because you commented.Message ID: @.***>

AnthonyMichaelTDM commented 2 years ago

yeah, I believe scout, engineer, and driller are missing their most recently added secondaries (the "Nishanka Boltshark X-80", "Shard Diffractor", and "Colette Wave Cooker" respectively)