Getting Started
Creating a Friday Night Funkin’ mod is straightforward. At its core, a mod is just a folder with a metadata file and whatever assets or scripts you want to add.This guide covers basic mod creation. For advanced scripting, see the Scripting Guide.
Mod Structure
Every mod follows this basic structure:Step 1: Create Mod Metadata
Every mod requires a_polymod_meta.json file. This tells Polymod about your mod:
Create _polymod_meta.json
Inside your mod folder, create
_polymod_meta.json with this template:_polymod_meta.json
Customize the fields
Required fields:
title- Display name of your moddescription- What your mod doesapi_version- Game version compatibility (use"0.8.0"for current)mod_version- Your mod’s versionlicense- License for your mod
contributors- Array of contributor objects withnamefieldhomepage- URL to mod page/repository
Example Metadata
Here’s the metadata from the included example mod:Step 2: Add a Mod Icon (Optional)
Create a_polymod_icon.png file to give your mod a custom icon:
- Size: 256x256 pixels recommended
- Format: PNG with transparency
- Location: Root of your mod folder
Step 3: Replace Assets
The simplest way to mod FNF is by replacing assets. Just match the game’s file structure:Replacing Images
To replace an image, create the same path in your mod:images/newgrounds_logo.png, it will use your version instead!
Replacing Data Files
Same principle for JSON data:Replacing Audio
Replace music or sound effects:Audio files should be in OGG Vorbis format for best compatibility.
Step 4: Merge Text Files
Instead of replacing files, you can append to them using the special_append folder:
- Concept
- Example
- From Example Mod
The
_append folder tells Polymod to add your content to the end of existing files instead of replacing them.Supported Merge Formats
Polymod supports merging for these file types:- TXT files - Line-by-line merging
- JSON files - Deep object merging
- CSV files - Row appending
- XML files - Node merging
Step 5: Add Scripts (Optional)
For custom behavior, add HScript files. Scripts go in the root or in ascripts folder:
Learn Scripting
See the full Scripting Guide for details on writing scripts.
Complete Example Mod
Here’s what a complete simple mod looks like:Testing Your Mod
Hot Reloading (Development)
During development, you can reload mods without restarting:PolymodHandler.hx
Best Practices
File Organization
File Organization
- Keep your folder structure clean and organized
- Use descriptive names for custom assets
- Document your changes in a README.md
- Include credits for any borrowed assets
Compatibility
Compatibility
- Test your mod with a clean game installation
- Check that API version matches current game version
- Avoid replacing files unless necessary (use append when possible)
- Test with other popular mods to check for conflicts
Performance
Performance
- Optimize image file sizes (use PNG compression)
- Keep audio files compressed (OGG with reasonable bitrate)
- Avoid excessive script calls in update loops
- Profile your scripts if you notice lag
Distribution
Distribution
- Package as a ZIP with your mod folder at the root
- Include installation instructions
- List compatible game versions
- Provide example screenshots
- Link to your homepage or source repository
Common File Paths
Here are some commonly modded paths:- Characters
- Stages
- Songs
- UI
Next Steps
Scripting Guide
Learn to write custom scripts with HScript
Polymod Deep Dive
Advanced modding techniques and asset merging
