Mod API reference

These pages list everything a mod may use. They are generated from the one spec that the game, the Mods tab and the mod list are tested against. The game reads mod API level 1. Level 1 (2026-11-16): The first level. Content is textures (a file may carry a readable label before its name), lines (a messages file), shops (each by its id in the shop table, from Nook's store and the flower shop to Katrina's tent, one block shape for every shop, each block applying while its when holds), new furniture on a vanilla base with pictures of its own (an items file, renames), letter templates, calendar days and villager line pools. Scripts get the events in the events list, each handed one table. They also get log, message, the game queries, a store per town with a part per player and one per browser, settings, remote calls between mods, a seeded rng and timers on the game clock. Eight commands are declared in permissions: six (cmd.send_letter, give_item, show_line, ask, take_item, take_bells) are applied at the end of a frame's update, and two (cmd.set_shop_goods, set_shop_open) are set at the call. Mods also have depends and conflicts with version ranges, and data_version with the data_migrated event. Mods can name optional_depends, and a setting can be world or client.

Sections #

Data files #

Every file a mod can ship, with each field, its limits and the errors it can raise:

FileWhat it is for
shops.jsonChanges shops, each by its id: "nook", "flower", "redd" and the rest of the shop table.
messages fileLines a script or another mod can use, by key.
textures folderA folder of replacement textures, named the way Dolphin names a custom texture.
main.luaLua 5.4 source text, run once when the game starts.
items.jsonNew furniture, each on a vanilla base piece.
mod-items.json (the game's)/save/card_a/mod-items.json.
letters.jsonLetter templates that a mod command (send_letter) mails through the mailbox, named "<mod id>:<letter id>".
calendar.jsonCalendar days: dated days with safe effects only, and no script.
talk.jsonVillager lines placed in a villager's talk.

For your editor and tools #

Start your mod.json with "$schema": "https://playaconline.com/schemas/mod.schema.json",. An editor that knows JSON Schema, such as VS Code, then checks the file as you type. For scripts, put playac.lua where your Lua language server reads library files.