// Management · RimWorld Mod
Flight Framework
This framework completes vanilla flight logic and expands it with multiple flight components — genes, apparel, hediffs/implants, races, and more.
This framework completes vanilla flight logic and expands it with multiple flight components — genes, apparel, hediffs/implants, races, and more. And it is the dependence of:
Jetpack:
https://steamcommunity.com/sharedfiles/filedetails/?id=3775891558
Avian Genes:
https://steamcommunity.com/sharedfiles/filedetails/?id=3769643744
To Players
Vanilla flight logic fixes
Fixed animation discontinuity caused by sudden drops during flight and takeoff.
Fixed unintended landing when changing path or job while flying.
Fixed repeated takeoff/landing when switching race flight duration.
Pawn flight features
While flying, a pawn’s move speed and pathfinding are unaffected by ground slowdown/speedup factors such as snow, water, objects, and buildings, and will not trigger traps. For hazardous terrain such as shallow magma, move speed is still unaffected, but pathfinding will still try to path around it.
Multiple flight components can exist on the same pawn at once. On takeoff, one currently active source is selected by priority order and enable state.
To Developers
Flight components
This mod adds several base flight component classes. Each has unified, complete def settings and preset methods—including priority and animation render layers—to make developing flight components on this framework easier.
Building a flight component
Choose the matching type by attachment point, wire it into the Def XML, and fill in the shared component fields.
To customize takeoff conditions or takeoff/landing logic, inherit the corresponding class and override Usable / FlyTick / Notify_TakeOff / Notify_Landed.
For animation, fill in the render layers in the same config block and prepare static textures plus flight animation frames. Flight still works without render layers; you just won’t get extra layers or animation.
Shared component fields and render layer fields currently supported by the framework:
Shared component fields (ModExtension_FlightAnim / various CompProperties_*_Flight):
priority: Priority; higher values are preferred when selecting the current flight source.
enable: Minimum locomotion urgency threshold to activate (corresponds to LocomotionUrgency). Default is 3 (Jog); when drafted, always attempts to fly. Set greater than 4 (e.g. 5) to treat as off.
triggerable: When true, shows a toggle gizmo to switch between the enabled value and off (5). Genes default to false.
flightSpeedFactor: Flight speed multiplier when this is the current flight source. Default 1.
canFlyInVacuum: Whether flight is allowed on cells with vacuum concentration ≥ 50%. Default false.
layers: Optional list of animation render layers.
Render layer fields (FlightAnimLayer):
texPath: Static texture path when landed.
flyingAnimationFramePathPrefix / flyingAnimationFrameCount / flyingAnimationTicksPerFrame: Flight animation sequence (naming aligned with vanilla animal flight fields).
layer / layerNorth: Render layer index; north-facing can be set separately.
tag / tagDef: Render node tag; if omitted, the framework auto-generates one from the Def.
drawSize, offset / offsetNorth, etc.: Size and per-facing offsets.
colorType, applySkinColorTint, rotDrawMode, etc.: Coloring and corpse drawing options.
Future Development
A variety of flight-related mods based on this framework will be rolled out successively, and the framework itself will be further refined throughout the development process.
Check these completed mods which already available and can serve as reference examples for this framework:
Jetpack:
https://steamcommunity.com/sharedfiles/filedetails/?id=3775891558
Avian Genes:
https://steamcommunity.com/sharedfiles/filedetails/?id=3769643744