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

Several portraits not showing #6696

Closed
mesilliac opened this issue May 9, 2022 · 7 comments · Fixed by #6697
Closed

Several portraits not showing #6696

mesilliac opened this issue May 9, 2022 · 7 comments · Fixed by #6697
Labels
Bug Issues involving unexpected behavior. Graphics Issues that involve the graphics engine or assets. Unconfirmed Issues that no developer was able to reproduce.

Comments

@mesilliac
Copy link
Contributor

Game and System Information

  • Version: master
  • Downloaded from: git
  • Build info: Release
  • OS: Linux

Description of the bug

Several portraits seem to be missing. I noticed it trying to look up "delfador.png" and "kalenz.png".

All i found when searching briefly was "delfador.webp" and "kalenz.webp".

I saw other portraits not working as well.

Steps to reproduce the behavior

Play one of the campaigns, i guess. The above was from Heir to the Throne, but i saw portraits missing in other campaigns too.

Expected behavior

No response

Additional context

Portraits all seemed to be working not long ago, this seems to have been caused by a recent commit (sometime in the past couple weeks).

@mesilliac mesilliac added the Bug Issues involving unexpected behavior. label May 9, 2022
@Wedge009
Copy link
Member

Wedge009 commented May 9, 2022

It seems likely from #6611. I couldn't find any references to kalenz.png or delfador.png, though - only their new .webp counterparts. Also I did a quick check of the starting scenario for HttT and didn't find anything amiss. Recompiled master just now as at 7e87826.

@Wedge009 Wedge009 added Unconfirmed Issues that no developer was able to reproduce. Graphics Issues that involve the graphics engine or assets. labels May 9, 2022
@mesilliac
Copy link
Contributor Author

Hmm, so the scenario i was on was "Crossroads". I also didn't find any reference to delfador.png (and am on 7e87826 ). Could it be automatically putting together the ".png" extension somewhere?

Delfador does show up correctly on the starting scenario.

Oh, or perhaps it's that it was a loaded game? I've been swapping around different save games for testing other things.

@mesilliac
Copy link
Contributor Author

Right - the image filename for units seems to be encoded into the save game. Maybe it would be a good idea to automatically convert those somehow?

This is the save game with Kalenz and Delfador, who both speak at the start of the scenario.
HttT-Crossroads.gz

@CelticMinstrel
Copy link
Member

We should add a rule in the image loading code that if the file isn't found, it tries switching the extension to webp before giving up.

@Pentarctagon
Copy link
Member

Is there a central place in the code where finding and loading images is handled?

@Wedge009
Copy link
Member

Wedge009 commented May 9, 2022

Right - the image filename for units seems to be encoded into the save game.

Yes, the WML is all saved in the save file, which is why we have issues like #4505. It can also make testing scenario changes difficult unless one manually edits the save file as well.

@CelticMinstrel
Copy link
Member

Is there a central place in the code where finding and loading images is handled?

Yes – the image cache.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues involving unexpected behavior. Graphics Issues that involve the graphics engine or assets. Unconfirmed Issues that no developer was able to reproduce.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants