CLIFp
An alternate, command-line based launcher for Flashpoint Archive
Install / Use
/learn @oblivioncth/CLIFpREADME
CLIFp (Command-line Interface for Flashpoint)
<img align="left" src="https://i.imgur.com/U6aDFSt.png" width=20%>CLIFp (pronounced "Cliff-P", or just "Cliff") is an alternative launcher for Flashpoint Archive that focuses on speed and simplicity while providing access to a Flashpoint's vast library via a ripe command-line interface. This greatly increases the flexibility of Flashpoint by allowing for more direct integration with other software, such as Steam, LaunchBox, or any arbitrary application/script. The functionality of CLIFp should be near identical to the standard launcher for the facilities it implements.
Other than a few pop-up dialogs used for alerts and errors, CLIFp runs completely in the background so that the only windows seen during use are the same ones present while running standard Flashpoint. It automatically terminates once the target application has exited, requiring no manual tasks or clean-up by the user.
Quickstart
Download the latest release that's appropriate for your system (see Release Builds for guidance on that) and place it in the root of your Flashpoint directory.
Play a game:
# By title
CLIFp play -t "Simple, Tasty Buttons"
# By UUID
CLIFp play -i 37e5c215-9c39-4a3d-9912-b4343a17027e
# Random
CLIFp play -r any
Play an additional app:
CLIFp play -t "Railroad Rampage" -s "Unlimited Health / Ammo Hack"
Create a desktop shortcut:
CLIFp link -t "Skill Archer"
Create a share link for other users
# Enable CLIFp to open share links (only needs to be done once)
CLIFp share -c
# Create link to game
CLIFp share -t "The Ultimate Showdown of Ultimate Destiny"
Update:
CLIFp update
Compatability
General
Most flashpoint features are supported. The regular launcher still must be used for the following:
- Changing user configuration, like preferences, playlists, etc.
- Updating the launcher and downloading game updates
See the All Commands/Options section for more information.
While constantly testing for complete compatibility is infeasible given the size of Flashpoint, CLIFp was designed with full compatibility in mind and theoretically is 100% compatible with the Flashpoint collection.
Version Matching
Each release of this application targets a specific version series of Flashpoint Archive, which are composed of a major and minor version number, and are designed to work with all Flashpoint updates within that series. For example, a FIL release that targets Flashpoint 10.1 is intended to be used with any version of Flashpoint that fits the scheme 10.1.x.x, such as 10.1, 10.1.0.3, 10.1.2, etc, but not 10.2.
Using a version of CLIFp with a version of Flashpoint different than its target version is discouraged as some features may not work correctly or at all and in some cases the utility may fail to function entirely; however, given its design, CLIFp is likely to continue working with newer versions of FP that are released without requiring an update, unless that new version contains significant technical changes.
The title of each release will indicate which version of Flashpoint it targets.
Updates will always be set to target the latest Flashpoint release, even if they were not created explicitly for compatibility reasons.
Usage
Original Usage
CLIFp was originally created for use with its sister project FIL (Flashpoint Importer for Launchers) to facilitate the inclusion of Flashpoint in to LaunchBox and other frontend collections. The operation of CLIFp is completely automated when used in this manner.
It was later refined to also be used directly with the Flashpoint project to allow users to create shortcuts and leverage other benefits of a CLI.
That being said, it is perfectly possible to use CLIFp in any manner one sees fit.
General
[!NOTE] In most cases you should use the 'static' builds of CLIFp on Windows or Linux.
It is recommended to place CLIFp in the root directory of Flashpoint (next to its shortcut), but CLIFp will search all parent directories in order for the root Flashpoint structure and therefore will work correctly in any Flashpoint sub-folder. However, this obviously won't work if CLIFp is behind a symlink/junction.
[!IMPORTANT] Before using CLIFp, be sure to have ran Flashpoint through its regular launcher at least once. If using Infinity, it's also best to make sure your install is fully updated as well.
Do not run CLIFp as an administrator/root as some titles may not work correctly or run at all.
CLIFp uses the following syntax scheme:
CLIFp <global options> *command* <command options>
The order of switches within each options section does not matter.
Primary Usage: The most common use case is the play command with a Title Command switch. For this example -i is used to indicate a title is being referenced by its UUID
CLIFp play -i 37e5c215-9c39-4a3d-9912-b4343a17027e
This is the most straightforward and hassle free approach, as it will start that title exactly as if it had been launched from the Flashpoint GUI (including download/mounting of data packs, autorun before additional apps, etc.).
A title's ID can be found by right clicking on an entry in Flashpoint and selecting "Copy Game UUID". This command also supports starting additional apps, though getting their UUID is more tricky as I currently know of no other way than opening [FP Install Dir]\Data\flashpoint.sqlite in a database browser and searching for the ID manually.
Alternatively, the -t switch can be used, followed by the exact title of an entry:
CLIFp play -t "Interactive Buddy"
Or if feeling spontaneous, use the -r switch, followed by a library filter to select a title randomly:
CLIFp play -r game
See the All Commands/Options section for more information.
Direct Execution: The legacy approach is to use the run command with the --app and --param switches. This will start Flashpoint's services and then start the application specified with the provided parameters:
CLIFp run --app="FPSoftware\Flash\flashplayer_32_sa.exe" --param="http://www.mowa.org/work/buttons/buttons_art/basic.swf"
If the application needs to use files from a Data Pack that pack will need to be downloaded/mounted first using prepare or else it won't work.
The applications and arguments that are used for each game/animation can be found within the Flashpoint database ([FP Install Dir]\Data\flashpoint.sqlite)
Flashpoint Protocol
CLIFp supports the "flashpoint" protocol, which means it can launch titles through URL with a custom scheme, followed by a title's UUID, like this:
flashpoint://37e5c215-9c39-4a3d-9912-b4343a17027e
This makes it fast and easy to share games that you think your friends should try out.
To register CLIFp as the handler for these URLs, simply run:
CLIFp share -c
To easily create a share link if you don't already know the UUID of a game, you can use the share command with the -t switch followed by a title:
CLIFp share -t "Simple, Tasty Buttons"
This will create a share link for that title which will be displayed via a message box and automatically copied to the system clipboard.
If for whatever reason the service through which you wish to share a link does not support links with custom schemes, you can use the -u switch to generate a standard "https" link that utilizes a GitHub-hosted redirect page, enabling share links to be provided everywhere.
[!IMPORTANT] You will want to disable the "Register As Protocol Handler" option in the default launcher or else it will replace CLIFp as the "flashpoint" protocol handler every time it's started.
Companion Mode
It is recommended to only use CLIFp when the regular launcher isn't running as it allows fully independent operation since it can start and stop required services on its own; however, CLIFp can be started while the standard launcher is running, in which case it will run in "Companion Mode" and utilize the launcher's services instead.
The catch with this mode is that CLIFp will be required to shutdown if at any point the standard launcher is closed.
Ultimate Archive Data Support
CLIFp supports loading games from Data/ArchiveData like newer Flashpoint Launcher versions, but with a key difference; after game data is located within an ArchiveData segment, instead of being used directly from within the archive, that data will first be extracted to the usual location on disk. This does mean that space utilization will increase over time, though the effect is negligible unless you're playing many thousands of games in a short span of time.
The ability to use the files directly from the archive will be added at a later time; however, do keep in mind that the current method means that previously started games will load faster the next time they are played since they will have already been extracted. This makes a significant difference with CLIFp in particular due to its "run on demand" paradigm, as it has to load the metadata from all archive data each time it is ran, versus the standard launcher which loads this data once at startup and then can utilize it multiple times until you close Flashpoint.
All Commands/Options
Most options have short and long forms, which are interchangeable. For options that take a value, a space or = can be used between the option and its value, i.e.
-i 95b149c2-7f57-4894-b980-6ef03192f79d
or
--msg="I am a message
