# Migrations

> **Info:**
Migrations run from **Editor > Migrations** only. The old plugin's NPC file has to be in the server's plugins folder. It does not have to be running.

## Sources

| Plugin | Reads | Notes |
| ------ | ----- | ----- |
| Citizens | saves.yml | Not tested on a live install yet. |
| FancyNpcs | npcs.yml | |
| ZNPCsPlus | data folder, or znpcsplus.sqlite | Not tested on a live install yet. Switch ZNPCsPlus from MySQL to YAML first. |
| ZNPCs | ServersNPC/data.json | Not tested on a live install yet. |

<figure><img src="../.gitbook/assets/migrations/fancynpcs.png" alt="" width="563"><figcaption><p>Migrations (Migrate from FancyNpcs)</p></figcaption></figure>

<figure><img src="../.gitbook/assets/migrations/citizens.png" alt="" width="563"><figcaption><p>Migrations (Migrate from Citizens)</p></figcaption></figure>

Each source shows whether its file was found on this server. Importing asks for a confirmation, then reports how many NPCs were imported, skipped and failed, with the reasons.

## What Is Imported

| | Citizens | FancyNpcs | ZNPCsPlus | ZNPCs |
| --- | --- | --- | --- | --- |
| Name, type, location, enabled | Yes | Yes | Yes | Yes |
| Skin | Name, mirror | Name, mirror, image URL, skin file | Name, mirror, saved texture | Saved texture, mirror |
| Glowing and its color, look at players | Yes | Yes | Yes | Yes |
| Visibility permission and distance | No | Yes | Yes | No |
| Scale, collision, show in tab, click cooldown | No | Yes | No | No |
| Commands on click | Yes | Yes | Yes | Yes |
| Messages and server switches | No | Yes | Yes | Yes |
| Delays, sounds, permission checks | Delay, permission | Yes | Delay | No |
| Equipment, with names, lore and enchantments | Yes | Yes | Yes | Yes |

Image URL skins are made again through MineSkin, faster with a [MineSkin key](../configurations/main-configuration.md#mineskin). FancyNpcs skin files are copied from FancyNpcs/skins into the PhoenixNPCs skins folder, so `/pnpc edit <id> skin <file>` keeps working; they are uploaded to MineSkin unless FancyNpcs already saved the texture.

The NPC's id comes from its old name, cut to the [id rules](../plugin-information/commands.md#npc-ids). Skins are looked up again as they are imported.

## What Is Left Out

The report lists each of these with a count:

* An NPC whose id already exists here is left alone, so running a migration twice is safe.
* Mob types this server cannot show, and mob properties such as baby or colors.
* Click types and actions with no match here, commands' cooldowns and costs, and actions that need a player to lack a permission.
* Hologram item lines of ZNPCsPlus and conversations of ZNPCs.
* Commands run as op are imported, but only run with [Allow Op Commands](../configurations/main-configuration.md#allow-op-commands) on.
* FancyNpcs NPCs shown only to chosen players are shown to everyone.

An NPC in a world that is not loaded is still imported, and shows once the world is loaded and the plugin reloaded. An NPC in a world that does not exist on this server is left out.

Source: https://www.phoenixplugins.com/docs/phoenix-npcs/features/migrations