-
Notifications
You must be signed in to change notification settings - Fork 7
Psych Engine API: Source Code Overhaul Transition
The 0.7.0
update of Psych Engine changed a lot of things about how the game works now. And so, it just so happened to break a lot of things in mods that depended on class and variable naming.
- The
classVar
argument should have the package folder followed by the class name; Example:backend.ClientPrefs
,substates.GameOverSubstate
,states.PlayState
. - If you are getting/setting from the ClientPrefs class, you must have
data.
before the variable name; Example:data.variableNameHere
.
Examples:
- Setters:
setPropertyFromClass('backend.ClientPrefs', 'data.lowQuality', false)
setPropertyFromClass('substates.GameOverSubstate', 'loopSoundName', 'your_song_name')
setPropertyFromClass('states.PlayState', 'chartingMode', true)
- Getters:
getPropertyFromClass('backend.ClientPrefs', 'data.lowQuality')
getPropertyFromClass('substates.GameOverSubstate', 'loopSoundName')
getPropertyFromClass('states.PlayState', 'chartingMode')
This is removed in this update, instead use camGame.scroll
; Example: getProperty('camGame.scroll.x')
.
The note color system has been changed from a HUE/Brt/Sat system to an RGB system; But because of this, the spritesheet of the notes would now have to be colored in a specific way to correctly apply the RGB shader on it.
To disable for the notes:
function onCreatePost()
for i = 0, getProperty('unspawnNotes.length')-1 do
setPropertyFromGroup('unspawnNotes', i, 'rgbShader.enabled', false)
end
end
To disable for the strums:
function onCreatePost()
for i = 0, 7 do
setPropertyFromGroup('strumLineNotes', i, 'useRGBShader', false)
end
end
To disable for the note splashes:
function onCreatePost()
for i = 0, getProperty('unspawnNotes.length')-1 do
setPropertyFromGroup('unspawnNotes', i, 'noteSplashData.useRGBShader', false)
end
end
If you want backwards compatibility for your scripts/mods of yours use the version
variable.
Example:
function onCreatePost()
if version < '0.7.0' then
debugPrint(getPropertyFromClass('ClientPrefs', 'lowQuality'))
else
debugPrint(getPropertyFromClass('backend.ClientPrefs', 'data.lowQuality'))
end
end
Is the page in some way inaccurate? an error, a typo, or outdated data? To report it, use the "Issue Tab". Or do you wish to include a new function or add new information? use the "Pull Request Tab". Help is always appreciated!
- Event Callbacks
- Custom Sprite
- Custom Text
- Object Functions
- General Functions
- Scripting & File Functions
- Game Input Control Functions
- Language Translation
- HScript Functions
- Custom Substates
- Custom Shaders
- Deprecated & Removed Functions
- Sound & Music Functions
- Tweens & Timers Functions
- Reflection Functions
- Variables