Costume mods - update 16 oct. 2014 : *Heavy* update (2 Viewers)

mike

Casual Client
Joined
Feb 4, 2012
Re: Costume mods - update 28 august. 2014 : Minato Namikaze & Naruto Uzumaki

Thanks ! I'm not sure yet if I'm going to be able to use it but at least there are some shader gradients in there ;)

Also I just want to inform you guys that I'm planning a complete rework of my opening post so don't freak out if mods are temporarily unavailable. I hope the result will be worth it.

Edit : new op is up and running. Still some fine tunning ahead but hopefully it's better than it used to be.
 

Turm

Potential Patron
Joined
Jun 9, 2014
Re: Costume mods - update 28 august. 2014 : Minato Namikaze & Naruto Uzumaki

The Naruto mod is awesome, thanks for making it.
 

mike

Casual Client
Joined
Feb 4, 2012
Re: Costume mods - update 28 august. 2014 : Minato Namikaze & Naruto Uzumaki

A bunch of updates to announce:
  • Naruto and Minato : little fix on maj+click transitions : sometimes you had to click multiple times for something to happen --> fixed. It's much smoother now.
  • Cana : little update, see op for details
  • Sakura : updated for handjob support and a bunch of fixes
  • Totally Spies : fairly huge update, now all three costumes are in the same swf. Maj+click on her right forearm will switch costumes, names, eye color etc. Tricky but I learned a lot and can reproduce it for sailors.

Turm said:
The Naruto mod is awesome, thanks for making it.

Glad you like it :). Madara will come next.
 

Gameboy739

Vivacious Visitor
Joined
Oct 14, 2012
Re: Costume mods - update 30 aug. 2014 : Minato Namikaze 1.1 & Naruto Uzumaki 1.1

You make really good male mods. Mixing them with dante's male head mod is great. Do you plan on making any for the futa him?
 

mike

Casual Client
Joined
Feb 4, 2012
Re: Costume mods - update 30 aug. 2014 : Minato Namikaze 1.1 & Naruto Uzumaki 1.1

Darkarbiter said:
You make really good male mods. Mixing them with dante's male head mod is great. Do you plan on making any for the futa him?

Thanks and no, no futa incoming atm. Did you have something specific in mind ?
 

Gameboy739

Vivacious Visitor
Joined
Oct 14, 2012
Re: Costume mods - update 30 aug. 2014 : Minato Namikaze 1.1 & Naruto Uzumaki 1.1

Mike said:
Darkarbiter said:
You make really good male mods. Mixing them with dante's male head mod is great. Do you plan on making any for the futa him?

Thanks and no, no futa incoming atm. Did you have something specific in mind ?
Nope, just happy with what you do. ;)
 

Faceless

Content Creator
Joined
Jun 12, 2011
Re: Costume mods - update 30 aug. 2014 : Minato Namikaze 1.1 & Naruto Uzumaki 1.1

Mike said:
Tricky but I learned a lot and can reproduce it for sailors.
A couple of suggestions that you're free to ignore.

[list type=decimal]
[*]Try implementing modPage to select costume settings from a list, rather than clicking a bunch of times to cycle to the desired costume. It's not such a big deal for the Naruto stuff, since those are mainly binary and ternary selections, but it'd be a bit of a hassle to have to go through all the other inners if I just want Jupiter, for instance.
[*]Do you plan to draw separate parts for each character? For instance, have 5 or however many you plan to do differently colored ribbons. You could try instead to draw just one ribbon, and use ColorTransform for the proper color.
[/list]
 

mike

Casual Client
Joined
Feb 4, 2012
Re: Costume mods - update 30 aug. 2014 : Minato Namikaze 1.1 & Naruto Uzumaki 1.1

Faceless said:
Try implementing modPage to select costume settings from a list, rather than clicking a bunch of times to cycle to the desired costume. It's not such a big deal for the Naruto stuff, since those are mainly binary and ternary selections, but it'd be a bit of a hassle to have to go through all the other inners if I just want Jupiter, for instance.

