Home > s7-e3

s7-e3

S7-e3 is a project mainly written in Ruby, it's free.

RMU Session 7 Exercise 3

Diablo 2 Hero Extractor

This library extracts the character info from a diablo 2 save game. Currently only 1.09 save files are supported. The library permits to extract the Character Name, class, level and attributes (str, dex, vit, energy).

This work was based on pellegrino's SC2Refinery, where I discovered the bindata library and learn a new way to use rSpec! :)

About the format

I'm follow the Trevin Beattie's specification, found here.

Usage

hero = D2Hero.load("/path/to/file.d2s")
hero.name   # => Kurskzakk
hero.class  # => :barbarian
hero.level  # => 99

Caveats

I'm relying on these character files, since I don't have the 1.09 version on my computer (in fact, 1.09 doens't work on Macs).

Previous:sample