Loader Modding Tutorial (1 Viewer)

stuntcock

Content Creator
Joined
Jun 5, 2012
Hey I want to know if anyone knows if their is any way to bring certain body parts in Flash Animate above another. Like say I want to have torso segments above leg segments. How would one do that if possible?
There are many ways to do it; we don't have enough information to advise you on the best path.

Tell us more about what you're trying to achieve, how much inter-mod compatibility you intend to provide, how large the torso-connected thing is, whether the torso-connected thing needs to be RGB or HSL shifted during gameplay, whether you're aiming for a Loader mod or vanilla import, etc. Draw a sketch if necessary, or link to similar mods which already exist.

  • the simplest option wold be to implement the torso thing as clothing. It would then appear above the legs. It would not inherit skin HSL settings (which is acceptable if it's a set of angel wings, but probably unacceptable if it's a big fat belly extension). It may behave oddly when combined with other pieces of torso clothing (e.g. load a shirt ... and suddenly the wings disappear).
  • you can manually inject sprites at arbitrary locations in the visual hierarchy via loader.loadManualIndex. Hence, you could draw a piece of the torso on a higher-than-usual layer so that it would have visual priority.
  • you can literally change the visual order of the layers which compose the SDT scene. This would be an extreme option and would tend to make the game look silly, but it may be useful if you're trying to something unusual (such as a girl who doesn't have legs at all - and you're not worried about mod compatibility because it's a standalone mod which isn't supposed to mix-and-match with other mods)
 

Skeleton15

Potential Patron
Joined
Oct 12, 2013
  • the simplest option wold be to implement the torso thing as clothing. It would then appear above the legs. It would not inherit skin HSL settings (which is acceptable if it's a set of angel wings, but probably unacceptable if it's a big fat belly extension). It may behave oddly when combined with other pieces of torso clothing (e.g. load a shirt ... and suddenly the wings disappear).
