SHARE
TWEET

Kinzart Dire Wolf Texture Applier (Manual) r899

pointystick Jan 3rd, 2019 112 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /////////////////////////////////////////////////////////////
  2. // Welcome to the Kinzart Dire Wolf manual custom texture set
  3. //  applier script!
  4. //
  5. // Unlike the best-practice appliers, which you put in a box,
  6. //  this one will be placed directly in each attachment to
  7. //  change the DIFFUSE, SPECULAR, and NORMAL textures.
  8. // Note: "Diffuse" is what many just call "texture." Common,
  9. //  but not technically accurate.
  10. //
  11. // !!!!!!!!!!!!
  12. // WARNING: On Dire Wolf version 1.0, this is an irreversible
  13. //  process. Once the user drops this script in, they cannot
  14. //  go back to the original specular and normal maps.
  15. //
  16. // Please WARN your customers BEFORE they use it, so they can
  17. //  make a backup and not ruin everything forever.
  18. //
  19. // Users hate that.
  20. // !!!!!!!!!!!!
  21. //
  22. // To set up this script, simply paste the texture UUID
  23. //  into the appropriate bodypart. Like so:
  24. //  string gsPart = "bfde6d35-afe2-498a-7b1c-d0de2ffb9e4d";
  25. //
  26. // If you do not wish to change a part, leave it blank, like so:
  27. //  string gsPart = "";
  28. // Do not delete the line. That will make the script cry.
  29. //
  30. // The body and fur work fine with the same texture. If you're
  31. //  not using a custom fur texture, add the body texture there.
  32. //
  33. // To use this script, drop it into one of the avatar's
  34. //  attachments. (Eg, head, neck, torso, arm, etc)
  35. //  Note that when it is done, it will DELETE ITSELF.
  36. //  So make sure you have a safe copy.
  37. //
  38. // 02 JAN 2019 - Stickman Ingmann
  39.  
  40. // You can put a special message here thanking them
  41. //  for being awesome and letting them know the application
  42. //  for this part finished.
  43. string MSG_APPLIED = "Custom textures applied. Thank you for using the Kinzart Dire Wolf!";
  44.  
  45. // Naming convention:
  46. //  gs = "Global String." Pretend it's not there.
  47. //  Body/Fur = The interior and exterior body layer.
  48. //   Note: fur affects the LONG fur, not the SHORT fur.
  49. //  Head/Neck/Torso/Etc = The bodypart the texture applies to.
  50. //  Diffuse/Specular/Normal = The texture type to apply
  51. // Tail, claws, and mouth part names should be self-explanatory.
  52. // Each section contains options for specular.
  53. //  Leave as-is to keep the value unchanged.
  54.  
  55. // Head (includes ears)
  56. string gsBodyHeadDiffuse = "";
  57. string gsBodyHeadSpecular = "";
  58. string gsBodyHeadNormal = "";
  59. string gsFurHeadDiffuse = "";
  60. string gsFurHeadSpecular = "";
  61. string gsFurHeadNormal = "";
  62. // head specular options
  63. vector gvBodyHeadSpecularColor = <-1.0, -1.0, -1.0>;
  64. integer giBodyHeadSpecularGlossiness = -1;
  65. integer giBodyHeadSpecularEnvironment = -1;
  66. vector gvFurHeadSpecularColor = <-1.0, -1.0, -1.0>;
  67. integer giFurHeadSpecularGlossiness = -1;
  68. integer giFurHeadSpecularEnvironment = -1;
  69.  
  70. // Neck
  71. string gsBodyNeckDiffuse = "";
  72. string gsBodyNeckSpecular = "";
  73. string gsBodyNeckNormal = "";
  74. string gsFurNeckDiffuse = "";
  75. string gsFurNeckSpecular = "";
  76. string gsFurNeckNormal = "";
  77. // neck specular options
  78. vector gvBodyNeckSpecularColor = <-1.0, -1.0, -1.0>;
  79. integer giBodyNeckSpecularGlossiness = -1;
  80. integer giBodyNeckSpecularEnvironment = -1;
  81. vector gvFurNeckSpecularColor = <-1.0, -1.0, -1.0>;
  82. integer giFurNeckSpecularGlossiness = -1;
  83. integer giFurNeckSpecularEnvironment = -1;
  84.  
  85. // Torso
  86. string gsBodyTorsoDiffuse = "";
  87. string gsBodyTorsoSpecular = "";
  88. string gsBodyTorsoNormal = "";
  89. string gsFurTorsoDiffuse = "";
  90. string gsFurTorsoSpecular = "";
  91. string gsFurTorsoNormal = "";
  92. // torso specular options
  93. vector gvBodyTorsoSpecularColor = <-1.0, -1.0, -1.0>;
  94. integer giBodyTorsoSpecularGlossiness = -1;
  95. integer giBodyTorsoSpecularEnvironment = -1;
  96. vector gvFurTorsoSpecularColor = <-1.0, -1.0, -1.0>;
  97. integer giFurTorsoSpecularGlossiness = -1;
  98. integer giFurTorsoSpecularEnvironment = -1;
  99.  
  100. // Arm
  101. string gsBodyArmDiffuse = "";
  102. string gsBodyArmSpecular = "";
  103. string gsBodyArmNormal = "";
  104. string gsFurArmDiffuse = "";
  105. string gsFurArmSpecular = "";
  106. string gsFurArmNormal = "";
  107. // arm specular options
  108. vector gvBodyArmSpecularColor = <-1.0, -1.0, -1.0>;
  109. integer giBodyArmSpecularGlossiness = -1;
  110. integer giBodyArmSpecularEnvironment = -1;
  111. vector gvFurArmSpecularColor = <-1.0, -1.0, -1.0>;
  112. integer giFurArmSpecularGlossiness = -1;
  113. integer giFurArmSpecularEnvironment = -1;
  114.  
  115. // Leg
  116. string gsBodyLegDiffuse = "";
  117. string gsBodyLegSpecular = "";
  118. string gsBodyLegNormal = "";
  119. string gsFurLegDiffuse = "";
  120. string gsFurLegSpecular = "";
  121. string gsFurLegNormal = "";
  122. // leg specular options
  123. vector gvBodyLegSpecularColor = <-1.0, -1.0, -1.0>;
  124. integer giBodyLegSpecularGlossiness = -1;
  125. integer giBodyLegSpecularEnvironment = -1;
  126. vector gvFurLegSpecularColor = <-1.0, -1.0, -1.0>;
  127. integer giFurLegSpecularGlossiness = -1;
  128. integer giFurLegSpecularEnvironment = -1;
  129.  
  130. // Tail
  131. string gsTailDiffuse = "";
  132. string gsTailSpecular = "";
  133. string gsTailNormal = "";
  134. // tail specular options
  135. vector gvTailSpecularColor = <-1.0, -1.0, -1.0>;
  136. integer giTailSpecularGlossiness = -1;
  137. integer giTailSpecularEnvironment = -1;
  138.  
  139. // Claws
  140. // (Just paste in all if not specific to a hand/foot)
  141. // left hand
  142. string gsClawHandLeftDiffuse = "";
  143. string gsClawHandLeftSpecular = "";
  144. string gsClawHandLeftNormal = "";
  145. // right hand
  146. string gsClawHandRightDiffuse = "";
  147. string gsClawHandRightSpecular = "";
  148. string gsClawHandRightNormal = "";
  149. // left foot
  150. string gsClawFootLeftDiffuse = "";
  151. string gsClawFootLeftSpecular = "";
  152. string gsClawFootLeftNormal = "";
  153. // right foot
  154. string gsClawFootRightDiffuse = "";
  155. string gsClawFootRightSpecular = "";
  156. string gsClawFootRightNormal = "";
  157. // Claw specular options
  158. // left hand
  159. vector gvClawHandLeftSpecularColor = <-1.0, -1.0, -1.0>;
  160. integer giClawHandLeftSpecularGlossiness = -1;
  161. integer giClawHandLeftSpecularEnvironment = -1;
  162. // right hand
  163. vector gvClawHandRightSpecularColor = <-1.0, -1.0, -1.0>;
  164. integer giClawHandRightSpecularGlossiness = -1;
  165. integer giClawHandRightSpecularEnvironment = -1;
  166. // left foot
  167. vector gvClawFootLeftSpecularColor = <-1.0, -1.0, -1.0>;
  168. integer giClawFootLeftSpecularGlossiness = -1;
  169. integer giClawFootLeftSpecularEnvironment = -1;
  170. // right foot
  171. vector gvClawFootRightSpecularColor = <-1.0, -1.0, -1.0>;
  172. integer giClawFootRightSpecularGlossiness = -1;
  173. integer giClawFootRightSpecularEnvironment = -1;
  174.  
  175. // Pads
  176. // left hand
  177. string gsPawpadHandLeftDiffuse = "";
  178. string gsPawpadHandLeftSpecular = "";
  179. string gsPawpadHandLeftNormal = "";
  180. // right hand
  181. string gsPawpadHandRightDiffuse = "";
  182. string gsPawpadHandRightSpecular = "";
  183. string gsPawpadHandRightNormal = "";
  184. // left foot
  185. string gsPawpadFootLeftDiffuse = "";
  186. string gsPawpadFootLeftSpecular = "";
  187. string gsPawpadFootLeftNormal = "";
  188. // right foot
  189. string gsPawpadFootRightDiffuse = "";
  190. string gsPawpadFootRightSpecular = "";
  191. string gsPawpadFootRightNormal = "";
  192. // Pads specular options
  193. // left hand
  194. vector gvPawpadHandLeftSpecularColor = <-1.0, -1.0, -1.0>;
  195. integer giPawpadHandLeftSpecularGlossiness = -1;
  196. integer giPawpadHandLeftSpecularEnvironment = -1;
  197. // right hand
  198. vector gvPawpadHandRightSpecularColor = <-1.0, -1.0, -1.0>;
  199. integer giPawpadHandRightSpecularGlossiness = -1;
  200. integer giPawpadHandRightSpecularEnvironment = -1;
  201. // left foot
  202. vector gvPawpadFootLeftSpecularColor = <-1.0, -1.0, -1.0>;
  203. integer giPawpadFootLeftSpecularGlossiness = -1;
  204. integer giPawpadFootLeftSpecularEnvironment = -1;
  205. // right foot
  206. vector gvPawpadFootRightSpecularColor = <-1.0, -1.0, -1.0>;
  207. integer giPawpadFootRightSpecularGlossiness = -1;
  208. integer giPawpadFootRightSpecularEnvironment = -1;
  209.  
  210. // Nose
  211. string gsNoseDiffuse = "";
  212. string gsNoseSpecular = "";
  213. string gsNoseNormal = "";
  214. // nose specular options
  215. vector gvNoseSpecularColor = <-1.0, -1.0, -1.0>;
  216. integer giNoseSpecularGlossiness = -1;
  217. integer giNoseSpecularEnvironment = -1;
  218.  
  219. // Mouth
  220. string gsMouthDiffuse = "";
  221. string gsMouthSpecular = "";
  222. string gsMouthNormal = "";
  223. // mouth specular options
  224. vector gvMouthSpecularColor = <-1.0, -1.0, -1.0>;
  225. integer giMouthSpecularGlossiness = -1;
  226. integer giMouthSpecularEnvironment = -1;
  227.  
  228. // Tongue
  229. string gsTongueDiffuse = "";
  230. string gsTongueSpecular = "";
  231. string gsTongueNormal = "";
  232. // tongue specular options
  233. vector gvTongueSpecularColor = <-1.0, -1.0, -1.0>;
  234. integer giTongueSpecularGlossiness = -1;
  235. integer giTongueSpecularEnvironment = -1;
  236.  
  237. // Teeth
  238. // WARNING: Unsupported.
  239. // Will ruin anything linked to any part inserted named "Object".
  240. // Leave blank, or have a special "head only" script, and warn
  241. //  them if they've linked prims to the head.
  242. string gsTeethDiffuse = "";
  243. string gsTeethSpecular = "";
  244. string gsTeethNormal = "";
  245. // teeth specular options
  246. vector gvTeethSpecularColor = <-1.0, -1.0, -1.0>;
  247. integer giTeethSpecularGlossiness = -1;
  248. integer giTeethSpecularEnvironment = -1;
  249.  
  250. // Eyes
  251. // I dunno how the eyes work. Maybe another time.
  252.  
  253.  
  254. ////////////////////////////////////////////////////////
  255. ////////////////////////////////////////////////////////
  256. // End configurable items.
  257. // Only edit below this point if you know how to script.
  258. list buildTexture(string sDiffuse, string sSpecular, string sNormal,
  259.     vector vSpecCol, integer iSpecGloss, integer iSpecEnv, integer iPrim)
  260.   {
  261.   list lRet;
  262.   integer iSide = llGetLinkNumberOfSides(iPrim);
  263.   while (iSide--) {
  264.     list lTextureProp = llList2List(llGetLinkPrimitiveParams(iPrim, [PRIM_SPECULAR, iSide]),1,-1);
  265.     if (sDiffuse) {
  266.       lRet += [PRIM_TEXTURE, iSide, (key)sDiffuse] + llList2List(lTextureProp,0,2);
  267.     }
  268.     if (sSpecular) {
  269.       if (vSpecCol != <-1.0,-1.0,-1.0>) {
  270.         lTextureProp = llListReplaceList(lTextureProp,[vSpecCol],3,3);
  271.       }
  272.       if (iSpecGloss != -1) {
  273.         lTextureProp = llListReplaceList(lTextureProp,[iSpecGloss],4,4);
  274.       }
  275.       if (iSpecEnv != -1) {
  276.         lTextureProp = llListReplaceList(lTextureProp,[iSpecEnv],5,5);
  277.       }
  278.       lRet += [PRIM_SPECULAR, iSide, (key)sSpecular] + lTextureProp;
  279.     }
  280.     if (sNormal) {
  281.       lRet += [PRIM_NORMAL, iSide, (key)sNormal] + llList2List(lTextureProp,0,2);
  282.     }
  283.   }
  284.   return lRet;
  285. }
  286.  
  287. default {
  288.   state_entry() {
  289.     integer x;
  290.     for (x=1;x<=llGetNumberOfPrims();x++) {
  291.       list lApply;
  292.       list lName = llParseString2List(llGetLinkName(x),["["],[]);
  293.       if (llListFindList(lName,["thead"]) != -1) {
  294.         if (llListFindList(lName,["fuzz"]) != -1 && llListFindList(lName,["long"]) != -1) {
  295.           lApply += buildTexture(gsFurHeadDiffuse, gsFurHeadSpecular, gsFurHeadNormal,
  296.                       gvFurHeadSpecularColor, giFurHeadSpecularGlossiness, giFurHeadSpecularEnvironment, x);
  297.         }
  298.         else {
  299.           lApply += buildTexture(gsBodyHeadDiffuse, gsBodyHeadSpecular, gsBodyHeadNormal,
  300.                       gvBodyHeadSpecularColor, giBodyHeadSpecularGlossiness, giBodyHeadSpecularEnvironment, x);
  301.         }
  302.       }
  303.       else if (llListFindList(lName,["tneck"]) != -1) {
  304.         if (llListFindList(lName,["fuzz"]) != -1 && llListFindList(lName,["long"]) != -1) {
  305.           lApply += buildTexture(gsFurNeckDiffuse, gsFurNeckSpecular, gsFurNeckNormal,
  306.                       gvFurNeckSpecularColor, giFurNeckSpecularGlossiness, giFurNeckSpecularEnvironment, x);
  307.         }
  308.         else {
  309.           lApply += buildTexture(gsBodyNeckDiffuse, gsBodyNeckSpecular, gsBodyNeckNormal,
  310.                       gvBodyNeckSpecularColor, giBodyNeckSpecularGlossiness, giBodyNeckSpecularEnvironment, x);
  311.         }
  312.       }
  313.       else if (llListFindList(lName,["ttorso"]) != -1) {
  314.         if (llListFindList(lName,["fuzz"]) != -1 && llListFindList(lName,["long"]) != -1) {
  315.           lApply += buildTexture(gsFurTorsoDiffuse, gsFurTorsoSpecular, gsFurTorsoNormal,
  316.                       gvFurTorsoSpecularColor, giFurTorsoSpecularGlossiness, giFurTorsoSpecularEnvironment, x);
  317.         }
  318.         else {
  319.           lApply += buildTexture(gsBodyTorsoDiffuse, gsBodyTorsoSpecular, gsBodyTorsoNormal,
  320.                       gvBodyTorsoSpecularColor, giBodyTorsoSpecularGlossiness, giBodyTorsoSpecularEnvironment, x);
  321.         }
  322.       }
  323.       else if (llListFindList(lName,["tarm"]) != -1) {
  324.         if (llListFindList(lName,["fuzz"]) != -1 && llListFindList(lName,["long"]) != -1) {
  325.           lApply += buildTexture(gsFurArmDiffuse, gsFurArmSpecular, gsFurArmNormal,
  326.                       gvFurArmSpecularColor, giFurArmSpecularGlossiness, giFurArmSpecularEnvironment, x);
  327.         }
  328.         else {
  329.           lApply += buildTexture(gsBodyArmDiffuse, gsBodyArmSpecular, gsBodyArmNormal,
  330.                       gvBodyArmSpecularColor, giBodyArmSpecularGlossiness, giBodyArmSpecularEnvironment, x);
  331.         }
  332.       }
  333.       else if (llListFindList(lName,["tleg"]) != -1) {
  334.         if (llListFindList(lName,["fuzz"]) != -1 && llListFindList(lName,["long"]) != -1) {
  335.           lApply += buildTexture(gsFurLegDiffuse, gsFurLegSpecular, gsFurLegNormal,
  336.                       gvFurLegSpecularColor, giFurLegSpecularGlossiness, giFurLegSpecularEnvironment, x);
  337.         }
  338.         else {
  339.           lApply += buildTexture(gsBodyLegDiffuse, gsBodyLegSpecular, gsBodyLegNormal,
  340.                       gvBodyLegSpecularColor, giBodyLegSpecularGlossiness, giBodyLegSpecularEnvironment, x);
  341.         }
  342.       }
  343.       else if (llListFindList(lName,["ttail"]) != -1) {
  344.         lApply += buildTexture(gsTailDiffuse, gsTailSpecular, gsTailNormal,
  345.                     gvTailSpecularColor, giTailSpecularGlossiness, giTailSpecularEnvironment, x);
  346.       }
  347.       else if (llListFindList(lName,["claw"]) != -1) {
  348.         if (llListFindList(lName,["handl"]) != -1) {
  349.           lApply += buildTexture(gsClawHandLeftDiffuse, gsClawHandLeftSpecular, gsClawHandLeftNormal,
  350.                       gvClawHandLeftSpecularColor, giClawHandLeftSpecularGlossiness, giClawHandLeftSpecularEnvironment, x);
  351.         }
  352.         else if (llListFindList(lName,["handr"]) != -1) {
  353.           lApply += buildTexture(gsClawHandRightDiffuse, gsClawHandRightSpecular, gsClawHandRightNormal,
  354.                       gvClawHandRightSpecularColor, giClawHandRightSpecularGlossiness, giClawHandRightSpecularEnvironment, x);
  355.         }
  356.         else if (llListFindList(lName,["footl"]) != -1) {
  357.           lApply += buildTexture(gsClawFootLeftDiffuse, gsClawFootLeftSpecular, gsClawFootLeftNormal,
  358.                       gvClawFootLeftSpecularColor, giClawFootLeftSpecularGlossiness, giClawFootLeftSpecularEnvironment, x);
  359.         }
  360.         else if (llListFindList(lName,["footr"]) != -1) {
  361.           lApply += buildTexture(gsClawFootRightDiffuse, gsClawFootRightSpecular, gsClawFootRightNormal,
  362.                       gvClawFootRightSpecularColor, giClawFootRightSpecularGlossiness, giClawFootRightSpecularEnvironment, x);
  363.         }
  364.       }
  365.       else if (llListFindList(lName,["ppad"]) != -1) {
  366.         if (llListFindList(lName,["handl"]) != -1) {
  367.           lApply += buildTexture(gsPawpadHandLeftDiffuse, gsPawpadHandLeftSpecular, gsPawpadHandLeftNormal,
  368.                       gvPawpadHandLeftSpecularColor, giPawpadHandLeftSpecularGlossiness, giPawpadHandLeftSpecularEnvironment, x);
  369.         }
  370.         else if (llListFindList(lName,["handr"]) != -1) {
  371.           lApply += buildTexture(gsPawpadHandRightDiffuse, gsPawpadHandRightSpecular, gsPawpadHandRightNormal,
  372.                       gvPawpadHandRightSpecularColor, giPawpadHandRightSpecularGlossiness, giPawpadHandRightSpecularEnvironment, x);
  373.         }
  374.         else if (llListFindList(lName,["footl"]) != -1) {
  375.           lApply += buildTexture(gsPawpadFootLeftDiffuse, gsPawpadFootLeftSpecular, gsPawpadFootLeftNormal,
  376.                       gvPawpadFootLeftSpecularColor, giPawpadFootLeftSpecularGlossiness, giPawpadFootLeftSpecularEnvironment, x);
  377.         }
  378.         else if (llListFindList(lName,["footr"]) != -1) {
  379.           lApply += buildTexture(gsPawpadFootRightDiffuse, gsPawpadFootRightSpecular, gsPawpadFootRightNormal,
  380.                       gvPawpadFootRightSpecularColor, giPawpadFootRightSpecularGlossiness, giPawpadFootRightSpecularEnvironment, x);
  381.         }
  382.       }
  383.       else if (llListFindList(lName,["nose"]) != -1) {
  384.         lApply += buildTexture(gsNoseDiffuse, gsNoseSpecular, gsNoseNormal,
  385.                     gvNoseSpecularColor, giNoseSpecularGlossiness, giNoseSpecularEnvironment, x);
  386.       }
  387.       else if (llListFindList(lName,["mouth"]) != -1) {
  388.         if (llListFindList(lName,["tongue"]) != -1) {
  389.           lApply += buildTexture(gsTongueDiffuse, gsTongueSpecular, gsTongueNormal,
  390.                       gvTongueSpecularColor, giTongueSpecularGlossiness, giTongueSpecularEnvironment, x); }
  391.         else {
  392.           lApply += buildTexture(gsMouthDiffuse, gsMouthSpecular, gsMouthNormal,
  393.                       gvMouthSpecularColor, giMouthSpecularGlossiness, giMouthSpecularEnvironment, x);
  394.         }
  395.       }
  396.       else if (llGetLinkName(x) == "Object") {
  397.         lApply += buildTexture(gsTeethDiffuse, gsTeethSpecular, gsTeethNormal,
  398.                     gvTeethSpecularColor, giTeethSpecularGlossiness, giTeethSpecularEnvironment, x);
  399.       }
  400.       if (lApply) {
  401.         llSetLinkPrimitiveParamsFast(x,lApply);
  402.       }
  403.     }
  404.     llOwnerSay(MSG_APPLIED);
  405.     llRemoveInventory(llGetScriptName());
  406.   }
  407. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top