Skip to content

Background and Architecture

Stjepan Bakrac edited this page May 22, 2020 · 3 revisions

The architecture for Lua modules differs significantly from previous Windower versions. Windower 4 contained a powerful core (often called hook), which was inaccessible to addon developers. It provided much of the base functionality used by plugins written by the Windower team.

The Windower 4 hook contained common base functionality shared by all plugins and was used to write custom user-facing code. Plugins enjoyed a trove of features, from memory access to packet manipulation, as well as any existing C++ libraries they wanted to load.

LuaCore was one such plugin, which was itself able to run multiple Lua addons written not only by the Windower team, but by anyone who wanted to contribute. Windower 4 addons also enjoyed a core set of shared features in their own Lua libraries, as well as a selection of functions exposed directly by the LuaCore plugin.

Architectural Changes

Windower 5 is a significant shift away from the previous architecture. It still has a core (now called core) that handles all internal features, such as hooking game functions and providing a basic Lua interface. However, the set of features in the Windower 5 core has been significantly reduced compared to Windower 4's hook.

Instead, the support for Lua modules has been designed from the start to be much more powerful, allowing much of the previous hook functionality to be implemented in Lua modules. Windower 5 Lua modules are sufficiently powerful enough that there is no longer a need for native C++ plugins.

Without the need for C++ plugins, the overall Windower 5 design is much simpler compared to Windower 4's architecture - it consists of only the core and Lua packages.

Lua Package Improvements

Windower 5 Lua packages are significantly more powerful than Windower 4 addons for three primary reasons:

  • Direct Memory Access
    Windower 5 packages have direct memory access and can scan memory signatures, find runtime game data, read and write to it.

  • Win32 API Access
    Windower 5 packages have access to the Win32 API through the LuaJIT ffi module. This module provides access to native Win32 functions that are normally only accessible through native code. These functions allow Lua packages to do things which in Windower 4 were only possible through plugins or in the hook.

  • Data Sharing
    Windower 5 allows packages to share data with each other in a simple fashion. This avoids the need to hold duplicate data for multiple addons and significantly reduces memory usage. Addon developers can use this to share any data they want.

Clone this wiki locally