About this mod
Modify existing formulas and add entirely new ones to the game via Lua.
- Requirements
- Permissions and credits
- Mirrors
- Changelogs
- Donations

Description
Every action (e.g. Cure) uses a formula which ultimately determines what happens to both the caster and target. This includes:
- Modifying stats such as hp, mp, mist, strength, etc.
- Adding or removing a status effect or augment.
- Adding an item to the player's inventory.
- When an action will miss, be countered, etc.
- and many many more.
A formula is the combination of one or more functions which are processed in a predetermined order. Each function does one specific task and is usually unique. For example, one function could check if the target is immune to fire while the other calculates the amount of health the target should lose.
However, formula functions are hardcoded in the executable and cannot be modified or even reordered.
Features
This mod allows modifying existing formulas and adding entirely new ones to the game via Lua.
Every single formula and its functions can be modified to the tiniest detail.
There are 6 modules that provide the ground framework for this mod. This includes:
- Formulas: Specify which functions are executed and in what order.
- Functions: Contain a series of statements that perform a specific task.
- Classes: Simulate object oriented programming to help with creating easily readable and maintainable code in formula functions.
- Helpers: Similar to functions, but are only defined once and can then be reused in various formula functions to avoid having to rewrite the same block code more than once.
- Assemblies: Strings with a block of assembly code that can call in-game functions and more.
- Middlewares: Control which functions are always executed before and after every formula.
These modules allow the creation of entirely new formulas very easily. Afterwards, you can assign it to an action or equipment via The Insurgent's Toolkit -> Battlepack Editor.
This wiki provides detailed information about the forge's features, structures, limitations, and more. It also includes numerous resources and examples to help you get started with Lua and work efficiently with formulas.
Improvements & Additions
The original formula processing structures were redesigned from scratch to offer new possibilities such as:
- The caster now shares the same modification capabilities as the target, instead of just being able to modify their hp, mp and level. This includes status effects, augments, stats, elemental affinities and more.
- A Quickening, Concurrence and Esper-Ultimate now share the same modification capabilities as every other action, instead of just being able to modify the target's hp.
- The caster of a trap is now the character that triggered it, instead of there being none.
- The caster of a chain benefit is now the character that collected the dropped loot, instead of there being none.
- A character's vitality, speed, attack power and elemental potency can now also be modified.
- A character's mist charges can now be modified separately from mist bars and mp.
- A character's augments can now be modified all at once instead of only 2-3 at a time.
- Gil can now also be removed instead of only added.
- Content (e.g. Potion) can now also be added instead of only removed. In addition, the count can now also be chosen instead of always being at 1.
- The party can now teleport to a location.
- The formula processing cause (e.g. character, gambit, trap, ...) can now be checked.
Many formula functions have also been improved with quality of life changes, bug fixes, and optimizations that enhance readability and reduce complexity. For a complete list of changes, you can refer to the wiki.
Installation
- Download, install and open the Vortex Mod Manager.
- Select Games on the left side bar, search for Final Fantasy XII and select Manage.
- Download and install the External File Loader v1.4.0+.
- Download and install the LUA Loader v1.6.4+.
- Download the mod via the Mod Manager Download button.
- Select Downloads on the left side bar of Vortex, search for the mod and select Install.
- Select Mods on the left side bar and enable the mod.
- Modify the configuration files to suit your needs or install another mod that comes with them.
Updating
- Uninstall the mod via the Vortex Mod Manager.
- Download and install the mod as shown in the installation instructions above.
- Update the mod requirements if necessary.
- Reapply any changes done to the configuration files.
Uninstallation
- Uninstall the mod via the Vortex Mod Manager.
Compatibility
- Fully compatible with other mods (excl. Classic Mist from The Insurgent's Past).
- Fully compatible with all game languages.
- Fully compatible with existing saves (no new game required).
- Only compatible with the latest Steam version of the game (1.0.4.0).
Configuration
There are several configurable files which are all loaded from the {game}/x64/scripts/config/TheInsurgentsForgeConfig/... directory when opening the game. All of these configuration files can be modified via any text editor. For more details, you can check out this page.
Notes
If you want to list this mod as a requirement in yours, you may do so under the following conditions:
You are only allowed to upload configuration files, which must include my original credits at the top, followed by your own. You must also clearly specify what changes you have made. Do not upload any unmodified files from the main folder to the configuration folder.
If you use anything else from this mod, or do not follow the conditions from above, I will report your mod for breaking my copyright.
The purpose of this is to allow me to release bug fixes without requiring updates to your mod. This ensures players always receive the latest features and fixes from this mod, without being affected by outdated issues if you are no longer maintaining your mod.
Frequently Asked Questions
Q: Where can I get help?
A: Either in the post sections of the mod page here, or in the modding discord server here.
Q: Where can I report a bug?
A: Same as above, either in the posts section of the mod page, or in the modding discord server. Please provide as much information as possible about how you encountered the bug in order to receive the best possible help. If I can confirm the bug, I will add it to the list of known issues.
Q: Nothing is working, what am I missing?
A: Make sure you didn't miss the deploy notification in the top right in Vortex when installing the mod. Also recheck if the mod requirements are up to date. If it still doesn't work, check out the hook.log file in the game/x64 directory. If it contains anything unusual, create a paste in pastebin and send me the link.
Known Issues
There are currently no known issues.
My Other Mods
For a list of my other mods, you can check out the following pages: