YesNoOk
avatar

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

Started by Rolento, March 12, 2010, 11:44:50 pm
Share this topic:
Re: Mega Man styled color swapping (1.0 specific)
#21  April 02, 2010, 04:40:52 am
  • ***
  • Figuring things out, one sprite at a time.
    • irwt.iammanyninjas.com
That's pretty much it. If I can use the code later, great. If not, not much time lost working on it.
Re: Mega Man styled color swapping (1.0 specific)
#22  August 04, 2010, 09:07:02 pm
  • **
  • Injustice 2 Clan : Mugen Roach
  • God Bless The Coffin They Carry Me Off In
    • Brazil
    • mugenroach.webs.com
really nice... based in your code I made my Leona changes her pallete just like KOF2002
but I'm having some problems with the remappal code..here are them:  :'(
1° - my leona has 2k2 mode (exploding the power-bar) her palfx doesn't work right (only blinks when she's hitting the enemy)
2° - when Leone is getting hit by fire the palfx doesn'twork either ...

so..please help me I made a lot of things but nothing worked..


here's a piece of the code...
Quote

;Changes palette during match to normal
[State -3, instant-change-part2]
type = RemapPal
triggerall = var(40)=0 && palno=1
trigger1 = roundstate = 2
source = 1,1
dest = 1,1

;Changes palette during match to orochi
[State -3, instant-change-part2]
type = RemapPal
triggerall = var(40)=1 && palno=1
trigger1 = roundstate = 2
source = 1,1
dest = 1,7

;-------------


here's the problem happening ...  :-\

Bea

Re: Mega Man styled color swapping (1.0 specific)
#23  August 05, 2010, 12:10:07 am
  • *****
  • MUGEN Grandma
    • Brazil
    • www.smeenet.org
That happens because your triggers are making it so that the remappal sctrl runs every tick, reseting Leona's pal to the chosen one, and overriding the palfx effects that were applied over her palette before it's changed by the remappal.
Princess Adora: "My friend saw She-Ra take her dress off in the shower. She said she has an 8 pack. She said She-Ra is shredded."

SF2NES is dead. Long live SF2NES.
Re: Mega Man styled color swapping (1.0 specific)
#24  August 05, 2010, 01:24:51 am
  • ***
  • Figuring things out, one sprite at a time.
    • irwt.iammanyninjas.com
Roach: Looks like you stumbled on a minor oversight in the original code: as Beatrice pointed out, the trigger as it was made it so that it ran on every tick. In the sample code, a minor change to the remappal sctrl used during roundstate 2 (adding "time = 1" to the trigger present) appeared to root out this specific error. Some more modification appears to be needed to maintain the ability to quickly switch through palettes though for the codes original purpose, as I just realized this change also makes it so that it only switches at the beginning of a new state...
Re: Mega Man styled color swapping (1.0 specific)
#25  August 05, 2010, 08:08:37 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
The remappal sctrl need only trigger once. Do it in the transformation state only. It'll work from that point on.

I did this in Lee Rekka for his Power/Speed modes and it causes no issues at all.


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)
#26  August 05, 2010, 03:32:23 pm
  • **
  • Injustice 2 Clan : Mugen Roach
  • God Bless The Coffin They Carry Me Off In
    • Brazil
    • mugenroach.webs.com
oh... thanks you all!
i got it!

now the code is just like that:

Quote

[State -2, instant-change-normal]
type = varset
trigger1 = var(40)= 0 ;var of orochi mode unactive
trigger1 = roundstate >= 0
v = 24
value = ifelse(palno=1,1,ifelse(palno=2,2,ifelse(palno=3,3,ifelse(palno=4,4,ifelse(palno=5,5,ifelse(palno=6,6,
ifelse(palno=7,1,ifelse(palno=8,2,ifelse(palno=9,3,ifelse(palno=10,4,ifelse(palno=11,5,6)))))))))))

[State -2, instant-change-ex]
type = varset
trigger1 = var(40)= 1 ;var of orochi mode active
trigger1 = roundstate >= 0
v = 24
value = ifelse(palno=1,7,ifelse(palno=2,8,ifelse(palno=3,9,ifelse(palno=4,10,ifelse(palno=5,11,ifelse(palno=6,12,
ifelse(palno=7,7,ifelse(palno=8,8,ifelse(palno=9,9,ifelse(palno=10,10,ifelse(palno=11,11,12)))))))))))

