Migrating from v0.5.0 to v0.6.0
Migration from v0.5.0 to v0.6.0 requires only minor changes to mods, and won't break most mods.
Migrate from hxCodec to hxvlc
The library used for video playback has changed from hxCodec to hxvlc. This has resulted in improved performance and various bug fixes overall, but breaks mods which interact directly with the video library. This should not break any mods which use the built-in system for cutscenes in Funkin'.
Make the following changes:
// BEFORE: Imports from the package `hxcodec`
import hxcodec.flixel.FlxVideoSprite;
// AFTER: Imports from the package `hxvlc`
import hxvlc.flixel.FlxVideoSprite;
// BEFORE: Callback to onTextureSetup
video.bitmap.onTextureSetup.add(() -> { ... });
// AFTER: Callback to onFormatSetup
video.bitmap.onFormatSetup.add(() -> { ... });
// BEFORE: Play a video by path.
video.play(videoPath);
// AFTER: Load a video by path, then play if load was successful.
// You can also run video.load() in advance before playing the video.
if (video.load(videoPath)) video.play();
Options Menu Changes
The options menu received a minor refactor internally. The pages
list was moved to its own class, which changes the code needed to access the "Preferences" menu (mainly done to add custom preferences).
We would like to standardize the process of adding custom user preferences to mods in the future eventually, but in the meantime you can make the necessary tweaks:
// BEFORE: Retrieve the value from the page Map.
if (Std.isOfType(currentState, OptionsState)) {
var preferencesPage = currentState.pages.get("preferences");
// Create a new option.
prefs.createPrefItemCheckbox(...);
}
// AFTER: Retrieve the value from the page Map, which is now inside a Codex.
if (Std.isOfType(currentState, OptionsState)) {
var preferencesPage = currentState.optionsCodex.pages.get("preferences");
// Create a new option.
prefs.createPrefItemCheckbox(...);
}