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

1.17 undead sprite cleanup #6655

Merged
merged 6 commits into from Apr 30, 2022

Conversation

doofus-01
Copy link
Member

@doofus-01 doofus-01 commented Apr 30, 2022

part of #6417 - completed

The ghosts were interesting; all of them were good sprites, but there was an evolution ending with the spectre, which is really top-shelf. If all sprites were like the spectre, this whole cleanup project would be unneeded.

@github-actions github-actions bot added Graphics Issues that involve the graphics engine or assets. Units Issues that involve unit definitions or their implementation in the engine. labels Apr 30, 2022
@doofus-01 doofus-01 marked this pull request as ready for review April 30, 2022 02:00
@doofus-01 doofus-01 merged commit a2ad3ae into wesnoth:master Apr 30, 2022
knyghtmare added a commit to knyghtmare/wesnoth that referenced this pull request Apr 30, 2022
incorrect image path after merger of wesnoth#6655 so patching it
pehjota added a commit to pehjota/wesnoth that referenced this pull request Feb 20, 2024
Playing the multiplayer scenario Aethermaw as Loyalists vs. Undead
revealed some image errors:

    20240219 06:50:21 error image: could not open image 'units/undead/shadow-s-attack-1.png'
    20240219 06:50:21 error image: could not open image 'units/undead/shadow-s-attack-4.png'
    20240219 06:50:21 error image: could not open image 'units/undead/shadow-n-3.png'
    20240219 06:50:22 error image: could not open image 'units/undead/shadow-n-attack-2.png'
    20240219 06:50:26 error image: could not open image 'units/human-loyalists/spearman-attack-se-9.png'
    20240219 06:50:26 error image: could not open image 'units/human-loyalists/spearman-attack-se-10.png'
    20240219 06:50:26 error image: could not open image 'units/human-loyalists/spearman-attack-s-6.png'
    20240219 06:50:26 error image: could not open image 'units/human-loyalists/general-idle-5.png'

units/undead/shadow-* images were moved to units/undead-spirit/shadow-*
in 1.17.4 commit a2ad3ae, specifically the "1.17 undead sprite
cleanup" commit 961b8a3 of PR wesnoth#6655.  This was documented on the
forums:
https://forums.wesnoth.org/viewtopic.php?p=684291&hilit=units%2Fundead-spirit%2F#p684291

wmllint handles renamed images, but it also does a bunch of questionable
translatable string changes like translating "<span color='#ff7722'>".
So for now, instead of using wmllint, just update Aethermaw for these
renamed images as follows (requires GNU sed):

    git grep -Fl -- 'units/undead/shadow-' \
        | grep -v '^data/tools/wmllint$' \
        | xargs sed -i 's|units/undead/shadow-|units/undead-spirit/shadow-|'

These units/human-loyalists/ images were removed in 1.17.12 commit
8e38cfd, specifically the "spearman image cleanup" commit 775e7f8
and the "remove left-over old general frames" commit e07d554 in
PR wesnoth#7208.  But Aethermaw still uses them.