That would be great although I don't know how to do that. I can't say if it would work with the way I do things at the moment.

For components that have only one image I just add images and switch between them. For the components that already have images though (hands & upperarmr), my solution is to duplicate the component and make it visible or not when I need to.

I'll gladly take your input on this.

Faceless said:
Do you plan to draw separate parts for each character? For instance, have 5 or however many you plan to do differently colored ribbons. You could try instead to draw just one ribbon, and use ColorTransform for the proper color.

As explained earlier atm I cycle through images so yeah, 3 times the same for totally spies for instance. How does colortransform work ?

Switching colors would work to some extent. Sailors don't have the same boots so they would require some different parts.
 

Faceless

Content Creator
Joined
Jun 12, 2011
Re: Costume mods - update 30 aug. 2014 : Minato Namikaze 1.1 & Naruto Uzumaki 1.1

Ah, I have a confession. I've not actually done anything with modPages either, so I'm just as much in the dark as you. I do actually have plans to fiddle with it for a Prince of Persia set, but there's no telling when I'll actually get around to it.

Now, ColorTransforms I can actually help you with. In a nutshell, they are how vanilla RGB slider support gets implemented. I don't think you've done any work with vanilla RGB support, so a quick tutorial. In whatever element that you're working on (let's go with upperarmr), create two layers. The top layer will be the shading, while the bottom layer will be the fill. The fill should be solid black, and converted into a named MovieClip object, set using the properties window (vanilla uses "rgbFill"). Essentially, you should be able to refer to the fill in AS as "upperarmr.rgbFill". For vanilla, that's all that's necessary, since hooking stuff up to the sliders is all handled by SDT itself.

For the loader, you'll have to implement the backend stuff yourself. Here's some example code, taken from my Sonia gloves.

Code:
var gloves:Array;

var rgba:Array;

var trans:ColorTransform = new ColorTransform();

function initl(l) {
    //...load stuff here
}

//frame listener
function frameRefresh(l) {
    //handjob
    handpos();
		
    //arms:Back
//    armPosition();

    rgba = main.g.characterControl.topControl.getDataString().split(",");
//    rgba = main.g.characterControl.armwearControl.getDataString().split(",");
    gloves.forEach(followColorSlider);
}

function followColorSlider(element:*, index:Number, arr:Array) {
    trans.color = (rgba[4]<<24 | rgba[1]<<16 | rgba[2]<<8 | rgba[3]);
    element.rgbFill.transform.colorTransform = trans;
}
The method "followColorSlider" is an iterator function. I don't know if you've ever seen one before, but basically what's going on is that "gloves" is an array containing all the elements I want colored (eg upperarmr). For each element in "gloves" (creatively referenced as "element") the iterator function gets called.

Now, this is designed to work with the vanilla RGB sliders, which is why this stuff is being called by a frame listener, but you'll probably want to tie this to a mouse click listener instead. The "rgba" array is used to extract the vanilla RGB values, which are concatenated for generate a color value for "trans.color", but if you're not planning on using the vanilla sliders don't worry too much about it. Just keep in mind that "trans.color" should be set to a hexadecimal RGB value (eg 0xFFFFFF for white) or its decimal equivalent (eg 16777215 for white).
 

mike

Casual Client
Joined
Feb 4, 2012
Re: Costume mods - update 30 aug. 2014 : Minato Namikaze 1.1 & Naruto Uzumaki 1.1

Faceless said:
Ah, I have a confession. I've not actually done anything with modPages either, so I'm just as much in the dark as you. I do actually have plans to fiddle with it for a Prince of Persia set, but there's no telling when I'll actually get around to it.

I guess it would require modifying the loader to create a bloc like the loader's rgb, and then select your function in a list ?

Faceless said:
Now, ColorTransforms I can actually help you with.

