LiveSplitHooks
Automatic LiveSplit start/split/reset for Mycopunk. IL reset-before-start, objective splits, per-mission split profiles.
| Date uploaded | 2 weeks ago |
| Version | 1.2.4 |
| Download link | Sparroh-LiveSplitHooks-1.2.4.zip |
| Downloads | 93 |
| Dependency string | Sparroh-LiveSplitHooks-1.2.4 |
This mod requires the following mods to function
BepInEx-BepInExPack_Mycopunk
BepInEx pack for Mycopunk. Preconfigured and ready to use.
Preferred version: 5.4.2403README
LiveSplitHooks
A BepInEx mod for Mycopunk that drives LiveSplit automatically over its named pipe command server. No ASL script required.
Features
- Auto start when a mission begins
- Auto reset + start on each new mission (IL-style; configurable)
- Auto split on successful mission completion
- Auto reset on mission fail / abort
- Optional splits on each main objective
- Incursion floor-clear splits (default target floor 30; ends the run at max floor)
- Sub-mission transitions (e.g. Cranius after setup): split, swap profile, start
- Per-mission split profiles — auto
switchsplitsby mission name/id - Load removal via LiveSplit game time (
pausegametime/unpausegametime) - Auto-reconnect if LiveSplit is opened after the game
- Fully configurable triggers
Requirements
- Mycopunk
- BepInEx (BepInExPack for Mycopunk)
- LiveSplit running on the same PC
- For split profile switching: a recent LiveSplit build that supports the
switchsplitspipe command
LiveSplit setup
- Open LiveSplit and load your splits layout as usual.
- Keep LiveSplit running while you play. The named pipe server (
\\.\pipe\LiveSplit) is available by default — no extra component is required for pipe control. - Optional: Right-click LiveSplit → Control → compare against Game Time if you use load removal.
- Launch Mycopunk with the mod installed.
When a mission starts you should see the timer reset (if a previous run exists) and start. Completing the mission splits; failing resets (defaults).
IL vs full-game
- Individual missions (default): leave
ResetBeforeStartOnMissionBegin = true. Each mission is its own LiveSplit attempt (reset + start on begin, split on complete). - Full-game / multi-mission route: set
ResetBeforeStartOnMissionBegin = falseso the timer keeps running across missions. Use one split segment per mission withSplitOnMissionComplete = true. Prefer leaving split profiles **off ** for full-game runs.
Objective splits
Set SplitOnObjectiveComplete = true to split on each main (non-side) objective. Keep SplitOnExtractObjective = false
if SplitOnMissionComplete already ends the run, or you will double-split at extract.
Incursion (floor 30)
Incursion never ends in-game. The speedrun category ends at floor 30.
When the active mission id is listed in FloorChangeSplitMissionIds (default incursion):
- Timer starts on mission begin as usual
- Each floor clear (floor number increases) sends
split - Door code skips that jump multiple floors emit one split per floor crossed (keeps a 30-segment layout aligned)
- Clearing floor 30 (entering floor 31, or skipping past 30) sends the final split and ends the LiveSplit run (
IncursionEndRunAtMaxFloor, default true) - Final time stays on screen; further floors / mission fail later do not reset or split this attempt
Suggested incursion.lss: 30 segments (cleared floor 1 … cleared floor 30). No extract segment.
Cranius (sub-mission)
Cranius loads after a setup mission on Moldy Tundra (often planet_def). With SplitOnSubMissionTransition = true (
default):
- Setup mission starts → normal start (and optional profile)
- Cranius mission starts →
split(ends setup attempt) →reset→switchsplitsto Cranius profile →start
The game’s mission id is literally ???; C# type is FlatTundraMission. The mod sets primary key **cranius
**. Put these in your live profiles.txt (not only the example file):
cranius => Mycopunk - cranius.lss
??? => Mycopunk - cranius.lss
FlatTundra Mission => Mycopunk - cranius.lss
FlatTundraMission => Mycopunk - cranius.lss
# planet_def => Mycopunk - planet_def.lss
Cranius is separate from Amalgamation — only Flat Tundra / cranius aliases apply.
Per-mission split profiles
Use this when different missions need different .lss files (e.g. different objective counts).
- Put your
.lssfiles in one folder (any path). Filenames can include the game prefix, e.g.Mycopunk - cleanup_detail.lss. - In config (
BepInEx/config/sparroh.livesplithooks.cfg):
[SplitProfiles]
Enabled = true
Directory = C:\Path\To\LiveSplit\Splits
MapFile = C:\Path\To\LiveSplit\Splits\profiles.txt
Mappings =
AllowSubstringMatch = true
MapFile= path to the mapping text file (notMappings— that is for inline lines only).Directory= folder used to resolve relative.lssnames on the right-hand side of the map.- Ensure the map file is named
profiles.txt(notprofiles.txt.txtfrom Windows hidden extensions).
- Create
profiles.txtnext to your splits (seeprofiles.example.txt):
ouroblitz => Mycopunk - ouroboros_blitz.lss
incursion => Mycopunk - incursion.lss
cleanup_detail => Mycopunk - cleanup_detail.lss
prized_pos => Mycopunk - prized_pos.lss
sat_salvage => Mycopunk - sat_salvage.lss
cranius => Mycopunk - cranius.lss
??? => Mycopunk - cranius.lss
FlatTundra Mission => Mycopunk - cranius.lss
FlatTundraMission => Mycopunk - cranius.lss
Confirmed ids: ouroblitz, incursion, cleanup_detail, prized_pos, sat_salvage, Cranius (cranius / ??? /
FlatTundraMission).
- Start a mission with
DebugLogging = trueand read the BepInEx log line:
Mission identity key='ouroblitz' name='Ouroboros: Blitz' detail=[OuroborosBlitz | Roguelike Operation]
Prefer the stable key= id for exact mappings; ~Name substring lines work until you log each mission once.
- On the next matching mission the mod sends
reset→switchsplits <path>→start.
Inline mappings also work via SplitProfiles.Mappings (same line format, \n-separated in the cfg value). MapFile is
easier to edit.
Note: Profile switching resets the timer before loading the new file so LiveSplit can swap cleanly. That pairs naturally with IL mode.
Installing
Thunderstore / r2modman (recommended)
Install LiveSplitHooks into your Mycopunk profile.
Manual
Place LiveSplitHooks.dll in BepInEx/plugins/.
Configuration
Edit BepInEx/config/sparroh.livesplithooks.cfg (created on first launch):
| Section | Key | Default | Description |
|---|---|---|---|
| General | Enabled | true | Master switch |
| General | DebugLogging | true | Log commands and mission identity |
| Connection | AutoReconnect | true | Retry if LiveSplit is not open |
| Connection | ReconnectIntervalSeconds | 3 | Delay between reconnect attempts |
| Triggers | StartOnMissionBegin | true | start when mission starts |
| Triggers | ResetBeforeStartOnMissionBegin | true | reset then start on mission begin (IL). Set false for full-game |
| Triggers | UseStartOrSplit | false | Use startorsplit instead of start |
| Triggers | SplitOnMissionComplete | true | split on successful extract/complete |
| Triggers | SplitOnObjectiveComplete | false | split on each main objective |
| Triggers | SplitOnExtractObjective | false | Also split extract objective (usually redundant) |
| Triggers | ResetOnMissionFail | true | reset on fail/abort |
| Triggers | PauseGameTimeDuringLoads | true | Pause game time while loading |
| Triggers | SplitOnSubMissionTransition | true | Mid-run mission change: split, swap profile, start (Cranius) |
| Triggers | FloorChangeSplitMissionIds | incursion | Mission ids that split on floor clear |
| Triggers | IncursionFloorSplitMax | 30 | Last floor number that emits a floor split |
| Triggers | IncursionStopSplitsAtMaxFloor | true | Stop floor splits after max floor |
| Triggers | IncursionEndRunAtMaxFloor | true | End LiveSplit run when max floor is cleared (endless Incursion) |
| SplitProfiles | Enabled | false | Auto-switch .lss by mission |
| SplitProfiles | Directory | (empty) | Folder for relative .lss paths |
| SplitProfiles | DefaultSplits | (empty) | Fallback .lss if no mapping matches |
| SplitProfiles | Mappings | (empty) | Inline key => file lines |
| SplitProfiles | MapFile | (empty) | External mapping file path |
| SplitProfiles | AllowSubstringMatch | true | Allow key⊂mission-name matches |
Building
dotnet build --configuration Release
Output: bin/Release/netstandard2.1/LiveSplitHooks.dll
How it works
The mod connects to LiveSplit’s command server and sends newline-terminated commands (start, split, reset,
switchsplits, pausegametime, …).
Game hooks (Harmony):
MissionManager.OnMissionStarted_Client→ capture mission identity, optional profile switch, optionalreset, thenstartMissionManager.OnMissionCompleted_ClientRpc→ splitMissionManager.OnFailMission_Client→ resetObjectiveBase.Complete/ client RPC → optional objective splitsIncursionObjective.SpawnRooms_ClientRpc/IncursionHUD.SetFloor→ floor-clear splits- Scene / player-load state → game time pause
Mission identity is resolved via MissionManager reflection (name/id and related fields) and logged when debug is on so
you can build profile maps without reverse-engineering.
Troubleshooting
- Nothing happens — Confirm LiveSplit is open before or while the game runs; enable
DebugLoggingand watch the BepInEx log forLiveSplit <= startetc. - Double splits — Turn off
SplitOnObjectiveCompleteif you only want one split per mission, or disableSplitOnMissionCompleteif you split on objectives only. - Timer doesn’t use load removal — Set LiveSplit to compare Game Time, and keep
PauseGameTimeDuringLoadsenabled. - Pipe connect failed — Another program may be holding the pipe; restart LiveSplit.
- Profile did not switch — Check the mission identity log line, your map keys, and that the
.lsspath exists. Confirm your LiveSplit version supportsswitchsplits(update LiveSplit if the command is ignored). - Wrong splits loaded — Prefer exact keys from the log; disable
AllowSubstringMatchif substring rules are too greedy. - Incursion keeps running after floor 30 — Ensure
IncursionEndRunAtMaxFloor = trueand that the mission id matchesFloorChangeSplitMissionIds(defaultincursion).
License
MIT — see LICENSE.
Authors
- Sparroh
CHANGELOG
Changelog
1.2.4
- Clarify Cranius ≠ Amalgamation: remove Amalgamation aliases; Cranius is FlatTundra only (
FlatTundraMission/???/cranius)
1.2.3
- Cranius: detect
FlatTundraMission/ assetFlatTundra*→ primary keycranius
1.2.2
- Cranius identity: treat mission id
???as a placeholder; prefer asset name / type aliases → primary keycranius - Still match profiles on
???,FlatTundra Mission,cranius profiles.example.txt: Cranius +planet_defsetup entries from in-game logs
1.2.1
- Incursion: end the LiveSplit run when floor 30 is cleared (
IncursionEndRunAtMaxFloor, default true) so endless mode does not keep the attempt open - Document floor-30 finish timing (final split on clearing 30 / entering 31)
1.2.0
- Sub-mission transitions (Cranius): if a new mission starts mid-run,
splitthe setup attempt,reset,switchsplitsto the new profile, thenstart - Incursion floor-clear splits: hook
IncursionObjective.SpawnRooms_ClientRpc+IncursionHUD.SetFloor; split when floor increases (supports +5 code skips); default target floor 30 - Config:
SplitOnSubMissionTransition,FloorChangeSplitMissionIds,IncursionFloorSplitMax,IncursionStopSplitsAtMaxFloor profiles.example.txt: confirmed idsouroblitz,incursion,cleanup_detail,prized_pos,sat_salvage; Cranius still~Craniusuntil logged
1.1.1
- Tighten mission identity: prefer nested mission
ID/MissionName/ asset name (e.g.ouroblitz,Ouroboros: Blitz) - Strip rich-text color tags; stop logging MissionManager network/bool noise
- Expand
profiles.example.txtwith current IL categories (Blitz confirmed; others substring until logged)
1.1.0
- Add optional split profiles: detect mission identity and
switchsplitsto a mapped.lssfile - Log mission identity on mission start (when DebugLogging is on) for easy profile map setup
- Config section
SplitProfiles(directory, default splits, inline mappings, external map file, substring match) - Ship
profiles.example.txtas a mapping template switchsplits/switchlayouthelpers on the LiveSplit client
1.0.1
- Add
ResetBeforeStartOnMissionBegin(default true) so each new mission resets LiveSplit before starting — fixes IL runs not clearing after a completed mission - Document IL vs full-game config in README
1.0.0
- Initial release
- LiveSplit named pipe client with auto-reconnect
- Auto start on mission begin
- Auto split on mission complete
- Auto reset on mission fail/abort
- Optional per-objective splits
- Game time pause during loads
- Configurable triggers via BepInEx config