To create custom notes in Friday Night Funkin' using the Psych Engine (v0.7.3) that behave like Project DIVA notes, you'll need to use Lua scripting to define how the notes appear and behave. Project DIVA notes often have unique visuals and timing mechanics, so we’ll simulate that as closely as possible using Psych Engine’s modding capabilities.
Here’s a basic example of how to create a custom note type in a .lua script that mimics some Project DIVA behavior (like a visual effect or custom hit logic):
📁 Place this script in mods/your-mod-name/scripts/
Filename: customDivaNote.lua
Example:
-- customDivaNote.lua
function onCreate()
-- Add a new custom note type
-- Make sure to add this note type in your chart editor too!
for i = 0, getProperty('unspawnNotes.length')-1 do
if getPropertyFromGroup('unspawnNotes', i, 'noteType') == 'Diva Note' then
-- Change the texture
setPropertyFromGroup('unspawnNotes', i, 'texture', 'customDivaNote'); -- Make sure you have this texture in images/
-- Optional: Make it ignore default note behavior
setPropertyFromGroup('unspawnNotes', i, 'noAnimation', true);
setPropertyFromGroup('unspawnNotes', i, 'hitCausesMiss', false);
end
end
end
function goodNoteHit(id, direction, noteType, isSustainNote)
if noteType == 'Diva Note' then
-- Play a custom animation or effect
playSound('divaHit', 1); -- Make sure you have divaHit.ogg in sounds/
characterPlayAnim('boyfriend', 'sing'..getDirectionName(direction), true);
-- Add a visual effect (like a flash or particle)
makeLuaSprite('flash', '', 0, 0);
makeGraphic('flash', screenWidth, screenHeight, 'FFFFFF');
setObjectCamera('flash', 'other');
addLuaSprite('flash', true);
doTweenAlpha('flashFade', 'flash', 0, 0.3, 'linear');
end
end
function getDirectionName(dir)
local dirs = {'LEFT', 'DOWN', 'UP', 'RIGHT'}
return dirs[dir+1]
end
📝 Additional Setup:
-
Chart Editor:
- In the Psych Engine chart editor, add a new note type called Diva Note.
- Place notes with this type where you want them.
-
Custom Texture:
- Create a new note texture (e.g., images/customDivaNote.png and customDivaNote.xml).
- You can base it off the default NOTE_assets and modify it to look like Project DIVA notes.
-
Custom Sound:
- Place a sound file named divaHit.ogg in mods/your-mod-name/sounds/.
-
Optional:
- You can add more complex behavior like hold notes, flicks, or slide notes by checking isSustainNote or adding more logic in goodNoteHit or onUpdate.
📌 Tips:
- You can animate the note or add a countdown ring like in Project DIVA using sprites and timers.
- Use onUpdatePost to animate custom UI elements or note effects.
- Use setPropertyFromGroup to modify note properties like scale, angle, or alpha.
Let me know if you want to simulate a specific Project DIVA note type (like star notes, slide notes, etc.) and I can help you build that too!