Does [size] affect the following?

Started by Kolossoni, December 01, 2022, 09:59:19 PM

Previous topic - Next topic

Kolossoni

If I put x = 1.2 and y = 1.2 for a character's "size", I'm aware that it affects the hitboxes as well as the sprites.

Now the question is, does it also affect explods and helpers as well? Or does adding their own size parameters prevent simultaneous resizing?
Also, do helpers' hitboxes also change in accordance to the parent's scale?

VictorCYBR

When I was making my R. Mika, since I used SFA3 sprites and in the original game they were resized to .83 width, I did the same. She has a Zangief helper that uses CvS sprites, which don't need to be resized, they are in the correct aspect ratio, but I noticed it was being resized, Zangief was really thin. I fixed it by adding x.scale or something, can't remember now.

So yeah, I think it affects helpers and explods if you don't specify their scales.

Basara Bogard

Yes and no. In the case of FX on hitdef you can keep the same size and they look with 1X, but if you want to make them the same for helpers/explods/projectiles, than you've to use scale them to 1.2X

Quote from: Kolossoni on December 01, 2022, 09:59:19 PM
Also, do helpers' hitboxes also change in accordance to the parent's scale?
That's another thing. About clsns, they're the same as the parent character, but you'll have manually adjust the x/y for the hitdefs and the positions for helpers/explods/projectiles. In your case (and also mine, since most of my ClayFighters are resized the same size), you've to multiply every x/y value with 1.2. For example, if the projectile should be X=30 and y=-55 in the original size, you've to multiply them by 1.2 and put X=36 and y=-66 in the Projectile sctrl

PotS

For helper scale (not hitboxes) the docs clarify it:

Quotesize.xscale (float)
size.yscale (float)
[...]
These parameters have the same meaning as the corresponding parameters in the root's CNS file. You can specify one or more of these parameters to change it to a value suitable for this helper. Otherwise, they default to the values inherited from the parent.

And to add, positions of everything will be unscaled unless the character is made with rescaling in mind. Which is achieved by multiplying position parameters by the scale like this:

pos = ceil(27 * const(size.xscale)), ceil(-73 * const(size.yscale))
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.

beterhans

Quote from: Kolossoni on December 01, 2022, 09:59:19 PM
If I put x = 1.2 and y = 1.2 for a character's "size", I'm aware that it affects the hitboxes as well as the sprites.

Now the question is, does it also affect explods and helpers as well? Or does adding their own size parameters prevent simultaneous resizing?
Also, do helpers' hitboxes also change in accordance to the parent's scale?

it only affect
root player.

not explod or helper. or root player's velocity

but you can code it to affect all.

for example

run speed in normal
[State 100, 1]
type = VelSet
trigger1 = Anim = 100 && AnimElemTime(2) >= 0
x = Const(velocity.run.fwd.x)


run speed scale flexible
[State 100, 1]
type = VelSet
trigger1 = Anim = 100 && AnimElemTime(2) >= 0
x = Const(velocity.run.fwd.x) * Const(Size.xscale)



scale helper too

[State Intro_Dummy]
type = helper
triggerall = !NumHelper(7600)
trigger1 = !Time
stateno = 7600
ID = 7600
name = "Intro - Dummy"
facing = 1
postype = P1
pos = 0 * Const(Size.xScale), 0 * Const(Size.yScale)
;supermovetime = 4294967295
;pausemovetime = 4294967295
size.xScale = Const(Size.xScale)
size.yScale = Const(Size.yScale)
ignorehitpause = 1



scale explod
[State 183, Explod]; Talk Frame
type = Explod
trigger1 = Anim = 183
trigger1 = AnimElemTime(3) = 0
anim = 6911
ID = 6911
space = stage
pos = (220) * facing * Const(size.xscale), (-300) * Const(size.yscale)
bindID = ID
bindtime = 1
facing = facing
removetime = -2
;vel = 0 * facing * Const(size.xscale), (10 + Random%30) * Const(size.yscale)
;accel = 0 * facing * Const(size.xscale),Const(Movement.yaccel) * Const(size.yscale)
;supermovetime = 65535
;pausemovetime = 65535
scale = 1 * Const(size.xscale), 1 * Const(size.yscale)
angle = 0
sprpriority = -3
ownpal = 1
;trans = add
;alpha = 256,0
;remappal = 6415, 0



basicly
any pos, vel, scale value need to * const(Size.xcale) and y scale

if you code character like that, the whole product will be flexible to scale.

all my recent work (720p HD character) are all flexible to scale you can try them out
https://www.youtube.com/playlist?list=PLdEQ2Uq3HHramidYnZrUyoeR0DKwY2CbD