Magic Framework
A modular, data-driven spell framework for RimWorld 1.
A modular, data-driven spell framework for RimWorld 1.6.
Magic Framework is the shared magic engine behind the Magic Framework family of mods. It provides the runtime systems, XML authoring tools, spell execution model, visual effects, targeting logic, persistent magic state, and developer resources needed to build spell-heavy RimWorld content.
On its own, Magic Framework is primarily a framework and dependency. For playable spells, magical production, arcane research, enchanted equipment, mission sites, and first-party magic content, use it with MFVanilla:
https://steamcommunity.com/sharedfiles/filedetails/?id=3725961309
Build Spells Through XML
Spells are authored through composable XML action trees. Damage, healing, hediffs, explosions, terrain changes, summons, teleports, projectiles, chains, force fields, sustained buffs, delayed effects, proximity triggers, resurrection, and area magic can be combined into custom spell behavior without writing new C# for every spell.
Persistent Magic Systems
Magic Framework supports runtime state that survives normal gameplay and save/load boundaries. Lingering zones, walls, spawned things, summons, maintained shields, delayed actions, armed traps, proximity triggers, reward caches, leyline state, and site-generation data can remain dependable across play sessions.
Targeting And Execution Tools
Reusable targeting queries support radius searches, nearest valid targets, shape targets, directional chains, deterministic ordering, result limits, self-affect rules, and context-aware spell execution. These tools are designed to make complex spell behavior easier to author, inspect, and maintain.
Item-Sourced Magic
Equipment can provide activated powers, passive status effects, melee-triggered magic, damage resistance, hediff prevention, and saved item-local cooldowns. This allows magic items to feel powerful without permanently teaching every effect to the pawn carrying them.
Arcane Progression Support
The framework includes hooks for caster growth, mana, spell learning, research-linked unlocks, Arcane Disciplines, magical identities, and content systems that can shape how pawns discover, specialize in, and present their magic.
Procedural Magic FX
Element, delivery style, effect shape, power tier, sounds, flecks, colors, and override metadata combine into extensible magic visuals for new spell families. Spell authors can use shared visual language while still overriding individual effects where needed.
Built For Content Mods
Magic Framework is designed to support first-party and third-party magic content: enchanted items, magical production chains, generated scrolls, deterministic rewards, mission sites, leylines, hostile spellcasters, summoned creatures, traps, wards, and other systems that need reliable framework support.
Developer Resources
GitHub repository, source, documentation, webform spell designer, and other tools:
https://github.com/KLoverTony/MagicFramework
Framework tools and information:
https://klovertony.github.io/MagicFramework/#framework