Files
mod-ale/docs/INSTALL.md
2025-11-09 15:16:34 +01:00

8.0 KiB

🔧 ALE Installation Guide

Step-by-step instructions for installing ALE on AzerothCore

Discord AzerothCore


Important

ALE is designed specifically for AzerothCore. If you're looking for compatibility with other emulators, check out ElunaAzerothCore for original Eluna compatibility.

📋 Table of Contents

Requirements

Before installing ALE, ensure you have:

System Requirements

  • AzerothCore Server: A working AzerothCore installation
  • Git: Version control system for cloning repositories
  • CMake: Build system (3.16 or higher recommended)
  • Compiler with C++11 Support:
    • Windows: Visual Studio 2019 or later
    • Linux: GCC 7+ or Clang 5+
    • macOS: Xcode 10+

Build Dependencies

ALE can use either:

  • ACE (ADAPTIVE Communication Environment), or
  • Boost (for filesystem library)

These should already be available if you have AzerothCore set up.

🚀 Installation

Step 1: Navigate to Modules Directory

Open your terminal (or Git Bash on Windows) and navigate to your AzerothCore modules directory:

cd <azerothcore-path>/modules

Example:

cd /home/user/azerothcore/modules

Step 2: Clone the Repository

Clone the mod-ale repository into your modules folder:

git clone https://github.com/azerothcore/mod-ale.git

This will create a mod-ale folder containing all necessary files.

Step 3: Configure Build

Navigate to your AzerothCore build directory and configure with CMake:

cd <azerothcore-build-directory>
cmake ../ -DLUA_VERSION=luajit

Lua Version Options

Choose your preferred Lua version with the -DLUA_VERSION flag:

Version Flag Notes
LuaJIT luajit Recommended - Best performance via JIT compilation
Lua 5.2 lua52 Default - Used if no version specified
Lua 5.3 lua53 Newer features, compatible
Lua 5.4 lua54 Latest version, all features

Examples:

# Using LuaJIT (recommended for performance)
cmake ../ -DLUA_VERSION=luajit

# Using Lua 5.3
cmake ../ -DLUA_VERSION=lua53

# Using default (Lua 5.2)
cmake ../

Step 4: Compile

Compile AzerothCore with the newly added module:

Linux/macOS:

make -j$(nproc)

Windows:

cmake --build . --config Release

Tip

The -j$(nproc) flag uses all available CPU cores for faster compilation.

Step 5: Update Configuration

Caution

Critical Step: After compiling, you must use the newly generated configuration files!

The compilation process generates updated config files with ALE settings. Without these, ALE may not function correctly (no error messages, logging issues, etc.).

Location of config files:

  • Usually in your server's etc/ or configs/ directory
  • Look for files like worldserver.conf

Copy the new .conf.dist files:

# Example - adjust paths as needed
cp worldserver.conf.dist worldserver.conf

Then edit worldserver.conf and configure ALE settings (see Configuration below).

⚙️ Configuration

ALE Settings in worldserver.conf

After installation, configure ALE by editing your worldserver.conf file:

###################################################################################################
# ALE (AZEROTHCORE LUA ENGINE)
###################################################################################################

# Enable or disable ALE
# Default: 1 (enabled)
Eluna.Enabled = 1

# Enable traceback for detailed error information
# Useful for debugging but has performance overhead
# Default: 1 (enabled)
Eluna.TraceBack = 1

# Script folder location (relative to server binary)
# Default: "lua_scripts"
Eluna.ScriptPath = "lua_scripts"

# Logging level
# 0 = Disabled
# 1 = Errors only
# 2 = Errors and warnings
# 3 = All messages (debug)
# Default: 2
Eluna.LogLevel = 2

Creating the Scripts Folder

Create the scripts folder next to your server executable:

mkdir lua_scripts

Place your .lua script files in this folder. ALE will automatically load them on server start.

🔄 Updating

Keep your ALE installation up to date with the latest features and bug fixes.

Update Steps

  1. Navigate to the mod-ale directory:
cd <azerothcore-path>/modules/mod-ale
  1. Pull the latest changes:
git pull
  1. Navigate to your build directory:
cd <azerothcore-build-directory>
  1. Reconfigure if needed (optional):
cmake ../ -DLUA_VERSION=luajit
  1. Recompile:
# Linux/macOS
make -j$(nproc)

# Windows
cmake --build . --config Release
  1. Restart your server to load the updated version

Tip

Always backup your database and scripts before updating!

🔧 Troubleshooting

ALE Not Loading

Check these things:

  1. Config file: Ensure you're using the new worldserver.conf generated after compilation
  2. Enabled setting: Verify Eluna.Enabled = 1 in config
  3. Script path: Ensure lua_scripts folder exists in the correct location
  4. Logs: Check server logs for error messages

No Error Messages

If you're not seeing ALE errors:

  • Solution: You're using an old config file. Copy the new .conf.dist file and reconfigure.

Compilation Errors

"Lua headers not found":

  • ALE should automatically download Lua dependencies
  • Ensure you have internet connection during CMake configuration

C++11 errors:

  • Update your compiler to one that supports C++11 or later

ACE/Boost errors:

  • These should be installed with AzerothCore
  • Check your AzerothCore installation

Scripts Not Loading

  1. Check file extension: Must be .lua
  2. Check file names: Must be unique across all subdirectories
  3. Check syntax: Look for errors in the log file
  4. Check location: Scripts must be in the configured ScriptPath folder

Getting Help

If you encounter issues:

📚 Next Steps

Now that ALE is installed, you're ready to start scripting!

  1. Usage Guide - Learn how to write your first script
  2. Implementation Details - Advanced features and best practices
  3. API Documentation - Complete API reference
  4. Hooks Reference - Available event hooks

Example Scripts

Create a test script to verify everything works:

File: lua_scripts/test.lua

local function OnServerStartup()
    print("ALE is working! Server started successfully.")
end

RegisterServerEvent(33, OnServerStartup)  -- SERVER_EVENT_ON_CONFIG_LOAD

Restart your server and look for the message in the console.


🌟 Acknowledgements

ALE is built upon the foundation of the Eluna Lua Engine. We acknowledge and thank the Eluna team for their pioneering work in Lua scripting for World of Warcraft server emulators.


Developed with ❤️ by the AzerothCore and ALE community

⬆ Back to Top