Skip to content

2. Basic Set‐up

Campbell edited this page Apr 28, 2026 · 1 revision

Here will be explanations of the basic modding in Nightmare Vision.


Creating your mod

In the content folder, create a new folder and name it after your mod.

In that content folder, you can create a .json file titled meta, which handles some specific information regarding your mod. More information about meta.json files can be viewed below on this page.

Creating your meta.json file

Listed below are each of the variables definable in the meta.json file and their function in the engine.

Name Type Function
name String String value that is referred to in the in-game mod manager.
description String String value that describes your mod in the in-game mod manager.
global Bool Boolean value that determines if your mod should run globally.
If enabled, you can access files from your mod while another mod is being prioritized.
discordClientID String String value that changes the currently used Discord Client. Must be a valid Discord Client ID.
For example, inputting the value "960620410095956018" would make the engine's Discord Client change to FNF D-Side's client.
windowTitle String String value that changes the game window's title.
iconFile String String value of the .png file location of your mod's icon.
If this field is filled out, it will change the game icon upon setting to the top mod.
Icon is also used in the Mods menu.

Image MUST be contained in your mods images folder or it will not load properly.
defaultTransition String String value that determines your mod's default transition. If you want a scripted transition to be used, simply input the script name.

There are a few fallback values you can use. Inputting base or swipe will make your transition rely on the engine's default transition, which is a black gradient swiping over the screen.
Inputting fade will make your transition fade to and from black.

Example, D-Side's default transition is scripts/transitions/SimpleSticker. In order to make it the default, the input for defaultTransition was simply SimpleSticker.
defaultFont String String value that determines your mod's default font.
Across FNF, the font vcr.tff is used very frequently, which is what we refer to as our default font.

When setting your default font, be sure to include your file extension. Simply inputting your font's file name will not work, you have to include the .ttf or .otf or it will not work.
uiPrefix String Folder prefix for your UI images that are loaded automatically via engine, more specifically, this is the location where the health / time bar assets are located.

So, if you have a custom health/time bar asset within images/UI/game/HUD/ and want the game to read from there, simply input your uiPrefix as images/UI/game/HUD/.
countdownPrefix String Folder prefix for your countdown images that are loaded automatically via engine.

So for example, if you have custom countdown assets within images/UI/game/HUD/countdown/ and want the game to read from there, simply input your countdownPrefix as images/UI/game/HUD/countdown/.
ratingsPrefix String Folder prefix for your ratings images that are loaded automatically via engine.

So for example, if you have custom rating assets within images/UI/game/HUD/ratings/ and want the game to read from there, simply input your ratingsPrefix as images/UI/game/HUD/ratings/.
comboPrefix String Folder prefix for your combo images that are loaded automatically via engine.

So for example, if you have custom combo assets within images/UI/game/HUD/combo/ and want the game to read from there, simply input your comboPrefix as images/UI/game/HUD/combo/.
stateRedirects typedef Field that determines what soft-coded state some hard-coded states may redirect to. Valid fields include:
- TitleState
- MainMenuState
- StoryMenuState
- FreeplayState
- CreditsState
- OptionsState

Make sure your value for each redirected state exists in your scripts/states folder, or else a crash may occur.

As an example, here is FNF D-Side's meta.json file in case you may be confused on the formatting.

{
    "name": "Friday Night Funkin: D-Sides (REDUX)",
    "description": "The iconic remix mod of the newgrounds-born rhythm game, Friday Night Funkin'! With a nearly identical premise as the original game, face off against a variety of opponents with a creative spin, alongside creative interpretation of many fanworks!",
    "global": false,

    "discordClientID": "960620410095956018",
    "windowTitle": "Friday Night Funkin: D-Sides",
    "iconFile": "UI/window/icons/64",
    "defaultTransition": "SimpleSticker",
    
    "stateRedirects": {
        "TitleState": "TitleState",
        "MainMenuState": "MainMenuState",
        "StoryMenuState": "StoryMenuState",
        "FreeplayState": "FreeplayState",
        "CreditsState": "Credits",
        "OptionsState": "Options"
    },
    

    "uiPrefix": "UI/game/HUD/",
    "countdownPrefix": "UI/game/HUD/countdown/",
    "ratingsPrefix": "UI/game/HUD/ratings/",
    "comboPrefix": "UI/game/HUD/combo/"
}

