Skip to content

Psych XTended v0.5.0

Latest
Compare
Choose a tag to compare
@DragShot DragShot released this 26 Sep 06:09
· 1 commit to master since this release

This second release focuses on including new features that make it stand apart from Psych 0.6.3:

  • Lua Scripting:
    • Added the ability of creating custom states (or replacing existing ones) by using Lua scripts. These will be read from the folder mods/your-mod/states/.
    • Added the option to submit Lua functions as an additional parameter to doTween%(), so they're called when the transition ends.
    • Added a global xt_version with the version of Psych-XT, visible to any Lua script.
    • Added Lua functions folderExists(), fileExists(), readFile() and readLines() for locating and reading mod assets.
    • Added Lua functions writeFile(), makeFolder(), removeFile() and removeFolder() for manipulating files inside the active modpack.
    • Added Lua functions getSongData() and getWeekData() for reading song and week info, useful in Story Mode and Free Play menus.
    • Added Lua functions startStoryMode() and startFreeplay() for starting regular FNF games, needed for Story Mode and Free Play menus.
    • Added Lua functions getSongScore(), getSongRating(), getWeekScore(), resetSongScore() and resetWeekScore() to retrieve/reset high scores from, useful in Story Mode and Free Play menus.
    • Added Lua functions getClientPreference(), setClientPreference(), saveClientPreferences() and loadClientPreferences() for reading, updating and saving user settings from within Lua states.
  • Internal Changes:
    • Locked dependency versions due to some bugs and compatibility issues reported in newer releases.
    • Added MusicBeatState type ScriptedState, for states like menu pages built entirely using a script.
    • Extracted some fields and methods from PlayState into MusicBeatState, in order to share them with ScriptedState.
    • Added class StateLua, representing the Lua script used in a scripted state.
    • Extracted most fields and callbacks from FunkinLua into a helper class LuaUtils, for them to be shared with StateLua.
    • Reorganized Lua callbacks in functions according to their topic.
    • Exported CustomSubstate, DebugLuaText, ModchartSprite, ModchartText and ModchartTimer as public classes, available from scripting package.
    • Added state-related resource loading functions (folder mods/<modname>/states) into Paths.
    • MusicBeatState now accepts text tags too as indication of what state to load next. This can be used in order to load scripted states in place of some of the existing ones, or to load custom states defined in the active mod.
    • Added DynamicAccesor and DynamicAccess in order to simplify access to internal objects and arrays from Lua scripts.
    • Now the states that are able to change the active mod (story mode, free play, setings, etc.) will remember the mod folder they were called from, returning control to it when the user goes back to the previous menu without doing changes through them.
    • Now modchart texts can be placed in the camera of your choice on creating, instead of being bound to camOther.

With these changes, the core concept of making custom states using Lua scripts is now functional. At the time of this update, one mod has been released that leverages the new capabilities of the modded engine: Universo Style.

Future updates will aim to reduce the limitations of these new scripted states, polish any rough edges, and add more features that may complement these tools well.