Pyd2bot utilizes the Pydofus2 as a background client to automate tasks in Dofus. This guide will help you set up the development environment for Pyd2bot.
Important
-
Python 3.9.11: Download and install from python.org.
-
Pcap and Wireshark: Required for sniffer functionality. Download Wireshark from here.
-
Make: Required for updating the protocol. You can install it with with chocolatery,
shell choco install make
. If you dont have chocolatey install it.
-
Create a New Folder:
-
Create a new folder named
botdev
and navigate into it:mkdir botdev cd botdev
-
-
Clone Repositories:
-
Clone the
pydofus2
repository insidebotdev
folder:git clone https://github.com/hadamrd/pydofus2.git
-
Clone the
pyd2bot
repository insidebotdev
folder:git clone https://github.com/hadamrd/pyd2bot.git
-
-
Create a Virtual Environment:
-
Within the
botdev
folder, create a new fresh python virtual environement:python -m venv .venv
-
Add the following environement variables to your system:
DOFUS_HOME
: Path to your Dofus installation directory.
If you dont wish to modify your environement variables or if you dont have the admin rights to do so, you can modify the file located at %APPDATA%/pydofus2/settings.json
and add the following:
{
"DOFUS_HOME": "path/to/your/dofus/installation"
}
Important
If Dofus is installed and operational through the Ankama Launcher (Zaap), there is no need to set the DOFUS_HOME
environment variable or modify the user settings file. PyDofus2 will automatically locate the Dofus installation.
LOGS_DIR
: Path to the folder you want pydofus2 to generate its logs to.
Note
If not set the logs will be generated in the %APPDATA%/pydofus2/logs
folder.
PYBOTDEV_HOME
: Path to youbotdev
directory.
source $PYBOTDEV_HOME/.venv/Script/activate
pip install -e $PYBOTDEV_HOME/pydofus2
pip install -e $PYBOTDEV_HOME/pyd2bot
cd $PYBOTDEV_HOME/pydofus2/updater
make unpack-maps
cd $PYBOTDEV_HOME/pydofus2/app
pip install -r requirements.txt
python app.py
cd $PYBOTDEV_HOME/pydofus2/sniffer
pip install -r requirements.txt
python app.py