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

UI image names don't match images #1248

Open
jlederer2 opened this issue Feb 11, 2020 · 6 comments
Open

UI image names don't match images #1248

jlederer2 opened this issue Feb 11, 2020 · 6 comments
Labels

Comments

@jlederer2
Copy link

jlederer2 commented Feb 11, 2020

Description of Problem or Question

I noticed that with the latest version of Valkyrie, the opening UI image for my existing published scenario from August of 2019 is no longer the one I selected when I built the module. Upon further investigation, I have found that for most of the images, after selecting an image for the UI "Image" field, the image title that appears doesn't seem to be the correct one for the image. I have all of the expansions including Path of the Serpent installed in my collection and imported.

This problem can be replicated by creating a New Scenario, adding a new UI component, clicking on the image field and then the "None" list item, and selecting, for example, the image of a train on a trestle. The image title that appears is "ImageOfficeWithBlood".

I tried running the MoM app, disabling PoTS in my collection, then restarting Valkyrie and re-importing my collection. That didn't fix the problem.

Valkyrie Version

2.4.06

@scrubbless
Copy link
Collaborator

When the official app is updated it can jumble the image content. This is why we moved from using the apps official tokens and redwolf opted to create new tokens to ensure they wouldnt get jumbled again. This is the first time I've seen it happening to images, but I noticed the same problem.

Personally I've opted to source my own images in the scenarios to avoid this.

@redwolf2
Copy link
Collaborator

redwolf2 commented Feb 12, 2020

https://github.com/NPBruce/valkyrie/blob/23d917ed03eee3e8eae47ed211e0ec6815b74e54/unity/Assets/StreamingAssets/content/MoM/base/images.ini

All Images with a non unique filename like {import}/img/Image_*_* might be affected.

Update:

I crawled for problematic images using all available scenarios and this table:

Click to expand!
ImageChurch
ImageMurderInvestigation
ImageSlime
ImageOfficeWithBlood
ImageDunwichHorror
ImageDarkReflections
ImageRitualGoneWrong
ImageBuriedAlive
ImageArtRoom
ImageGoodNowStayDead
ImageWounded
ImageBloodyKukri
ImageHexagramRitual
ImageDrHenryArmitage
ImageScream
ImageOfficeLazy
ImageLibary
ImageMuseum
ImageSpell
ImageWorkroom
ImageFogWindy
ImageMuseumHuntingHorror
ImageDeepOnes
ImageDocks
ImageArmStuck
ImageSpellCaster
ImageOfficeAsleep
ImageVillageDecayed
ImageWoodsDogingBullets
ImageCoveredBodyWithBlood
ImageFogMansion
ImageLibaryResearch
ImageFightingTentacles
ImageMuseumRobber
ImageCityMessedUpWithBlood
ImageGunThemDown
ImageDissectionRoom
ImageDocksBuringBoat
ImageSpellMindtrick
ImageBookHolder
ImageSyringe
ImageBustedOpen
ImageHillStreetPolicePatrol
ImageBook
ImageNightWatch
ImageCarTentacleEscape
ImageChurchDecayed
ImageMuseumInvitation
ImageFogVillage
ImageInnsmouthHorror
ImageDinnerInvitation
ImageStarVampire
ImagePortal
ImageBoatRide
ImageTome
ImageMiskatonicCampus
ImageClueFound
ImageDarkReflections2
ImageMiGoSneakUp
ImagePortalSpell
ImageOfficeTypewriter
ImageRoomVineCovered
ImageFogCityStreets
ImageHandcuffed
ImageDarkReflections3
ImageOfficeBriefing
ImageDinnerParty
ImageInnsmouthCity
ImageMurderInvestigationBedroom
ImagePoliceMan
ImageSpellVision
ImageFogWoods
ImageBurningHouseRuneStone
ImageFlashlightScared
ImageRitualOnDeadBody
ImagePoliceBuilding
ImageLabStudy
ImageMeeting
ImageZombieKill
ImageMuseumHall
ImageFogWoods2
ImageDarkReflections4
ImageBackShot
ImageMotorcycle
ImageBarricadeBreaks
ImageDispute
ImageGraveyard
ImageRitualStone
ImageSpellMindtrick2
ImageAmulet
ImageKillItWithFire
ImageHandcuffed2
ImageFarmDarkYoung
ImageMuseumExhibition
ImageDeepOne
ImageZombie
ImageSpellLightning
ImageRitualPentagramCultists
ImageBook2
ImageCityAlleyway
ImageMuseumBloodTrail
ImageWoodsSwathOfDestruction
ImageAngryMob
ImageDocks2
ImageVillage
ImageDog
ImageDeepOne2
ImageZombieGirl
ImageStrangeSky
ImageYogSothoth
ImageMuseumArchive
ImageTentacleAttack
ImageCityAtNight
ImageDriveBy
ImageLetTheMotherfuckerBurn
ImagePlaza
ImageCityStreets
ImageMuseumBuilding
ImageTank
ImagePoliceMan2
ImageMuseumExhibitionAtNight
ImageThisIsYouLastChance
ImageDunwichCultists
ImageWeirdStorage
ImageRitualNeedsBlood
ImageInnsmouthStreets
ImageLockedAway
ImageWeirdStorage2
ImagePoliceConfession
ImageDocksKiller
ImageBadNews
ImageMansionAtNight
ImageSpellMoon
ImageYouAreFinished
ImageDissectionMiGo
ImageYogSothothPlanet
ImageHotelRoom
ImageMausoleum
ImageSewerInvestigation
ImageThrall
ImageFogGarden
ImageYogSothoth2
ImageZombiesAtTheWindow
ImageTentaclePalms
ImageDarkReflections5
ImageGraveyard2
ImageCarDriver
ImagePoliceMythosCreaturesAttack
ImageFoundTheKey
ImageOvergrowth
ImageCar
ImageHotelRoomDark
ImageSyringeDoctor
ImageAlienClockwork
ImageDoorOpening

