Differences between openage modding and AoE modding

Both openage and the Genie Engine used for Age of Empires offer the same gameplay features. However, while the features provide the same ingame experience, they are sometimes realized differently in openage as a result of architectural decisions or to provide an extended feature set. This post should outline the major changes to consider when transitioning from AoE modding to openage modding.

Unified Entity-Component System for Ingame Objects

AoE has several different types of ingame objects. Units, buildings, animals and trees have common traits but are often handled differently by the game’s engine. These types have a fixed set of attributes which can result in constraints. For example, trees cannot move because they don’t possess the speed attribute.

In openage, every ingame object is handled in the same way. Therefore, any ingame object can have any ability available through the engine’s API. Instead of having a fixed set of attributes, openage ingame objects are configured by adding active and passive abilities to a common basic object (e.g. Move, Attack, Create). Essentially, modders can select the components they need to create the desired behaviour of a unit.

Upgrading units does not reference other unit objects

In AoE we have stat upgrades and unit upgrades. Stat upgrades can only change a unit’s basic attributes (HP, speed, attack value), while animations, names or even behaviour of a unit can only be altered with a unit upgrade. A unit upgrade is performed by updating the unit reference of an object. For example, the Archer unit is upgraded by changing all ingame units’ references of archers to Crossbowman. Both Archer and Crossbowman exist in the data as separate units.

openage does not make this distinction and all upgrades will behave like stat upgrades. Therefore, upgrading the archer to crossbowman will change animations, names, attack values and HP via a stat upgrade without referencing a new unit. As a result, no separate Crossbowman unit object exists in openage data.

State machines instead of object reference replacement

AoE’s units have static set of abilities that doesn’t change over their life time. If abilities have to be taken away, e.g. when a unit dies, or added, e.g. when a trebuchet unpacks, the unit’s object reference is usually replaced similarly to the unit upgrade. For example, if an archer unit dies, its object reference is replaced from the Archer object to a DeadArcher object.

For openage we want to avoid reference replacement and therefore use a mechanic called implicit state machine. Basically, a state change tells the unit which abilities should be activated or deactivated. In the case of death, the abilities for movement and attacking would be deactivated. Multiple state changes can be active at once and thus, the current state is always implicit. While this is a bit more complicated to manage than AoE’s solution, it gives modders much more control over their units’ behaviour.

2 Likes