Skip to content

Mod NukeIslands

New superweapons, meaner bots, cheaper ships, your own HUD widgets. Change a number in a JSON file, or write Luau that reacts to the match.

A mod is a folder of JSON and Luau. Scripts run in a sandbox. Mod API level 1.

The Solar Flare mod in a match: the Sun Lance console opens, then the flare lands on an enemy island and the FLARES counter widget appears.
Solar Flare, the example mod: a new superweapon, a cheaper Destroyer and a HUD counter. Two data files, one strings file, 35 lines of Luau.
  • SuperweaponsAdd new ones on the console and art of a base weapon. Price, cooldown, damage caps, a free first charge.
  • Ships and buildingsCost, HP, speed, range, damage, bays and level curves of every unit.
  • BotsNew personalities, how often they go to war, what they say when they do.
  • Upgrade treesAdd, change or remove nodes in the lab, star and offline trees.
  • EconomyIncome curves, raids, shields, wipes, the Silo: every constant.
  • EventsReact when a weapon lands, an island is wiped, a tier is reached. Cancel a strike.
  • HUD widgetsSmall panels, buttons and windows in the game’s own pixel style.
  • Sounds and spritesShip your own, or replace a game sound by giving yours its name.
  • SavesKeep your mod’s own numbers in the player’s save slot.

Make a folder called mods, and in it a folder called my_first_mod with two files:

mod.json
{
"id": "my_first_mod",
"name": "My First Mod",
"version": "1.0.0",
"api_version": 1,
"author": "you",
"description": "A cheaper Destroyer."
}
data/ships.json
{ "patch": { "destroyer": { "cost": 1500 } } }

Start the game with that folder. The MODS page lists your mod, and the Destroyer now costs $1,500 instead of $4,000:

The SHIPS sheet in a match. The Destroyer's price button reads $1.50K.
The SHIPS sheet with my_first_mod installed. Captured from the game.

That is a whole mod. The tutorial walks through it with the commands, then breaks it on purpose so you know what an error looks like.

  1. Tweak the DestroyerFolders, mod.json, a data file, the MODS page.
  2. Your first superweaponSolar Flare, file by file.
  3. React to eventsA truce that refuses superweapons for three minutes.
  4. Add a HUD widgetA cash meter, then a window behind a button.
  5. Save dataA war diary that survives restarts.
  6. Ship it as a .nkpOne file to share, checked and ready.

Every code sample on this site is a real mod that the test suite loads into the game’s mod layer, in both the server and the client VM. The reference is generated from the game code, so it cannot fall behind.