How to assign RGB sliders to another template (Vanilla) (1 Viewer)

SyntaxTerror

Content Creator
Joined
Jul 24, 2014
Hello

These questions concerns Vanilla:

How can I affect the same RGB slider to symbols in the Top Template and the Bottoms Template, like in Iago Iago 's Sleeveless Dress Miniskirt for example (the Top RGB slider also changes the Bottoms colour).

I tried to decompile his mod, but didn't understood how he did it.

By the way, is there is a way to "steal" a RGB slider of a costume template to affect it to another template?
For example, if I need 3 sliders for an Headwear, is it possible to use the slider of the Tongue piercing?

Thank you.
 

Iago

Content Creator
Joined
Aug 19, 2014
Here is a piece of code from that mod in the main settings file (asuming you are using sby template, I don't know how the other one looks like):

registerMod(Top);
registerMod(Bottoms);


import flash.events.Event;
import flash.display.MovieClip;

addEventListener(Event.ENTER_FRAME, followColorSlider);
function followColorSlider(e:Event)
{
Bottoms.back.rgbFill.transform.colorTransform = Top.back.rgbFill.transform.colorTransform;
Bottoms.chest.rgbFill.transform.colorTransform = Top.back.rgbFill.transform.colorTransform;
Bottoms.rightThigh.rgbFill.transform.colorTransform = Top.back.rgbFill.transform.colorTransform;
Bottoms.leftThigh.rgbFill.transform.colorTransform = Top.back.rgbFill.transform.colorTransform;
}
The blue part is what I added to asign the slider of the top to other templates (in these case the Bottoms). Be careful what you add to the code, if the piece doesn't exist, anything after it will not work properly.

If the code is not enough we might be able to use it as a base for a longer explanation.

My trick to "steal" sliders is adding a piece from the robbed template and put it in a place where it will never be seen. To steal the neck slider for those of my overtops that don't have a visible neck piece I make little elipses that I put in the part of the neck that goes behind the shoulders (so the mode has to include the neck template).
 

SyntaxTerror

Content Creator
Joined
Jul 24, 2014
asuming you are using sby template
Errrr... I am not using anything else than the base game and konashion's SDTMods folder... (I am kinda the Amish modder of this forum)

I tried to make a mod with two templates (Top + Bottoms) and a RGBFill in the rightThigh layer, and added only the corresponding line, but when I try to publish, I got this:
Compilation errors said:
Main, Calque 'Settings', Image 1, line 13, row 1 1120 : Access to undefined property Bottoms.
Main, Calque 'Settings', Image 1, line 13, row 49 1120 : Access to undefined property Top.
(I had to translate this to English, my Animate CC is in French)

I tried to find the "sby template" you're talking about, but cannot find it... (@sby has done too many things :tongue:)
I think it is an edited SDTMods folder to put in my FLAs folder, right?

[EDIT] do you mean this: download: 10/23/2014 - SDTMods_sbyTemplate3.zip?
I'm trying it right now.

[EDIT 2] If I replace kona's SDTMods folder by sby's, I have this:
Compilation errors said:
Symbol 'Bottoms Template', Layer 'Settings', Image 1, line 10, row 22 1120 : Access to undefined property ModTypes.
The error is on this line:
var modType:String = ModTypes.BOTTOMS;
I think I need to use sby's template instead of kona's, I'm trying this right now...

[EDIT 3] I'm such an eternal noob when it comes to coding...
In fact, your blue code works with kona's stuff, I got errors because I called the symbols "top" instead of "Top"...
Damned CamelCase!
 
Last edited:

Iago

Content Creator
Joined
Aug 19, 2014
Sorry, I'm a bit rusty and I forgot, you shouldn't need to use sby template. It is basically Kona's template but with bra, and panties templates (and some others I don't remember), the rest should work exactly the same. Let me think what might be the problem, although I hope someone more experienced will drop by and help you long before I come to any conclusion XD.

Edit: As a provisional solution, remember that in my code "Top" and "Bottom" are the names I used in the registermod line (the name you used in the properties field) and rgbFill is not the name you gave to the file but also the name you put in the properties field of the rgbFill file.
 
Last edited:

SyntaxTerror

Content Creator
Joined
Jul 24, 2014
Iago Iago : I'm such an eternal noob when it comes to coding...
In fact, your blue code works with kona's stuff, I got errors because I called the symbols "top" instead of "Top"...
Damned CamelCase!

Talking of your way to have 3 RGB sliders, you mean using the Collar template to put a RGBFill symbol that would be on the Back for example? If it is that, the two templates must not move from each other? For example, it would not work with a Collar RGBFill applied to a Footwear template?

[EDIT] in fact, in your code, these lines do not seem to be useful:
Code:
import flash.events.Event;
import flash.display.MovieClip;
I removed them and everything seems to work fine
 
Last edited:

Iago

Content Creator
Joined
Aug 19, 2014
You might be right about those lines for all I know. I'm not an expert myself, I simply copied something I saw on some tutorial or other and used it ever since without questioning XD.

As for your other question, I'm not talking about modeling the, lets say, sleeves of a top in the collar template, if I understand you correctly, I'm talking about creating a little ellipse in a collar template, so low in that template that it will be hidden behind the shoulders and then asign the sleeves rgbfill of the top to that rgbfill like in my blue code. So instead of having the bottoms working with the slider of the top template, you have the sleeves of the top working with the slider of a collar template piece that is never seen because although it is there, it's always overlaped by the body (unless you're using a very extreme animtools position :p).
 
Last edited:

SyntaxTerror

Content Creator
Joined
Jul 24, 2014
I simply copied something I saw on some tutorial or other and used it ever since without questioning
I admit that I often do same... :rolleyes:
I'm talking about creating a little ellipse in a collar template, so low in that template that it will be hidden behind the shoulders and then asign the sleeves rgbfill of the top to that rgbfill like in my blue code.
This is clever, I didn't think of it in this way.

Thank you for your advices, they will be very useful in the future.
Now I am trying to make a night dress with adjustable breasts and RGB sliders, and I am having hard time with the shape tweens... And I haven't made the 151 RGBFill symbols yet!
 

Iago

Content Creator
Joined
Aug 19, 2014
You do know that you don't need to make more than six or seven outlines or symbols for the breasts, right? The tween works the same with the solid symbols as it does with the outlines, just remove the lines from the rgbfill file, leaving only the solid form so that the interpolation tool doesn't go crazy.

P.D: Now that I think about it, I guess you don't need to "hide" the auxiliar piece from the template you want to vamp behind other part of the body. If you just put it so far away from the coordinates origin that it ends up outside the screen, no matter the zoom or position of the character, it should be enough.
 

SyntaxTerror

Content Creator
Joined
Jul 24, 2014
I know, but even lines become strange between the 5-6 key images, and I want to draw a 12px wide braid that have a RGB slider, with a balck outline (the pink braid).

vaBfgwc.png

(the colours look strange because I mixed two references)

Concerning RGBFill symbols, I've just discovered that the shape tweenings can be made inside the RGBFill symbol, so I won't have to make 151 symbols.
Anyway, I have to get a closer look to kona's example t-shirt mod.
 

Iago

Content Creator
Joined
Aug 19, 2014
Consider drawing the outline of the braid and that of the breast in different layers so they will interpolate separately (maybe in this manner you won't need to interpolate the braid at all).

Edit: Nice dress, by the way although I'm sure people around here will thank you if you provide along with the dress the top and skirt as separate mods.
 

SyntaxTerror

Content Creator
Joined
Jul 24, 2014
I'm talking about creating a little ellipse in a collar template, so low in that template that it will be hidden behind the shoulders and then asign the sleeves rgbfill of the top to that rgbfill like in my blue code. So instead of having the bottoms working with the slider of the top template, you have the sleeves of the top working with the slider of a collar template piece that is never seen because although it is there, it's always overlaped by the body (unless you're using a very extreme animtools position :p).
In fact, I do not really understand how to have 3 RGB sliders in one template, because I must name the instances "rgbFill" and "rgbFill2", but how do I name the third?

[EDIT] OK, I got it. I made some tries but had problems because there is no symbol already made in the Collar template.

For example, to add a 3rd RGB slider to the Back of the Top template:
  1. create a symbol in the Collar template and name its instance "thingy"
  2. create a symbol in the symbol "thingy" and name its instance "rgbFill" (this symbol has to be hidden under the neck)
  3. name the Collar template instance "collar" in the Main
  4. create a RGBFill fill symbol in the "back" of the Top template and name its instance "rgbFill3"
  5. name the Top template instance "top" in the Main
  6. add the blue stuff above with a line
    • top.back.rgbFill3.transform.colorTransform = collar.thingy.rgbFill.transform.colorTransform;
Like this it is possible to assign any of the RGB sliders of an avaialble template (for Vanilla: collar, eyewear, gag, headwear, bottoms, footwear, top, belly/ear/nipple/tongue piercing) to one part of a costume.
 
Last edited:

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.