Restore the removed images that are still used:

    git grep -EIh -- '^[^#]*[{]PLACE_IMAGE[^ ]* +[(]?"?[^{}$ ~")]+[ ~")].*$' data/ \
        | sed -E 's|^.*[{]PLACE_IMAGE[^ ]* +[(]?"?([^{}$ ~")]+)[ ~")].*$|\1|' \
        | while read -r img; do
            [ -e data/core/images/${img} ] && continue
            [ -e data/campaigns/*/images/${img} ] && continue
            [ -e ${img} ] && continue
            git show 8e38cfd~1:data/core/images/${img} 1>data/core/images/${img}
        done

Also add a CI check to prevent this from happening in the future.
Example output without these Aethermaw fixes:

    data/multiplayer/scenarios/2p_Aethermaw.cfg:134: missing image: units/undead/shadow-s-attack-1.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:135: missing image: units/undead/shadow-n-attack-2.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:147: missing image: units/undead/shadow-n-3.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:149: missing image: units/undead/shadow-s-attack-4.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:196: missing image: units/human-loyalists/spearman-attack-se-10.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:197: missing image: units/human-loyalists/spearman-attack-s-6.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:198: missing image: units/human-loyalists/spearman-attack-se-9.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:203: missing image: units/human-loyalists/general-idle-5.png
pehjota added a commit to pehjota/wesnoth that referenced this pull request Feb 20, 2024
Playing the multiplayer scenario Aethermaw as Loyalists vs. Undead
revealed some image errors:

    20240219 06:50:21 error image: could not open image 'units/undead/shadow-s-attack-1.png'
    20240219 06:50:21 error image: could not open image 'units/undead/shadow-s-attack-4.png'
    20240219 06:50:21 error image: could not open image 'units/undead/shadow-n-3.png'
    20240219 06:50:22 error image: could not open image 'units/undead/shadow-n-attack-2.png'
    20240219 06:50:26 error image: could not open image 'units/human-loyalists/spearman-attack-se-9.png'
    20240219 06:50:26 error image: could not open image 'units/human-loyalists/spearman-attack-se-10.png'
    20240219 06:50:26 error image: could not open image 'units/human-loyalists/spearman-attack-s-6.png'
    20240219 06:50:26 error image: could not open image 'units/human-loyalists/general-idle-5.png'

units/undead/shadow-* images were moved to units/undead-spirit/shadow-*
in 1.17.4 commit a2ad3ae, specifically the "1.17 undead sprite
cleanup" commit 961b8a3 of PR wesnoth#6655.  This was documented on the
forums:
https://forums.wesnoth.org/viewtopic.php?p=684291&hilit=units%2Fundead-spirit%2F#p684291

wmllint handles renamed images, but it also makes an enormous number of
other (often questionable at best) changes (issue wesnoth#5799).  So for now,
instead of using wmllint, just update Aethermaw for these renamed images
as follows (requires GNU sed):

    git grep -Fl -- 'units/undead/shadow-' \
        | grep -v '^data/tools/wmllint$' \
        | xargs sed -i 's|units/undead/shadow-|units/undead-spirit/shadow-|'

These units/human-loyalists/ images were removed in 1.17.12 commit
8e38cfd, specifically the "spearman image cleanup" commit 775e7f8
and the "remove left-over old general frames" commit e07d554 in
PR wesnoth#7208.  But Aethermaw still uses them.

Restore the removed images that are still used:

    git grep -EIh -- '^[^#]*[{]PLACE_IMAGE[^ ]* +[(]?"?[^{}$ ~")]+[ ~")].*$' data/ \
        | sed -E 's|^.*[{]PLACE_IMAGE[^ ]* +[(]?"?([^{}$ ~")]+)[ ~")].*$|\1|' \
        | while read -r img; do
            [ -e data/core/images/${img} ] && continue
            [ -e data/campaigns/*/images/${img} ] && continue
            [ -e ${img} ] && continue
            git show 8e38cfd~1:data/core/images/${img} 1>data/core/images/${img}
        done

Also add a CI check to prevent this from happening in the future.
Example output without these Aethermaw fixes:

    data/multiplayer/scenarios/2p_Aethermaw.cfg:134: missing image: units/undead/shadow-s-attack-1.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:135: missing image: units/undead/shadow-n-attack-2.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:147: missing image: units/undead/shadow-n-3.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:149: missing image: units/undead/shadow-s-attack-4.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:196: missing image: units/human-loyalists/spearman-attack-se-10.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:197: missing image: units/human-loyalists/spearman-attack-s-6.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:198: missing image: units/human-loyalists/spearman-attack-se-9.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:203: missing image: units/human-loyalists/general-idle-5.png
pehjota added a commit to pehjota/wesnoth that referenced this pull request Feb 20, 2024
Playing the multiplayer scenario Aethermaw as Loyalists vs. Undead
revealed some image errors:

    20240219 06:50:21 error image: could not open image 'units/undead/shadow-s-attack-1.png'
    20240219 06:50:21 error image: could not open image 'units/undead/shadow-s-attack-4.png'
    20240219 06:50:21 error image: could not open image 'units/undead/shadow-n-3.png'
    20240219 06:50:22 error image: could not open image 'units/undead/shadow-n-attack-2.png'
    20240219 06:50:26 error image: could not open image 'units/human-loyalists/spearman-attack-se-9.png'
    20240219 06:50:26 error image: could not open image 'units/human-loyalists/spearman-attack-se-10.png'
    20240219 06:50:26 error image: could not open image 'units/human-loyalists/spearman-attack-s-6.png'
    20240219 06:50:26 error image: could not open image 'units/human-loyalists/general-idle-5.png'

