Skip to content
Discussion options

You must be logged in to vote

funkin.save.Save has a variable called modOptions. You can do something like modOptions.set(key, value) and to save it to the game's save file, you can use Save.flush(). To get whatever value is stored in it, you can do something like modOptions.get(key).

For actually adding options to the preferences menu, you can do something like this

if (Std.isOfType(currentState, OptionsState)) {
    var preferencesPage = currentState.optionsCodex.pages.get("preferences");

    // Create a new option.
    prefs.createPrefItemCheckbox(...);
}

This was taken directly from the Funkin' Modding Docs, so this code snippet might not be that great.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@JadeJuno
Comment options

Answer selected by JadeJuno
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants