Flavie bug, and how to make one (reading .d2s, .d2x)

Gynli

Diabloii.Net Member
Hiya.

I just noticed that the flavie report is not correctly reading an item in my stash; the Sparking Mail.

There is one in the stash and multiple in the project; but it's not picking up any of them.

So it got me wondering...

1) Does anyone else have a problem with Flavie not recognizing an item in the stash/project?

2) If I were to make one of my own, how would i read the .d2s files? Simply opening the file w/ notepad seems to show me gibberish. (binary?)
 

GalaXyHaXz

Diabloii.Net Member
2) If I were to make one of my own, how would i read the .d2s files? Simply opening the file w/ notepad seems to show me gibberish. (binary?)
The player's name is stored as an ASCII string. Everything else is a header determining what the data is followed by a bit-field containing the data. The data for items is of variable size determined by flags in the header. If you're really serious about writing your own reporting utility, it would be best to head over to the phrozen keep and study the documentation of the save file.

But it's likely much more work than it's worth. Isn't Flavie part of Gomule which is written in Java? In that case, you could build upon that and probably fix the bug you are having in much less time.
 

Gynli

Diabloii.Net Member
@GalaXyHaXz I know i'm couple months late, but thanks! =D

I'd forgotten about this; and only just occured to me I posted a question here about it.

Firstly, I'll correct myself here that I thought .d2s was the Stash file, not the char file. lol.

Anywho, the problem I have is that the Flavie report shows that I have 0 'Sparking Mails' in my stash, but I know there's at least a couple in it. My initial reaction was that it's a minor bug in Flavie - perhaps some String typo or something along that line - and I thought i'd do a quick fix. Didn't occur to me that they were bit-field data, and I don't plan on learning the data structure of d2 files. xD

After looking at the UniqueItems.txt or standard.dat files, there were no apprent errors; so I have to start learning how Flavie works.

But before I do, could there be another file that Flavie works with that could potentially cause this kind of 'one missing item' error?

I can assume some kind of logic error if it happens with all items.. or all unique items.. or etc, but just missing that just one item is strange. :confused:

EDIT: by any chance, does the game use a different name for Sparking Mail? o_O

EDIT2: SOLVED!

tldr; Overlap of naming between 'Sparking Mail' and Light skiller 'Sparking'. Only on v4.3.
FIX: Rename 'Lightning,Sparking' to 'Lightning, Sparking Grand Charm' in 'standard.dat' file.
E3: overlap in question happened in Gomule/Flavie. File I edited was standard.dat. /E3

So after following the flavie function calls via ALOT of System.out.println's, I found an edge-case error at DirectD2Files.java. Under matchItem function, I noticed that the name 'Sparking Mail' of the item from 'getName()' and the name read from the standard.dat matches correctly, but when assigning variable lFound to lItemObject, the lItemObject printed out 'Lightning' instead of 'Sparking Mail'.

Under Flavie logic, 'Sparking mail' was a skiller. =D

I brought in a skiller from some months ago**, and flavie'd couple variations - with/without the skiller or the Sparking Mail. After some aimless searching, and fiddling around with the files I found that renaming the skiller section, - specifically the 'Lightning,Sparking' under sorc skillers - to include 'Grand Charm' after the prefix, was the simplest solution.

**Note I brought in items from stashes given away previously. I am aware it is against the rules. It was brought in solely for testing purposes, since I did not have any light skillers on the backup stash. Of course, they were all deleted after testing.
 
Last edited:

GalaXyHaXz

Diabloii.Net Member
Great that you managed to fix it! Diablo 2's .txt files are full of typos and spelling errors, not to mention many things are named differently than they are in-game. (Grief is called Widow Maker IIRC). So it's no doubt to be an issue for programs that use them.
 

ioupainmax

Diabloii.Net Member
Are you talking about the stand-alone Flavie program or the one inside GoMule? I'm assuming GoMule since you mention v4.3 although my GoMule is actually called 'R0.43: Donkey'.
 

Gynli

Diabloii.Net Member
Yes, I was talking about the one inside Gomule. :)

iirc I recall you saying somewhere that you edited the Flavie to include some nice goodies like skillers.
I wanted to ask how/what you changed?

Also yes, It's also 'R0.43: Donkey' for me too. It just says R4.3 on the file.. xD

E: @GalaXyHaXz Just for clarification, the txt file i edited was the standard.dat file from Gomule. I didn't bother delving into the whole excel spreadsheet of data from d2 itself.
 
Last edited:

ioupainmax

Diabloii.Net Member
Yes I did, I'll ask the mods if it is OK to post a small how to guide. I can add you to a conversation with @T72on1 where I show him how to do the same thing.

Check out my Flavie report below (signature) for the end result.
 

Gynli

Diabloii.Net Member
@ioupainmax

Ya that'd be great if you could add me to the convo. I know you re-did the css/standard.dat; but I'm also curious if you cleaned up any of the code itself.

I'm also hoping to make a flavie for all the affixes, so if you have any idea on how to get that all setup that'll be super neat as well. :D
 

Friiser

Diabloii.Net Member
Yes I did, I'll ask the mods if it is OK to post a small how to guide. I can add you to a conversation with @T72on1 where I show him how to do the same thing.

Check out my Flavie report below (signature) for the end result.
Did you get the okay to post instructions on how to add skillets to the flavie report?
 
Top