Giter VIP home page Giter VIP logo

d2r-holygrail-tracker's Introduction

D2R HolyGrail Tracker

Diablo 2 Resurrected HolyGrail Tracker based on character save file parsing

Disclaimer

Personal project to experiment and learn Rust language. Comments and PRs regarding code style, idioms, efficiency, etc. are welcome!

Reference for *.d2s file parsing is this parser written in JS: https://github.com/dschu012/d2s

TODO:

  • Watch save file for changes
  • Check if save file is saved on unidentify item YES
  • Parse Unique and Set items
  • Save found items (SQLite)
  • Minimal GUI
  • Create transparent overlay (Qt, Windows specific lib?)
  • Stretch goal: Research Modding for coloring already found items when you see them on the ground in the game

D2S File Format

I will try to bring https://github.com/krisives/d2s-format up to date here.

Integers are stored in little endian byte order.

Offset Type Desc
0 u32 Signature (0xaa55aa55)
4 u32 Version
8 u32 Size of the file in bytes
12 u32 Checksum
16 N/A ?
36 u8 Character Status
37 u8 Progression?
38 [u8, 2] Active arms?
40 u8 Character Class
267 [u8, 16] Character Name

Versions

Save file version. Current version of the game uses 99. In the future if version changes File Format should be versioned and changes documented.

  • <98 is pre D2R
  • 98 is version ??
  • 99 is current version 1.6.74264

Checksum

Needs to be re-calculated when editing save file otherwise it will not be valid anymore. Credit for algorithm goes to whoever reverse engineered it.

Character Status

8-bit field of flags for statuses

Bit Desc
0 ?
1 ?
2 Hardcore
3 Died
4 ?
5 Expansion
6 Ladder
7 ?

Character Class

N Class
0 Amazon
1 Sorceress
2 Necromancer
3 Paladin
4 Barbarian
5 Druid
6 Assassin

Character Name

Character names are stored as an array of 16 characters which contain a null terminated string padded with 0x00 for the remaining bytes. Characters are stored as 8-bit ASCII, but remember that valid names must follow these rules:

  • Must be 2-15 in length
  • Must begin with a letter
  • May contain up to one hyphen (-) or underscore (_)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.