My results are:

Click to expand!
ALittleNightMusic\ui.ini at line 8 with image ImageDarkReflections
ALittleNightMusic\ui.ini at line 8 with image ImageDarkReflections4
BirdsShop\ui.ini at line 80 with image ImagePortal
BirdsShop\ui.ini at line 131 with image ImageTome
CasadelasSirenas\ui.ini at line 8 with image ImageChurch
DesaparicionBosque\ui.ini at line 16 with image ImageKillItWithFire
DesaparicionBosque\ui.ini at line 135 with image ImageHillStreetPolicePatrol
EditorAlpine\ui.ini at line 19 with image ImageRitualGoneWrong
EditorAlpine\ui.ini at line 50 with image ImageHotelRoom
EditorAlpine\ui.ini at line 50 with image ImageHotelRoomDark
EditorAlpine\ui.ini at line 120 with image ImageYogSothoth
EditorAlpine\ui.ini at line 120 with image ImageYogSothoth2
EditorDelveTooDeep\ui.ini at line 8 with image ImageOfficeWithBlood
EditorDelveTooDeep\ui.ini at line 38 with image ImageYogSothoth
EditorDelveTooDeep\ui.ini at line 38 with image ImageYogSothothPlanet
EditorEscenario1\ui.ini at line 10 with image ImageFogGarden
EditorEscenario1\ui.ini at line 19 with image ImageBook
EditorEscenario1\ui.ini at line 28 with image ImageDarkReflections
EditorEscenario1\ui.ini at line 28 with image ImageDarkReflections3
EditorEscenario1\ui.ini at line 36 with image ImagePoliceMan
EditorEscenario1\ui.ini at line 36 with image ImagePoliceMan2
EditorEscenario5\ui.ini at line 48 with image ImageSpell
EditorEscenario5\ui.ini at line 48 with image ImageSpellCaster
EditorEscenario5\ui.ini at line 65 with image ImageSpell
EditorEscenario5\ui.ini at line 100 with image ImageFlashlightScared
EditorEscenario5\ui.ini at line 178 with image ImageSpell
EditorEscenario5\ui.ini at line 178 with image ImageSpellCaster
EditorFootsteps\ui.ini at line 56 with image ImageRitualStone
EditorFootsteps\ui.ini at line 75 with image ImageTank
EditorFootsteps\ui.ini at line 103 with image ImageSpell
EditorFootsteps\ui.ini at line 103 with image ImageSpellMindtrick
EditorMuseum\ui.ini at line 16 with image ImageDeepOnes
EditorMuseum\ui.ini at line 16 with image ImageDeepOne
EditorMuseum\ui.ini at line 46 with image ImageMuseum
EditorMuseum\ui.ini at line 46 with image ImageMuseumHuntingHorror
EditorMuseum\ui.ini at line 65 with image ImageChurch
EditorScenario3\ui.ini at line 11 with image ImageLabStudy
EditorScenario3\ui.ini at line 23 with image ImageZombie
EditorScenario3\ui.ini at line 23 with image ImageZombiesAtTheWindow
EditorScenario3\ui.ini at line 133 with image ImageRitualPentagramCultists
EditorScenario3\ui.ini at line 153 with image ImageSpell
EditorScenario3\ui.ini at line 153 with image ImageSpellCaster
Eldurmiente\ui.ini at line 478 with image ImageChurch
Il_Mistero_della_Villa_Parcival\ui.ini at line 16 with image ImageFogGarden
Il_Mistero_della_Villa_Parcival\ui.ini at line 43 with image ImageDocks
Il_Mistero_della_Villa_Parcival\ui.ini at line 43 with image ImageDocks2
Il_Mistero_della_Villa_Parcival\ui.ini at line 106 with image ImageDarkReflections
Il_Mistero_della_Villa_Parcival\ui.ini at line 106 with image ImageDarkReflections3
La_Follia_di_Arkham\ui.ini at line 384 with image ImageMuseum
La_Mascarada\ui.ini at line 8 with image ImageSpell
La_Mascarada\ui.ini at line 8 with image ImageSpellMindtrick
La_Mascarada\ui.ini at line 62 with image ImageMausoleum
La_Mascarada\ui.ini at line 92 with image ImageLibary
La_Mascarada\ui.ini at line 92 with image ImageLibaryResearch
LlamadaInnsmouth\ui.ini at line 8 with image ImageDissectionRoom
LlamadaInnsmouth\ui.ini at line 51 with image ImageBook
LlamadaInnsmouth\ui.ini at line 78 with image ImageLabStudy
MansionColeman\ui.ini at line 38 with image ImageCarDriver
MansionColeman\ui.ini at line 38 with image ImageCar
MansionColeman\ui.ini at line 46 with image ImageThisIsYouLastChance
MansionColeman\ui.ini at line 75 with image ImageCityAtNight
MansionColeman\ui.ini at line 110 with image ImageBuriedAlive
Massachusetts\ui.ini at line 25 with image ImageMuseum
Massachusetts\ui.ini at line 25 with image ImageMuseumHall
Saviors\ui.ini at line 8 with image ImageMuseum
Saviors\ui.ini at line 8 with image ImageMuseumInvitation
Saviors\ui.ini at line 31 with image ImageBustedOpen
Saviors\ui.ini at line 53 with image ImageWeirdStorage
Saviors\ui.ini at line 53 with image ImageWeirdStorage2
Saviors\ui.ini at line 97 with image ImageOfficeTypewriter
Saviors\ui.ini at line 107 with image ImageSpell
TheExperiment\ui.ini at line 52 with image ImageVillage
TheExperiment\ui.ini at line 162 with image ImageOvergrowth
TheRobberyOfTheKadakianIdol\ui.ini at line 8 with image ImageOvergrowth
TrasLaPuerta\ui.ini at line 81 with image ImageSyringe
TrasLaPuerta\ui.ini at line 81 with image ImageSyringeDoctor
TrasLaPuerta\ui.ini at line 112 with image ImageThisIsYouLastChance
TrasLaPuerta\ui.ini at line 142 with image ImageBuriedAlive
TrasLaPuerta\ui.ini at line 159 with image ImageBook
TrasLaPuerta\ui.ini at line 159 with image ImageBook2
UnaTristeVerità2\ui.ini at line 56 with image ImageVillage
wiltshire\ui.ini at line 40 with image ImageDarkReflections
wiltshire\ui.ini at line 40 with image ImageDarkReflections3
wiltshire\ui.ini at line 67 with image ImagePlaza
wiltshire\ui.ini at line 76 with image ImageDarkReflections
wiltshire\ui.ini at line 76 with image ImageDarkReflections3
wiltshire\ui.ini at line 95 with image ImageCar
wiltshire\ui.ini at line 116 with image ImageFarmDarkYoung
Demo\features\1.1\ui.ini at line 17 with image ImageCar

