Skins: Difference between revisions

From Citizens Wiki

No edit summary
(19 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Custom NPC skins are something that many server admins have asked for ever since Citizens was first released. Unfortunately, skins are handled purely on the client. This means that without a client modification such as SpoutCraft, NPC skins are not controllable. The name of an NPC as you see it in-game is what Minecraft uses to look up the skin on its skin database. Renaming the NPC in any way will change its skin. Giving an NPC a name with color will change the skin to the default "Steve" because color characters count as part of the name.
== NPC Skins ==


__NOTOC__
Custom NPC skins are something that many server admins have asked for ever since Citizens was first released. In recent Minecraft versions it has become possible to control an NPC's skin via the new player packet system. By default an NPC will have the default Steve or Alex skin. You can set an NPC's skin by using the <code>/npc skin [NAME]</code> command. For example, <code>/npc skin mcmonkey4eva</code>


==What about giving the NPC a "display name" and using the real name to find the skin on the Minecraft skin database?==
== What's the best way to set a custom skin? ==
This is not possible. Many people have suggested that we give an NPC a "display name" similar to that of players. Unfortunately, display names are only used for chat-related uses. An NPC has no concept of a "display name" that would have any effect on its skin.


==So, I've ignored everything you've said. I just want to know where I can go to get custom skins.==
If you want to set a custom skin (one that isn't already on a player), use the script provided in [[#Helpful Tools]] which lets you set a skin from a URL. If you don't want to or can't do that, the backup option is: Set your own player skin to the desired skin. Go to your NPC and type <code>/npc skin <your name></code>. Change your skin to the next skin for the next NPC and repeat the process.
You will need to run [http://get.spout.org SpoutCraft] on your server and your players will need the Spout client. After installing Spout on your server and SpoutCraft on your client, install a skin-editing Spout plugin, see [[SpoutPlugin]].


==Can I just name my NPCs after real players?==
== Other Options ==
Sure, and it will work with all players, not just the ones who have the client mod. However, the owners of these accounts can change their skins if they want to, which can cause issues.
You can use <code>/npc skin [NAME] -l</code> (a lowercase L) to always use the latest skin for the player (updating if the player changes their skin). If this is not set, the current skin (at time of using the command) will be retained.
Please note that these skins won't work if you change the color of the NPC's name.
==See Also==
[[Frequently Asked Questions]]


==Recommended Skins==
You can use <code>/npc skin -t [uuid] [data] [signature]</code> from the console (or any large-input command sender) to set a very specific full skin blob from Mojang. If you don't know exactly what that is, just don't use it. It's a developer tool.
{| class="wikitable"
 
|+Templar Skins
Note that some sites like https://mineskin.org/ let you generate values for the <code>-t</code> option.
|-
 
|Basnik
== Common Issues ==
|<center>Basnik</center>[[File:Basnik.png]]
Many issues can cause the skin system to fail. If you are experienced issues, please ensure the following:
|-
* You are running a fully up to date Spigot server acquired from https://www.spigotmc.org/wiki/buildtools/ running the latest version of Minecraft. (Outdated servers are unsupported!) You can use <code>/version</code> to check the version of your server.
|Tribbs
* You are running the latest dev version of Citizens2 from http://ci.citizensnpcs.co/job/Citizens2/ Please verify the specific build number (NOT the file version name) You can use <code>/version citizens</code> to check this build number.
|<center>Tribbs</center>[[File:Tribbs.png]]
* You have a dedicated server (not a shared hosting service!)
|-
* You own your server's IP entirely (no other ports on the server are used by other minecraft servers! (Unless they're your own servers as well.))
|Gavoon
* You are running your server in ONLINE MODE (offline mode servers won't work!)
|<center>Gavoon</center>[[File:Gavoon.png]]
* There are no errors ANYWHERE in your current log file (<code>logs/latest.log</code>). Any errors, even if seemingly unrelated, must be fixed!
|}
* You are not being rate limited by Mojang. This can occur if you've loaded too many skins recently (from player head skull items, or from the npc skin command). This can be cured by waiting a while without loading more skins in, to allow Mojang to drop the rate limit.
 
If you have confirmed you meet all of these requirements, but are still having trouble, feel free to post an issue to https://github.com/CitizensDev/Citizens2/issues with as much information as possible (At the very least, pastebin your current log file and Citizens saves.yml file)
 
Please '''DO NOT''' lie about any of these when requesting help. They are not to "catch you" or anything like that: these are listed because these requirements '''WILL''' cause issues if not met, and if you say you meet them but don't actually, you'll just be wasting everyone's time (including your own!)
 
== Helpful Tools ==
 
There's a [https://www.spigotmc.org/resources/denizen.21039/ Denizen] script available to automatically load skins onto an NPC from any valid skin image URL (even just from imgur / any other direct-link image host). Get that script [https://forum.denizenscript.com/viewtopic.php?f=13&t=133 here].


{{NavBox}}
{{NavBox}}
[[Category:Usage]]
[[Category:Usage]]

Revision as of 13:08, 1 August 2019

NPC Skins

Custom NPC skins are something that many server admins have asked for ever since Citizens was first released. In recent Minecraft versions it has become possible to control an NPC's skin via the new player packet system. By default an NPC will have the default Steve or Alex skin. You can set an NPC's skin by using the /npc skin [NAME] command. For example, /npc skin mcmonkey4eva

What's the best way to set a custom skin?

If you want to set a custom skin (one that isn't already on a player), use the script provided in #Helpful Tools which lets you set a skin from a URL. If you don't want to or can't do that, the backup option is: Set your own player skin to the desired skin. Go to your NPC and type /npc skin <your name>. Change your skin to the next skin for the next NPC and repeat the process.

Other Options

You can use /npc skin [NAME] -l (a lowercase L) to always use the latest skin for the player (updating if the player changes their skin). If this is not set, the current skin (at time of using the command) will be retained.

You can use /npc skin -t [uuid] [data] [signature] from the console (or any large-input command sender) to set a very specific full skin blob from Mojang. If you don't know exactly what that is, just don't use it. It's a developer tool.

Note that some sites like https://mineskin.org/ let you generate values for the -t option.

Common Issues

Many issues can cause the skin system to fail. If you are experienced issues, please ensure the following:

  • You are running a fully up to date Spigot server acquired from https://www.spigotmc.org/wiki/buildtools/ running the latest version of Minecraft. (Outdated servers are unsupported!) You can use /version to check the version of your server.
  • You are running the latest dev version of Citizens2 from http://ci.citizensnpcs.co/job/Citizens2/ Please verify the specific build number (NOT the file version name) You can use /version citizens to check this build number.
  • You have a dedicated server (not a shared hosting service!)
  • You own your server's IP entirely (no other ports on the server are used by other minecraft servers! (Unless they're your own servers as well.))
  • You are running your server in ONLINE MODE (offline mode servers won't work!)
  • There are no errors ANYWHERE in your current log file (logs/latest.log). Any errors, even if seemingly unrelated, must be fixed!
  • You are not being rate limited by Mojang. This can occur if you've loaded too many skins recently (from player head skull items, or from the npc skin command). This can be cured by waiting a while without loading more skins in, to allow Mojang to drop the rate limit.

If you have confirmed you meet all of these requirements, but are still having trouble, feel free to post an issue to https://github.com/CitizensDev/Citizens2/issues with as much information as possible (At the very least, pastebin your current log file and Citizens saves.yml file)

Please DO NOT lie about any of these when requesting help. They are not to "catch you" or anything like that: these are listed because these requirements WILL cause issues if not met, and if you say you meet them but don't actually, you'll just be wasting everyone's time (including your own!)

Helpful Tools

There's a Denizen script available to automatically load skins onto an NPC from any valid skin image URL (even just from imgur / any other direct-link image host). Get that script here.