d2s
d2s copied to clipboard
Add reading initial save attributes based on constants
I am working on an application that reads the save file as soon as it is created. I have added an example of such a file as examples/chars/98/InitialSave.d2s
.
The initial save does not seem to contain readable data for the attributes, items and skills. To resolve this I made the following changes:
- extended the parser for constants to also read the starting attributes for the classes
- when the attributes header is not found and the character level is 1 then the attributes are calculated based on constants
- when the items header is not found and the character level is 1 then no items are returned
- when the skills header is not found and the character level is 1 then no skills are returned
This could still be improved by:
- returning starter items based on class
- returning starter skills based on class