Migrating from v0.5.0 to v0.6.3
Migration from v0.5.0 to v0.6.3 requires some changes to mods.
Update the API Version
Eric accidentally forgot to increment the API version for the game when updating to v0.6.0, and this got fixed with v0.6.3.
This means that mods won't load unless the api_version
value in the _polymod_meta.json
file is at least v0.6.3. This allows mod creators to perform testing and ensure their mods are compatible before releasing an update on their distribution platforms of choice. Most mods (especially ones with minimal scripting) will need no changes to work as expected, but developers should probably do some playtesting to be sure.
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(...);
}
Sticker Changes
v0.6.0 rewrote how stickers get used by the game (and v0.6.3 rewrote it again but better this time). Any existing mods that provided stickers will probably break.
New or updating mods looking to add, remove, or replace stickers should consult the custom Sticker Packs documentation