YesNoOk
avatar

MegaMan Zero (MUGEN ver.) Help: Palettes (Read 4868 times)

Started by RedDragonCats17, October 31, 2018, 10:06:33 am
Share this topic:
Re: MegaMan Zero (MUGEN ver.) Help: Palettes
#21  November 05, 2018, 09:53:57 pm
  • *****
  • Shame on you!
    • USA
Do you have palettes for those numbers?

I believe he said,
dest = 1, palno + 12 * (var(3)=1)

What's happening is you pick the character and a value is set to the var. That var represents which character you picked with a number.
We then use that number in any type of math we want. In this case it's setting the palette(s).

Because you have 3 characters and 1 of them needs 12 palettes, ALL of the characters should be treated as having 12 palettes.
You have to make palettes 1-12 for one def, 13-24 for the second def. You make it seem like 1 character will only have 1 palette. That wont work right.

But above ALL of this, you've switched it from Var 10 to Var 15. We dont know what variable you use to keep track of your character.
THIS
dest = 1, palno + 12 * (var(3)=1)
is enough to be able to figure out what you need to do. But I think it should be written like

dest = 1, floor(palno + (12 * var(3)))
because you want to use pal 1,1 - 1,12.
1+12*0 =1
1+12*1 = 13
1+12*2 = 25
You may have to drop the floor(). CBF to test this.

This will allow you to create as many characters as you want and have them get their own palettes.

Set the Var 10, or the Var 15, or whatever var you're currently using, to be what ever number you want so the math in the RemapPal works.
Do you get why this works?
vVv Ryuko718 Updated 10/31/22 vVv
Re: MegaMan Zero (MUGEN ver.) Help: Palettes
#22  November 11, 2018, 08:50:31 am
  • ***
  • Part-Time MUGEN creator
    • USA
    • Skype - reddragoncats17
    • reddragoncats17.weebly.com/
First of all, I got rid of the var(15), as I thought that it could separate Zero from Omega Zero in his def, but then Deathscythe helped me get Omega Zero's mode out of normal Zero's def.

To answer your question, before I ask some, yes, I do have palettes for numbers 1-12, and here they are, the acts and the images.



Code:
pal1 = Zero.act
pal2 = Rise.act
pal3 = Yellow.act
pal4 = Blue.act
pal5 = Orange.act
pal6 = Strong.act
pal7 = Stronger.act
pal8 = Extend.act
pal9 = Junk.act
pal10 = Elf.act
pal11 = Proto.act
pal12 = Ultimate.act

And reading your post, Omega's single palette is assigned to 13-24.

Now here are my questions. What are the.... specifications (if that's the right word) of this?

Code:
dest = 1, floor(palno + (12 * var(3)))

Also, what do I do with this?

Code:
1+12*0 =1
1+12*1 = 13
1+12*2 = 25

I originally put each number in like what you see, and then I added the palno and a times sign right before, but Omega is still using the Ultimate.act palette. So what do I do?

Code:
dest = 1, 1+12*2 = 25

Code:
dest = 1, palno * 1+12*2 = 25
Last Edit: November 11, 2018, 08:53:57 am by RedDragonCats17
Re: MegaMan Zero (MUGEN ver.) Help: Palettes
#23  November 11, 2018, 11:16:50 am
  • *****
  • Shame on you!
    • USA
"What are the.... specifications (if that's the right word) of this?"
Code:    dest = 1, floor(palno + (12 * var(3)))

So the Dest is what the final number, or the outcome, will be. aka Destination Palette. Because we want to end up with palettes 1-12 and palettes 13-24, those values will be our target destination(s).
The
1,
is the group. This almost never changes.
The floor() is to make sure the math is the kind of math mugen wants to read for the destination values. floor will change a number like 1.3452 to just 1
Because Palette 1,1.3452 can never exist, mugen flips out if it's even possible. It'll crash.
palno is actually what button you've pressed. This word actually becomes a number to mugen. Like if you pressed y, palno would equal 5
The 12 * Var(3) is a tiny bit of algebra. The Var can be any number including 0. So using that we adjust the "sets" of destination palettes.
12*0=0
12*1=12
12*2=24
^^^These are just the values that will be possible.
So when we look at that equation and we pressed y to select our character, it'd look like this
dest = 1,floor(5+12*1)
to mugen.
Mugen would figure that out as
dest = 1,17

Now, I'm 99% sure I know how you can write this palette change to work for you. But I need to know,
How separated are the two characters?
Meaning, do they only have separate Def files, or do they have different CNS files? Do they have different CMD files?

How do you keep the different sets of moves from working in the other character?
Is it a variable or do you use different files or what? I need to know as many specifics on this as you can think of. Tell me about each file. If you're just using the name, tell me all the specific names you're using. All of it.

vVv Ryuko718 Updated 10/31/22 vVv
Re: MegaMan Zero (MUGEN ver.) Help: Palettes
#24  November 11, 2018, 09:57:34 pm
  • ****
    • crepa.neocities.org
If you got rid of var(15), how are you separating his modes? And I said earlier that if you're using sff 1.0, the act files (pal1 = Zero.act) won't work, they are for winmugen sff. 1.0 will read palettes directly from sff.
Re: MegaMan Zero (MUGEN ver.) Help: Palettes
#25  November 17, 2018, 06:09:41 am
  • ***
  • Part-Time MUGEN creator
    • USA
    • Skype - reddragoncats17
    • reddragoncats17.weebly.com/
Now, I'm 99% sure I know how you can write this palette change to work for you. But I need to know,
How separated are the two characters?
Meaning, do they only have separate Def files, or do they have different CNS files? Do they have different CMD files?

How do you keep the different sets of moves from working in the other character?
Is it a variable or do you use different files or what? I need to know as many specifics on this as you can think of. Tell me about each file. If you're just using the name, tell me all the specific names you're using. All of it.

I use a variable. I originally used 2 variables: var(15) for normal Zero, and var(10) for Omega Zero, but I got rid of the other variable (var(15)) because I found out that the reason why Omega is still in the MegaManZeroNormal.def is the name of the character itself. I changed the name from "MegaMan Zero" to "MegaMan Zero (normal)" in the MegaManZeroNormal.def, and that solved the problem.

Both characters use these 2 states, Zero.cns and Helpers.cns, and both use the same CMD. However, I put their constants in their DEFs so that I can make a MUGEN sized version of them without making another state for them, since some people don't like chibi characters. I also gave them their individual state files for their palettes, using state 5900 from common1, as Deathscythe suggested. So for the Zero that has both modes, I use MegaManZero.cns, for normal Zero, I use NormalZero.cns, and for Omega Zero, I use Omega.cns.

If you got rid of var(15), how are you separating his modes? And I said earlier that if you're using sff 1.0, the act files (pal1 = Zero.act) won't work, they are for winmugen sff. 1.0 will read palettes directly from sff.

The first paragraph will explain.

Also, I've discovered something interesting the other day. I messed with the remappal in MegaManZero.cns, and I changed it to 12+1, and normal Zero used Omega Zero's palette. But when I tried it in Omega.cns, it had little to no effect on Omega Zero himself.

So here's my question: Why doesn't it work on the Omega.cns state? That makes little to no sense at all.
Last Edit: November 18, 2018, 03:00:48 am by RedDragonCats17
Re: MegaMan Zero (MUGEN ver.) Help: Palettes
#26  November 18, 2018, 10:40:48 am
  • *****
  • Shame on you!
    • USA
Do you get how variables work yet?  Setting 2 variables to do the same thing means you didn't get how they worked originally.

When you ask stuff like
"So here's my question: Why doesn't it work on the Omega.cns state? That makes little to no sense at all."
I literally cant answer you. There are so many parts to what you're doing and I have no clue what parts you have in what files.
What I can say, is it sounds like you're making 3 characters in "3 files". You've edited 2 of those files and gotten things to work for 1? character.
Which makes me think you haven't understood why it works for that 1 character. On top of that you haven't edited the other files for the other 2 characters.

Where ever, however, you set "this"
    [State -2, Normal Zero]
    type = VarSet
    trigger1 = name = "MegaMan Zero" && palno = [1,6]
    trigger2 = name = "MegaMan Zero"
    var(10) = 15
You need to set it for all three characters. And NOT the same value.

What needs to happen is Var 10 is what character is playing. Var 10 set to 15 is MegaMan Zero.
 What is the value you set for var 10 to be Omega? And what is the value you set for it to be equal to the megaman that does both versions?
What are all 3 values?

Reading all of this and slowly catching on to how you have stuff set up seems completely backwards. I feel like this is what's causing you the most trouble. You have so many parts of so much shit running around in different files that when you get 1 file the way it should be, the 2nd and 3rd arent set up so it doesn't work. You edit the 2nd and kinda get it to work. So you go back and edit the 1st and it messes up.
ALL of these files, the different versions you're working on, could and SHOULD be in "1 file". You should be working with just 1 cns file to make your life easier. The fact that you dont know how/why variables work is what's killing you.

You've seemed to set a value 1 time, and wonder why it doesn't work 3 different ways. You didn't set it for those 3 other ways. You need to set up your displaytoclipboard so you can debug the values. Learn to do this!



With all that said.  You are going to invent some math. You're going to make up an equation. No one else really can because your files and values are all yours. You have ALL of the equation in parts. You have to adjust some stuff to make it work. I'm going to try to explain to you what you'll be trying to accomplish. What I say, except for a few things, wont be the correct answer for you. You'll have to figure it all out.
 
THIS SHOULD WORK
[State 5900, 3] ;Change palette
type = RemapPal
trigger1 = 1
source = 1,1
dest = 1, floor(palno + (12 * var(10)))   

Once everything is set up properly ^^^^That will be what works for you.
BUT
"First of all, I got rid of the var(15), as I thought that it could separate Zero from Omega Zero in his def, "
"If you got rid of var(15), how are you separating his modes? "
"I use a variable."
We fucking get that. WHAT is the var, WHAT IS ACTUALLY IN THE FUCKING CODE? So once again I'm going to guess. And all of everything I'm going to tell you is going to be a fucking guess.
Instead of reading something like
----
    [State -2, Normal Zero]
    type = VarSet
    trigger1 = name = "MegaMan Zero"
    var(10) = 15
    [State -2, Normal Zero]
    type = VarSet
    trigger1 = name = "MegaMan Zero (Normal)"
    var(10) = 120
    [State -2, Normal Zero]
    type = VarSet
    trigger1 = name = "MegaMan Zero (Omega)"
    var(10) = 7
---
we are guessing!!!!! Do you understand why this is a problem. Do you get that you haven't actually answered the question? 
WITH THOSE NUMBERS
Mega man zero's Palettes will have to be set to 1,180 - 1,191
Mega man zero normal's Palettes will have to be set to 1,1440 - 1,1451
Mega man zero omega's  Palettes will have to be set to 1,84 - 1,95
to make the code THAT WILL WORK, work.
Obviously, you can adjust the values to 0, 1, and 2, so you can use palettes 1,0 - 1,35. For a total of 36 custom palettes. Get it?




This is the 3rd or 4th time explaining this concept to you. I'm going to try to explain it one last time.
Var(10) translates to "Character"
and the value "15" translates to  "MegaMan Zero"
Var(10) = 15
translates to
Character = MegaMan Zero
But only you know that. Mugen doesn't understand "english"
Every time you want to talk to mugen and say,
"Only MegaMan Zero gets to do this"
You'd put
TriggerAll = Var(10) = 15
If you wanted to tell mugen
"MegaMan Zero Omega isn't allowed to do this, but the other 2 characters can"
You'd put
TriggerAll = Var(10) != 7
because
"Character" "doesn't equal" "Mega man zero omega"
again, if you edit the values 15, 120, and 7 into 0, 1, and 2. Those triggerall would be adjust to match your values.

You have so much shit flying around we cannot write specific pieces of code for you to get it to work. Especially with answers like, "I use a variable". You have to get the underlying concepts and work this crap out yourself.

I shouldn't have to tell you, but I feel like I should.
 "MegaMan Zero (Omega)"
If this isn't the name for your omega character, change it to your actual character's name.
vVv Ryuko718 Updated 10/31/22 vVv
Re: MegaMan Zero (MUGEN ver.) Help: Palettes
#27  November 18, 2018, 11:10:48 am
  • ***
  • Part-Time MUGEN creator
    • USA
    • Skype - reddragoncats17
    • reddragoncats17.weebly.com/
Odb, slap me across the face, because guess what? I found the source of the problem.

What is it, you ask? It's this:

Code:
[State 0, RemapPal]
type = RemapPal
trigger1 = var(10)
source = 1,1
dest = 1, palno

This was my initial attempt to force Omega to use his palette in his DEF. I completely forgot about it and I didn't delete it. sigh With that in mind, this thread is solved, but you're probably not going to see another help thread from me for a while because I'm frustrated at MYSELF for being a dumbass and not pay attention to my code. Next time, I'm gonna look closer to my code and see what's up.

I'm probably going to bang my forehead on a corner of a door frame until it bleeds.
Re: MegaMan Zero (MUGEN ver.) Help: Palettes
#28  November 18, 2018, 11:39:14 am
  • ****
    • crepa.neocities.org
I feel like it's my fault that you split the files, since I told you to do that in the first place. My apologies.

I just want to explain very quick how variables work, so you don't get lost in the future.
So, you have 60 variables and 40 float variables to use. YOU will set them to a number and your character will react to it depending on its value.
For this example, we are trying to set different modes to one character. First thing, pick a variable. I want to assign modes to variable 10. Second thing, how many modes i'm going to make? I want 3 modes, one normal, one "evil", and one that can use both normal and evil moves. How do I make this work?

var(10)=0 <- means my character is in normal mode
var(10)=1 <- means my character is in evil mode
var(10)=2 <- means my character is in the mode that can use both normal and evil moves

This is just an example. You can see here that I used simple numbers, 0, 1, 2, right? It will be easier for you later to remember this.
For now, this variable does nothing, they are just numbers. As Odb said, you need to tell mugen what these numbers will do.
Let's say I'll create a move that only normal mode should be able to use. How do I do that?

triggerall = var(10) = 0

Or, if you want to be able to perform the move in the normal mode AND the mode that can use both moves:

triggerall = var(10) != 1

! is a "NO" signal. You're saying that this move should only work when variable 10 is not equal to 1, the evil mode in this case, so it will only works with variable 10 equals to either 0 or 2.

Some usege for variables:
- As an on/off feature. Use numbers like 0 and 1
- To detect if weak, medium or heavy button is pressed: ifelse(command = "x", 0, ifelse(command = "y", 1, 2))
- As a timer for a special move that makes your character stronger for, for example, 10 seconds

Do you get it?
Re: MegaMan Zero (MUGEN ver.) Help: Palettes
#29  November 18, 2018, 12:03:34 pm
  • ***
  • Part-Time MUGEN creator
    • USA
    • Skype - reddragoncats17
    • reddragoncats17.weebly.com/
I do, matter of fact, look at this:

Code:
;---------------------------------------------------------------------------
;Charge Triple Rod
[State -1, ChangeState]
type = ChangeState
triggerall = !var(10)
triggerall = var(9) >= 90
triggerall = command = "charge_rod"
trigger1 = statetype = S
trigger1 = ctrl
value = 330

Code:
;---------------------------------------------------------------------------
;Omega Pillar Ground Punch
[State -1, Omega Ground Punch]
type = ChangeState
value = 1310
triggerall = var(10)
triggerall = command = "charge_rod"
triggerall = command != "holddown"
trigger1 = statetype != A
trigger1 = ctrl

I do know how a variable like this works, it's just that a mechanic like this is something I've never done before, and, of course, my little mistake that could've been easily seen.

I will admit this, I do want to know how I can make the mode that uses both normal and Omega modes use the "Ultimate.act" and "Proto.act" as Zero's last 2 palettes before he enters Omega mode, but maybe another time.

Before you ask, no, I didn't bang my head. It's 3:00 in the morning right now, and I know, I should be sleeping. I have a bad habbit of not sleeping until midnight.

I will also admit this, I shouldn't be doing something like this because it's complicate, but at the same time it's a good thing because this was something I plan to implement in my version of Ryu and Akuma once I recover them from my old computer's hard drive.

With that being said, since it is 3:00, I'm probably gonna shut down and go to sleep. If I make another help thread, it's gonna be something SIMPLE. DEAD simple.

Spoiler alert: It's jumping velocities on one of the boss characters that I'm making. Yes, I am coding a boss. Deathtanz Mantisk from MegaMan Zero 3, to be specific. A.I is gonna be a different matter.
Re: MegaMan Zero (MUGEN ver.) Help: Palettes
#30  November 20, 2018, 08:53:43 am
  • *****
  • Shame on you!
    • USA
Quote
I will admit this, I do want to know how I can make the mode that uses both normal and Omega modes use the "Ultimate.act" and "Proto.act" as Zero's last 2 palettes before he enters Omega mode, but maybe another time.
#1, because you're using mugen 1.0+, you're not using the *.act files any longer. You're using palettes 1,X - 1,Y.
#2, depending on the value, and how and when you want to switch to it, you'll just use the remap function. But this time you know it's going to be 1 particular value so you wont be doing any math. Just making sure your triggers are perfect.

jumping/getting off the ground can be a little tricky. The toughest part is ordering the velocities and the state type changes. If you switch to Air too fast it'll be close to the ground and instantly revert to Stand. It makes it seem like it doesn't work at all.
vVv Ryuko718 Updated 10/31/22 vVv