Help with Loader Modding Skins/Triggers (1 Viewer)

sclover13

Content Creator
Joined
Nov 29, 2012
I'm currently trying to undertake two loader based mods. One is a set of full body mods that I would like to have change skin tone based on the selected skin tone in the main menu. I've seen this done before with a few other body mods - such as thicker ass n thighs and better feet.

I've managed to replicate what those mods do and it works with the thighs and the calves, however when I try to get it to work with back and chest it just flashes black.

The other mod I'm working on is a background mod that triggers based on game variables. I'd like to get a character to come on screen after a certain action. Then I'd like to have the character animated based on other variables happening in the game.

Anyone here versed in loader modding knowledge please help .thank you.
 

sby

Content Creator
Coder
Joined
Sep 11, 2012
do you already use this?
edit - oh you are not talking about the arms this time around
 

sclover13

Content Creator
Joined
Nov 29, 2012
do you already use this?
edit - oh you are not talking about the arms this time around
Sby thanks for the reply btw.
What I'm trying to accomplish is more along these lines:

var setSkin_Post:Function; var g; function methodWrapper(method:Function, parameter1:Object):Function { return function():void{ method(parameter1); } } function methodWrapper2(method:Function, parameter1:Object, parameter2:Object):Function { return function():void{ method(parameter1, parameter2); } } function initl(l){ // Setup a response function which can apply the correct skin-tone and tan settings to our custom thighs setSkin_Post = methodWrapper2(function(bodyMods:Vector.<MovieClip>, g:Object):void { bodyMods.forEach(function(bodyMod:MovieClip, ...args):void { bodyMod.gotoAndStop(g.characterControl.currentSkinType); if (bodyMod.getChildByName("tan") as MovieClip) { (bodyMod.getChildByName("tan") as MovieClip).gotoAndStop(l.g.her._tan._tanNameList[g.her._tan._currentTanID]); (bodyMod.getChildByName("tan") as MovieClip).alpha = (l.g.her.torso.back as MovieClip).getChildByName("tan").alpha; (bodyMod.getChildByName("tan") as MovieClip).blendMode = flash.display.BlendMode.OVERLAY; } // Special logic: the "overwrite" policy will normally be ignored when the user switches skin tones or tan levels // The original skin sprites and tan sprites will reappear, even through they're supposed to be temporarily overridden. // To compensate for this problem, we'll manually reassert the desired invisibility. g.customElementLoader.modTargetHelpers[SDTMods.ModTypes.BODY].targetDictionary[bodyMod.name].gotoAndStop("None"); for each(var tanItem:MovieClip in g.her._tan._standardTanItems) { if ((g.customElementLoader.modTargetHelpers[SDTMods.ModTypes.BODY].targetDictionary[bodyMod.name]) == tanItem) { tanItem["tan"].visible = false; } } }); }, new <MovieClip>[taf.rightThigh, taf.rightCalf, taf.leftThigh, taf.back], l.g); // Register proxy methods (via ModGuy's Loader) which will invoke the shoulder-skin function in response to gameplay activities var lProxy:Class = l.getLoaderClass("Modules.lProxy"); var setTanAlpha = (lProxy as Class).createProxy(l.g.her._tan, "setTanAlpha"); setTanAlpha.addPost(setSkin_Post, false); var addStaticModElement = (lProxy as Class).createProxy(l.g.customElementLoader, "addStaticModElement"); addStaticModElement.addPost(setSkin_Post, false); // Ensure that these proxies get cleaned up when the mod is Unloaded (or the Reset button is invoked) var moreClothingIsInitializing:Boolean = false; if (l.moreclothing) { // Temp: search for a 400 x 150 TextField // TODO: use a public accessor func instead (if sby is willing to add one) for (var i:uint = 0; i<(l.stage as Stage).numChildren; i++) { if (((l.stage as Stage).getChildAt(i) as TextField) && ((l.stage as Stage).getChildAt(i) as TextField).width == 400 && ((l.stage as Stage).getChildAt(i) as TextField).height == 150) { moreClothingIsInitializing = true; break; } } } if (moreClothingIsInitializing) { // Special case: this mod is being loaded through MoreClothing (during its initialization phase) // We want the proxies to remain active (in case the user subsequently calls up the mod via the next/prev buttons) // Therefore, we'll suppress the proxy-removal behaviour } else { // Normal case: remove proxies whenever the Clear Mods button is clicked or Reset occurs l.registerUnloadFunction( methodWrapper(removeProxies, l) ); var clearInstancedMods = (lProxy as Class).createProxy(l.g.customElementLoader, "clearInstancedMods"); clearInstancedMods.addPost( methodWrapper(removeProxies, l), false ); } } function removeProxies(l:Object) { var lProxy:Class = l.getLoaderClass("Modules.lProxy"); var setTanAlpha = (lProxy as Class).checkProxied(l.g.her._tan, "setTanAlpha"); if (setTanAlpha) { setTanAlpha.removePost(setSkin_Post); } var addStaticModElement = (lProxy as Class).checkProxied(l.g.customElementLoader, "addStaticModElement"); if (addStaticModElement) { addStaticModElement.removePost(setSkin_Post); } var clearInstancedMods = (lProxy as Class).checkProxied(l.g.customElementLoader, "clearInstancedMods"); if (clearInstancedMods) { clearInstancedMods.restoreProxy(false); } // Reapply the current skin and tan settings, so that the leg sprites will reappear g.characterControl.setSkin(g.characterControl.currentSkin); g.her._tan.setTanAlpha((l.g.her.torso.back as MovieClip).getChildByName("tan").alpha); } registerMod(taf);

99% of this I pulled from the Thicker Leg's N Ass Mod -> here

As of right now, it works with the calves and thighs (as expected), but flips it shit on back, arms, and chest. Any way around this?

Extending from this issue, I'm also trying to make eyewear that can change based on ear/nose type as well. I'm hoping figuring out this issue might open a few doors, including making earrings that respond to changes in ear type, etc.
 

sclover13

Content Creator
Joined
Nov 29, 2012
Alternatively, if anyone knows how I might be able to get my hands on the Loader source/fla files I feel like I could really expand what I'm trying to accomplish. I've searched through the site, but found nothing.

Edit: Found the Dev Guide.txt inside Loader helpful but still not addressing the issue I'm having.
 

sclover13

Content Creator
Joined
Nov 29, 2012
Upload your shit somewhere so we can take a look.
It's Faceless! I wasn't sure if you were still around or not, and I'm immensely excited that you might be able to help me with this. I've got work till late tonight but when I get back I'll upload the FLA. Thanks!
 

sclover13

Content Creator
Joined
Nov 29, 2012
Faceless Faceless sby sby Here is the FLA i'm working on. The art isn't completely done. But, I wanted to make sure I got the code working before I invested more hours into the art.

 

Faceless

Content Creator
Joined
Jun 12, 2011
sclover13 sclover13 Huh, the way I did skintones is completely different.

Anywho, observations:
  1. Tan mask layers in the back sprite were fucking you over. Not sure why, but I got rid of the masking and hid the layers. I'm not sure anyone even uses the tanlines anyway, so you're probably fine going through everything and just deleting the tanline mask layers outright.
  2. I fixed the chest sprite to support both skin tones and breast sliders (you're welcome). I think you actually need to have both in the artwork for the chest to work properly, but once you do vanilla SDT handles all that for you. Note that the sprites do need to be MovieClips and not Graphics for this to work.
  3. The overwrite special logic section in initl() was preventing clean unloading, and also somehow messed up the chest skin tone support. I commented it out as a quick workaround, but you'll need to talk to sby sby if you want that functionality, I think.
 

sclover13

Content Creator
Joined
Nov 29, 2012
sclover13 sclover13 Huh, the way I did skintones is completely different.

Anywho, observations:
  1. Tan mask layers in the back sprite were fucking you over. Not sure why, but I got rid of the masking and hid the layers. I'm not sure anyone even uses the tanlines anyway, so you're probably fine going through everything and just deleting the tanline mask layers outright.
  2. I fixed the chest sprite to support both skin tones and breast sliders (you're welcome). I think you actually need to have both in the artwork for the chest to work properly, but once you do vanilla SDT handles all that for you. Note that the sprites do need to be MovieClips and not Graphics for this to work.
  3. The overwrite special logic section in initl() was preventing clean unloading, and also somehow messed up the chest skin tone support. I commented it out as a quick workaround, but you'll need to talk to sby sby if you want that functionality, I think.
You're an absolute legend. When I get back to the workstation I can't wait to finish this out. I really appreciate it.
 

sclover13

Content Creator
Joined
Nov 29, 2012
It worked fabulously btw! Thanks again.
I even added in the arms. I'll throw it up on the RM tomorrow.
 

sclover13

Content Creator
Joined
Nov 29, 2012
Foregoing sleep, I went ahead and added it to the RM.

Next?
1615310751522.png


Lol, probably not.
 

Users who are viewing this thread

Top


Are you 18 or older?

This website requires you to be 18 years of age or older. Please verify your age to view the content, or click Exit to leave.