bugBattle for Wesnoth - Bugs: bug #18683, Leader sprite is missing in the...

Show feedback again

bug #18683: Leader sprite is missing in the load game dialog

Submitted by:  Espreon <espreon>
Submitted on:  Sun 18 Sep 2011 12:30:29 AM UTC  
Category: BugSeverity: 2 - Minor
Priority: 4Item Group:  None of the others
Status: In ProgressPrivacy: Public
Assigned to: Ignacio R. Morelle <shadowmaster>Open/Closed: Open
Release: 1.9.9+svn (51223)Operating System: Sabayon Linux

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


(Jump to the original submission Jump to the original submission)

Sat 14 Apr 2012 11:43:43 PM UTC, SVN revision 53932:

Make leader_image paths in the saved games index binary path-independent (part of bug #18683)

This makes it possible to store in the save_index image paths that can
be used in the Load Game dialog even when displaying units whose
graphics are in binary paths not currently loaded. This alleviates the
effect of bug #19410 on the whole mechanism, but not completely.

When the save_index is missing, this won't work properly; we'll need to
add the leader_image attribute to the saved game config itself later.

(Browse SVN revision 53932)

Ignacio R. Morelle <shadowmaster>
Project AdministratorIn charge of this item.
Sun 05 Feb 2012 01:11:02 AM UTC, comment #12:

Waiting on bug #19410 now.

Ignacio R. Morelle <shadowmaster>
Project AdministratorIn charge of this item.
Sat 04 Feb 2012 08:53:37 PM UTC, comment #11:

image::exists() apparently doesn't try very hard to locate images for non-default binary paths. As a result, the leader image is still missing for saved games of currently-loaded campaigns and eras.

I'll try to figure out a different way to detect whether an image can be loaded later (the only reason I didn't use the original image::get_image() test is that it causes noise in stderr).

Ignacio R. Morelle <shadowmaster>
Project AdministratorIn charge of this item.
Sat 04 Feb 2012 08:45:05 PM UTC, SVN revision 52921:

