yl_speak_up/skin_preview.lua

63 lines
2.9 KiB
Lua

-- this file contains the preview images for the skins of the NPC;
-- it does depend on the model used
-- this is a suitable version for most models/meshes that use normal player skins
-- (i.e. mobs_redo)
yl_speak_up.skin_preview_normal = function(skin)
return "image[4.5,1.8;3,3;[combine:8x9:-8,-9="..skin..":-40,-9="..skin.."]".. -- head, beard
"image[4.5,4.12;3,4.5;[combine:8x12:-20,-20="..skin.."]".. -- body
"image[4.5,8.02;1.5,4.5;[combine:4x12:-4,-20="..skin.."]".. -- left leg
"image[5.73,8.02;1.5,4.5;[combine:4x12:-4,-20="..skin.."^[transformFX]".. -- right leg
"image[3.15,4.12;1.5,4.5;[combine:4x12:-44,-20="..skin.."]".. -- left hand
"image[7.35,4.12;1.5,4.5;[combine:4x12:-44,-20="..skin.."^[transformFX]".. -- right hand
"image[10.5,1.8;3,3;[combine:8x8:-24,-8="..skin.."]".. -- back head
"image[10.5,4.12;3,4.5;[combine:8x12:-32,-20="..skin.."]".. -- body back
"image[10.5,8.02;1.5,4.5;[combine:4x12:-12,-20="..skin.."]".. -- left leg back
"image[11.73,8.02;1.5,4.5;[combine:4x12:-12,-20="..skin.."^[transformFX]".. -- right leg back
"image[9.3,4.12;1.5,4.5;[combine:4x12:-52,-20="..skin.."]".. -- left hand back
"image[12.95,4.12;1.5,4.5;[combine:4x12:-52,-20="..skin.."^[transformFX]" -- right hand back
end
-- this is a version for the yl_speak_up mobs
yl_speak_up.skin_preview_skinsdb_3d_armor_character_5 = function(main_skin)
if main_skin == nil or main_skin == "" then
main_skin = "default_greyscale.png"
end
local player_skin = "(" .. main_skin .. ")"
local skin = -- Consistent on both sizes:
--Chest
"([combine:16x32:-16,-12="..player_skin.."^[mask:yl_speak_up_mask_chest.png)^"..
--Head
"([combine:16x32:-4,-8="..player_skin.."^[mask:yl_speak_up_mask_head.png)^"..
--Hat
"([combine:16x32:-36,-8="..player_skin.."^[mask:yl_speak_up_mask_head.png)^"..
--Right Arm
"([combine:16x32:-44,-12="..player_skin.."^[mask:yl_speak_up_mask_rarm.png)^"..
--Right Leg
"([combine:16x32:0,0="..player_skin.."^[mask:yl_speak_up_mask_rleg.png)^"..
-- Left Arm
"([combine:16x32:-24,-44="..player_skin.."^[mask:(yl_speak_up_mask_rarm.png^[transformFX))^"..
--Left Leg
"([combine:16x32:-12,-32="..player_skin.."^[mask:(yl_speak_up_mask_rleg.png^[transformFX))^"..
-- Add overlays for 64x skins. these wont appear if skin is 32x because it will be cropped out
--Chest Overlay
"([combine:16x32:-16,-28="..player_skin.."^[mask:yl_speak_up_mask_chest.png)^"..
--Right Arm Overlay
"([combine:16x32:-44,-28="..player_skin.."^[mask:yl_speak_up_mask_rarm.png)^"..
--Right Leg Overlay
"([combine:16x32:0,-16="..player_skin.."^[mask:yl_speak_up_mask_rleg.png)^"..
--Left Arm Overlay
"([combine:16x32:-40,-44="..player_skin.."^[mask:(yl_speak_up_mask_rarm.png^[transformFX))^"..
--Left Leg Overlay
"([combine:16x32:4,-32="..player_skin.."^[mask:(yl_speak_up_mask_rleg.png^[transformFX))"
-- Full Preview
skin = "((("..skin..")^[resize:64x128)^[mask:yl_speak_up_transform.png)"
return "image[4.5,1.8;9,10.5;"..skin.."]"
end