Skins: Difference between revisions

From Citizens Wiki

No edit summary
 
(49 intermediate revisions by 7 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 ==


==But what about giving the NPC a "display name" and using the real name to find the skin on the Minecraft skin database?==
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>
Again, 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.==
== What's the best way to set a custom skin? ==
To get custom skins for NPCs, you must download [http://get.spout.org SpoutCraft]. There are other client mods out there that control NPC skins, but many of those are proprietary and/or outdated. After installing Spout on your server and SpoutCraft on your client, install a skin-editing Spout plugin (i.e. CitiSkin or [http://dev.bukkit.org/server-mods/citizenskins CitizenSkins]).


==Can't I just name my NPCs after real players?==
If you want to set a custom skin (one that isn't already on a player), use <code>/npc skin --url [image]</code>. The "[image]" part must be filled with a valid public image direct link. "public" means it's on a web host (you can just use Discord or [https://imgur.com imgur] or whatever else) and "direct" means it's a link that ends with ".png" containing the raw image (not a link to an album or similar. Imgur by default gives you an album link, and you have to right click -> copy image URL).
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.
Please note that these skins won't work if you change the colour of the npc's name.
Here is a list of usable skins:
<div class="toccolours mw-collapsible mw-collapsed">
List Of Character Names with Skins:
</div>
<div class=mw-collapsibe-content">


Playername | Description
For example: <code>/npc skin --url https://gamepedia.cursecdn.com/minecraft_gamepedia/3/37/Steve_skin.png</code>
'''Mojang Staff'''
Notch - The creator of Minecraft.
jeb_ - Developer of Minecraft.


'''Unsorted:'''
Note that the <code>--url</code> feature is internally backed by [https://mineskin.org/ Mineskin], and in some cases it may be helpful to use their website directly.
hidden = Green trim Knight
LeaverBoy = White Armor w/ Red Visor
Icarus = Looks like Ezreal from League of Legends
Dominus = James from Pokemon (Team Rocket)
Miner = A well skinned miner
Goblin = An orc/goblin.
Citizen = Secret Agent Man w/ #3 on back
Judge = Boring Gray man w/Suit
Guard = Master Chief from the "Halo" series
Herobrine = The so called "Herobrine", a rumor of Minecraft.
God = A skin that resembles their image of God.
Alberts = Ash from Pokemon
inthelittlewood = Oldman w/Green robe and red creeper face cape
PigZombie = Mudkip from Pokemon.
Dragonianer = deadric armor from Elder Scrolls Series
Dawdle2 = A HD skeleton
assassins_kid= Dark armored w/ Enderman Cape
KingCharles = Shoop Da Whoop (Meme)
Oracle = Black armor Knight w/ Gold trim
Librarian = Monk with red robe trimmed gold
Basic = A tree man
Wolfram = Rambo skin w/flaming pants
EnlightendDead = Undead w/ Hollow Mask (Bleach Series) and red-black Robe
Hidendra = Creeper in a Suit
Drakia = A blond haired guy in a mideval outfit
Quaffle = Tan Monk in gray/blue robe
Jereq = Default with plain blue clothing
HoneyDew = Honeydew's skin from Minecraft.
Xephos = A homeless person (grey ripped shirt.)
Israphel = A grey creeper face with dark coat.
Grim = Futuristic Cop/Black Armor with blue shades.
Ezreal = Looks like a boy with Goggles, blonde hair & green coat.
Jason = Full Creeper Skin
Non = Grey/White skinned, Orange Hair & Shades with Red Shirt.
Gazz = Domokun.
Britannia = Mc Donalds Clown
Little = Orange fox with Glasses.
Chris = Minecraft Guy with Denim Jacket.
Joe = Red coated guy/wizard.
Engel = Girl NPC with White hair & White/Grey clothes.
Blockmann = Creeper with dark green/grey vest.
Chef = Guy with clothes & 3-D glasses.
Archer = Scottish guy
CaptainSparklez = Batman (CaptainSparklez's Skin).
Kaikez - Soldier
Adventurer - Green Clothed person.


'''Males:'''
If you want a '''slim model''' (aka "Alex model") (3-pixel wide arms instead of 4) from a URL, it might be helpful to directly upload the skin image to [https://mineskin.org/ Mineskin] and use the model choice option on the page.
warami - Batman
Soldan - Ash from pokemon
SoldjahBoy - ME! A man in a white shirt
frosty - Cookie Monster
ParkerGG - guy in a black hood
Joymo - Duke Nukem
AnewAaron - Awesomeface person w/brown Hoodie
TheDarkStar - Blue/Ice Wizard
Geecku - Link Skin
Shogun - Ninja w/Red head band and belt
Giik - some trendy bloke
seekercat - Templar/Armored Knight
Yamatsukami - Metal Gear Solid person
Kraiten - Blue knight/Diver suit
WingOfWar - Masked Traveler/Warrior
ThePengu - A charming chap wearing a monocle


'''Females'''
== Other Options ==
Raecchi - Steampunk
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.
MakaHearts - French Maid
Amber - Misty from Pokemon
MizLiv - Bubble Eyed w/ Rainbow Clothing
AngelGirl737 - Girl in blue armour
SuccubusQueen - Nude w/ Light Chain armor
</div>


==See Also==
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.
[[Frequently Asked Questions]]
 
Note that some sites like https://mineskin.org/ let you generate values for the <code>-t</code> option.
 
== Mirroring A Player's Current Skin ==
 
If you want every player to see their own current skin applied to the NPC, install [https://denizenscript.com/ Denizen] and then use the command <code>/npc mirrorskin</code>. You can also have the name mirrored via <code>/npc mirrorname</code>, or mirror equipped items with <code>/npc mirrorequip</code>.
 
== For API Users ==
 
If you use the Java Citizens API, you can control skins on NPCs via <code>npc.getOrAddTrait(SkinTrait.class)</code> and calling a method like <code>setSkinName</code>. Refer to the [https://jd.citizensnpcs.co/net/citizensnpcs/trait/SkinTrait.html SkinTrait JavaDoc] for more information.
 
'''Note:''' you can't (and shouldn't) set from image or URL directly via Java API. Instead, upload your image to [https://mineskin.org/ Mineskin] and save the texture+signature data (store them in a string or a config file), and set that with <code>setSkinPersistent(uniqueId, signature, texture)</code>.
 
'''Also note:''' if you're creating a new NPC and giving it a skin, it's best to give it a skin before you call <code>spawn()</code>, as the first spawn will trigger a default skin load, which can be slow or even overwrite your custom skin. If you have set a skin prior to the spawn call, it will not try to load a default one.
 
== Common Issues ==
Many issues can cause the skin system to fail. If you are experiencing issues, please ensure the following:
* You are running a fully up to date Spigot server acquired from https://www.spigotmc.org/wiki/buildtools/ running a supported recent version of Minecraft. (Paper also generally works). You can use <code>/version</code> 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 <code>/version citizens</code> 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!) (note that if you're on a Bungee network, you must enable "bungeecord: true" to make sure the game knows it can still connect to Mojang's servers to download skins).
* 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.
* Mojang's servers are online. Check that the [https://status.mojang.com/check Mojang Status Page] is showing greens. If skins usually work but suddenly don't for a while, it might just be the official servers are down.
 
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 GitHub] or ask on [https://discord.gg/Q6pZGSR Discord] 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!).
 
== Technical Info ==
 
If you're interested in how the skin system works internally (texture/signature system), you can view an explanation of the skin-blob system [https://one.denizenscript.com/denizen/lngs/player%20entity%20skins here on the Denizen documentation site].
 
== Additional Resources ==
 
* Here's a Denizen script to save/load skins on NPCs for if you reuse skins frequently: [https://forum.denizenscript.com/resources/npc-skin-save-load.8/ NPC Skin Save/Load]
* Mineskin has a gallery of skins you can look through: [https://mineskin.org/gallery Mineskin Gallery]
* Here are some more skin list sites: [https://www.minecraftskins.com/ MinecraftSkins.com], [https://www.minecraftskins.net/ MinecraftSkins.net], [https://www.planetminecraft.com/skins/ PlanetMinecraft Skins]
* Minecraft Wiki page about skins: [https://minecraft.fandom.com/wiki/Skin Minecraft Wiki: Skins]
* Here's a Denizen script to edit player skins as easily as you can edit NPC skins: [https://forum.denizenscript.com/resources/player-skin-command.54/ Player Skin Command]


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

Latest revision as of 13:24, 29 April 2022

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 /npc skin --url [image]. The "[image]" part must be filled with a valid public image direct link. "public" means it's on a web host (you can just use Discord or imgur or whatever else) and "direct" means it's a link that ends with ".png" containing the raw image (not a link to an album or similar. Imgur by default gives you an album link, and you have to right click -> copy image URL).

For example: /npc skin --url https://gamepedia.cursecdn.com/minecraft_gamepedia/3/37/Steve_skin.png

Note that the --url feature is internally backed by Mineskin, and in some cases it may be helpful to use their website directly.

If you want a slim model (aka "Alex model") (3-pixel wide arms instead of 4) from a URL, it might be helpful to directly upload the skin image to Mineskin and use the model choice option on the page.

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.

Mirroring A Player's Current Skin

If you want every player to see their own current skin applied to the NPC, install Denizen and then use the command /npc mirrorskin. You can also have the name mirrored via /npc mirrorname, or mirror equipped items with /npc mirrorequip.

For API Users

If you use the Java Citizens API, you can control skins on NPCs via npc.getOrAddTrait(SkinTrait.class) and calling a method like setSkinName. Refer to the SkinTrait JavaDoc for more information.

Note: you can't (and shouldn't) set from image or URL directly via Java API. Instead, upload your image to Mineskin and save the texture+signature data (store them in a string or a config file), and set that with setSkinPersistent(uniqueId, signature, texture).

Also note: if you're creating a new NPC and giving it a skin, it's best to give it a skin before you call spawn(), as the first spawn will trigger a default skin load, which can be slow or even overwrite your custom skin. If you have set a skin prior to the spawn call, it will not try to load a default one.

Common Issues

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

  • You are running a fully up to date Spigot server acquired from https://www.spigotmc.org/wiki/buildtools/ running a supported recent version of Minecraft. (Paper also generally works). 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!) (note that if you're on a Bungee network, you must enable "bungeecord: true" to make sure the game knows it can still connect to Mojang's servers to download skins).
  • 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.
  • Mojang's servers are online. Check that the Mojang Status Page is showing greens. If skins usually work but suddenly don't for a while, it might just be the official servers are down.

If you have confirmed you meet all of these requirements, but are still having trouble, feel free to post an issue to GitHub or ask on Discord 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!).

Technical Info

If you're interested in how the skin system works internally (texture/signature system), you can view an explanation of the skin-blob system here on the Denizen documentation site.

Additional Resources