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:
| File | What it is for |
|---|---|
| shops.json | Changes shops, each by its id: "nook", "flower", "redd" and the rest of the shop table. |
| messages file | Lines a script or another mod can use, by key. |
| textures folder | A folder of replacement textures, named the way Dolphin names a custom texture. |
| main.lua | Lua 5.4 source text, run once when the game starts. |
| items.json | New furniture, each on a vanilla base piece. |
| mod-items.json (the game's) | /save/card_a/mod-items.json. |
| letters.json | Letter templates that a mod command (send_letter) mails through the mailbox, named "<mod id>:<letter id>". |
| calendar.json | Calendar days: dated days with safe effects only, and no script. |
| talk.json | Villager 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.
mod.schema.json: JSON Schema for mod.jsonshops.schema.json: JSON Schema for shops.jsonmessages.schema.json: JSON Schema for a messages filemod-items.schema.json: JSON Schema for a mod items fileletters.schema.json: JSON Schema for a letters filecalendar.schema.json: JSON Schema for a calendar filetalk.schema.json: JSON Schema for a talk pools fileplayac.lua: Lua types for your editor (LuaLS)items.json: every item, its price and whether a shop may stock itscenes.json: every scene a player can be in: number, name and titlesounds.json: every sound cmd.play_sound can play: name and titlevillagers.json: every villager: id, name, species and personalityapi.json: the whole spec, for toolsllms.txt: the API for AI assistants