Restore leader unit image in Load Game dialog (bug #18683)

(Candidate for 1.10 branch.)

This functionality is back with a slight change to r47758 in order to
left-align the map snapshot only when the leader image cannot be loaded.
We also no longer spam stderr with errors about missing leader images
(which can be caused by unloaded campaigns or eras).

Anonymissimus pointed out this functionality was still found in the GUI2
version of the dialog (--new-widgets). Whoever last changed the saved
games summary code probably only bothered to update this experimental
code without fixing the normal GUI1 dialog. As I pointed out in the
tracker, the layout code was still in place.

As a compromise for the time being, we always assume the "magenta"
palette for TC recoloring now. This doesn't seem to be a problem since
the old code already made an annoying assumption of side 1 using the 1
(red) color range instead of permiting the use of the side.color value,
or reflecting the currently playing side number at the time of the save

I may later extend the saved games summary to include additional
information to get rid of the magenta and side 1 limitations.

(Browse SVN revision 52921)

Ignacio R. Morelle <shadowmaster>
Project AdministratorIn charge of this item.
Sat 04 Feb 2012 04:13:07 PM UTC, comment #9:

Note that I recently got to see some leader sprites there by using the --new-widgets parameter (gui2 version of load game dialog).

Anonymissimus <anonymissimus>
Project Member
Wed 18 Jan 2012 11:27:30 PM UTC, comment #8:

Also note that extract_summary_from_config is only called by manager::load_summary in savegame.cpp:277 project-wide, and that this happens for a certain savegame only in case that the summary wasn't already present in the save_index (since acquiring the summary is expensive).
other bug in the series: bug #19215:

Anonymissimus <anonymissimus>
Project Member
Wed 18 Jan 2012 11:15:27 PM UTC, comment #7:

The information to display is acquired in the function extract_summary_from_config in gamestatus.cpp:369ff, which also assigns the unit id to the leader key instead of its type.
However, even after fixing that, I can't get the image to show for unknown reason, though it is loaded correctly AFAICT.
The leader key's value can be empty or a unit id for both turn saves or start-of-scenario saves.

Anonymissimus <anonymissimus>
Project Member
Sun 08 Jan 2012 02:09:40 PM UTC, comment #6:

The GUI (GUI1) code implementing the leader sprite presentation in the save preview panel still exists in trunk as of this writing (r52545) and can be found in src/dialogs.cpp, lines 384 to 399 (in the implementation of the <anonymous>::save_preview_pane::draw_contents() method), so it is possible this feature wasn't intentionally disabled or removed.

The save_index.gz file (which is already a PITA due to other bugs) stores .leader and .leader_image attributes under [save] nodes, but .leader doesn't contain useful data -- for turn saves, it corresponds to the side 1 leader (individual) unit id, but for start-of-scenario saves it's an empty string. Neither is what the GUI1 code expects (a unit type id).

Ignacio R. Morelle <shadowmaster>
Project AdministratorIn charge of this item.
Mon 24 Oct 2011 02:56:14 PM UTC, comment #5:

Adapt bug title.

Anonymissimus <anonymissimus>
Project Member
Sun 16 Oct 2011 03:25:02 PM UTC, comment #4:

Eh, you're right. I remember the leader sprite reacting to which unit actually is the leader (canrecruit=yes).
However, the feature could as well have been removed at some point for some reason.
Seems to be in 1.9.8 already.

Anonymissimus <anonymissimus>
Project Member
Fri 14 Oct 2011 09:29:26 AM UTC, comment #3:

The minimap part of this is fixed, but not the leader sprite part. I do recall seeing leader sprites in that dialog at one point, but I don't remember when they disappeared.

Espreon <espreon>
Project Member
Mon 10 Oct 2011 01:16:03 PM UTC, comment #2:

Due to the token changes revert, this bug has probably never existed. Please check.

Anonymissimus <anonymissimus>
Project Member
Tue 20 Sep 2011 09:20:42 PM UTC, SVN revision 51235:

Fixed bug #18682 load dialog bug where all times were 1969, by changing incorrect iterator from i to j on line 624. Bug #18683 is not fixed by this patch. Other bug in the series are bug #18665, bug #18649

(Browse SVN revision 51235)

Thonsew <thonsew>
Project Member
Sun 18 Sep 2011 12:30:29 AM UTC, original submission:

Sometimes, the minimap preview and the leader sprite are missing in the load game dialog. If they are present, the dialog will use the first save's minimap and leader sprite for all saves.

Espreon <espreon>
Project Member


(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


   bug dependencies.

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by shadowmaster (Posted a comment)
  • -unavailable- added by anonymissimus (Posted a comment)
  • -unavailable- added by thonsew (Updated the item)
  • -unavailable- added by espreon (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follow 10 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 08 Feb 2012 08:48:39 PM UTCshadowmasterDependencies-=>Depends on bugs #19410
    Sat 04 Feb 2012 08:53:37 PM UTCshadowmasterStatusNone=>In Progress
    Sat 04 Feb 2012 08:08:07 PM UTCshadowmasterAssigned toNone=>shadowmaster
    Mon 24 Oct 2011 02:56:14 PM UTCanonymissimusSummaryMinimap preview and leader sprite are sometimes missing in the load game dialog=>Leader sprite is missing in the load game dialog
    Sun 16 Oct 2011 03:25:02 PM UTCanonymissimusSeverity3 - Normal=>2 - Minor
      Priority5 - Normal=>4
    Mon 10 Oct 2011 01:16:03 PM UTCanonymissimusStatusReady For Test=>None
      Assigned tothonsew=>None
    Mon 26 Sep 2011 09:17:48 PM UTCthonsewStatusIn Progress=>Ready For Test
    Tue 20 Sep 2011 07:28:40 PM UTCthonsewStatusNone=>In Progress
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup