YesNoOk
avatar

Mega Man styled color swapping (1.0 specific) (Read 15319 times)

Started by Rolento, March 12, 2010, 11:44:50 pm
Share this topic:
Mega Man styled color swapping (1.0 specific)
#1  March 12, 2010, 11:44:50 pm
  • ***
  • Figuring things out, one sprite at a time.
    • irwt.iammanyninjas.com
Here's another bit of code that I personally have no use for, but maybe someone can find a purpose for. It's actually rather short and simple everything fits under statedef -2.

Anywho, the following code does 2 main things: the first is that it forces the player to palette 1 (aka the default palette) at round's start so you begin with what should be the non-powered palette. The second part is that by hitting z or c in this example, you can switch the character's currently selected palette.

Vars used
Var(24) - This var is used to track of palette value changes.
Var(25) - The var checked for the remappals <- Added to sample

Code (Place under statedef -2)
Code:
;Sample color change (Rockman styled)
;Initial varset - start round using pal01/no power selected
[State -2, Startup var]
type = VarSet
trigger1 = roundstate = 0
var(24) = 1

[State -2, Startup var]
type = VarSet
trigger1 = roundstate = 0
var(25) = 1

[State -2, forces vars to match up]
type = varset
trigger1 = 1
var(24) = var(25)

;Moving up and down
[State -2, Add-to-value]
type = VarAdd
triggerall = roundstate = 2
trigger1 = command = "z"
v = 25
value = 1

[State -2, subtract-from-value]
type = VarAdd
triggerall = roundstate = 2
trigger1 = command = "c"
v = 25
value = -1

;Next two varsets allow cycling both ways
[State -2, back to pal 1]
type = varset
triggerall = roundstate = 2
trigger1 = var(25) > 12 ; value of 12 used here assumes all 12 palettes are used. Customize as needed.
var(25) = 1

[State -2, back to pal 12]
type = varset
triggerall = roundstate = 2
trigger1 = var(25) < 1
var(25) = 12 ; value of 12 used here assumes all 12 palettes are used. Customize as needed.

;Changes palette to default at round start
[State -2, instant-change-part1]
type = RemapPal
trigger1 = roundstate = 0
source = 1,1
dest = 1,1

;Changes palette during match based on higher value
[State -2, instant-change-part2]
type = RemapPal
trigger1 = var(24) != var(25)
source = 1,1
dest = 1,var(25)

That's it for this code. As for switching the active weapon for Mega Man inspired characters, it could be done fairly simply by creating states for each weapon type being used and having the command file entries check either the value of var(24) or the current palno value to direct to the correct states or have one set of firing states that generate helpers based on the value of var(24) or palno. Either or should do the trick unless I missed something there. Have a nice weekend, and good .\/. to you all.

Edit: Added Cyanide's adjustment for cycling back and forth at extremes, and now what should be a better fix for timely cycling that still allows for palfx to work.
Last Edit: August 06, 2010, 01:12:14 am by Rolento
Re: Mega Man styled color swapping (1.0 specific)
#2  March 12, 2010, 11:52:48 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Quick addition to this that people would find handy would be to have going up or down at the max values rolls it over.

type = varset
trigger1 = var(24) > 12
v = 24
value = 1

and vice versa, so you don't need to press z/c 11 times to get to the other end of the palettes. Kirby was cyclical when changing morphs. This is about the same thing.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Mega Man styled color swapping (1.0 specific)
#3  March 13, 2010, 12:24:42 am
  • ***
  • Figuring things out, one sprite at a time.
    • irwt.iammanyninjas.com
Ah, nice catch. Do need to make some minor adjustments to the code above, which I'll do now.
Re: Mega Man styled color swapping (1.0 specific)
#4  March 15, 2010, 10:30:07 pm
  • *****
  • IG @tanooki_ninja
    • Puerto Rico
    • maxbeta.webs.com/mugen.htm
Ok, this is surely up my alley since I am currently working on an MVC styled "Complete Change" Ryu.

My question I guess would be if this code could basically change his palette once I activate his Akuma or Ken switch modes.

Thanks again for your awesome codes and tips Rolento...I'm also making use of the SFIV focus attack code atm.  ;)
"We need other people in order to create the circumstances for the learning that we are here to generate" RIP Adam Yauch aka MCA
www.instagram.com/tanooki_ninja
Re: Mega Man styled color swapping (1.0 specific)
#5  March 16, 2010, 01:26:06 am
  • ***
  • Figuring things out, one sprite at a time.
    • irwt.iammanyninjas.com
That sort of change still works on the same basic principle of changing the active palette based on the variable at the time, which in your case is the variable that decides which mode and move set Ryu is currently using. You may need to edit things a bit in your case to make contingencies for mirror matches, but the changes needed wouldn't really be that hard.
Re: Mega Man styled color swapping (1.0 specific)
#6  March 16, 2010, 07:54:54 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Using the ryu thing, You'd have to set up a 3 set of palettes for each mode.

Pal1 would give you the source dest stuff of

1,1
2,1
3,1

Pal2 would be

1,2
2,2
3,2

And so on. You would absolutely have to use sffv2 for this though.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Mega Man styled color swapping (1.0 specific)
#7  March 17, 2010, 12:27:58 am
  • ***
  • +1 to whoever added Godzilla to the main index.