Thanks for the extensive explanation. It's still a bit over my head as there are a few things I don't get like why you use "element" instead of "gloves" and where you define that "element" object.

Given what I understand the code would look like this:
Code:
if (this.parent.parent != null){
	main = this.parent.parent;
	var i:uint;
	var costumes:Array;
	var trans:ColorTransform = new ColorTransform();
	
	//Load stuff as usual
	
	costumes=[handr, handl, chest];
	forearmr.addEventListener(MouseEvent.CLICK,switchFrames);
	element = ??
	
	//definition for the first sailor
	trans.color = (rgba[4]<<YY | rgba[1]<<YY | rgba[2]<<YY | rgba[3]);
	element.rgbFill.transform.colorTransform = trans;
	
	main.unloadMod();
}

function switchFrames(e){
	if(e.shiftKey==true)
	{
	//at first click
	trans.color = (rgba[4]<<XX | rgba[1]<<XX | rgba[2]<<XX | rgba[3]);
        element.rgbFill.transform.colorTransform = trans;
		
	//at second click
	trans.color = (rgba[4]<<ZZ | rgba[1]<<ZZ | rgba[2]<<ZZ | rgba[3]);
        element.rgbFill.transform.colorTransform = trans;
	
	//etc.
	}


While we're on the coding thing I would need a little tip for my next mod. The design works good for the normal position but the "face fuck" style breaks things. I would like to switch a few things automatically when the face fuck style is selected but I don't know how to refer to that position change.

Code:
function facefuck(e:Event){
if(???position==facefuck???){
hcalfr.gotoandstop(2);
}
else{blabla}
}
 

Faceless

Content Creator
Joined
Jun 12, 2011
Re: Costume mods - update 30 aug. 2014 : Minato Namikaze 1.1 & Naruto Uzumaki 1.1

Mike said:
I guess it would require modifying the loader to create a bloc like the loader's rgb, and then select your function in a list ?
Well, I'm assuming that you'll implement a counter to keep track of how many times a click event has been registered.

Code:
function switchFrame(e) {
    if(e.shiftKey==true) {
        charCount= (charCount++) % maxChars;

        switch(charCount) {
            case 0:
                //default character
                break;

            case 1:
                //first click - change to second character
                break;

            case 2:
                //second click - change to third character
                break;

            //...etc
        }
    }
}
Or something like that. What I was proposing was that instead of incrementing "charCount" by clicking the forearm or wherever, display a list on the Loader tab of all the characters, and when you make a selection from the list it fires off an event that sets the value of "charCount" using the list, and then calls switchFrame() to change the costume.

Basically this:
Code:
//called when selection from list is made
function selectFromList(e) {
    var listValue:Number = /*get value from list*/;

    switchFrame(listValue);
}

function switchFrame(charCount) {
    switch(charCount) {
        case 0:
            //default character
            break;

        case 1:
            //change to second character
            break;

        case 2:
            //change to third character
            break;

        //...etc
    }
}
But again, I haven't actually used the modPage stuff, so I don't know what the specific function calls for handling the list stuff are.

---
Thanks for the extensive explanation. It's still a bit over my head as there are a few things I don't get like why you use "element" instead of "gloves" and where you define that "element" object.
The "element" reference is declared as the first parameter of followColorSlider(). It's a placeholder for an element when using an iterator function to traverse the contents of the "gloves" array. If you're still confused, don't worry about it and use one of the other following code snips instead (they're all functionally identical; array.forEach(function) is just the fancy way of doing it):
Code:
for(var i = 0; i < gloves.size; i++) {
    trans.color = 0xFFFFFF;
    gloves[i].rgbFill.transform.colorTransform = trans;
}
Code:
for each(var o:Object in gloves) {
    trans.color = 0xFFFFFF;
    o.rgbFill.transform.colorTransform = trans;
}
Code:
gloves.forEach(followColorSlider);
function followColorSlider(element:*, index:Number, arr:Array) {
    trans.color = 0xFFFFFF;
    element.rgbFill.transform.colorTransform = trans;
}