[State -2, remappal];you have to put it in the changing state too
type = RemapPal
trigger1 = var(24) && time <= 1
source = 1,1
dest = 1,var(24)


"my code" allow you have orochi Leona choosen up to palno 6... (it's sth normal)
but is there an way to  datain the bug of the both have the same pallete?
for example : leona's palno = 1 when is in orochi mode is palno = 7 and vice-versa with all the rest ones ... so when the palno 1 and 7 with orochi's var (un)actived are the same.

the problem happening!  :P ...



 (me and my problems of to be a mugen maker) --;
Re: Mega Man styled color swapping (1.0 specific)
#27  August 05, 2010, 05:42:47 pm
  • ***
  • Figuring things out, one sprite at a time.
    • irwt.iammanyninjas.com
Based on what I could understand of your post, you are asking what to do in the case if Leona starts in palettes 7-12, in which she is already using her Orochi colors and thus any transformation would be less obvious as there is no drastic color change taking place. The easiest solution to this problem I can think of is probably making it so that if you start in palettes 7-12, you start as Orochi Leona by default. All that really requires is an additional varset that changes your var(40) to 1 if the active palette during roundstate=0 is greater than 6. Should do the trick.
Re: Mega Man styled color swapping (1.0 specific)
#28  August 06, 2010, 12:28:20 am
  • **
  • Injustice 2 Clan : Mugen Roach
  • God Bless The Coffin They Carry Me Off In
    • Brazil
    • mugenroach.webs.com
i used this code
...using it out of turns mode works right ...
Quote

[State -2, instant-change-ex]
type = varadd
triggerall = teammode != turns
trigger1 = teamside = 2 &&  enemy, name = "Leona"
trigger1 = enemy, palno != palno
v = 24
value = ifelse(palno=12,-5,ifelse(palno=6,-5,1))


but when is in the turns mode the problem continues after round 1 ...  :P ??? >:(
Re: Mega Man styled color swapping (1.0 specific)
#29  August 06, 2010, 01:07:45 am
  • ***
  • Figuring things out, one sprite at a time.
    • irwt.iammanyninjas.com
The way I'm looking at it right now, you've probably really overcomplicated things for the mode change. Cyanide gave you the right idea; for Leona, you only really needed one remappal sctrl to be present in the mode change state and you'd probably be fine on that part. Only other thing that comes to mind is setting up so the var that keeps track of whether or not Leona is supposed to be in Orochi mode doesn't reset inbetween rounds and you are good to go.
Re: Mega Man styled color swapping (1.0 specific)
#30  August 06, 2010, 08:06:12 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
If she starts in orochi palette for 7-12, why not have the transformation put her in the normal palette?

And yes, you are overcomplicating it. In your transformation state, that's the one you get into by going UDUDUD+KK add a single remappal controller

[State ReMapPal]
type = remappal
trigger1 = Use the trigger for when she actually changes
source = 1,1
dest = 1,palno+6

If you want to get fancy and have her go backwards if she's already in orochi mode, add

trigger1 = palno = [1,6] to the above piece of code and add a second remappal with

trigger1 = palno = [7,12]
dest = 1,palno-6

You need to use a variable if you want the change to persist into round 2 but it's still essentially the same stuff, You just need to overwrite state 5900 and tell it more accurately what to do.


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)
#31  August 06, 2010, 09:34:54 pm
  • **
  • Injustice 2 Clan : Mugen Roach
  • God Bless The Coffin They Carry Me Off In
    • Brazil
    • mugenroach.webs.com
i overcomplicated it ... but I can't find another way even with your helps ....
I'm still trying to make it works correctly the way I want to...
I have a lots of doubts yet about remapal ...
thanks a lot for your helps!
I have so many doubts that it becomes difficult to me to post here about it ...
when I got it working out of turns mode first, I'll post here the code ...
maybe in this way all of you shall understand what I want to make.
c ya! ;)