Adding NPCs & Custom Content to an L2J Server

X
xzone
June 27, 2026 2 min de lectura Server Development

Adding custom content is the most common thing new L2J admins ask about. The pattern is almost always the same: an NPC ships as a data definition plus an SQL insert, and once both are in place you spawn it. This overview applies to modern forks (aCis, L2jMobius and similar) — file paths differ slightly, but the idea is identical.

How an NPC is defined

  • Template (data): stats, appearance, AI type and skill list — an XML file under data/stats/npcs (path varies by fork).
  • SQL: registers the NPC id and, for buffers/shops, the buff or multisell lists it uses.

Steps

  1. Copy the NPC's data/XML file into your pack's NPC data folder.
  2. Run its SQL file against your game database (via a client like DBeaver, HeidiSQL or the CLI).
  3. Restart the server, or use a //reload npc-type command if your fork supports it.
  4. Spawn it in-game with //spawn <npc_id> where you want it, then save the spawn.

Adding a buffer

A buffer is just a special NPC. Most are script/quest-based: import the SQL, drop the script into your fork's script folder, register the NPC id, and spawn it. If players get a "you do not meet the criteria" message, the buff-skill entries in the SQL did not import — re-run that part.

Golden rules

  • Always back up your database before importing SQL.
  • Keep custom NPC ids in a high, unused range so official updates never collide with them.
  • Test on a local copy before touching your live server.

Once your server is ready, list it on L2TopZone to bring in players.

FAQ

Do I need both the data and the SQL file?

Yes. The data/XML defines the NPC, the SQL registers it and its buff/shop lists. Missing one breaks it.

Can I apply changes without a restart?

On forks that support it, a //reload command applies most NPC changes live; otherwise restart.

What id should custom NPCs use?

Keep custom ids in a high, unused range so official updates never collide with them.

Compartir este artículo:

© 2021 L2TOPZONE, LLC Todos los derechos reservados.