# Dofus

Dofus is an MMORPG by Ankama.

## AUR

Installation can be automated with the AUR package dofusAUR, which depends on ankama-transitionAUR, the updater.

Currently the game files are installed under the "games" group with group writability. You can add your user to the group (`usermod -a -G games username`) to take advantage of this. Otherwise, you may need to enter your password in order to update the game files.

## Manual Installation

Ankama provides official Linux packages for Dofus, but some modifications are necessary for them to work on Arch Linux.

There is no Adobe Air runtime on Arch Linux, so it is necessary to use this workaround involving `adobe-air-sdk`. `transition` needs to be configured to use the sdk launcher instead of binaries provided by Dofus. Additionally, `transition` will by default attempt to install Adobe Air, and this needs to be disabled in its configuration.

The dofusAUR AUR package accomplishes these with the following code in `transition.conf`:

     bypass_air_installation = true
     dofus.reg.path = "${root}/share/reg/bin/air-generic-launcher.sh"

     launcher.command = """
     "${root}/bin/air-generic-launcher.sh" --lang=${i18n.lang} --update-server-port=${service_port} --updater_version=v2

It installs `air-generic-launcher.sh` in the same locations as the game client and sound engine executables, to run them with the SDK launcher:

     #!/bin/bash

     # This is a generic launcher script for AIR applications on Arch Linux

     SCRIPT_PATH=`readlink -f $0`
     SCRIPT_DIR=`dirname $SCRIPT_PATH`
     BASE_DIR=`readlink -f $SCRIPT_DIR/..`

     if [ "`uname -m`" == "x86_64" ]; then
     	export GTK_PATH=/usr/lib32/gtk-2.0
     	export G_FILENAME_ENCODING=UTF-8
     fi

     /opt/adobe-air-sdk/bin/adl -nodebug $BASE_DIR/share/META-INF/AIR/application.xml $BASE_DIR/share -- $*

## Troubleshooting

When debugging problems, it is helpful to set the environment variable `AK_LOG_CONSOLE=1` when running Dofus. It will then print detailed logs in the console.

A known problem is that some systems require `unset SESSION_MANAGER` in the environment, to avoid crashes on start up.

Occasionally the updater cannot function because of a leftover process from previous runs. Killing `transition` processes can solve this problem.

Category:

- Gaming