YesNoOk
avatar

Looking for ways to make a character not repeat palettes (Read 3457 times)

Started by iara, June 18, 2022, 07:50:09 pm
Share this topic:
Looking for ways to make a character not repeat palettes
#1  June 18, 2022, 07:50:09 pm
  • *
  • Leaning my way down MUGEN! [Discord: Iara#4611]
    • Peru
Good afternoon! I am tinkering with MUGEN, trying to make my own 'custom game' of sorts, and now I have found pet peeve I would like to fix, but lack the coding abilities to do so (I am still pretty green when it comes to MUGEN coding)

If several of the same character are used by both players and the user, palettes will repeat. Having the same character use the same palette by each user is complicated. By default, MUGEN has a "palette reserve" feature, which makes certain palettes not available for the second person (or the AI) who chooses the same character and, afterwards, MUGEN  gives the character a new palette, using the pal.defaults property on the [Info] section of each character, where you can choose up to 5 palettes. But that's my problem: You can only choose up to 5 palettes.

I am using a regular MUGEN with only one character installed: "Sandbag", who has 8 different palettes. I (as player 2) will perform a 'Watch mode' match of 4 vs 4 teams. Each time I choose Sandbag, debug will show me that certain palettes are already reserved, so my character will use other available. However, once I reach the 7th character, there are no more palettes, so it defaults to whichever button is pressed (In this case, palette 1)

The match starts normally. My characters all have different palettes, but the opposing team (player 5, 6, 7 and 8) are the issue.
Player 5 VS Player 1


Player 6 VS Player 1


Player 7 vs Player 1 (Player 8 vs Player 1 is also similar)


Something similar happens on Survival Mode if I (Player 1 side) choose 4 team members and fight against a Simul AI.

After I KO them, the next match starts with the repeated palettes. And when I knock those one the palettes go back to the 1st round ones, repeating over and over.


I do not want this to happen, but I think MUGEN has the pal.defaults and palette reserves hard-coded . I would prefer for palettes to never repeat, so... Is there any State code I could make to make a character "detect" if its fighting the exact same enemy (maybe using the name and author feature?) with the same palette? And if so, is there any way to make it forcefully change its own palette? What I would like to do is, basically, make the character code have this line of thought: "If my opponent is [X] character, made by [Y] author, and my opponent is using [Z] palette, and I am also using [Z], I will change my palette to other".

EDIT: Adding more palettes does fix the issue in survival mode, but not 'Watch mode'. This brings a new issue, though: I want to have a, b, c, x, y and z mapped to palette number 1. Apparently MUGEN will not use any more palette if they aren't assigned. So my problem still stands, sadly. Unless I can remap the offending character with a Statedef.
Last Edit: June 19, 2022, 02:57:09 am by iara
Re: Looking for ways to make a character not repeat palettes
#2  June 18, 2022, 08:01:53 pm
  • ****
  • YERRRRRRRRRR
  • HIGHBRIDGE!
    • USA
    • Skype - DJHANNIBALROYCEUSA
    • sites.google.com/site/djhrmugen/
you have to make up to 12 palettes. copy and paste the first *.act file and make sure u got 12 ACT files...then just color them yourself in fighters facotry....i would choose classic for this part cause its easier imo
Follow me on twitter! @djhannibalroyce
Re: Looking for ways to make a character not repeat palettes
#3  June 18, 2022, 08:37:43 pm
  • *
  • Leaning my way down MUGEN! [Discord: Iara#4611]
    • Peru
Quote
you have to make up to 12 palettes. copy and paste the first *.act file and make sure u got 12 ACT files...then just color them yourself in fighters facotry....i would choose classic for this part cause its easier imo

Sadly, even with 12 palettes, it does not work. Already tried the same with other characters who have 12 palettes. So I either need a way to edit the pal.defaults or a Statedef code.

EDIT: Adding more palettes does fix survival mode, but not Watch. This brings a new issue: I want to have a, b, c, x, y and z to only give the player the "regular" palette number 1. Apparently MUGEN will not use any more palette if they aren't assigned. So my problem still stands, sadly.
Last Edit: June 19, 2022, 02:55:59 am by iara
Re: Looking for ways to make a character not repeat palettes
#4  June 19, 2022, 12:29:14 pm
  • *****
  • Shame on you!
    • USA
I'm not 100% positive of the method. But there is a way for P1 aka P2 aka P8 to determine which player they are.
You could set up the type = RemapPal to add 5 to the palette if they're P7 or P8.
I think it uses like
 ishometeam
numpartner
TeamSide = 2
And I think you use ID somehow.

 Since it's all the same character you might be able to set up a variable and check it. But I'm not sure if that can happen in statedef 5900.
Do some digging on partner and teamside.
vVv Ryuko718 Updated 10/31/22 vVv
Re: Looking for ways to make a character not repeat palettes
#5  June 19, 2022, 05:51:44 pm
  • **
    • USA
Mugen 1.1 beta tester here. This is actually a known bug that was reported to (and acknowledged by) Elecbyte back in the day. Alas, it wasn't fixed before they vanished into the ether again.

There is a workaround, though. I'm guessing you're using the same button to select all 8 characters. The fix is to use two different buttons to select characters 7 and 8. So for example, if you use button "a" to select characters 1-6, then use button "b" to pick character 7 and button "c" to select character 8. Note that if you use the same different button ("b" for example) to pick 7 and 8, then 8 will once again default to palette 1.

Hope this helps.
Re: Looking for ways to make a character not repeat palettes
#6  June 20, 2022, 01:58:29 am
  • *
  • Leaning my way down MUGEN! [Discord: Iara#4611]
    • Peru
I'm not 100% positive of the method. But there is a way for P1 aka P2 aka P8 to determine which player they are.
You could set up the type = RemapPal to add 5 to the palette if they're P7 or P8.
I think it uses like
 ishometeam
numpartner
TeamSide = 2
And I think you use ID somehow.

 Since it's all the same character you might be able to set up a variable and check it. But I'm not sure if that can happen in statedef 5900.
Do some digging on partner and teamside.

With some help of a friend, I found a much simpler code that can change the palette of the offending character. The problem is that once the player is no longer around, the offending character will go back to palette one and I have no idea how to make the code "last" between rounds since this is all in the Initialize bracket. Do you think there is anything else that could be added onto this? Or is this as good as it gets?

Code:
[state 5900, remap]
type = remappal
trigger1 = enemy,Name = "XXX"
trigger1 = enemy,authorname = "YYY"
trigger1 = enemy,palno = palno ;;
trigger1 = TeamSide = 2 ;; I'm not player 1
source = 1, 1
dest = 1, ((random%6)+6) ;; Pics random palette from S bracket.
ignorehitpause = 1

Mugen 1.1 beta tester here. This is actually a known bug that was reported to (and acknowledged by) Elecbyte back in the day. Alas, it wasn't fixed before they vanished into the ether again.

There is a workaround, though. I'm guessing you're using the same button to select all 8 characters. The fix is to use two different buttons to select characters 7 and 8. So for example, if you use button "a" to select characters 1-6, then use button "b" to pick character 7 and button "c" to select character 8. Note that if you use the same different button ("b" for example) to pick 7 and 8, then 8 will once again default to palette 1.

Hope this helps.

Oh that's a blow. I would like to go to Mugen 1.0 but zoom and stuff like add004 are far too appealing to simply ignore.  The above code works alright but still has some few kinks to fix. Hopefully there is a way to make it 'linger' or something. Thanks for the advice!
Re: Looking for ways to make a character not repeat palettes
#7  June 22, 2022, 02:58:12 am
  • *
  • Leaning my way down MUGEN! [Discord: Iara#4611]
    • Peru
I went for this code, at the end of the day:

Code:
[state 5900, remap]
type = remappal
triggerall = enemy,Name = "Sandbag (Iara Edit)"
trigger1 = Teamside = 2 && numpartner = 0
trigger1 = enemy,palno = palno
source = 1, 1
dest = 1,8
ignorehitpause = 1

[state 5900, remap survival]
type = remappal
triggerall = enemy,Name = "Sandbag (Iara Edit)" && IsHomeTeam = 0
trigger1 = numpartner
trigger1 = ID > partner,ID || ID < partner,ID
trigger1 = enemy,palno = palno || partner,palno = palno
source = 1, 1
dest = 1,8
ignorehitpause = 1

There is probably a better way to attain what I want, but this will have to do. Palette 8 will be a 'secret' palette that I won't mind having repeated.
Re: Looking for ways to make a character not repeat palettes
#8  June 29, 2022, 10:17:02 am
  • ******
    • Portugal
    • network.mugenguild.com/pots/
I've had to fix something like this in my Bison char but I'm not exactly sure how I did it anymore. I think you need to add the [Palette Keymap] part to the def file.
You can help with Ikemen GO's development by trying out the latest development build and reporting any bugs on GitHub.
My Mugen and Ikemen content can also be found here.