Setting up the Raptors mod and air unit collision in BAR

The Raptors mod adds playable units to custom BAR games. Getting it running means navigating unit naming conventions, file organization, and the tricky topic of air unit collision.

Tags: BAR modding, raptors mod, air unit collision, unit naming, custom params

Getting the Raptors mod running

The Raptors mod is available on GitHub with a ready-to-use codebase. If you want a quick start, the NuttyB-Raptors repository provides a copy-paste solution. The mod works by introducing new unit definitions that bypass standard game restrictions. For players who want to customize further, a public spreadsheet tracks unit stats and configurations for easy reference.

Renaming new units

When you create a new unit in BAR, the visible name comes from the language file, not from the unitdef directly. To set a custom name, use customparams.i18nfromunit to point to a string in the game's language table. Without this, your new unit displays with a generic or technical identifier. The language file mapping is the cleanest way to handle naming, especially when creating multiple custom units.

Air unit collision and pathfinding

Making air units avoid each other in flight is harder than it looks. The Dragon unit achieves this, but simply copying its collision volume settings to another unit does not work. The reason is that BAR's collision detection for air units uses the model radius, not the collisionvolumes defined in unitdefs or collisionvolumes.lua. The game engine applies hardcoded collision checks across all defs using string.find patterns on unit names. To bypass these restrictions on custom units, copy the unit and append a recognized suffix to the name that the engine's collision code will process correctly.

The key takeaway: model radius drives air collision, not the collisionvolumes table. Adjusting the model file is often necessary for air units that should physically interact.

Creed of champions

Modding and custom games keep the community fresh and creative. The Creed of Champions welcomes players who experiment with new game modes and share what works. Better teammates make better games, whether stock or modded.

[Crd] Crd is the first really comfortable community I have been a part of. Everyone is nice and kind, the atmosphere is relaxed, and I am not getting yelled at for not being optimal.