---
Given what I understand the code would look like this:
Eh, I'd go with:
Code:
var upperarmr;
//...declare other mod elements

var trans:ColorTransform = new ColorTransform();
var curCharNum:Number = 0;
var rgbValues:Array = [
    0xFFFFFF, //colors for first character
    0x00000, //colors for second character
    //...etc
    0xCCCCCC, //colors for last character
];
var costumeElements:Array;

function initl(l) {
    main = l;

    //...instantiate and load mod elements

    costumeElements = [handr, handl, chestl];

    main.unloadMod();
}

function switchFrame(e) {
    if(e.shiftKey == true) {
        curCharNum = (curCharNum++) % rgbValues.size;

        trans.color = rgbValues[curCharNum];
        for(var i:Number = 0; i < costumeElements.size; i++) {
            costumeElements[i].rgbFill.transform.colorTransform = trans;
        }
    }
}
Or something.

---
While we're on the coding thing I would need a little tip for my next mod. The design works good for the normal position but the "face fuck" style breaks things. I would like to switch a few things automatically when the face fuck style is selected but I don't know how to refer to that position change.
Try (main.g.animationControl.currentAnimationName() == "face_fuck").
 

mike

Casual Client
Joined
Feb 4, 2012
Re: Costume mods - update 30 aug. 2014 : Minato Namikaze 1.1 & Naruto Uzumaki 1.1

Faceless said:
What I was proposing was that instead of incrementing "charCount" by clicking the forearm or wherever, display a list on the Loader tab of all the characters, and when you make a selection from the list it fires off an event that sets the value of "charCount" using the list, and then calls switchFrame() to change the costume.

Again, sounds great, but far over my current coding abilities :-\. The switchframe code I currently use was actually proposed by you and modguy a few months back. I worked with that and the template code to make something but I'm more on trial and errors than actual coding at this point.


Faceless said:
Eh, I'd go with...

I'll have to read it a few more times but I think I can get my head around that.

Faceless said:
Try (main.g.animationControl.currentAnimationName() == "face_fuck").

Given the piece of code I've found below by decompiling sdt I suppose it should work...but it doesn't.

Code:
         public function style2Clicked_l(param1:MouseEvent) : void {
         g.animationControl.setAnimation(AnimationControl.FACE_FUCK);
         g.saveData.saveCharOptionsData();
         this.setStyleCheckboxes();
      }

Maybe it would be possible possible to add a listener to the click that changes position instead ?
 

ModGuy

Content Creator
Joined
Feb 17, 2011
Re: Costume mods - update 30 aug. 2014 : Minato Namikaze 1.1 & Naruto Uzumaki 1.1

To simplify this discussion.
You are free to create a SWF for each version of the mod or one mod containing all versions.
In the first case, you'd use another mod to swap between them, this already exists.
In the latter case you can:

Bind a hotkey to swap between the frames of the mod.
Create a UI component to call the function to swap between the mods.
Define a gesture (shift click or whatever) to call the function.

Specifics can be discussed after you've decided on a route.

EDIT:

The style issue can be resolved with some detection or a proxy and would select some alternate form of the mod. Once again, specifics after decision.
 

mike

Casual Client
Joined
Feb 4, 2012
Re: Costume mods - update 30 aug. 2014 : Minato Namikaze 1.1 & Naruto Uzumaki 1.1

MG said:
You are free to create a SWF for each version of the mod

This one has been out of the way since the beginning.

MG said:
Define a gesture (shift click or whatever) to call the function.

This is how I do it at the moment.

MG said:
Bind a hotkey to swap between the frames of the mod.

To me this is exactly the same as before except instead of listening to a mouse event I'd listen to a keyboard event.