units/undead/shadow-* images were moved to units/undead-spirit/shadow-*
in 1.17.4 commit a2ad3ae, specifically the "1.17 undead sprite
cleanup" commit 961b8a3 of PR wesnoth#6655.  This was documented on the
forums:
https://forums.wesnoth.org/viewtopic.php?p=684291&hilit=units%2Fundead-spirit%2F#p684291

wmllint handles renamed images, but it also makes an enormous number of
other (often questionable at best) changes (issue wesnoth#5799).  So for now,
instead of using wmllint, just update Aethermaw for these renamed images
as follows (requires GNU sed):

    git grep -Fl -- 'units/undead/shadow-' \
        | grep -v '^data/tools/wmllint$' \
        | xargs sed -i 's|units/undead/shadow-|units/undead-spirit/shadow-|'

These units/human-loyalists/ images were removed in 1.17.12 commit
8e38cfd, specifically the "spearman image cleanup" commit 775e7f8
and the "remove left-over old general frames" commit e07d554 in
PR wesnoth#7208.  But Aethermaw still uses them.

Restore the removed images that are still used:

    git grep -EIh -- '^[^#]*[{]PLACE_IMAGE[^ ]* +[(]?"?[^{}$ ~")]+[ ~")].*$' data/ \
        | sed -E 's|^.*[{]PLACE_IMAGE[^ ]* +[(]?"?([^{}$ ~")]+)[ ~")].*$|\1|' \
        | while read -r img; do
            [ -e data/core/images/${img} ] && continue
            [ -e data/campaigns/*/images/${img} ] && continue
            [ -e ${img} ] && continue
            git show 8e38cfd~1:data/core/images/${img} 1>data/core/images/${img}
        done

Also add a CI check to prevent this from happening in the future.
Example output without these Aethermaw fixes:

    data/multiplayer/scenarios/2p_Aethermaw.cfg:134: missing image: units/undead/shadow-s-attack-1.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:135: missing image: units/undead/shadow-n-attack-2.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:147: missing image: units/undead/shadow-n-3.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:149: missing image: units/undead/shadow-s-attack-4.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:196: missing image: units/human-loyalists/spearman-attack-se-10.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:197: missing image: units/human-loyalists/spearman-attack-s-6.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:198: missing image: units/human-loyalists/spearman-attack-se-9.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:203: missing image: units/human-loyalists/general-idle-5.png
pehjota added a commit to pehjota/wesnoth that referenced this pull request Feb 20, 2024
Playing the multiplayer scenario Aethermaw as Loyalists vs. Undead
revealed some image errors:

    20240219 06:50:21 error image: could not open image 'units/undead/shadow-s-attack-1.png'
    20240219 06:50:21 error image: could not open image 'units/undead/shadow-s-attack-4.png'
    20240219 06:50:21 error image: could not open image 'units/undead/shadow-n-3.png'
    20240219 06:50:22 error image: could not open image 'units/undead/shadow-n-attack-2.png'
    20240219 06:50:26 error image: could not open image 'units/human-loyalists/spearman-attack-se-9.png'
    20240219 06:50:26 error image: could not open image 'units/human-loyalists/spearman-attack-se-10.png'
    20240219 06:50:26 error image: could not open image 'units/human-loyalists/spearman-attack-s-6.png'
    20240219 06:50:26 error image: could not open image 'units/human-loyalists/general-idle-5.png'

units/undead/shadow-* images were moved to units/undead-spirit/shadow-*
in 1.17.4 commit a2ad3ae, specifically the "1.17 undead sprite
cleanup" commit 961b8a3 of PR wesnoth#6655.  This was documented on the
forums:
https://forums.wesnoth.org/viewtopic.php?p=684291&hilit=units%2Fundead-spirit%2F#p684291

wmllint handles renamed images, but it also makes an enormous number of
other (often questionable at best) changes (issue wesnoth#5799).  So for now,
instead of using wmllint, just update Aethermaw for these renamed images
as follows (requires GNU sed):

    git grep -Fl -- 'units/undead/shadow-' \
        | grep -v '^data/tools/wmllint$' \
        | xargs sed -i 's|units/undead/shadow-|units/undead-spirit/shadow-|'

These units/human-loyalists/ images were removed in 1.17.12 commit
8e38cfd, specifically the "spearman image cleanup" commit 775e7f8
and the "remove left-over old general frames" commit e07d554 in
PR wesnoth#7208.  But Aethermaw still uses them.

Restore the removed images that are still used:

    git grep -EIh -- '^[^#]*[{]PLACE_IMAGE[^ ]* +[(]?"?[^{}$ ~")]+[ ~")].*$' data/ \
        | sed -E 's|^.*[{]PLACE_IMAGE[^ ]* +[(]?"?([^{}$ ~")]+)[ ~")].*$|\1|' \
        | while read -r img; do
            [ -e data/core/images/${img} ] && continue
            [ -e data/campaigns/*/images/${img} ] && continue
            [ -e ${img} ] && continue
            git show 8e38cfd~1:data/core/images/${img} 1>data/core/images/${img}
        done

Also add a CI check to prevent this from happening in the future.
Example output without these Aethermaw fixes:

    data/multiplayer/scenarios/2p_Aethermaw.cfg:134: missing image: units/undead/shadow-s-attack-1.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:135: missing image: units/undead/shadow-n-attack-2.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:147: missing image: units/undead/shadow-n-3.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:149: missing image: units/undead/shadow-s-attack-4.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:196: missing image: units/human-loyalists/spearman-attack-se-10.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:197: missing image: units/human-loyalists/spearman-attack-s-6.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:198: missing image: units/human-loyalists/spearman-attack-se-9.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:203: missing image: units/human-loyalists/general-idle-5.png
pehjota added a commit to pehjota/wesnoth that referenced this pull request Feb 20, 2024
Playing the multiplayer scenario Aethermaw as Loyalists vs. Undead
revealed some image errors:

    20240219 06:50:21 error image: could not open image 'units/undead/shadow-s-attack-1.png'
    20240219 06:50:21 error image: could not open image 'units/undead/shadow-s-attack-4.png'
    20240219 06:50:21 error image: could not open image 'units/undead/shadow-n-3.png'
    20240219 06:50:22 error image: could not open image 'units/undead/shadow-n-attack-2.png'
    20240219 06:50:26 error image: could not open image 'units/human-loyalists/spearman-attack-se-9.png'
    20240219 06:50:26 error image: could not open image 'units/human-loyalists/spearman-attack-se-10.png'
    20240219 06:50:26 error image: could not open image 'units/human-loyalists/spearman-attack-s-6.png'
    20240219 06:50:26 error image: could not open image 'units/human-loyalists/general-idle-5.png'

units/undead/shadow-* images were moved to units/undead-spirit/shadow-*
in 1.17.4 commit a2ad3ae, specifically the "1.17 undead sprite
cleanup" commit 961b8a3 of PR wesnoth#6655.  This was documented on the
forums:
https://forums.wesnoth.org/viewtopic.php?p=684291&hilit=units%2Fundead-spirit%2F#p684291

wmllint handles renamed images, but it also makes an enormous number of
other (often questionable at best) changes (issue wesnoth#5799).  So for now,
instead of using wmllint, just update Aethermaw for these renamed images
as follows (requires GNU sed):

    git grep -Fl -- 'units/undead/shadow-' \
        | grep -v '^data/tools/wmllint$' \
        | xargs sed -i 's|units/undead/shadow-|units/undead-spirit/shadow-|'

These units/human-loyalists/ images were removed in 1.17.12 commit
8e38cfd, specifically the "spearman image cleanup" commit 775e7f8
and the "remove left-over old general frames" commit e07d554 in
PR wesnoth#7208.  But Aethermaw still uses them.

Restore the removed images that are still used:

    git grep -EIh -- '^[^#]*[{]PLACE_IMAGE[^ ]* +[(]?"?[^{}$ ~")]+[ ~")].*$' data/ \
        | sed -E 's|^.*[{]PLACE_IMAGE[^ ]* +[(]?"?([^{}$ ~")]+)[ ~")].*$|\1|' \
        | while read -r img; do
            [ -e data/core/images/${img} ] && continue
            [ -e data/campaigns/*/images/${img} ] && continue
            [ -e ${img} ] && continue
            git show 8e38cfd~1:data/core/images/${img} 1>data/core/images/${img}
        done

Also add a CI check to prevent this from happening in the future.
Example output without these Aethermaw fixes:

    data/multiplayer/scenarios/2p_Aethermaw.cfg:134: missing image: units/undead/shadow-s-attack-1.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:135: missing image: units/undead/shadow-n-attack-2.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:147: missing image: units/undead/shadow-n-3.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:149: missing image: units/undead/shadow-s-attack-4.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:196: missing image: units/human-loyalists/spearman-attack-se-10.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:197: missing image: units/human-loyalists/spearman-attack-s-6.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:198: missing image: units/human-loyalists/spearman-attack-se-9.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:203: missing image: units/human-loyalists/general-idle-5.png
Wedge009 added a commit to Wedge009/wesnoth that referenced this pull request Feb 20, 2024
pehjota added a commit to pehjota/wesnoth that referenced this pull request Feb 20, 2024
Playing the multiplayer scenario Aethermaw as Loyalists vs. Undead
revealed some image errors:

    20240219 06:50:21 error image: could not open image 'units/undead/shadow-s-attack-1.png'
    20240219 06:50:21 error image: could not open image 'units/undead/shadow-s-attack-4.png'
    20240219 06:50:21 error image: could not open image 'units/undead/shadow-n-3.png'
    20240219 06:50:22 error image: could not open image 'units/undead/shadow-n-attack-2.png'
    20240219 06:50:26 error image: could not open image 'units/human-loyalists/spearman-attack-se-9.png'
    20240219 06:50:26 error image: could not open image 'units/human-loyalists/spearman-attack-se-10.png'
    20240219 06:50:26 error image: could not open image 'units/human-loyalists/spearman-attack-s-6.png'
    20240219 06:50:26 error image: could not open image 'units/human-loyalists/general-idle-5.png'

units/undead/shadow-* images were moved to units/undead-spirit/shadow-*
in 1.17.4 commit a2ad3ae, specifically the "1.17 undead sprite
cleanup" commit 961b8a3 of PR wesnoth#6655.  This was documented on the
forums:
https://forums.wesnoth.org/viewtopic.php?p=684291&hilit=units%2Fundead-spirit%2F#p684291

wmllint handles renamed images, but it also makes an enormous number of
other (often questionable at best) changes (issue wesnoth#5799).  So for now,
instead of using wmllint, just update Aethermaw for these renamed images
as follows (requires GNU sed):

    git grep -Fl -- 'units/undead/shadow-' \
        | grep -v '^data/tools/wmllint$' \
        | xargs sed -i 's|units/undead/shadow-|units/undead-spirit/shadow-|'

These units/human-loyalists/ images were removed in 1.17.12 commit
8e38cfd, specifically the "spearman image cleanup" commit 775e7f8
and the "remove left-over old general frames" commit e07d554 in
PR wesnoth#7208.  But Aethermaw still uses them.

Restore the removed images that are still used:

    git grep -EIh -- '^[^#]*[{]PLACE_IMAGE[^ ]* +[(]?"?[^{}$ ~")]+[ ~")].*$' data/ \
        | sed -E 's|^.*[{]PLACE_IMAGE[^ ]* +[(]?"?([^{}$ ~")]+)[ ~")].*$|\1|' \
        | while read -r img; do
            [ -e data/core/images/${img} ] && continue
            [ -e data/campaigns/*/images/${img} ] && continue
            [ -e ${img} ] && continue
            git show 8e38cfd~1:data/core/images/${img} 1>data/core/images/${img}
        done

Also add a CI check to prevent this from happening in the future.
Example output without these Aethermaw fixes:

    data/multiplayer/scenarios/2p_Aethermaw.cfg:134: missing image: units/undead/shadow-s-attack-1.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:135: missing image: units/undead/shadow-n-attack-2.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:147: missing image: units/undead/shadow-n-3.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:149: missing image: units/undead/shadow-s-attack-4.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:196: missing image: units/human-loyalists/spearman-attack-se-10.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:197: missing image: units/human-loyalists/spearman-attack-s-6.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:198: missing image: units/human-loyalists/spearman-attack-se-9.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:203: missing image: units/human-loyalists/general-idle-5.png
pehjota added a commit to pehjota/wesnoth that referenced this pull request Feb 20, 2024
Playing the multiplayer scenario Aethermaw as Loyalists vs. Undead
revealed some image errors:

    20240219 06:50:21 error image: could not open image 'units/undead/shadow-s-attack-1.png'
    20240219 06:50:21 error image: could not open image 'units/undead/shadow-s-attack-4.png'
    20240219 06:50:21 error image: could not open image 'units/undead/shadow-n-3.png'
    20240219 06:50:22 error image: could not open image 'units/undead/shadow-n-attack-2.png'
    20240219 06:50:26 error image: could not open image 'units/human-loyalists/spearman-attack-se-9.png'
    20240219 06:50:26 error image: could not open image 'units/human-loyalists/spearman-attack-se-10.png'
    20240219 06:50:26 error image: could not open image 'units/human-loyalists/spearman-attack-s-6.png'
    20240219 06:50:26 error image: could not open image 'units/human-loyalists/general-idle-5.png'

units/undead/shadow-* images were moved to units/undead-spirit/shadow-*
in 1.17.4 commit a2ad3ae, specifically the "1.17 undead sprite
cleanup" commit 961b8a3 of PR wesnoth#6655.  This was documented on the
forums:
https://forums.wesnoth.org/viewtopic.php?p=684291&hilit=units%2Fundead-spirit%2F#p684291

wmllint handles renamed images, but it also makes an enormous number of
other (often questionable at best) changes (issue wesnoth#5799).  So for now,
instead of using wmllint, just update Aethermaw for these renamed images
as follows (requires GNU sed):

    git grep -Fl -- 'units/undead/shadow-' \
        | grep -v '^data/tools/wmllint$' \
        | xargs sed -i 's|units/undead/shadow-|units/undead-spirit/shadow-|'

These units/human-loyalists/ images were removed in 1.17.12 commit
8e38cfd, specifically the "spearman image cleanup" commit 775e7f8
and the "remove left-over old general frames" commit e07d554 in
PR wesnoth#7208.  But Aethermaw still uses them.

Restore the removed images that are still used:

    git grep -EIh -- '^[^#]*[{]PLACE_IMAGE[^ ]* +[(]?"?[^{}$ ~")]+[ ~")].*$' data/ \
        | sed -E 's|^.*[{]PLACE_IMAGE[^ ]* +[(]?"?([^{}$ ~")]+)[ ~")].*$|\1|' \
        | while read -r img; do
            [ -e data/core/images/${img} ] && continue
            [ -e data/campaigns/*/images/${img} ] && continue
            [ -e ${img} ] && continue
            git show 8e38cfd~1:data/core/images/${img} 1>data/core/images/${img}
        done

Also add a CI check to prevent this from happening in the future.
Example output without these Aethermaw fixes:

    data/multiplayer/scenarios/2p_Aethermaw.cfg:134: missing image: units/undead/shadow-s-attack-1.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:135: missing image: units/undead/shadow-n-attack-2.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:147: missing image: units/undead/shadow-n-3.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:149: missing image: units/undead/shadow-s-attack-4.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:196: missing image: units/human-loyalists/spearman-attack-se-10.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:197: missing image: units/human-loyalists/spearman-attack-s-6.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:198: missing image: units/human-loyalists/spearman-attack-se-9.png
    data/multiplayer/scenarios/2p_Aethermaw.cfg:203: missing image: units/human-loyalists/general-idle-5.png
@pehjota pehjota mentioned this pull request Feb 20, 2024
Wedge009 added a commit that referenced this pull request Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Graphics Issues that involve the graphics engine or assets. Units Issues that involve unit definitions or their implementation in the engine.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant