ermaccer / mugenhook

Add features to M.U.G.E.N engine.
39 stars 6 forks source link

randomselect doesn't keep x and y scale #32

Closed thanguya closed 2 years ago

thanguya commented 2 years ago

Hi Ermaccer, I don't know if you can replicate this issue but when I hover onto randomselect, the characters I see randomly, some animations are smaller and some are bigger. My character at row 0 collumn 0 appear right size but other characters are smaller. However, if I move over each character to normally select they appear the right size because I already set their x and y scale in Animated Portraits

; h - Scale X ; i - Scale Y ; ; 0 1 0 0 181 181 chars\A.B.A_GG_Muteki\aba.air .24 .24 0 26 0 0 181 181 chars\Akuma_CvS\cvsgouki.air 0.5 0.5 1 1 0 0 181 181 chars\Cammy_CvS\cvscammy.air 0.415 0.535

New Bitmap Image (4) .

thanguya commented 2 years ago

What I'm guessing is that when you select randomselect, it takes the AnimatedPortraits settings of the first character and stores it and keeps it and applies it to every character on randomselect. But if you select the characters normally, it takes the information from AnimatedPortraits properly.

ermaccer commented 2 years ago

Random select is not really supported, I think setting scale in system.def should affect random select, try editing p1/2.face.scale.

thanguya commented 2 years ago

Hi Ermaccer, I tried setting p1/2.face.scale but it nothing changed on the select screen. Seems like mugenhook overrides the portrait settings with animatedPortraits, so changing things like portrait scale or sprite no longer works.

Is there any way mugenhook can make sure randomselect keeps the scale settings of each character it scrolls through separately as defined in animatedPortraits.dat? That would be perfect and fix the issue.

So each time the next character is randomly displayed, it also reads that character's ; h - Scale X ; i - Scale Y.

I tried editing the AIR scale as well, but seems like mugenhook ignores that and just considers the sprite index.

For example, to scale a sprite in AIR, I can use the 8th and 9th parameters for x-scale and y-scale respectively, e.g. this will scale the sprite by 1.5 and 2 respectively:

15,4, 0,0, 5, ,A, 1.5,2

But I don't think that extra bit at the end is used.

Right now, The very first entry in animatedPortraits.dat sets the scale for every other character that gets randomised in randomselect. So if I put

0 1 0 0 181 181 chars\kfm\kfm.air .5 .5

randomselect makes it that every character is scaled with .5 .5, ignoring the fact that underneath that line I have

0 1 0 0 181 181 chars\kfm\kfm.air .5 .5 0 1 0 0 181 181 chars\abby\abby.air 1.4 1.4 0 1 0 0 181 181 chars\susan\susan.air .65 .65

I'm hoping there is coding solution to this, as it would help alot of players who use randomselect and have a roster of characters with different sprite sizes, some characters are too big etc.