Skip to content

antoinbo/pharaoh-snippets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

pharaoh-snippets

Highscore file structure

Pharaoh highscore file format description.

This small project is made to learn how to use Kaitai.

Build

Via pip:

cd highscore
pip install kaitaistruct
ksc -t python highscore.ksy

Via docker:

cd highscore
docker build -t kaitai-docker .
docker run -v "$(pwd):/root:rw" kaitai-docker ksc -t python highscore.ksy

Usage

data = Highscore.from_file("highscore.jas")

print(len(data.entries))
print(len([e for e in data.entries if e.active]))

for entry in data.entries:
    if entry.active:
        print(entry.score, entry.id, entry.name, entry.percent, entry.population, entry.money, entry.year, entry.difficulty, entry.unknown, entry.active)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published