Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Sprite] Documenting Fix for variant desync between static and exp loading issue #5335

Open
Unicornpowerstar opened this issue Feb 15, 2025 · 2 comments · May be fixed by #5346
Open

[Sprite] Documenting Fix for variant desync between static and exp loading issue #5335

Unicornpowerstar opened this issue Feb 15, 2025 · 2 comments · May be fixed by #5346
Assignees
Labels
Sprite/Animation For issues/PRs related to graphics

Comments

@Unicornpowerstar
Copy link
Contributor

Unicornpowerstar commented Feb 15, 2025

  • So @Unicornpowerstar Figured out what was the cause of the Noivern back sprite Issues.
    Which after checking the report of back exp for Mareanie revealed that all variants in Gen 6 to gen 9 if static and exp dont have the same setup WILL BREAK and its only a matter of time before they do so.

  • Thanks to @SirzBenjie finding the contradictions in the Variant/_Masterlist.json wont be done Manually as they wrote a python script for it. #5316

explanation

The reason why this happens is due to how the game loads exps and variant exps ontop of that.

  • before even loading a exp the game fully loads the static png for the Pokemon then after that loads the exp files.

  • If the mon has a Variant when it loads the Static, it also loads all variant info for that static. This is were the desync happens if the front static and front exp dont have the same setup. It desync them and the game code becomes unable to ever load them again without fixing the source of the desync.

  • Noivern back Variant not working.

The files in _masterlist

Static back
Image
Exp back
Image

what it looks like

Image

The reason why Noibat will be used is due to last loaded sprite was Noibat for the cache but it can only load the static, as the exp failed to load and the faster solution was keeping the static for Noibat.

chaning the files _masterlist

Static back
Image
Exp back
Image

The result

Image

In order to solve this a base fix need to be done to bring both to be able to go by png and the variant json.

It also doesn't matter if the desync is due to the static or the exp. as long they remain without having the same setup. They can and will break at any moment. all it would take is 1 or 2 failed attempts to load and it will stop working from then on.

  • Example of other mons not having the same order
Mareanie

Static back in _masterlist
Image
Exp back in _masterlist
Image

Image

With Mareanie the source of the desync is the variant being pngs for the exp back while the static has them as json variants. So exp back is the source unlike for Noivern were the back static was the main source.
@Unicornpowerstar Unicornpowerstar added the Sprite/Animation For issues/PRs related to graphics label Feb 15, 2025
@Unicornpowerstar Unicornpowerstar self-assigned this Feb 15, 2025
@Unicornpowerstar Unicornpowerstar changed the title [Sprite] Documenting Fix for variant desync between static and exp [Sprite] Documenting Fix for variant desync between static and exp loading issue Feb 15, 2025
@SirzBenjie SirzBenjie pinned this issue Feb 15, 2025
@Unicornpowerstar Unicornpowerstar linked a pull request Feb 16, 2025 that will close this issue
6 tasks
@Fontbane
Copy link
Contributor

Fontbane commented Feb 18, 2025

For reference, the list:

key,front,back,expback,female
  • 672,"[0, 1, 2]","[0, 1, 1]","[0, 1, 1]","[0, 1, 1]",

  • 715,"[0, 2, 2]","[0, 2, 2]","[0, 2, 1]","[0, 1, 1]",

  • 791,"[2, 1, 1]","[2, 1, 1]","[2, 1, 1]","[1, 1, 1]",

  • 881,"[0, 1, 1]","[0, 2, 2]","[0, 1, 1]","[0, 1, 1]", [Sprite] Fix Impidimp front, Arctozolt back variants #5342

  • 982,"[0, 1, 1]","[0, 1, 2]","[0, 1, 1]","[0, 1, 1]",

  • 982-three-segment,"[0, 1, 1]","[0, 1, 2]","[0, 1, 1]","[0, 1, 1]",

  • 212-mega,"[1, 1, 1]","[1, 2, 1]","[1, 1, 2]","[1, 2, 2]",

  • 248-mega,"[0, 2, 1]","[0, 1, 1]","[0, 1, 1]","[0, 2, 1]",

  • 373-mega,"[0, 2, 2]","[0, 1, 1]","[0, 1, 1]","[0, 1, 1]",

  • 756,"[0, 1, 2]","[0, 1, 1]","[0, 1, 1]","[0, 1, 1]",

  • 859,"[0, 2, 2]","[0, 1, 1]","[0, 1, 1]","[0, 1, 1]", [Sprite] Fix Impidimp front, Arctozolt back variants #5342

  • 887,"[2, 1, 1]","[1, 1, 1]","[1, 1, 1]","[1, 1, 1]",

  • 897,"[2, 1, 1]","[1, 1, 1]","[1, 1, 1]","[1, 1, 1]",

  • 901,"[0, 1, 2]","[0, 1, 1]","[0, 1, 1]","[0, 1, 1]",

  • 909,"[0, 2, 2]","[0, 1, 1]","[0, 1, 1]","[0, 1, 1]",

  • 913,"[0, 2, 2]","[0, 1, 1]","[0, 1, 2]","[0, 1, 1]",

  • 920,"[2, 2, 2]","[1, 1, 1]","[1, 1, 1]","[1, 1, 1]",

  • 935,"[2, 2, 2]","[2, 2, 2]","[1, 1, 2]","[2, 2, 2]",

  • 957,"[1, 2, 2]","[1, 1, 1]","[2, 2, 2]","[1, 1, 1]",

  • 958,"[2, 2, 1]","[1, 1, 1]","[2, 2, 2]","[1, 1, 1]",

  • 968,"[0, 2, 2]","[0, 1, 1]","[0, 1, 1]","[0, 2, 2]",

  • 973,"[2, 2, 2]","[1, 1, 1]","[1, 1, 1]","[1, 1, 1]",

  • 975,"[0, 2, 2]","[0, 1, 1]","[0, 1, 1]","[0, 1, 1]",

  • 2053,"[0, 1, 1]","[0, 1, 1]","[0, 1, 0]","[0, 1, 1]",

  • 4080,"[2, 1, 1]","[2, 1, 1]","[2, 1, 1]","[2, 2, 2]",

  • 2,"[0, 2, 1]","[0, 1, 1]",,,

  • 6-mega-x,"[0, 1, 2]","[0, 1, 2]","[0, 2, 2]","[0, 2, 2]",

  • 6-mega-y,"[0, 1, 2]","[0, 1, 2]","[0, 2, 2]","[0, 1, 2]",

  • 35,"[0, 1, 2]","[0, 1, 1]",,,

  • 36,"[0, 1, 1]","[0, 2, 1]",,,

  • 56,"[1, 2, 2]","[1, 1, 1]",,,

  • 57,"[2, 2, 2]","[1, 1, 1]",,,

  • 69,"[0, 2, 2]","[0, 1, 1]",,,

  • 94-gigantamax,"[1, 2, 2]","[1, 1, 1]",,,

  • 94-mega,"[2, 2, 2]","[1, 1, 1]","[2, 2, 2]","[1, 1, 1]",

  • 113,"[2, 2, 2]","[1, 1, 1]",,,

  • 118,"[1, 1, 1]","[1, 1, 1]",,,"[0, 1, 1]"

  • 119,"[1, 1, 1]","[1, 1, 1]",,,"[0, 1, 1]"

  • 139,"[0, 1, 2]","[0, 1, 1]",,,

  • 141,"[0, 2, 2]","[0, 1, 1]",,,

  • 144,"[1, 2, 2]","[1, 1, 1]",,,

  • 161,"[0, 1, 2]","[0, 1, 1]",,,

  • 164,"[0, 2, 2]","[0, 1, 1]",,,

  • 173,"[0, 1, 2]","[0, 1, 1]",,,

  • 180,"[0, 2, 2]","[0, 1, 2]",,,

  • 183,"[0, 1, 2]","[0, 1, 1]",,,

  • 184,"[0, 2, 2]","[0, 1, 1]",,,

  • 200,"[1, 1, 1]","[1, 2, 2]",,,

  • 226,"[0, 2, 2]","[0, 1, 1]",,,

  • 242,"[2, 2, 2]","[1, 1, 1]",,,

  • 249,"[0, 2, 2]","[0, 1, 1]",,,

  • 250,"[0, 2, 2]","[0, 1, 1]",,,

  • 257,"[0, 1, 2]","[0, 1, 1]",,,"[0, 1, 1]"

  • 282-mega,"[0, 2, 2]","[0, 1, 1]","[0, 2, 2]","[0, 1, 1]",

  • 292,"[2, 1, 2]","[2, 2, 2]",,,

  • 298,"[0, 2, 2]","[0, 1, 1]",,,

  • 303,"[0, 1, 1]","[1, 1, 1]",,,

  • 303-mega,"[1, 1, 1]","[1, 1, 1]","[0, 1, 1]","[0, 1, 1]",

  • 308,"[0, 2, 1]","[0, 1, 1]",,,"[0, 1, 1]"

  • 329,"[0, 1, 2]","[0, 1, 1]",,,

  • 334,"[0, 2, 2]","[0, 1, 1]",,,

  • 334-mega,"[0, 2, 1]","[0, 1, 1]","[0, 2, 1]","[0, 1, 1]",

  • 339,"[0, 1, 1]","[0, 2, 1]",,,

  • 341,"[0, 2, 2]","[0, 1, 1]",,,

  • 351,"[0, 2, 2]","[0, 1, 1]",,,

  • 351-rainy,"[1, 2, 2]","[1, 1, 1]",,,

  • 351-sunny,"[1, 2, 2]","[1, 1, 2]",,,

  • 358,"[2, 1, 1]","[1, 1, 1]",,,

  • 362,"[0, 2, 2]","[0, 1, 1]",,,

  • 369,"[0, 1, 1]","[0, 2, 2]",,,"[0, 1, 1]"

  • 370,"[0, 1, 1]","[0, 2, 2]",,,

  • 384-mega,"[0, 2, 1]","[0, 1, 1]","[0, 2, 1]","[0, 1, 1]",

  • 387,"[0, 1, 1]","[0, 2, 1]",,,

  • 399,"[0, 1, 1]","[0, 2, 1]",,,"[0, 1, 1]"

  • 402,"[0, 1, 1]","[0, 1, 1]",,,"[0, 2, 2]"

  • 413-plant,"[2, 2, 2]","[1, 1, 1]",,,

  • 419,"[0, 1, 1]","[0, 1, 1]",,,"[0, 2, 1]"

  • 440,"[1, 1, 2]","[1, 1, 1]",,,

  • 441,"[0, 1, 1]","[0, 1, 2]",,,

  • 457,"[0, 1, 1]","[0, 2, 1]",,,"[0, 1, 1]"

  • 458,"[0, 1, 1]","[0, 2, 2]",,,

  • 466,"[1, 1, 2]","[2, 1, 1]",,,

  • 470,"[1, 1, 1]","[2, 2, 1]",,,

  • 471,"[1, 2, 2]","[1, 1, 1]",,,

  • 492-land,"[0, 2, 1]","[0, 1, 1]",,,

  • 526,"[0, 2, 2]","[0, 1, 1]",,,

  • 530,"[0, 2, 2]","[0, 1, 2]",,,

  • 543,"[0, 1, 2]","[0, 1, 1]",,,

  • 544,"[0, 1, 2]","[0, 1, 1]",,,

  • 549,"[0, 1, 2]","[0, 1, 1]",,,

  • 568,"[0, 2, 2]","[0, 1, 1]",,,

  • 585-summer,"[2, 0, 0]","[1, 0, 0]",,,

  • 592,"[0, 1, 2]","[0, 1, 2]",,,"[1, 1, 1]"

  • 593,"[0, 1, 1]","[0, 1, 1]",,,"[1, 1, 1]"

  • 612,"[0, 1, 2]","[0, 1, 1]",,,

  • 665,"[0, 1, 1]","[0, 1, 1]","[0, 1, 1]","[0, 2, 1]",

  • 666-archipelago,"[0, 1, 1]","[0, 1, 1]","[0, 1, 1]","[0, 2, 2]",

  • 666-continental,"[0, 1, 2]","[0, 1, 1]","[0, 1, 1]","[0, 2, 2]",

  • 666-elegant,"[0, 1, 1]","[0, 1, 1]","[0, 1, 1]","[0, 2, 2]",

  • 666-garden,"[0, 1, 1]","[0, 1, 1]","[0, 1, 1]","[0, 2, 2]",

  • 666-high-plains,"[0, 1, 1]","[0, 1, 1]","[0, 1, 1]","[0, 2, 2]",

  • 666-icy-snow,"[0, 1, 1]","[0, 1, 1]","[0, 1, 1]","[0, 2, 2]",

  • 666-jungle,"[0, 1, 1]","[0, 1, 1]","[0, 1, 1]","[0, 2, 2]",

  • 666-marine,"[0, 1, 1]","[0, 1, 1]","[0, 1, 1]","[0, 2, 2]",

  • 666-meadow,"[0, 1, 1]","[0, 1, 1]","[0, 2, 2]","[0, 2, 2]",

  • 666-modern,"[0, 1, 1]","[0, 1, 1]","[0, 1, 1]","[0, 2, 2]",

  • 666-monsoon,"[0, 1, 1]","[0, 1, 1]","[0, 1, 1]","[0, 2, 2]",

  • 666-ocean,"[0, 1, 1]","[0, 1, 1]","[0, 1, 1]","[0, 2, 2]",

  • 666-poke-ball,"[0, 1, 2]","[0, 1, 1]","[0, 1, 2]","[0, 2, 2]",

  • 666-polar,"[0, 1, 1]","[0, 1, 1]","[0, 1, 1]","[0, 2, 2]",

  • 666-river,"[0, 2, 1]","[0, 2, 1]","[0, 2, 1]","[0, 2, 2]",

  • 666-sandstorm,"[0, 1, 1]","[0, 1, 1]","[0, 1, 1]","[0, 2, 2]",

  • 666-savanna,"[0, 1, 1]","[0, 1, 1]","[0, 1, 1]","[0, 2, 2]",

  • 666-sun,"[0, 1, 1]","[0, 1, 1]","[0, 1, 1]","[0, 2, 2]",

  • 666-tundra,"[0, 1, 1]","[0, 1, 1]","[0, 1, 1]","[0, 2, 2]",

  • 669-blue,"[0, 2, 2]","[0, 1, 1]","[0, 1, 1]","[0, 2, 2]",

  • 669-orange,"[0, 2, 1]","[0, 1, 1]","[0, 2, 2]","[0, 2, 2]",

  • 669-red,"[0, 2, 1]","[0, 1, 1]","[0, 2, 2]","[0, 2, 2]",

  • 669-white,"[0, 1, 1]","[0, 1, 1]","[0, 1, 1]","[0, 2, 2]",

  • 669-yellow,"[0, 2, 1]","[0, 1, 1]","[0, 1, 1]","[0, 2, 2]",

  • 670-blue,"[0, 2, 2]","[0, 1, 1]","[0, 1, 1]","[0, 2, 2]",

  • 670-orange,"[0, 2, 2]","[0, 1, 1]","[0, 1, 1]","[0, 1, 1]",

  • 670-red,"[0, 2, 2]","[0, 1, 1]","[0, 1, 1]","[0, 1, 1]",

  • 670-white,"[0, 2, 2]","[0, 1, 1]","[0, 1, 1]","[0, 1, 1]",

  • 670-yellow,"[0, 2, 2]","[0, 1, 1]","[0, 1, 1]","[0, 1, 1]",

  • 671-blue,"[0, 1, 2]","[0, 1, 1]","[0, 1, 2]","[0, 1, 1]",

  • 671-orange,"[0, 1, 1]","[0, 1, 1]","[0, 1, 2]","[0, 1, 1]",

  • 671-red,"[0, 1, 2]","[0, 1, 1]","[0, 1, 2]","[0, 1, 1]",

  • 671-white,"[0, 1, 2]","[0, 1, 1]","[0, 1, 2]","[0, 1, 1]",

  • 671-yellow,"[0, 1, 2]","[0, 1, 1]","[0, 1, 1]","[0, 1, 1]",

  • 699,"[0, 1, 1]","[0, 1, 1]","[0, 1, 1]","[0, 2, 2]",

  • 717,"[0, 1, 1]","[0, 1, 1]","[0, 2, 2]","[0, 1, 1]",

  • 729,"[0, 1, 1]","[0, 1, 1]","[0, 2, 2]","[0, 2, 2]",

  • 730,"[0, 1, 1]","[0, 1, 1]","[0, 2, 1]","[0, 2, 1]",

  • 747,"[0, 1, 1]","[0, 1, 1]","[0, 2, 2]","[0, 2, 2]",

  • 754,"[0, 1, 1]","[0, 2, 2]","[0, 2, 2]","[0, 2, 2]",

  • 771,"[0, 1, 1]","[0, 1, 1]","[0, 2, 2]","[0, 1, 1]",

  • 776,"[0, 1, 1]","[0, 1, 1]","[0, 1, 1]","[0, 2, 2]",

  • 793,"[0, 1, 1]","[0, 1, 1]","[0, 2, 2]","[0, 1, 1]",

  • 818,"[0, 1, 1]","[0, 1, 1]","[1, 1, 1]","[0, 1, 1]",

  • 821,"[0, 1, 1]","[0, 1, 1]","[0, 2, 2]","[0, 1, 1]",

  • 836,"[0, 2, 2]","[0, 1, 1]","[0, 2, 2]","[0, 1, 1]",

  • 882,"[0, 1, 1]","[0, 1, 1]","[0, 2, 1]","[0, 1, 1]",

  • 890,"[0, 1, 1]","[0, 1, 1]","[0, 2, 1]","[0, 1, 1]",

  • 911,"[0, 1, 1]","[0, 1, 1]","[0, 2, 2]","[0, 1, 1]",

  • 912,"[0, 1, 1]","[0, 1, 1]","[0, 1, 2]","[0, 1, 1]",

  • 914,"[0, 2, 1]","[0, 1, 1]","[0, 2, 1]","[0, 2, 2]",

  • 925-four,"[1, 1, 1]","[1, 1, 1]","[1, 2, 2]","[1, 2, 2]",

  • 925-three,"[1, 1, 1]","[1, 1, 1]","[1, 2, 2]","[1, 2, 2]",

  • 932,"[0, 1, 2]","[0, 1, 1]","[0, 2, 2]","[0, 1, 1]",

  • 933,"[0, 1, 1]","[0, 1, 1]","[0, 2, 2]","[0, 1, 1]",

  • 936,"[2, 2, 2]","[1, 1, 1]","[2, 2, 2]","[2, 2, 2]",

  • 937,"[2, 2, 2]","[1, 1, 1]","[2, 2, 2]","[2, 2, 2]",

  • 952,"[0, 1, 1]","[0, 1, 1]","[0, 1, 1]","[0, 2, 1]",

  • 959,"[2, 2, 2]","[1, 1, 1]","[2, 2, 2]","[1, 1, 1]",

  • 978-stretchy,"[0, 2, 2]","[0, 1, 1]","[0, 2, 2]","[0, 1, 1]",

  • 979,"[2, 2, 2]","[1, 1, 1]","[2, 2, 2]","[1, 1, 1]",

  • 988,"[0, 1, 2]","[0, 1, 1]","[0, 1, 2]","[0, 1, 1]",

  • 994,"[0, 1, 1]","[0, 1, 1]","[0, 1, 2]","[0, 1, 1]",

  • 997,"[0, 1, 1]","[0, 1, 1]","[0, 2, 2]","[0, 1, 1]",

  • 998,"[0, 1, 1]","[0, 1, 1]","[0, 2, 2]","[0, 1, 1]",

  • 999,"[1, 1, 1]","[1, 1, 1]","[2, 1, 1]","[1, 1, 1]",

  • 1006,"[0, 2, 1]","[0, 2, 1]","[0, 2, 1]","[0, 2, 2]",

  • 1022,"[0, 1, 1]","[0, 2, 2]",,,

Also, it seems the most problematic mismatches are when exp backsprite uses shader json (1) and static backsprite uses its own sprite (2). Those are the cases that result in substitute sprite when exp sprites are enabled. These cases are at the top of the list. They can sometimes be fixed by just copying the shader json from the exp folder to the regular one.

@Unicornpowerstar
Copy link
Contributor Author

Image

Once again No it doesnt matter the order as long it doesnt match up theres a chance for it desync and stop working at all.
Ceruledge Sprite is still working just not displaying the shiny colors at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Sprite/Animation For issues/PRs related to graphics
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants