"Image Not Found" shown on character hex?

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
tribes55
Posts: 132
Joined: June 10th, 2012, 4:29 am

"Image Not Found" shown on character hex?

Post by tribes55 »

I'm working on my campaign, and one of my units has a problem in scenario 5 they didn't have in previous scenarios, and I don't know what is causing it. The character (id=locket) is shown, but the hex they move to says "image not found" on it. This wasn't a problem in previous scenarios.

I have no idea what is causing it, and I appreciate anybody willing to take the time to help me!

I'll attach both the scenario, and the entire campaign separately.

(campaign too large to attach, I've linked my Google Drive: https://drive.google.com/file/d/1mNmbVJ ... sp=sharing )
Attachments
05_Return.cfg
(15.34 KiB) Downloaded 161 times
User avatar
Pentarctagon
Project Manager
Posts: 5565
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: "Image Not Found" shown on character hex?

Post by Pentarctagon »

If you look in the log, it will say which image it thinks it isn't finding.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
Pilauli
Posts: 115
Joined: August 18th, 2020, 12:56 pm

Re: "Image Not Found" shown on character hex?

Post by Pilauli »

Your Google Drive does not let me see your campaign; it says I need to request access. (I requested access with my email address pctillotson1@gmail.com.) If you want to make sure everyone can easily view it, then when you go to get the share link, make sure it says "Anyone with the link: Anyone on the internet with this link can view" instead of "Restricted: Only people added can open with this link".

---

Obviously, you'll want to look in the log, as Pentarctagon says. (I'm not actually sure how to access logs, so I looked around a bit, and these are probably the correct instructions: https://forums.wesnoth.org/viewtopic.php?f=4&t=46166 )

---

I've also written some basic troubleshooting questions for you:

Is it the tile's fault?
- Does the tile say "image not found" all the time?
- Do other tiles of the same kind of terrain also say "image not found"?
- Is there any sort of special image on that tile, or does it change into another type of terrain when Locket moves there, or anything like that?

Is it Locket's fault?
- Does Locket disappear (or turn into an "image not found" marker) when he moves to that tile?
- Is he a custom unit type with a special standing animation for tiles like that? (For example, wolves lift their heads when in water. Drakes sit on solid land, but fly when over a chasm. And so on.)
- Does moving to that tile trigger an event that modifies him in some way?

EDIT: Just re-read your post, and if Locket is still visible, then it's probably a problem with the tile instead. Probably. Maybe. So this part probably isn't useful.

I can't actually find anywhere in your scenario where it says Locket moves anywhere. All I can find is when he is recalled, a couple of things he says, and the event that makes the player lose when Locket dies.

Looking in the log to find which image it can't find is probably more efficient than testing everything I thought of, but the answers to most of these questions are generally obvious to whoever wrote the campaign, so when I try to make a campaign, these are the sort of questions I ask myself.
tribes55
Posts: 132
Joined: June 10th, 2012, 4:29 am

Re: "Image Not Found" shown on character hex?

Post by tribes55 »

Thank you for your responses.

The next time it happens, I'll check the logs. Oddly enough, it doesn't happen everytime, only about half of the time. It's very strange.
I modified the google drive so that it's downloadable.
tribes55
Posts: 132
Joined: June 10th, 2012, 4:29 am

Re: "Image Not Found" shown on character hex?

Post by tribes55 »

20201005 19:53:26 error display: could not open image 'misc/ellipse-hero-leader-top.png'
20201005 19:53:26 error display: could not open image 'misc/ellipse-hero-leader-bottom.png'

These are the errors, but I don't understand what is causing it. Half of the time I load it up (after restarting) it's fine. The other half of the time, this error is thrown.
gnombat
Posts: 707
Joined: June 10th, 2010, 8:49 pm

Re: "Image Not Found" shown on character hex?

Post by gnombat »

It looks like the issue described here: UnitTypeWML
The IS_HERO/MAKE_HERO/UNMAKE_HERO macros change the ellipse to/back from "misc/ellipse-hero" ... WARNING: Be aware that setting this to "misc/ellipse-hero" for a unit with canrecruit=yes will result in the ellipse being "misc/ellipse-hero-leader", which is not a supported combination (it doesn't have a graphic, and will cause error logs that the graphic is missing).
Pilauli
Posts: 115
Joined: August 18th, 2020, 12:56 pm

Re: "Image Not Found" shown on character hex?

Post by Pilauli »

Just played through to scenario 5, and tried restarting that scenario a couple times. Couldn't get the "image not found" thing to display. Locket is showing a hero ellipse, not a leader ellipse. I'm on the latest development version from Steam, so maybe something has been fixed? Or maybe I'm just having "bad" luck with making it happen.

(Okay, to be perfectly exact, I played through to scenario 5, then spent a while fumbling around in the figurative darkness and trying to figure out whether I could guess what might be wrong with yours.)

And you say it only does it some of the time? Weird...

Here, test something for me? Load up scenario 2 (or scenario 5) and test whether Locket can recruit. Ideally, test that with and without a glitched ellipse. According to the wiki, [unstore_unit] actually places the stored unit back in the map, so I wonder whether that is over-writing your new "Locket" unit with stuff like canrecruit=yes.

If Locket's glitched ellipse goes along with the ability to recruit, I'm still confused as to why it happens (especially, why does it only happen some of the time), but I would suggest commenting out the [unstore_unit] statement at the end of scenario 1. And then, of course, testing the whole thing again to see if that fixed it. Sorry...

You've also got a couple of misspelled words in the story at the beginning of scenario 2: should be "roving" instead of "roaving" and "wary" instead of "weary". ("Weary" is also a word, but it means "tired", and Locket probably means "wary", as in "cautious" or "watchful".)
tribes55
Posts: 132
Joined: June 10th, 2012, 4:29 am

Re: "Image Not Found" shown on character hex?

Post by tribes55 »

gnombat wrote: October 6th, 2020, 1:50 am It looks like the issue described here: UnitTypeWML
Yep, this seems to be it. This should fix it. I've simply removed the IS_HERO macro from Locket. I have a suspicion that I had it for a reason, but I imagine that I'll eventually find if that is the case.
Pilauli wrote: October 6th, 2020, 4:42 am Just played through to scenario 5, and tried restarting that scenario a couple times. Couldn't get the "image not found" thing to display. Locket is showing a hero ellipse, not a leader ellipse. I'm on the latest development version from Steam, so maybe something has been fixed? Or maybe I'm just having "bad" luck with making it happen.

(Okay, to be perfectly exact, I played through to scenario 5, then spent a while fumbling around in the figurative darkness and trying to figure out whether I could guess what might be wrong with yours.)

And you say it only does it some of the time? Weird...

Here, test something for me? Load up scenario 2 (or scenario 5) and test whether Locket can recruit. Ideally, test that with and without a glitched ellipse. According to the wiki, [unstore_unit] actually places the stored unit back in the map, so I wonder whether that is over-writing your new "Locket" unit with stuff like canrecruit=yes.

If Locket's glitched ellipse goes along with the ability to recruit, I'm still confused as to why it happens (especially, why does it only happen some of the time), but I would suggest commenting out the [unstore_unit] statement at the end of scenario 1. And then, of course, testing the whole thing again to see if that fixed it. Sorry...

You've also got a couple of misspelled words in the story at the beginning of scenario 2: should be "roving" instead of "roaving" and "wary" instead of "weary". ("Weary" is also a word, but it means "tired", and Locket probably means "wary", as in "cautious" or "watchful".)
I appreciate your time. It's strange you weren't able to get the instance to occur. It seems to have been caused between the conflict of the canrecruit=yes and {IS_HERO} Macro, as suggested above. Thank you for catching the spelling mistakes, I'll make sure to fix them.
User avatar
Ravana
Forum Moderator
Posts: 3009
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: "Image Not Found" shown on character hex?

Post by Ravana »

Error image is only displayed during debug. Otherwise it just shows nothing.
Post Reply