Using the ryu thing, You'd have to set up a 3 set of palettes for each mode.

var(24)%3 would also work, and could be SFFv1. Three being the number of modes. It also helps if the number is a factor of your total number of palletes.

You couldn't go higher than 3 modes each with 4 unique palletes (one for each player in a simul mirror match).
If you did need to have more than 3 modes with 4 palletes, you would need to use SFFv2.
i think we should call it an "engine" so we don't look like total idiots because otherwise we'd be arguing about a "game" and that would be somehow "dumber" than arguing about an "engine" on the "internet" for countless hours

Iced said:
I for one, do not enjoy round corners!  :bigcry:
But they hurt much less when we accidentally hit them!  :S
Last Edit: March 17, 2010, 12:34:28 am by MirageAtoli
Re: Mega Man styled color swapping (1.0 specific)
#8  March 17, 2010, 02:09:19 pm
  • *****
  • IG @tanooki_ninja
    • Puerto Rico
    • maxbeta.webs.com/mugen.htm
Ok, I'm kind of getting some of the suggestions here as I'm pretty new to the whole character coding deal. Here's something I've given some thought to, and please feel free to correct me if I'm wrong so I can learn more.

Let's say I make each palette grid having three different sets of Ryu sprites in mind;

One for good ol' Normal Ryu, His Evil/Gouki Pose Alternate, and his Ken Alternate.

Although, the question here would be if its possible to code Basic Motion sets for his Akuma/Ken sets, like Jump, Walk, Crouch and all their respective attacks.

You guys follow what I'm saying? ...and more importantly, can it be done this way?

Thanks again.
"We need other people in order to create the circumstances for the learning that we are here to generate" RIP Adam Yauch aka MCA
www.instagram.com/tanooki_ninja
Re: Mega Man styled color swapping (1.0 specific)
#9  March 18, 2010, 03:51:54 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
You don't need to. Once you have told it to remappal, it will be Ryu with different colours. You can use a variable to change the moves he can use. I don't think becoming ken/akuma changes the way he walks jumps or stands.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Mega Man styled color swapping (1.0 specific)
#10  March 18, 2010, 04:01:16 am
  • ***
  • Figuring things out, one sprite at a time.
    • irwt.iammanyninjas.com
Cyanide: Actually, it does change his standing frames when in Gouki mode and Ken mode has more bouncing to the left and right than Ryu's normal stance.

Anyway, Cyanide is right that all you need to do is apply the default Ryu palette to those frames, and remappal will take care of the rest by changing the colors to their appropriate versions depending on the mode selected.

vyn

Re: Mega Man styled color swapping (1.0 specific)
#11  March 18, 2010, 04:14:00 am
  • ****
    • Mexico
    • armandojc3@gmail.com
Nice, are true transformations possible now??? as in changing the required sprites so goku doesnt turn black haired when thrown anymore??
Re: Mega Man styled color swapping (1.0 specific)
#12  March 18, 2010, 04:27:16 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Well, the STYLE would change, but you could keep it yellow. Cleverness with how the sprite looked in normal mode could make the transformation version look normal no matter what.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

vyn

Re: Mega Man styled color swapping (1.0 specific)
#13  March 18, 2010, 04:32:50 am
  • ****
    • Mexico
    • armandojc3@gmail.com
I meant more like the 5000s required sprites, is there a code around them now or is it still impossible? not quite talking bout this code but 1.0
Re: Mega Man styled color swapping (1.0 specific)
#14  March 18, 2010, 07:53:58 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Yes, i know that. I'm saying if you used remappal it wouldn't go back to black (you could make the hitsprites look enough like the ssj hair style that it would work)

But that's DBZ specific, in general custom states are still a problem.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

vyn

Re: Mega Man styled color swapping (1.0 specific)
#15  March 18, 2010, 04:56:34 pm
  • ****
    • Mexico
    • armandojc3@gmail.com
Ah ok, my bad for not asking in general, tnx mate
Re: Mega Man styled color swapping (1.0 specific)
#16  April 01, 2010, 09:31:04 pm
  • ***
  • I have no idea what I'm doing.
    • UK
This intrigues me. I'll copy this code down, in case I want it for something.  ;)

I wonder - could this be used to create a character whose special moves change depending on the palette? Like Chameleon from Mortal Kombat, for instance?
Re: Mega Man styled color swapping (1.0 specific)
#17  April 02, 2010, 01:58:00 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
It's still just a variable. Use it for whatever you like.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

vyn

Re: Mega Man styled color swapping (1.0 specific)
#18  April 02, 2010, 03:50:21 am
  • ****
    • Mexico
    • armandojc3@gmail.com
You make these codes for the fun of it or are they part of abandoned projects, just curious mate.
Re: Mega Man styled color swapping (1.0 specific)
#19  April 02, 2010, 04:34:20 am
  • ***
  • Figuring things out, one sprite at a time.
    • irwt.iammanyninjas.com
This bit of code resulted from a combination of talking to Shoshingo and having nothing better to do for a few minutes. Figured it wouldn't be too hard to do something like this, and it wasn't.

vyn

Re: Mega Man styled color swapping (1.0 specific)
#20  April 02, 2010, 04:37:40 am
  • ****
    • Mexico
    • armandojc3@gmail.com
So sort of to see if stuff is posible?, good reason as any i guess.