Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /////////////////////////////////////////////////////////////
- // Welcome to the Kinzart Dire Wolf manual custom texture set
- // applier script!
- //
- // Unlike the best-practice appliers, which you put in a box,
- // this one will be placed directly in each attachment to
- // change the DIFFUSE, SPECULAR, and NORMAL textures.
- // Note: "Diffuse" is what many just call "texture." Common,
- // but not technically accurate.
- //
- // !!!!!!!!!!!!
- // WARNING: On Dire Wolf version 1.0, this is an irreversible
- // process. Once the user drops this script in, they cannot
- // go back to the original specular and normal maps.
- //
- // Please WARN your customers BEFORE they use it, so they can
- // make a backup and not ruin everything forever.
- //
- // Users hate that.
- // !!!!!!!!!!!!
- //
- // To set up this script, simply paste the texture UUID
- // into the appropriate bodypart. Like so:
- // string gsPart = "bfde6d35-afe2-498a-7b1c-d0de2ffb9e4d";
- //
- // If you do not wish to change a part, leave it blank, like so:
- // string gsPart = "";
- // Do not delete the line. That will make the script cry.
- //
- // The body and fur work fine with the same texture. If you're
- // not using a custom fur texture, add the body texture there.
- //
- // To use this script, drop it into one of the avatar's
- // attachments. (Eg, head, neck, torso, arm, etc)
- // Note that when it is done, it will DELETE ITSELF.
- // So make sure you have a safe copy.
- //
- // 02 JAN 2019 - Stickman Ingmann
- // You can put a special message here thanking them
- // for being awesome and letting them know the application
- // for this part finished.
- string MSG_APPLIED = "Custom textures applied. Thank you for using the Kinzart Dire Wolf!";
- // Naming convention:
- // gs = "Global String." Pretend it's not there.
- // Body/Fur = The interior and exterior body layer.
- // Note: fur affects the LONG fur, not the SHORT fur.
- // Head/Neck/Torso/Etc = The bodypart the texture applies to.
- // Diffuse/Specular/Normal = The texture type to apply
- // Tail, claws, and mouth part names should be self-explanatory.
- // Each section contains options for specular.
- // Leave as-is to keep the value unchanged.
- // Head (includes ears)
- string gsBodyHeadDiffuse = "";
- string gsBodyHeadSpecular = "";
- string gsBodyHeadNormal = "";
- string gsFurHeadDiffuse = "";
- string gsFurHeadSpecular = "";
- string gsFurHeadNormal = "";
- // head specular options
- vector gvBodyHeadSpecularColor = <-1.0, -1.0, -1.0>;
- integer giBodyHeadSpecularGlossiness = -1;
- integer giBodyHeadSpecularEnvironment = -1;
- vector gvFurHeadSpecularColor = <-1.0, -1.0, -1.0>;
- integer giFurHeadSpecularGlossiness = -1;
- integer giFurHeadSpecularEnvironment = -1;
- // Neck
- string gsBodyNeckDiffuse = "";
- string gsBodyNeckSpecular = "";
- string gsBodyNeckNormal = "";
- string gsFurNeckDiffuse = "";
- string gsFurNeckSpecular = "";
- string gsFurNeckNormal = "";
- // neck specular options
- vector gvBodyNeckSpecularColor = <-1.0, -1.0, -1.0>;
- integer giBodyNeckSpecularGlossiness = -1;
- integer giBodyNeckSpecularEnvironment = -1;
- vector gvFurNeckSpecularColor = <-1.0, -1.0, -1.0>;
- integer giFurNeckSpecularGlossiness = -1;
- integer giFurNeckSpecularEnvironment = -1;
- // Torso
- string gsBodyTorsoDiffuse = "";
- string gsBodyTorsoSpecular = "";
- string gsBodyTorsoNormal = "";
- string gsFurTorsoDiffuse = "";
- string gsFurTorsoSpecular = "";
- string gsFurTorsoNormal = "";
- // torso specular options
- vector gvBodyTorsoSpecularColor = <-1.0, -1.0, -1.0>;
- integer giBodyTorsoSpecularGlossiness = -1;
- integer giBodyTorsoSpecularEnvironment = -1;
- vector gvFurTorsoSpecularColor = <-1.0, -1.0, -1.0>;
- integer giFurTorsoSpecularGlossiness = -1;
- integer giFurTorsoSpecularEnvironment = -1;
- // Arm
- string gsBodyArmDiffuse = "";
- string gsBodyArmSpecular = "";
- string gsBodyArmNormal = "";
- string gsFurArmDiffuse = "";
- string gsFurArmSpecular = "";
- string gsFurArmNormal = "";
- // arm specular options
- vector gvBodyArmSpecularColor = <-1.0, -1.0, -1.0>;
- integer giBodyArmSpecularGlossiness = -1;
- integer giBodyArmSpecularEnvironment = -1;
- vector gvFurArmSpecularColor = <-1.0, -1.0, -1.0>;
- integer giFurArmSpecularGlossiness = -1;
- integer giFurArmSpecularEnvironment = -1;
- // Leg
- string gsBodyLegDiffuse = "";
- string gsBodyLegSpecular = "";
- string gsBodyLegNormal = "";
- string gsFurLegDiffuse = "";
- string gsFurLegSpecular = "";
- string gsFurLegNormal = "";
- // leg specular options
- vector gvBodyLegSpecularColor = <-1.0, -1.0, -1.0>;
- integer giBodyLegSpecularGlossiness = -1;
- integer giBodyLegSpecularEnvironment = -1;
- vector gvFurLegSpecularColor = <-1.0, -1.0, -1.0>;
- integer giFurLegSpecularGlossiness = -1;
- integer giFurLegSpecularEnvironment = -1;
- // Tail
- string gsTailDiffuse = "";
- string gsTailSpecular = "";
- string gsTailNormal = "";
- // tail specular options
- vector gvTailSpecularColor = <-1.0, -1.0, -1.0>;
- integer giTailSpecularGlossiness = -1;
- integer giTailSpecularEnvironment = -1;
- // Claws
- // (Just paste in all if not specific to a hand/foot)
- // left hand
- string gsClawHandLeftDiffuse = "";
- string gsClawHandLeftSpecular = "";
- string gsClawHandLeftNormal = "";
- // right hand
- string gsClawHandRightDiffuse = "";
- string gsClawHandRightSpecular = "";
- string gsClawHandRightNormal = "";
- // left foot
- string gsClawFootLeftDiffuse = "";
- string gsClawFootLeftSpecular = "";
- string gsClawFootLeftNormal = "";
- // right foot
- string gsClawFootRightDiffuse = "";
- string gsClawFootRightSpecular = "";
- string gsClawFootRightNormal = "";
- // Claw specular options
- // left hand
- vector gvClawHandLeftSpecularColor = <-1.0, -1.0, -1.0>;
- integer giClawHandLeftSpecularGlossiness = -1;
- integer giClawHandLeftSpecularEnvironment = -1;
- // right hand
- vector gvClawHandRightSpecularColor = <-1.0, -1.0, -1.0>;
- integer giClawHandRightSpecularGlossiness = -1;
- integer giClawHandRightSpecularEnvironment = -1;
- // left foot
- vector gvClawFootLeftSpecularColor = <-1.0, -1.0, -1.0>;
- integer giClawFootLeftSpecularGlossiness = -1;
- integer giClawFootLeftSpecularEnvironment = -1;
- // right foot
- vector gvClawFootRightSpecularColor = <-1.0, -1.0, -1.0>;
- integer giClawFootRightSpecularGlossiness = -1;
- integer giClawFootRightSpecularEnvironment = -1;
- // Pads
- // left hand
- string gsPawpadHandLeftDiffuse = "";
- string gsPawpadHandLeftSpecular = "";
- string gsPawpadHandLeftNormal = "";
- // right hand
- string gsPawpadHandRightDiffuse = "";
- string gsPawpadHandRightSpecular = "";
- string gsPawpadHandRightNormal = "";
- // left foot
- string gsPawpadFootLeftDiffuse = "";
- string gsPawpadFootLeftSpecular = "";
- string gsPawpadFootLeftNormal = "";
- // right foot
- string gsPawpadFootRightDiffuse = "";
- string gsPawpadFootRightSpecular = "";
- string gsPawpadFootRightNormal = "";
- // Pads specular options
- // left hand
- vector gvPawpadHandLeftSpecularColor = <-1.0, -1.0, -1.0>;
- integer giPawpadHandLeftSpecularGlossiness = -1;
- integer giPawpadHandLeftSpecularEnvironment = -1;
- // right hand
- vector gvPawpadHandRightSpecularColor = <-1.0, -1.0, -1.0>;
- integer giPawpadHandRightSpecularGlossiness = -1;
- integer giPawpadHandRightSpecularEnvironment = -1;
- // left foot
- vector gvPawpadFootLeftSpecularColor = <-1.0, -1.0, -1.0>;
- integer giPawpadFootLeftSpecularGlossiness = -1;
- integer giPawpadFootLeftSpecularEnvironment = -1;
- // right foot
- vector gvPawpadFootRightSpecularColor = <-1.0, -1.0, -1.0>;
- integer giPawpadFootRightSpecularGlossiness = -1;
- integer giPawpadFootRightSpecularEnvironment = -1;
- // Nose
- string gsNoseDiffuse = "";
- string gsNoseSpecular = "";
- string gsNoseNormal = "";
- // nose specular options
- vector gvNoseSpecularColor = <-1.0, -1.0, -1.0>;
- integer giNoseSpecularGlossiness = -1;
- integer giNoseSpecularEnvironment = -1;
- // Mouth
- string gsMouthDiffuse = "";
- string gsMouthSpecular = "";
- string gsMouthNormal = "";
- // mouth specular options
- vector gvMouthSpecularColor = <-1.0, -1.0, -1.0>;
- integer giMouthSpecularGlossiness = -1;
- integer giMouthSpecularEnvironment = -1;
- // Tongue
- string gsTongueDiffuse = "";
- string gsTongueSpecular = "";
- string gsTongueNormal = "";
- // tongue specular options
- vector gvTongueSpecularColor = <-1.0, -1.0, -1.0>;
- integer giTongueSpecularGlossiness = -1;
- integer giTongueSpecularEnvironment = -1;
- // Teeth
- // WARNING: Unsupported.
- // Will ruin anything linked to any part inserted named "Object".
- // Leave blank, or have a special "head only" script, and warn
- // them if they've linked prims to the head.
- string gsTeethDiffuse = "";
- string gsTeethSpecular = "";
- string gsTeethNormal = "";
- // teeth specular options
- vector gvTeethSpecularColor = <-1.0, -1.0, -1.0>;
- integer giTeethSpecularGlossiness = -1;
- integer giTeethSpecularEnvironment = -1;
- // Eyes
- // I dunno how the eyes work. Maybe another time.
- ////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////
- // End configurable items.
- // Only edit below this point if you know how to script.
- list buildTexture(string sDiffuse, string sSpecular, string sNormal,
- vector vSpecCol, integer iSpecGloss, integer iSpecEnv, integer iPrim)
- {
- list lRet;
- integer iSide = llGetLinkNumberOfSides(iPrim);
- while (iSide--) {
- list lTextureProp = llList2List(llGetLinkPrimitiveParams(iPrim, [PRIM_SPECULAR, iSide]),1,-1);
- if (sDiffuse) {
- lRet += [PRIM_TEXTURE, iSide, (key)sDiffuse] + llList2List(lTextureProp,0,2);
- }
- if (sSpecular) {
- if (vSpecCol != <-1.0,-1.0,-1.0>) {
- lTextureProp = llListReplaceList(lTextureProp,[vSpecCol],3,3);
- }
- if (iSpecGloss != -1) {
- lTextureProp = llListReplaceList(lTextureProp,[iSpecGloss],4,4);
- }
- if (iSpecEnv != -1) {
- lTextureProp = llListReplaceList(lTextureProp,[iSpecEnv],5,5);
- }
- lRet += [PRIM_SPECULAR, iSide, (key)sSpecular] + lTextureProp;
- }
- if (sNormal) {
- lRet += [PRIM_NORMAL, iSide, (key)sNormal] + llList2List(lTextureProp,0,2);
- }
- }
- return lRet;
- }
- default {
- state_entry() {
- integer x;
- for (x=1;x<=llGetNumberOfPrims();x++) {
- list lApply;
- list lName = llParseString2List(llGetLinkName(x),["["],[]);
- if (llListFindList(lName,["thead"]) != -1) {
- if (llListFindList(lName,["fuzz"]) != -1 && llListFindList(lName,["long"]) != -1) {
- lApply += buildTexture(gsFurHeadDiffuse, gsFurHeadSpecular, gsFurHeadNormal,
- gvFurHeadSpecularColor, giFurHeadSpecularGlossiness, giFurHeadSpecularEnvironment, x);
- }
- else {
- lApply += buildTexture(gsBodyHeadDiffuse, gsBodyHeadSpecular, gsBodyHeadNormal,
- gvBodyHeadSpecularColor, giBodyHeadSpecularGlossiness, giBodyHeadSpecularEnvironment, x);
- }
- }
- else if (llListFindList(lName,["tneck"]) != -1) {
- if (llListFindList(lName,["fuzz"]) != -1 && llListFindList(lName,["long"]) != -1) {
- lApply += buildTexture(gsFurNeckDiffuse, gsFurNeckSpecular, gsFurNeckNormal,
- gvFurNeckSpecularColor, giFurNeckSpecularGlossiness, giFurNeckSpecularEnvironment, x);
- }
- else {
- lApply += buildTexture(gsBodyNeckDiffuse, gsBodyNeckSpecular, gsBodyNeckNormal,
- gvBodyNeckSpecularColor, giBodyNeckSpecularGlossiness, giBodyNeckSpecularEnvironment, x);
- }
- }
- else if (llListFindList(lName,["ttorso"]) != -1) {
- if (llListFindList(lName,["fuzz"]) != -1 && llListFindList(lName,["long"]) != -1) {
- lApply += buildTexture(gsFurTorsoDiffuse, gsFurTorsoSpecular, gsFurTorsoNormal,
- gvFurTorsoSpecularColor, giFurTorsoSpecularGlossiness, giFurTorsoSpecularEnvironment, x);
- }
- else {
- lApply += buildTexture(gsBodyTorsoDiffuse, gsBodyTorsoSpecular, gsBodyTorsoNormal,
- gvBodyTorsoSpecularColor, giBodyTorsoSpecularGlossiness, giBodyTorsoSpecularEnvironment, x);
- }
- }
- else if (llListFindList(lName,["tarm"]) != -1) {
- if (llListFindList(lName,["fuzz"]) != -1 && llListFindList(lName,["long"]) != -1) {
- lApply += buildTexture(gsFurArmDiffuse, gsFurArmSpecular, gsFurArmNormal,
- gvFurArmSpecularColor, giFurArmSpecularGlossiness, giFurArmSpecularEnvironment, x);
- }
- else {
- lApply += buildTexture(gsBodyArmDiffuse, gsBodyArmSpecular, gsBodyArmNormal,
- gvBodyArmSpecularColor, giBodyArmSpecularGlossiness, giBodyArmSpecularEnvironment, x);
- }
- }
- else if (llListFindList(lName,["tleg"]) != -1) {
- if (llListFindList(lName,["fuzz"]) != -1 && llListFindList(lName,["long"]) != -1) {
- lApply += buildTexture(gsFurLegDiffuse, gsFurLegSpecular, gsFurLegNormal,
- gvFurLegSpecularColor, giFurLegSpecularGlossiness, giFurLegSpecularEnvironment, x);
- }
- else {
- lApply += buildTexture(gsBodyLegDiffuse, gsBodyLegSpecular, gsBodyLegNormal,
- gvBodyLegSpecularColor, giBodyLegSpecularGlossiness, giBodyLegSpecularEnvironment, x);
- }
- }
- else if (llListFindList(lName,["ttail"]) != -1) {
- lApply += buildTexture(gsTailDiffuse, gsTailSpecular, gsTailNormal,
- gvTailSpecularColor, giTailSpecularGlossiness, giTailSpecularEnvironment, x);
- }
- else if (llListFindList(lName,["claw"]) != -1) {
- if (llListFindList(lName,["handl"]) != -1) {
- lApply += buildTexture(gsClawHandLeftDiffuse, gsClawHandLeftSpecular, gsClawHandLeftNormal,
- gvClawHandLeftSpecularColor, giClawHandLeftSpecularGlossiness, giClawHandLeftSpecularEnvironment, x);
- }
- else if (llListFindList(lName,["handr"]) != -1) {
- lApply += buildTexture(gsClawHandRightDiffuse, gsClawHandRightSpecular, gsClawHandRightNormal,
- gvClawHandRightSpecularColor, giClawHandRightSpecularGlossiness, giClawHandRightSpecularEnvironment, x);
- }
- else if (llListFindList(lName,["footl"]) != -1) {
- lApply += buildTexture(gsClawFootLeftDiffuse, gsClawFootLeftSpecular, gsClawFootLeftNormal,
- gvClawFootLeftSpecularColor, giClawFootLeftSpecularGlossiness, giClawFootLeftSpecularEnvironment, x);
- }
- else if (llListFindList(lName,["footr"]) != -1) {
- lApply += buildTexture(gsClawFootRightDiffuse, gsClawFootRightSpecular, gsClawFootRightNormal,
- gvClawFootRightSpecularColor, giClawFootRightSpecularGlossiness, giClawFootRightSpecularEnvironment, x);
- }
- }
- else if (llListFindList(lName,["ppad"]) != -1) {
- if (llListFindList(lName,["handl"]) != -1) {
- lApply += buildTexture(gsPawpadHandLeftDiffuse, gsPawpadHandLeftSpecular, gsPawpadHandLeftNormal,
- gvPawpadHandLeftSpecularColor, giPawpadHandLeftSpecularGlossiness, giPawpadHandLeftSpecularEnvironment, x);
- }
- else if (llListFindList(lName,["handr"]) != -1) {
- lApply += buildTexture(gsPawpadHandRightDiffuse, gsPawpadHandRightSpecular, gsPawpadHandRightNormal,
- gvPawpadHandRightSpecularColor, giPawpadHandRightSpecularGlossiness, giPawpadHandRightSpecularEnvironment, x);
- }
- else if (llListFindList(lName,["footl"]) != -1) {
- lApply += buildTexture(gsPawpadFootLeftDiffuse, gsPawpadFootLeftSpecular, gsPawpadFootLeftNormal,
- gvPawpadFootLeftSpecularColor, giPawpadFootLeftSpecularGlossiness, giPawpadFootLeftSpecularEnvironment, x);
- }
- else if (llListFindList(lName,["footr"]) != -1) {
- lApply += buildTexture(gsPawpadFootRightDiffuse, gsPawpadFootRightSpecular, gsPawpadFootRightNormal,
- gvPawpadFootRightSpecularColor, giPawpadFootRightSpecularGlossiness, giPawpadFootRightSpecularEnvironment, x);
- }
- }
- else if (llListFindList(lName,["nose"]) != -1) {
- lApply += buildTexture(gsNoseDiffuse, gsNoseSpecular, gsNoseNormal,
- gvNoseSpecularColor, giNoseSpecularGlossiness, giNoseSpecularEnvironment, x);
- }
- else if (llListFindList(lName,["mouth"]) != -1) {
- if (llListFindList(lName,["tongue"]) != -1) {
- lApply += buildTexture(gsTongueDiffuse, gsTongueSpecular, gsTongueNormal,
- gvTongueSpecularColor, giTongueSpecularGlossiness, giTongueSpecularEnvironment, x); }
- else {
- lApply += buildTexture(gsMouthDiffuse, gsMouthSpecular, gsMouthNormal,
- gvMouthSpecularColor, giMouthSpecularGlossiness, giMouthSpecularEnvironment, x);
- }
- }
- else if (llGetLinkName(x) == "Object") {
- lApply += buildTexture(gsTeethDiffuse, gsTeethSpecular, gsTeethNormal,
- gvTeethSpecularColor, giTeethSpecularGlossiness, giTeethSpecularEnvironment, x);
- }
- if (lApply) {
- llSetLinkPrimitiveParamsFast(x,lApply);
- }
- }
- llOwnerSay(MSG_APPLIED);
- llRemoveInventory(llGetScriptName());
- }
- }
Add Comment
Please, Sign In to add comment