I believe that option will work if you can inform me or know of any tutorials (I couldn't find anything). What I am trying to achieve is a frontal torso segment that appears above legs but below breasts. It would not require any RGB or HSL shifting and would work well as a clothing mod. It is to be used with the loader only because it was built from Dante's templates.
 

stuntcock

Content Creator
Joined
Jun 5, 2012
I believe that option will work if you can inform me or know of any tutorials (I couldn't find anything).
Tutorials
What I am trying to achieve is a frontal torso segment that appears above legs but below breasts.
You're going to need to either rearrange the layers or split your mod into two segments, then.

sdt-layers-legTorsoBreasts.png

Here's a quick demo image showing a blue ellipse, implemented as a BODY mod on rightLeg. Notice that it is on top of the torso and breasts. If we simply "push the right leg layer into the background" or "pull the torso and breasts into the foreground" then you'd obtain the desired layer-stacking, but the scene would look ridiculous. Her right leg would be on wrong side of her torso, her buttocks would be deformed, and the creepy unfinished pelvis would be visible.

----------------​

You can potentially design your mod as two separate pieces. One would be a piece of clothing on the torso which appears on top of the right leg (like a skirt). The other would be a body mod applied to the torso (like a tattoo) which would appear beneath the right breast.

----------------​

This would be easier if you would explain your actual goal (e.g. "I'm trying to create a fancy belt; here's the reference image" or "I'm trying to create small angel wings which attach to the girl's hips" or "I'm trying to create a big fat belly") instead of laying out intermediate technical objectives. There may be a much simpler approach which could achieve the desired goal. I may be able to link you to an existing FLA file which can put you on the right track (and/or serve as a working example). If you want to keep it a secret until the file is ready to release then that's your prerogative, but tech support is going to be less effective.
 

Samoth

Staff
Admin
Forums Moderator
Discord Moderator
Content Creator
2D Artist
Writer
Joined
Feb 13, 2016
In the tutorial, you mention that parts of the female layout (explicitly mentioning NEWUPPERARMR) need to be drawn on two separate frames to get it to work in multiple positions. I must have missed something, because I did that and now it just flashes constantly between the two when I load the mod into the game. I seem to have missed the step where you stop that from happening (since you only address a similar issue for the breasts - but in that case the easy fix is to remove all frames that aren't the one you modded in. THAT I followed easily and have done, but that method wouldn't work for the arms because I'd be forced to use her one way or the other and not both).
 

Samoth

Staff
Admin
Forums Moderator
Discord Moderator
Content Creator
2D Artist
Writer
Joined
Feb 13, 2016
It looks like any lines that may be that are already uncommented... I would asume the code is likely in the "update [left/right] hand" functions?

This is how that portion looks. I tried going and re-exporting it and no dice. Still doing the thing.
Code:
function updateRightArm() {
    if(her.currentRightArmPosition == 0) {
        upperarmr.gotoAndStop("backArm");
    }
    else {
        upperarmr.gotoAndStop("normalArm");
    }
}

I could post a larger portion if you want, but that seems to be the portion you're referring to. A search for "gotoAndStop" doesn't turn up much that could also be tied to this.
 

Faceless

Content Creator
Joined
Jun 12, 2011
Are you testing with the debug player? If all the proper control code is active, then probably what's happening is that you're getting an exception somewhere and so the control code is never executed.
 

Samoth

Staff
Admin
Forums Moderator
Discord Moderator
Content Creator
2D Artist
Writer
Joined
Feb 13, 2016
A brief note to any future modders who see this thread and happen to have the same issue I did: make sure you uncomment the arm listeners if you're going to give the girl gloves with Faceless' template. In v0.98, it's lines 603 and 606 for the right/left arms. They should be something like "registerRightArmPosition();" and "registerLeftArmPosition();" in the code. A search for the term "listener" may help bring it up as well.

Many thanks to Faceless for helping me figure this out. Dante, you may want to consider including a note about this particular kind of issue somewhere in your guide (since the guide built into Faceless' template only mentions uncommenting the "bodypart = new bodypart" and your guide here only addresses preventing the breasts from constantly spazzing out in this manner - you mention that the arms have 2 frames, but never how this is specifically to be dealt with).
 

Faceless

Content Creator
Joined
Jun 12, 2011
In light of this oversight in documentation on my part, I have released a new template with explicit warnings for all relevant components to enable listeners as appropriate.
 

Skeleton15

Potential Patron
Joined
Oct 12, 2013
Tutorials
You're going to need to either rearrange the layers or split your mod into two segments, then.


Here's a quick demo image showing a blue ellipse, implemented as a BODY mod on rightLeg. Notice that it is on top of the torso and breasts. If we simply "push the right leg layer into the background" or "pull the torso and breasts into the foreground" then you'd obtain the desired layer-stacking, but the scene would look ridiculous. Her right leg would be on wrong side of her torso, her buttocks would be deformed, and the creepy unfinished pelvis would be visible.

----------------​

You can potentially design your mod as two separate pieces. One would be a piece of clothing on the torso which appears on top of the right leg (like a skirt). The other would be a body mod applied to the torso (like a tattoo) which would appear beneath the right breast.

----------------​

This would be easier if you would explain your actual goal (e.g. "I'm trying to create a fancy belt; here's the reference image" or "I'm trying to create small angel wings which attach to the girl's hips" or "I'm trying to create a big fat belly") instead of laying out intermediate technical objectives. There may be a much simpler approach which could achieve the desired goal. I may be able to link you to an existing FLA file which can put you on the right track (and/or serve as a working example). If you want to keep it a secret until the file is ready to release then that's your prerogative, but tech support is going to be less effective.


Okay sorry I have been to busy and have forgotten about this post for a while, but if you're still willing to help I'll try to better explain the problem. Basically I'm just testing out the loader modding stuff and have ran into an issue on a custom mod where a front torso piece is below the legs, but I want to to be above them.
2016_06_26_0415.png

I want to make the above image look like the below image.
2016_06_26_0414.png

Here's this if it's useful.
2016_06_26_0416.png
 

stuntcock

Content Creator
Joined
Jun 5, 2012
Here's this if it's useful.
If you're looking for assistance with a Flash project, and you find yourself posting a screenshot of your project ... then it would probably be more useful to just share the FLA file instead :)
Basically I'm just testing out the loader modding stuff and have ran into an issue on a custom mod where a front torso piece is below the legs, but I want to to be above them.
Your goal is reasonable. But as I explained previously, it's not possible for a single front torso piece to be simultaneously above the legs and below the breasts.
  1. Duplicate your newchest symbol
    • You'll want to give it a proper symbol name, and a recognizable class name in the "Export for ActionScript" configuration section. I'll just assume that both names are newchest_copy.
  2. Load the new symbol as chest clothing rather than skin
    • l.loadCustomFull(new newchest_copy(), ".|Her.torso.topContainer.chestTop", "x:0;y:0;r:0;a:1");
    • This isn't a replacement for your original chest-loading statement. The two statement should appear side-by-side.
  3. If you test the file in-game, you'll notice that the new clothing element entirely overlaps the old one, and appears above the breasts.
    • This isn't the effect that we're trying to achieve, but it proves that we're on the right track.
  4. Open up the copied Chest symbol. Add a new layer.
  5. Draw a simple filled rectangle (any color) on the new layer.
    • Ensure that it partially overlaps the clothing -- you'll want it to cover the whole of the "skirt" but not the upper part of the "torso".
  6. Right-click the new layer and choose Mask from the context menu.
    • The new layer will now be treated as a Mask.
    • The contents of other layers in your Symbol will be automatically cropped (on the canvas and during gameplay) so that only the portion which falls within your rectangle will be visible.
  7. If your symbol includes many layers, then drag-drop them onto the Mask layer so that they all get masked.
  8. Publish your file and test it in-game
 

Skeleton15

Potential Patron
Joined
Oct 12, 2013
If you're looking for assistance with a Flash project, and you find yourself posting a screenshot of your project ... then it would probably be more useful to just share the FLA file instead :)
Your goal is reasonable. But as I explained previously, it's not possible for a single front torso piece to be simultaneously above the legs and below the breasts.
  1. Duplicate your newchest symbol
    • You'll want to give it a proper symbol name, and a recognizable class name in the "Export for ActionScript" configuration section. I'll just assume that both names are newchest_copy.
  2. Load the new symbol as chest clothing rather than skin
    • l.loadCustomFull(new newchest_copy(), ".|Her.torso.topContainer.chestTop", "x:0;y:0;r:0;a:1");
    • This isn't a replacement for your original chest-loading statement. The two statement should appear side-by-side.
  3. If you test the file in-game, you'll notice that the new clothing element entirely overlaps the old one, and appears above the breasts.
    • This isn't the effect that we're trying to achieve, but it proves that we're on the right track.
  4. Open up the copied Chest symbol. Add a new layer.
  5. Draw a simple filled rectangle (any color) on the new layer.
    • Ensure that it partially overlaps the clothing -- you'll want it to cover the whole of the "skirt" but not the upper part of the "torso".
  6. Right-click the new layer and choose Mask from the context menu.
    • The new layer will now be treated as a Mask.
    • The contents of other layers in your Symbol will be automatically cropped (on the canvas and during gameplay) so that only the portion which falls within your rectangle will be visible.
  7. If your symbol includes many layers, then drag-drop them onto the Mask layer so that they all get masked.
  8. Publish your file and test it in-game

This has worked, and with a few adjustments using the ".topContainer" line has solved all my problems thank you.
 

Skeleton15

Potential Patron
Joined
Oct 12, 2013
I have a simple question if anyone's still around to answer it. Using Dante's template and the loader is there a way to toggle or disable certain body parts? For example could I hide the original legs so a mod with a more slender figure could work without appearing over the original legs.
 

stuntcock

Content Creator
Joined
Jun 5, 2012
I have a simple question if anyone's still around to answer it. Using Dante's template and the loader is there a way to toggle or disable certain body parts?
I'd recommend using Faceless' FLA template instead of Dante's. The bodyparts and proportions are the same between the two files (so you'll be able to cut-and-paste any artwork that you've already drawn), but Faceless Faceless has included a lot of inactive ActionScript code in his file. For many tasks, you'll be able to simply uncomment a particular block of code instead of writing code from scratch.

For example could I hide the original legs so a mod with a more slender figure could work without appearing over the original legs.
It depends on the shape. If the shape is similar to the original body (example) then you could repackage your artwork as a vanilla import (var modType:String = ModTypes.BODY;) and simply include the var overwrite:Boolean = true; setting in your script. Vanilla imports are potentially more useful for players, because they can be registered with moreClothing and then toggled on or off at will (whereas some Loader mods are "dirty" and cannot be removed without resetting the game).

If the shape is significantly different (e.g. outside the boundaries of the standard Mask, using different anatomy) then you'll need to stick with the Loader template and add some more fancy scripting. The exact details will depend on the shape of your artwork, its interaction with other mods (such as existing costumes), and its potential manipulation via the in-game menu (e.g. HSL sliders, RGB sliders, bodysize slider). It may be useful to describe your project and provide a screenshot or two. If you're willing to share your FLA file then someone could probably add the AS3 details directly into it. If you'd prefer to keep your source files private then we can share some code snippets which might work.
 

Skeleton15

Potential Patron
Joined
Oct 12, 2013
I'd recommend using Faceless' FLA template instead of Dante's. The bodyparts and proportions are the same between the two files (so you'll be able to cut-and-paste any artwork that you've already drawn), but Faceless Faceless has included a lot of inactive ActionScript code in his file. For many tasks, you'll be able to simply uncomment a particular block of code instead of writing code from scratch.

It depends on the shape. If the shape is similar to the original body (example) then you could repackage your artwork as a vanilla import (var modType:String = ModTypes.BODY;) and simply include the var overwrite:Boolean = true; setting in your script. Vanilla imports are potentially more useful for players, because they can be registered with moreClothing and then toggled on or off at will (whereas some Loader mods are "dirty" and cannot be removed without resetting the game).

If the shape is significantly different (e.g. outside the boundaries of the standard Mask, using different anatomy) then you'll need to stick with the Loader template and add some more fancy scripting. The exact details will depend on the shape of your artwork, its interaction with other mods (such as existing costumes), and its potential manipulation via the in-game menu (e.g. HSL sliders, RGB sliders, bodysize slider). It may be useful to describe your project and provide a screenshot or two. If you're willing to share your FLA file then someone could probably add the AS3 details directly into it. If you'd prefer to keep your source files private then we can share some code snippets which might work.

I see what you're saying, thanks for the help. I've begun using the Faceless template, but I don't know much about the coding aspect so i'll need for detailed info and what to change and what to add. I still am only trying to hide or disable the original legs and the legs only.

On a side note is there a way to remove SWF clothing in the loader without resetting?
 

stuntcock

Content Creator
Joined
Jun 5, 2012
On a side note is there a way to remove SWF clothing in the loader without resetting?
If you're loading the a vanilla import via the "Swf Mod..." button then please look slightly to the right of that button. There's a button marked with a curved arrow () which will remove any manually-loaded imports while leaving the rest of the game intact.

If you're loading a Loader mod via the same method then you're at the mercy of the mod author. Try clicking the curved arrow button. The author might have included an unload/cleanup method ... but they might not have. If not, then you'll need to Reset (as you've already discovered).

If you're loading the SWF file via moreClothing then you'll need to use the in-game menus to switch to a different clothing item (or choose "None" to remove the item completely). You can also try Shift-Clicking on the item itself to remove it.

If you've included the SWF file in a Character Folder then it's equivalent to the "Swf Mod..." button. Try clicking the curved arrow button.
 

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.