Creating your freeplay.json file

The freeplay.json file is used if your mod utilizes the built in Freeplay state, instead of a custom one. This file handles what songs are added to freeplay in a specific order and can even group them by tab.
The freeplay.json file is located within the data folder of your mod.

It is worth noting that the freeplay.json file is completely optional and not required for your songs to appear in freeplay.
If you have any existing week jsons within your weeks folder and no defined freeplay.json, the engine will read your weeks folder for freeplay data instead. It is recommended that you set up your freeplay list via the freeplay data file, but worth nothing it is not required.


Listed below are each of the variables definable in the freeplay.json file and their function within Freeplay.

Name Type Function
tabs Array This is the list containing each tab's data.
Wrap your full freeplay.json within tabs.
If an example is needed, please see below this table.
title String Displayed title for your freeplay tab.

image
fromWeeks Array<String> List of week jsons to apply to freeplay.
Formatted as "week1", "week2".

Simply input the name of the week json as a string element, so if you have testweek.json and poopweek.json and want both to be in freeplay, simply put:
"fromWeeks": ["testweek", "poopweek"]
songs Array<String> List of songs to apply to freeplay.
Formatted as "song1", "song2".

Simply input the song's folder name as a string element to be added, so if you have the song folders of test song and test song 2, simply put:
"songs": ["test song", "test song 2"]

As an example, below is the (at the time of writing this) current freeplay.json file in the NMV-Base-Game content folder.

{
    "tabs": [
        {
            "title": "Friday Night Funkin'",
            "fromWeeks": ["tutorial", "week1", "week1-pico", "week2", "week3", "week4", "week5", "week6", "week7"]
        },
        {
            "title": "Erect Mixes",
            "songs": [
                "Bopeebo-erect",
                "Fresh-erect",
                "Dadbattle-erect"
            ]
        },
        {
            "title": "Pico Mixes",
            "songs": [
                "Bopeebo (Pico Mix)",
                "Fresh (Pico Mix)",
                "DadBattle (Pico Mix)",
                "Stress (Pico Mix)",
                "Darnell",
                "Lit-Up",
                "2hot",
                "Blazin"
            ]
        }   
    ]
}

File Organization

File organization is an essential part of modding in NMV, and there are a few options. Below is a table listing each folder usable in a mod folder, and their function.

flowchart LR

    CONTENT_DIR[(content)] --> YOUR_MOD
    YOUR_MOD --> DATA_DIR[data]
    YOUR_MOD --> IMAGES[images]
    
    YOUR_MOD{your mod} ==> CORE_META[meta.json]@{shape: card}




    IMAGES --> CHAR_IMAGE[characters] ==> sheet/atlas-here@{shape: card}
    IMAGES --> UI --> ICONS[icons] ==> icon.png@{shape: card}
    IMAGES --> images-here@{shape: card}

    YOUR_MOD --> D[music] ==> music.ogg@{shape: card}
    YOUR_MOD --> SCRIPTS_DIR[scripts] ==> SCRIPT_DIR_SCRIPT[script.hx]@{shape: card}
    YOUR_MOD --> F[shaders] ==> shader.frag@{shape: card}
    YOUR_MOD --> SONGS_DIR[songs]
    YOUR_MOD --> sounds ==> sound.ogg@{shape: card}
    YOUR_MOD --> fonts ==> font.ttf@{shape: card}

    SCRIPTS_DIR --> SCRIPT_STATES_DIR[states] ==> State.hx@{shape: card}

    DATA_DIR ==> freeplay.json@{shape: card}
    DATA_DIR --> characters ==> char.json@{shape: card}
    DATA_DIR --> EVENTS_DIR[events] 
    DATA_DIR --> noteskins ==> noteskin.json@{shape: card}
    DATA_DIR --> NOTETYPES_DIR[notetypes]
    DATA_DIR --> DATA_STAGE_DIR[stages]
    DATA_DIR --> weeks ==> week.json@{shape: card}

    DATA_STAGE_DIR --> SONG_STAGE_DIR[stage] ==> data.json@{shape: card}
    SONG_STAGE_DIR ==> script.hx@{shape: card}


    EVENTS_DIR ==> event.txt@{shape: card}
    EVENTS_DIR ==> event.hx@{shape: card}

    NOTETYPES_DIR ==> note.txt@{shape: card}
    NOTETYPES_DIR ==> note.hx@{shape: card}


    SONGS_DIR --> SONG[song] ==> meta.json@{shape: card}

    SONG --> AUDIO[audio]
    SONG --> CHARTS[charts]

    AUDIO ==> Inst.ogg@{shape: card}
    AUDIO ==> Voices.ogg@{shape: card}

    CHARTS ==> hard.json@{shape: card}
    CHARTS ==> events.json@{shape: card}
Loading
Name Purpose
data Folder containing a majority of your mod's data files (.txt, .json, etc.).
Optionally, you can put some folders within data to organize your mod further.

Folders that you can contain inside or outside of data include:
- characters
- events
- notetypes
- noteskins
- stages
- stages
- weeks
fonts Folder containing all of your .ttf or .otf files.
images Folder containing all of your image files.
Sprite sheets, texture atlas', and all images are contained in this folder.
music Folder containing all of your music files.

Music files are the songs played in menus, cutscenes, and other places.
Music files are NOT to be confused with playable songs.

Your music files can be either .ogg or .wav files.
sounds Folder containing all of your sound effect files.

Your sound files can be either .ogg or .wav files.
scripts Folder containing all of your haxe script files.
Files can be either .hx, .hxs, or .hscript.
All script files not contained within a sub-folder will run in PlayState.

There are multiple sub-folders in scripts, and those include:
- states
- substates
- transitions
- plugins
shaders Folder containing all of your .frag shader files.
songs Folder containing all of your playable song files.
To make a new song, simply make a new folder titled after your song.

Within that folder, create a folder called data. That folder will contain all of your chart & event .json files.
Chart files should be named after the difficulty. So if you want to put in your hard chart. simply name it hard.json.

Your audio files can be put in your folder directly, or alternatively put in a sub-folder entitled audio.
Below are the file naming schemes for song files:
- Inst (Instrumental)
- Voices (Works like pre-0.3.0 base-game. Standalone voices file that mutes audio when the player misses.)
- Voices-player & Voices-opp (Works like 0.3.0 base-game, mutes only the player audio when the player misses)

Your song script files can be contained within the folder directly or alternatively a sub-folder entitled scripts.
So, if you wanted your script Test.hx to run, you could put it in songs/SongName or songs/SongName/scripts.
videos Folder containing all of your .mp4 and .mov files.
characters Folder containing all of your character data files. Files in this folder include the character .json files, and optional character scripts.

Character scripts follow the same file formatting as any other script, that being .hx, .hxs, or .hscript.
MAKE SURE that your character script shares a name with your respective character's data file..
boyfriend.json would load the script boyfriend.hx, and nothing else.

More information on character scripts can be found in the scripts section of the wiki.
events Folder containing your event script files.
Event scripts follow the same file formatting as any other script, that being .hx, .hxs, or .hscript.
More information on event scripts can be found in the scripts section of the wiki.
notetypes Folder containing your note type script files.
Note type scripts follow the same file formatting as any other script, that being .hx, .hxs, or .hscript.

More information on note type scripts can be found in the scripts section of the wiki.
noteskins Folder containing all of your .json note skin files.
More information on note skins can be found in the note skin section of the wiki.
stages Folder containing all of your stage files.
Stages have two possible naming conventions, either being a subfolder named after your stage or simply being a .json and script file with the same name.

More information on stage .jsons and scripts can be found in the stages section of the wiki.
weeks Folder containing all of your .json week files.

Clone this wiki locally