Faceless' remark was that it could be tedious to switch between sailors if you want, let's say the last one. Bound key or maj+click is pretty much the same regarding this. I'm open to better ways although, bound key or maj+click is still really a 2s switch at the beginning, probably even faster than opening the menu and clicking buttons.

MG said:
Create a UI component to call the function to swap between the mods.

This is interesting if you can have a list to select from. That's the fancy solution, way over my head as I said. Also I'm not entirely convinced it's faster or more user friendly...but it sounds sexy :-*.

MG said:
Specifics can be discussed after you've decided on a route.

Either way there was also the matter of how I would implement the switch, be it frames or rgb colortransform. The first I've done already, the second I'd have to work on.

In the end the rgb solution would be almost exclusive to the sailors since most mods will require different drawings (unless I tackle power rangers or something I suppose)...but it's still interesting to learn stuff.

MG said:
The style issue can be resolved with some detection or a proxy and would select some alternate form of the mod. Once again, specifics after decision.

If detection means event listener then yeah. I just want to switch between two frames when the style 2 aka face fuck is selected in the menu. It's not the sailors so it's really just a matter of event detection.
 

Faceless

Content Creator
Joined
Jun 12, 2011
Re: Costume mods - update 30 aug. 2014 : Minato Namikaze 1.1 & Naruto Uzumaki 1.1

Mike said:
Given the piece of code I've found below by decompiling sdt I suppose it should work...but it doesn't.

Maybe it would be possible possible to add a listener to the click that changes position instead ?
Hold on, do you want to set the style, or just know which style is active? Well, either way you'd still need to reference the loader itself first (hence "main.g" rather than just "g").
 

mike

Casual Client
Joined
Feb 4, 2012
Re: Costume mods - update 30 aug. 2014 : Minato Namikaze 1.1 & Naruto Uzumaki 1.1

Faceless said:
Hold on, do you want to set the style, or just know which style is active? Well, either way you'd still need to reference the loader itself first (hence "main.g" rather than just "g").

I want to know which style is active in order to change frames. I saw the piece of code by decompiling sdt and it was just a confirmation that main.g.animationControl.currentAnimationName() should work, except it doesn't for some reason. Since it doesn't work, I was asking if you could listen to the user's click that changes the style instead of listening to the change of style itself. I hope it's clear.
 

ModGuy

Content Creator
Joined
Feb 17, 2011
Re: Costume mods - update 30 aug. 2014 : Minato Namikaze 1.1 & Naruto Uzumaki 1.1

Provide a document to work with, don't settle for something simply not working.
Consider starting a separate thread regarding this mod since bumping your thread implies updates.
 

mike

Casual Client
Joined
Feb 4, 2012
Re: Costume mods - update 30 aug. 2014 : Minato Namikaze 1.1 & Naruto Uzumaki 1.1

This is the function I use.

Code:
function facefuck(e:Event){
if(main.g.animationControl.currentAnimationName() == "face_fuck"){
hcalfr.gotoandstop(2);
}
else{hcalfr.gotoandstop(1);}
}
 

Faceless

Content Creator
Joined
Jun 12, 2011
Re: Costume mods - update 30 aug. 2014 : Minato Namikaze 1.1 & Naruto Uzumaki 1.1

It turns out that currentAnimationName is a field, not a method, so get rid of the parentheses. Herp derp.

That's the sort of thing that debugging should have flagged, so if you haven't already I'd recommend getting the debug Flash player and enabling debug in the template publishing options.
 

mike

Casual Client
Joined
Feb 4, 2012
Re: Costume mods - update 30 aug. 2014 : Minato Namikaze 1.1 & Naruto Uzumaki 1.1

Sadly it's still not working :-\.

Here's a test fla if you wanna fiddle with it, on style2 it should display 2 instead of 1 on his leg if the code works.

View attachment Test.fla

I tried downloading debug flash but when loading the mod all I have is a blank page. Debugging in flash pro doesn't give anything either (I checked allow debug in publishing parameters).
 
Last edited by a moderator:

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.