-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Sui / SuicideMachine edited this page Nov 8, 2021
·
10 revisions
- An IDE like Visual Studio 2019 (Community Edition is enough) or Jetbrains Rider.
- A copy of Red Faction that runs correctly.
- LiveSplit.
- Git Bash or some Git frontend (easiest should be Github Desktop).
- First you'll need to create a fork of this repository - click Fork in the upper right corner of this page.
- Launch your Github client and clone the repository.
- For Github desktop it's File -> Clone Repository and download all the files.
- Open LiveSplit.RedFaction.sln in Visual Studio.
- In Solution Explorer check if any references are missing. If LiveSplit.Core or UpdateManager show as missing, remove them from the list, then right-click on References, Add References..., navigate to LiveSplit directory and add UpdateManager.dll and LiveSplit.Core.dll.
- Switch the build type to Debug in the bar at the top of the window.
- Under Build tab, configure output path to a Components directory in LiveSplit.
- Under Debug, select LiveSplit.exe in LiveSplit directory.
- Edit RedFactionSettings code, by right-clicking on RedFactionSettings.cs.
- Scroll down to line 19 (or the line that starts private static readonly Mod[] DEFAULT_MODS) - you'll see a section with mod support.
- Adding support for a new mod is quite easy. After the last mod in the section add:
- new Mod("Name of the mod here", new List()
- This should be followed by an opening curly bracket {
- After that you define splits:
- To split on level change add a line new SplitLevelChange("Section name to display", "level file from which you're switching", "level file to which you're switching"),
- To split on pre-rendered cutscene change add a line new SplitVideoPlays("Section name to display", "level file on which to check it")
- To obtain level files, you may run LiveSplit with Debugger attached by clicking start at the top of the IDE and reading the Output (you won't be able to do it if your constructors are not properly closed off).
- Once you have all splits, remember to close the mod section with a closing curly bracket and closing parenthesis }).
- Note that level names should be lowercase only, regardless of how they are named originally.
- Once you're done adding all the necessary splits, click Start the top, to see if the project compiles and then navigate to Edit splits in LiveSplit and settings to see if the mod appears on the list.
- Make sure that all the splitting works correctly.
- Once you're done editing, you'll need to make a git commit.
- Open Github Desktop, select the LiveSplit.RedFaction repository and you should see a list of files, you have modified on the left under changes.
- Make sure RedFactionSettings.cs is ticked, then write a commit name and a description and click Commit.
- Make sure to push the changes to a remote branch by pressing push (or sync) in the bar at the top.
- Then navigate to your Github page, select your fork of LiveSplit.RedFaction, and create a pull request.