Problematic images:
ImageDarkReflections
ImageDarkReflections4
ImagePortal
ImageTome
ImageChurch
ImageKillItWithFire
ImageHillStreetPolicePatrol
ImageRitualGoneWrong
ImageHotelRoom
ImageHotelRoomDark
ImageYogSothoth
ImageYogSothoth2
ImageOfficeWithBlood
ImageYogSothothPlanet
ImageFogGarden
ImageBook
ImageDarkReflections3
ImagePoliceMan
ImagePoliceMan2
ImageSpell
ImageSpellCaster
ImageFlashlightScared
ImageRitualStone
ImageTank
ImageSpellMindtrick
ImageDeepOnes
ImageDeepOne
ImageMuseum
ImageMuseumHuntingHorror
ImageLabStudy
ImageZombie
ImageZombiesAtTheWindow
ImageRitualPentagramCultists
ImageDocks
ImageDocks2
ImageMausoleum
ImageLibary
ImageLibaryResearch
ImageDissectionRoom
ImageCarDriver
ImageCar
ImageThisIsYouLastChance
ImageCityAtNight
ImageBuriedAlive
ImageMuseumHall
ImageMuseumInvitation
ImageBustedOpen
ImageWeirdStorage
ImageWeirdStorage2
ImageOfficeTypewriter
ImageVillage
ImageOvergrowth
ImageSyringe
ImageSyringeDoctor
ImageBook2
ImagePlaza
ImageFarmDarkYoung

