An open API service indexing awesome lists of open source software.

https://github.com/dofusdude/doduda

CLI for Dofus asset downloading and unpacking
https://github.com/dofusdude/doduda

api database dofus dofus-unity dofus3 download unpack

Last synced: 2 months ago
JSON representation

CLI for Dofus asset downloading and unpacking

Awesome Lists containing this project

README

          



doduda


CLI for Dofus asset downloading and unpacking



Download the latest Dofus 3 data from Ankama and convert the interesting parts to a developer friendly json format:

```sh
# Install
curl -s https://get.dofusdu.de/doduda | sh

# Run
doduda && doduda map
```

## Features

See `doduda --help` for all parameters.

### Load

Download the latest Dofus version. You can change the target folder with `--output`.

load example

You can also download the complete game to get a playable version without unpacking the files using `doduda --full`.
If you want a different platform version than Windows, you can specify the it with the `--platform` parameter.

### Map

Make the cryptic data easier to use in apps.

map example

The command assumes that all categories (except images) are already downloaded.

### Watchdog

Listen for new Dofus versions and react to their release.

watchdog example

You can use that for getting anything that supports webhooks to react to Dofus version updates. Some ideas are:

- [Discord Channels](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks)
- [ntfy.sh](https://ntfy.sh) (Push notifications to your phone)

### Render

Generate pre-rendered, high resolution `.png` images from the vector files.

render example

## Installation

```sh
curl -s https://get.dofusdu.de/doduda | sh
```

There is only one dependency: [Docker](https://docs.docker.com/get-docker/).

You need to have it installed when you:

- want to unpack the Dofus 3 data files.
- want to use the `render` command to generate images for Dofus 2.

You don't need it when you only want to use the `map` command or download the entire game (`--full`). The script above will crash if Docker is not installed since Dofus 3 is the default game at the moment.

If you have problems with Docker, like a missing socket, the solution is often to find your `docker.sock` path and link it to the missing path or export your path as `DOCKER_HOST` environment variable `export DOCKER_HOST=unix://` before running `doduda`.

### GitHub Releases

Get the latest `doduda` binary from the [release](https://github.com/dofusdude/doduda/releases) page.

### Go install (needs [Go](https://go.dev/doc/install) >= 1.21)

You need to have `$GOPATH/bin` in your `$PATH` for this to work, so `export PATH=$PATH:$(go env GOPATH)/bin` if you haven't already.

```bash
go install github.com/dofusdude/doduda@latest
```

## The dofusdude auto-update cycle

This tool is the first step in a pipeline that updates the data on [GitHub](https://github.com/dofusdude/dofus3-main) when a new Dofus version is released.

1. Two watchdogs (`doduda listen`) listen for new Dofus versions. One for main and one for beta. When something releases, the watchdog calls the GitHub API to start a workflow that uses `doduda` to download and parse the update to check for new elements and item_types. They hold global IDs for the API, so they must be consistent with each update.
2. At the end of the `doduda` workflow, it triggers the corresponding data repository to do a release, which then downloads the latest `doduda` binary (because it is a different workflow) and runs it to produce the final dataset. The data repository opens a release and uploads the files.
3. After a release, `doduapi` needs to know that a new update is available. The data repository workflow calls the update endpoint. The API then fetches the latest version from GitHub, indexes, starts the image upscaler (if necessary) and does a atomic switch of the database when ready.

## Known Problems

- Run `doduda` with `--headless` in a server environment or automations to avoid "no tty" errors.

## Credit

To unpack Dofus 2 data, doduda ships a port of the [PyDofus](https://github.com/balciseri/PyDofus) project. Thanks to balciseri for the work on PyDofus!

The terminal visualizations are made with [vhs](https://vhs.charm.sh).

Many thanks to Ankama for developing and updating Dofus! All data belongs to them. I just make it more accessible for the developer community.