ikemen-engine / Ikemen-GO

An open-source fighting game engine that supports MUGEN resources.
https://ikemen-engine.github.io
Other
751 stars 127 forks source link

Custom Common FX palette issue #1719

Open ViolinKen opened 8 months ago

ViolinKen commented 8 months ago

Describe the bug

Custom hitsparks using the first palette index have issues displaying properly when character def loads its first palette. Other sparks using indexes after the first load the correct palettes regardless of character def palette.

To Reproduce

  1. Download SF6 Common FX. Download Add to your save/config.json.
    ],
    "CommonFx": [
    "data/SF6.def"
    ],
  2. Add this code to an attack with more than one palette (light punch stateno 200 if available).
[State 200, hit spark]
type = explod
trigger1 = movehit = 1
anim = drive0
space = stage
facing = facing
pos = ifelse(facing = 1, 1, -1) * 55 + pos x + camerapos x , -87 + pos y
scale = 0.38, 0.38
sprpriority = 2
ownpal = 1
ignorehitpause = 1
persistent = 0
  1. Run character in both pal1 and palx (x being any other palette than 1).
  2. Error is pal1 displays this spark properly. Palx displays the sprite in a wrong index. I think it's displaying it in index 0,1.
  3. You'll notice that if you change the explod anim from drive0 to drive1 or drive2, these sprites would display properly when using character def palx. Seems this issue is only the first custom fx sprites index and for character def palx.
  4. The workaround fix is just avoid using the first pal index on your custom fx.

Expected behavior

I would expect the customfx to load the first indexed palette for these sprites using any character def palette.

Screenshots / Video

https://github.com/ikemen-engine/Ikemen-GO/assets/62481815/1d0f3b00-5f28-4d5a-ab39-eb1641438fcf

Engine Version (or source code date)

latest nightly as of 4/1/24

Operating system

Windows

Extra context or search terms

No response

Wftk commented 5 months ago

can't reproduce.

K4thos commented 2 months ago

better test case: https://discord.com/channels/233345562261323776/233363722934943744/1288338216398618656