Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

D2X File not supported #5

Open
maxicekuk opened this issue Sep 24, 2021 · 10 comments
Open

D2X File not supported #5

maxicekuk opened this issue Sep 24, 2021 · 10 comments

Comments

@maxicekuk
Copy link

maxicekuk commented Sep 24, 2021

D2X stash files from the original GoMule cannot be opened in D2R GoMule
Stash format seems to have changed (now .d2i ?). This means moving items from into D2R can only be done by loading up mule characters

Edit: Is this because the items have changed in D2R?

(re-wrote to better describe the issue)

@pairofdocs
Copy link
Owner

Item encoding has changed in D2R, you're right.

a .d2x file has to be converted to D2R for gomule-d2r to read it. There is a tool to convert D2 LoD save files to D2R save files which does the item conversion.

https://github.com/d07RiV/d07riv.github.io/blob/master/d2r.html#L262 from the converter page https://d07riv.github.io/d2r.html

That function can be used to convert a .d2x to a .d2i file

Do you have a sample .d2x file? I can take a look over the weekend
(you can zip the file and drag-and-drop it as an attachment to a comment here)

@Pwntheon
Copy link

Hi. Thanks for working on this project. Here's an example stash.

Default.zip

@pairofdocs
Copy link
Owner

@Pwntheon do you have an example stash with some items?

default.d2x has the header, item count (0), file version and a checksum but no items
image

@pairofdocs
Copy link
Owner

In progress converter here: https://pairofdocs.github.io/atma-stash-d2r/

I'm still testing. I was able to open an example stash with 1 item (.d2x converted to .d2i) and open it in gomule

@semenzaharov
Copy link

semenzaharov commented Sep 25, 2021

@pairofdocs Is there any chance that you implement backwards convertion (from .d2i to d2x)? And is there any converter from d2r to d2 save file (want to play tcp/ip in old version)?
Here is stash for debug (converter did not work for this one)

stash.zip

@pairofdocs
Copy link
Owner

pairofdocs commented Sep 25, 2021

@semenzaharov I'll look into that conversion after debugging the .d2x -> .d2i one

Thanks for the file 👍

I was reading the binary data from it and saw 6673 items in the header, but when going through the item list I only saw 6672 items and the code failed on the last one. Do you know how many total items there are in that stash file? Does Atma or Gomule-LoD show that?

This will convert D2R to LoD https://d07riv.github.io/d2r.html

@pairofdocs
Copy link
Owner

pairofdocs commented Sep 26, 2021

@semenzaharov I couldnt find the issue with the stash MainStash.d2x, there is some item that's not being converted right by Riv's converter or something else

I was able to get a part of the stash to convert correctly and show up in Gomule-d2r

I took the first 1982 items from the stash to test. Here is the .d2x and the .d2i stashes zipped
MainStash-1982.zip

@semenzaharov
Copy link

semenzaharov commented Sep 26, 2021

@pairofdocs it shows 6673 in old gomule. It seems that 2 A Jade Figurine cause the problem (you don't have them in your MainStash-1982.zip) - I tried to split main stash into smaller ones and only they won't convert.
But, after removing them from MainStash and conversion, GoMuleR just freezes on opening stash (with 6671 items).

@pairofdocs
Copy link
Owner

pairofdocs commented Sep 26, 2021

@semenzaharov

How big were the splits that you tried?

Smaller stashes seem to have more success for converting (maybe there is a out-of-memory issue with converting in the browser. And a separate issue with some item/items as well).
There was a post here that had a 5k stash but after moving out all the runes, charms, gems, runewords, and crafted items - leaving it at 2k items roughly was able to convert.

I selected a random middle section of the main stash and had ~1.8k items convert correctly. random_sel_1k.zip

It's hard to track down exactly what the problem is. I'm just using Riv's conversion functions and am not familiar with them. We would need Riv the original author of the converter script to debug this more carefully. https://github.com/d07RiV/d07riv.github.io

@pairofdocs
Copy link
Owner

pairofdocs commented Sep 26, 2021

@pairofdocs Is there any chance that you implement backwards convertion (from .d2i to d2x)? And is there any converter from d2r to d2 save file (want to play tcp/ip in old version)?

I added code to be able to also convert from .d2i to .d2x https://pairofdocs.github.io/atma-stash-d2r/

Testing with MainStash-1982.d2x -> MainStash-1982.d2i -> MainStash-1982.d2x (converting twice) I see that there are a few items that weren't converted back 100%.

There is only one byte that differs consistently for a few items in the stash. This could be the issue that the converter code is having

orig d2x : 4A 4D 10 00 80 00 02 C4 0C 20 97 E6 06 82 CC 9D 46 06 0E 25 00 78 04 14 B9 FF
conv d2x : 4A 4D 10 00 80 00 65 C4 0C 20 97 E6 06 82 CC 9D 46 06 0E 25 00 78 04 14 B9 FF
____________________________ ^

related to https://github.com/d07RiV/d07riv.github.io/blob/master/d2r.html#L279-L283 I believe. Could be related to "item version" data for the item

That example item above was a blue ring and d2r-gomule can read the .d2i file, then gomule-lod can read the twice converted .d2x file.
MainStash-oneitem-testitemversion.zip

but in the original .d2x MainStash.d2x the version of the item is Uknown (and in the twice converted d2x it's v1.10+)
image
Riv's converter probably fails for these items (or something else is causing issues, since d2x -> d2i worked for all those items in Mainstash-1982)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants