1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Loading "Him" Forearm Mods

Discussion in 'Help' started by Sharklasers, Jul 21, 2016.

  1. Sharklasers

    Sharklasers Avid Affiliate Content Creator

    Joined:
    Feb 8, 2016
    Messages:
    87
    Likes Received:
    19
    I'm messing with some of the .fla files Dante released when he left. I want to make more .swf imports for the female/futa "him" body.

    Here's the code as Dante left it:

    Code:
    function initl(l)
    {
            l.g.inGameMenu.loadData("hisBody:female;hisFootwear:none,82,0,6,1;hisBreasts:130;");
        l.loadCustomFull(new historso,".|Him.torsoLayer.torso","x:0;y:0;r:0;a:1");
        l.loadCustomFull(new hisbreastr,".|Him.torsoLayer.rightBreastContainer.rightBreast","x:0;y:0;r:0;a:1");
        l.loadCustomFull(new hisbreastl,".|Him.torsoLayer.leftBreastContainer.leftBreast","x:0;y:0;r:0;a:1");
        l.loadCustomFull(new hisfootl(),".|Him.leftLegCostume.calf.foot","x:0;y:0;r:0;a:1");
        l.loadCustomFull(new hisfootr(),".|Him.rightLegCostume.calf.foot","x:0;y:0;r:0;a:1");
        l.loadCustomFull(new hiscalfl(),".|Him.leftLegCostume.calf","x:0;y:0;r:0;a:1");
        l.loadCustomFull(new hiscalfr(),".|Him.rightLegCostume.calf","x:0;y:0;r:0;a:1");
        l.loadCustomFull(new histhighl(),".|Him.leftLegCostume","x:0;y:0;r:0;a:1");
        l.loadCustomFull(new histhighr,".|Him.rightLegCostume","x:0;y:0;r:0;a:1");
        l.loadCustomFull(new historso,".|Him.torsoLayer.torso","x:0;y:0;r:0;a:1");
        l.loadCustomFull(new pantstop,".|Him.midLayer.hips","x:0;y:0;r:0;a:1");
        var hupperarm = new hisupperarm();
        hupperarm.rotation = -90;
        l.him.armContainer.arm.upperArm.addChild(hupperarm);
        l.registerToRemove(hupperarm);
        var hforearm = new hisforearm();
        var hupperarml = new hisupperarml();
        l.him.leftArmContainer.arm.addChild(hupperarml);
        l.registerToRemove(hupperarml);
        //l.him.leftLeg.calf.visible=false;
        //l.him.rightLeg.calf.visible=false;
        l.unloadMod();
       
    }
    
    

    (I commented out the leftLeg.calf.visible=false lines.)

    There's a piece of the template for forearm/hand mods. What code would I need to add to load in forearm mods for the left and right arms?
     
  2. stuntcock

    stuntcock Club Regular Staff Member Moderator

    Joined:
    Jun 5, 2012
    Messages:
    1,520
    Likes Received:
    353
    I'd recommend working with the FLA template instead of re-purposing the source file for a specific mod.

    Messing around with old FLA files is slightly risky, because you may inadvertently replicate some deprecated scripting techniques (especially ON_ENTER_FRAME stuff, which heavily limits the inter-mod compatibility of your SWF files). It's useful when you're starting out - when you just want to quickly get a "proof of concept" scribble to appear in-game so that you can then iterate on it and improve your skills. But if you have some experience in SDT modding (or computer programming in general) then it's better to do things properly.

    Here's an excerpt from the FLA template. Please do not copy-paste this code into your project, because it omits important proxies and helper methods. Download and use the template instead.
    Code:
      //---------------------------right arm
       loader.loadManual(hupperarmr, him.armContainer.arm.upperArm);
       loader.loadManual(hforearmr, him.armContainer.arm.lowerArm);
       loader.loadManual(hhandr, him.armContainer.arm.hand);
    
       //---------------------------left arm
       loader.loadManual(hupperarml, him.leftArmContainer.arm);
       loader.loadManual(hforearml, him.leftArmContainer.arm.foreArm);
       loader.loadManual(hhandl, him.leftArmContainer.arm.foreArm.hand);
    
     
  3. Sharklasers

    Sharklasers Avid Affiliate Content Creator

    Joined:
    Feb 8, 2016
    Messages:
    87
    Likes Received:
    19
    Thanks. I actually tried using the .fla template, but I couldn't figure out how to change the male template. All the female/futa body assets are on the second or third frames of movie clips, so I couldn't get the entire template to advance all at once - I could only change one body part at a time. The template mentioned a listener that I needed to change, but I wasn't clear on what part of the actionscript I was supposed to change. (I thought of deleting the first frames to force the clips to advance, but I thought that might mess up the scripting.) So, I just went back to tweaking premade .fla mods.

    Do you know what I have to do to make the .fla template display the futa/female body in the body template mode? Is there even a way to do that?
     
  4. stuntcock

    stuntcock Club Regular Staff Member Moderator

    Joined:
    Jun 5, 2012
    Messages:
    1,520
    Likes Received:
    353
    That's because you're only editing one component at a time, and we generally expect that people won't care about the "context" of the bodypart because they already know that everything fits together. So long as they preserve the original outline, the fitting will still be okay.

    Admittedly, that isn't true if you're making significant changes to the limbs. If you're drawing a new arm then ... yeah; it would be very useful to see the futa Upper Arm when you're editing the futa Forearm, so that you can setup the elbow joint properly.

    Uncomment this line:
    Code:
      //register his body type listener
    //   registerHisBodyType();
    
    The principle is fine, and it would simplify your workflow, but your proposed implementation is risky: it would cause your mod to throw ArgumentError exceptions at runtime.

    Instead of deleting the "him" keyframe, just copy-paste the "futa" shapes onto the "him" keyframe. It's a bit tedious. But there are relatively few components in the male body, and you can probably skip most of them (e.g. legs, feet) if you're creating arm mods specifically.

    Please note that shapes you draw will not replace the vanilla sprites but will instead be rendered on top of them. Your artwork therefore needs to be bigger than the vanilla body (or share the exact same outline), but your new stuff usually won't impair the vanilla scripting.

    If your new body sprite is going to be thinner or smaller than its vanilla counterpart, then you'll need to add some scripting to hide the vanilla stuff. But you should nonetheless be able to get your thin sprites in-game for testing/preview purposes, and we can add the Visibility scripting later on.
     
    Sharklasers and aztlan like this.
  5. Sharklasers

    Sharklasers Avid Affiliate Content Creator

    Joined:
    Feb 8, 2016
    Messages:
    87
    Likes Received:
    19
    Thank you again, you've been a huge help. I'm only on the trial version of Flash, but this makes me want to get ahold of a permanent version. (Ideally an old version that doesn't have a monthly subscription fee. Sheesh.)

    In the meantime, while my trial is still up, is there any place where I can get .fla assets for the clothes already in the game? Specifically, I want the default shirt, so I can edit one for the domme/futa body.
     
  6. Faceless

    Faceless Club Regular Content Creator

    Joined:
    Jun 12, 2011
    Messages:
    1,118
    Likes Received:
    22