I found this using this code:

Click to expand!
namespace ImageSearch
{
    class Program
    {
        static void Main(string[] args)
        {
            var path = System.IO.Path.GetDirectoryName(new System.Uri(System.Reflection.Assembly.GetExecutingAssembly().CodeBase).LocalPath);
            var scenarioDir = Path.Combine(path, "scenarios");
            var problemsFile = Path.Combine(path, "problems.txt");
            var problems = File.ReadAllLines(problemsFile);

            var iniFiles = Directory.GetFiles(scenarioDir,"*.ini", SearchOption.AllDirectories);
            var problematicImages = new List<string>();
            foreach(var iniFile in iniFiles) 
            {
                var lines = File.ReadAllLines(iniFile);
                int lineCount = 0;
                foreach(var line in lines)
                {
                    lineCount++;
                    foreach(var problem in problems) 
                    {
                        if (line.Contains(problem))
                        {
                            var filename = Path.GetRelativePath(scenarioDir, iniFile);
                            Console.WriteLine(filename + " at line " + lineCount + " with image " + problem);

                            if (!problematicImages.Contains(problem))
                            {
                                problematicImages.Add(problem);
                            }
                        }
                    }
                }
            }
            Console.WriteLine();
            Console.WriteLine("Problematic images:");
            foreach (var problematicImage in problematicImages)
            {
                Console.WriteLine(problematicImage);
            }
        }
    }
}

ImageSearch.zip

Click to expand!

And here are the problematic images. Count hints how much they were used.

ImageDarkReflections count = 5
ImageDarkReflections4 count = 1
ImagePortal count = 1
ImageTome count = 1
ImageChurch count = 3
ImageKillItWithFire count = 1
ImageHillStreetPolicePatrol count = 1
ImageRitualGoneWrong count = 1
ImageHotelRoom count = 1
ImageHotelRoomDark count = 1
ImageYogSothoth count = 2
ImageYogSothoth2 count = 1
ImageOfficeWithBlood count = 1
ImageYogSothothPlanet count = 1
ImageFogGarden count = 2
ImageBook count = 3
ImageDarkReflections3 count = 4
ImagePoliceMan count = 1
ImagePoliceMan2 count = 1
ImageSpell count = 7
ImageSpellCaster count = 3
ImageFlashlightScared count = 1
ImageRitualStone count = 1
ImageTank count = 1
ImageSpellMindtrick count = 2
ImageDeepOnes count = 1
ImageDeepOne count = 1
ImageMuseum count = 4
ImageMuseumHuntingHorror count = 1
ImageLabStudy count = 2
ImageZombie count = 1
ImageZombiesAtTheWindow count = 1

I would suggest replacing all images with a generic one like this:

image_no_longer_supported

I created a pull request for it:

#1249

The impact is quite big:

grafik

@jlederer2
Copy link
Author

Nice work. Perhaps it would be best to remove the ability to use any of the FF images so no new dependencies on the remaining FF images are created by scenario authors in the future.

@redwolf2
Copy link
Collaborator

This removes all images without a unique name, so some images can still be used.

@scrubbless
Copy link
Collaborator

Ouch, it's frustrating that the images keep getting jumbled.

@redwolf2
Copy link
Collaborator

redwolf2 commented Feb 25, 2020

A better but time consuming solution would be to readd support one by one. But this is the best quickfix besides adding the orifinal FFG images, we have for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants