Sharing and combining mods
Once your mod works, other people will install it, usually next to a dozen others. This guide covers what to ship, how Eclipse combines several mods that touch the same fight, which claims are exclusive, and how to release updates that keep players’ saves intact.
A mod pack is a set of mods installed and enabled together. Each mod keeps its own identity, saved data and screens. A dependency means one mod needs another and loads after it.
Package your mod
Section titled “Package your mod”A mod is a folder with a mod.toml directly inside it. To share it:
- Pick a final
idin the manifest. It is permanent: it names your content, your saved data and your achievements. Changing it later makes existing saves unable to find your items. - Set a
versionsuch as1.0.0and raise it with every release. - Declare every mod you depend on in
[[dependencies]], with a range you have tested, such as">=2.0 <3.0". Ranges use=,>,>=,<and<=joined by spaces;^,~and*are not supported. A range cannot add functions an older build does not have. - Optionally add
icon.png(about 256 by 256 pixels) next tomod.tomlfor the mod menu. - Zip the folder.
mod.tomlmay be at the top of the ZIP or inside one enclosing folder, and the ZIP must hold exactly one mod.
Players install the ZIP from Mods > Install ZIP or copy the folder into Mods by hand; see Installing mods. If a mod with the same ID is already installed they can replace it, and its saved progress is kept.
Before you share, check that the mod loads from a fresh install with only its declared dependencies, that nothing relies on files outside the folder, and that the Details panel in the mod menu shows no problems. A successful load only proves your definitions passed validation. It cannot show that a sprite looks right, an opponent plays well or a reward is balanced, so play it.
Data files that contain numbers (moveset and weapon JSON, for example) use a decimal point, such as 0.25, on every system.
What the supported API covers
Section titled “What the supported API covers”Stay inside the documented functions in the reference (for example battles and story). A field that exists in the game’s original data is not automatically available in Lua, and an unknown field or callback name makes a mod fail to load with a message. The supported surface includes:
- typed content (items, perks, fighters, battles, maps, locations);
- combat behaviours and ticks;
- saved mod state, counters and achievements;
- local modes, events and raids, and generated encounters;
- mod-owned screens and explicit asset replacement;
- story events at documented moments;
- programmable fighting styles, and round objectives that can end an offline round. The game’s own knockout, timeout and surrender results still win.
Arbitrary engine objects and unrestricted control of fight results are outside the contract.
Make your mod a good neighbour
Section titled “Make your mod a good neighbour”When two mods change the same fight, Eclipse combines them if both play by the same rules. The most important rule: append, do not replace.
local sf2 = require("sf2")
local observer = { on_round_begin = function() sf2.log.info("My rule is active alongside the fight's other rules") end,}
sf2.battles.patch { fight = "core:fights/zone_1/tournament/3", append_rules = { { kind = "behavior", behavior = observer } },}This needs the core dependency. The fight keeps its original rules, and your rule is added once. Lua behaviour rules run in the combined order when combat calls them. That order follows load order: dependencies load before the mods that need them, and mods with no dependency between them sort by ID (an ordinal, case-sensitive comparison). Folder order never matters. Callbacks run one after another, so scaling damage and then adding damage gives a different result from adding and then scaling; if you need a specific order, declare the dependency that guarantees it.
A pack in practice
Section titled “A pack in practice”Imagine three small mods working together. This is an illustration of what the API supports, not a published pack:
- Focus Framework owns a saved Focus resource that other mods read and spend.
- Focus Trial depends on the framework, adds a bonus every third unblocked hit, and shows the resource meter.
- Three-hit Objective independently adds a round controller: land three unblocked hits in ten seconds to win the round, or lose when time runs out.
Both gameplay rules apply to the same fight, and each mod shows its own HUD line. HUD placement is each author’s job; Eclipse does not move overlapping overlays. To coordinate a shared objective, use one round controller and a shared saved-state field.
Understand a conflict
Section titled “Understand a conflict”| Change | Result |
|---|---|
| Two mods append different compatible rules | Both contribute. |
A mod uses rules on a fight, even rules = {} |
Exclusive replacement. Any other change to that rule list conflicts. |
| Two round controllers overlap in mode and round | The later mod fails to load, and the error names both rules. |
Controllers with different mode or rounds filters |
Both load. Only the applicable one has authority. |
| The same rule attached twice | Rejected, not silently ignored. |
| A fight ends up with more than 100 rules | The later mod fails to load. |
| One mod patches the same field of a fight twice | Rejected. Combine it into one list. |
Other exclusive claims follow the same idea: one mod per patched native move, one replace owner per target in sf2.moves.patch, and one owner per replaced asset in sf2.assets.replace. The VS Code extension warns about these claims across the mods in your workspace before you play.
A conflict discards everything that mod defined while loading. Mods already active keep their content, later independent mods still load, and a mod that depends on the failed one stays unavailable. Distinct rule IDs avoid identity clashes but do not guarantee the gameplay fits together.
Disabling and reinstalling
Section titled “Disabling and reinstalling”Change the enabled set in Mods and choose Apply & Restart. Eclipse rebuilds its content from the base game and the enabled mods only, and never removes a mod mid-fight. In the pack above, disabling Three-hit Objective leaves Focus in place, and re-enabling it restores both rules. Missing dependencies are reported by name. A mod’s saved data is kept while the mod is absent; Saving and options explains what players see.
Round-local state and a pending round result are never saved.
Updating a published mod
Section titled “Updating a published mod”- Keep the manifest
id, your content IDs, fight order and saved field names stable. Add; do not rename. - Raise
version. If your saved data changed shape, bump the stateversionand write a migration; see Upgrading saved data. - If an item must change ID, retire the old one with
replaced_by(Updating without breaking saves). - Test with a save from the previous version, including owned and equipped items, then disable and re-enable the mod.
- Restart Eclipse after changing files. Replacing files does not reload definitions already in memory.
Online and local Versus
Section titled “Online and local Versus”Local and online Versus give both fighters equal combat ratings and use a balance preset (Forge and economy covers presets). Online players must match the game’s combat engine version, enabled mods, equipment roster and selected rules. “Enabled mods” means each mod’s id and version and also the contents of its gameplay files: everything in scripts/, movesets/ and weapons/, the models in assets/models/, and any .toml, .json, .xml, .lua or .bytes file outside assets/ and localizations/ (the manifest included). Pictures, sounds and translations can differ. So if you edit a gameplay file, players with the old copy can no longer meet you online, even at the same version: share the new files and raise version. Replays check the same files; recordings made before this check only compare id and version. Changing the host’s rules clears the guest’s readiness. New replays carry their own copy of the rules, so changing your preset later does not change playback. Older recordings without that copy can be browsed but not played in this version. Campaign story callbacks and campaign rewards do not run in Versus, but mod content is still loaded.
Limits
Section titled “Limits”- Combination rules cover the documented claims. They cannot make two mods with the same goal agree on gameplay.
- Mods that replace a whole rule list, or that add a second overlapping round controller, will not combine with others touching that fight. Say so in your description.
Where next
Section titled “Where next”- Battle rules: append, replace and controller details.
- Saving and options: what happens to a save when a mod comes and goes.
- Showcase: finished mods to study and install.