mmatyas / pegasus-frontend

A cross platform, customizable graphical frontend for launching emulators and managing your game collection.
http://pegasus-frontend.org
Other
1.3k stars 117 forks source link

Built-in theme only uses screenshots #407

Closed spoogemcfuck closed 5 years ago

spoogemcfuck commented 5 years ago

Hi. I love Pegasus! It's beautiful and easy to use, just a huge step up from EmulationStation.

The one issue that I'm having is that the default (only) theme doesn't look quite like the themes shown in the examples on the website. It's using screenshots instead of covers for the grid, and the detail view on the left is missing the wheel art and screenshot.

The correct art is present in the standard EmulationStation location: /home/pi/RetroPie/roms/nes/media/covers, screenshots, etc and the art is all listed correctly in the the gamelist. Here's an example entry:

  <game>
    <path>/home/pi/RetroPie/roms/nes/Favorites/Battletoads (U) [!].nes</path>
    <name>Battletoads</name>
    <cover>/home/pi/RetroPie/roms/nes/media/covers/Battletoads (U) [!].png</cover>
    <image>/home/pi/RetroPie/roms/nes/media/screenshots/Battletoads (U) [!].png</image>
    <marquee>/home/pi/RetroPie/roms/nes/media/marquees/Battletoads (U) [!].png</marquee>
    <video />
    <rating>0.8</rating>
    <desc>The Dark Queen has attacked and kidnapped (toadnapped?) your best buddy.. To make matters worse, she nabbed the best looking girl around! So, what will you do? Cry? Whimper? Hide? Call the Starcops? NO! Cause you&apos;re a Battletoad! Battletoads don&apos;t cry, hide or call for help! And they certainly don&apos;t whimper! They get MAD then they get EVEN! So grab your blaster, hop on the Toadster and go get &apos;em!

You will control a battletoad through various levels. Some are side-scrolling beat-em-ups, other are vertical drops down a shaft, fighting as you go, others have you riding a rocket or surfboard, shooting or avoiding enemies. At the end of each area, there is a boss. In some areas, about half-way through, you may have a mini-boss.</desc>
    <releasedate>19910602T000000</releasedate>
    <developer>Rareware</developer>
    <publisher>Tradewest</publisher>
    <genre>Beat&apos;em Up, Action</genre>
    <players>2</players>
  </game>

Here's a picture of what I'm seeing. Please forgive me for taking a photo of the TV; I can't figure out how to get a proper screenshot. screenshot

I'm running Pegasus on a Raspberry Bi 3 B, installed from RetroPie. The version string shows: alpha11-16-g68efbff, 2019-03-12

Tangentially, I looked for the theme .cfg file to see if this is intended behavior, but I can't find it. The themes folder at /opt/retropie/configs/all/pegasus-fe/themes/ is empty. Am I looking in the wrong place?

Thanks for any help!

RexBorova commented 5 years ago

For box covers Pegsaus looks for the folder "box2dfront". If you use skraper assets, that folder should be in the "media" directory of your respected game collections folder. I think EmulationStation assets looks for the same "box2dfront" folder for box covers, but I could be wrong. Hope this helps!

mmatyas commented 5 years ago

Hi, EmulationStation now has several different branches of development; I can't add support for them all (some of them are even incompatible), so Pegasus supports the original set of features, and on a best-effort base the main RetroPie branch. The original ES supports only the asset types image and video (documented here) and in addition, the RetroPie branch also supports marquee (according to the source code). image is assumed to be a box art, and so that's what the theme tries to display.

In your case, image is a set value, so then Pegasus won't try to find a matching cover art under media or skraper. What you could do is either edit you ES gamelist file (change/remove image paths) or convert the XML to Pegasus' metadata format (eg. on this site) and rely on the automatic asset search (or manually define them there too).

As for the default theme, it's built-in so it won't appear under themes, but you can find the sources here.

spoogemcfuck commented 5 years ago

Thank you for your reply! So if I understand correctly, Pegasus out of the box is set to look for EmulationStation's gamelist.xml and images, so that's how it was seeing my games without having to set up any collections.pegasus.txt files or pointing Pegasus at them in Settings. And although it can use EmulationStation's xml, it only supports an older version that doesn't include multiple image types, so that's why it was displaying screenshots (which were listed as the single image asset that ES 1 supported) and nothing else. Is that correct so far?

So to fix this, I need to turn off ES as a data source and instead add my roms as a collection, which means creating a collection file. I initially thought that there should be two files, "collections.pegasus.txt" (as mentioned in the Settings pane) and "metadata.pegasus.txt" (as described in the docs) but after a lot of bumbling I think the intent is for a single file with either name, containing both collections and metadata. Anyway that's what seems to work.

I'm still having three problems though:

The major issue is that I don't know how to launch games. Your example shows how to do it in Android, but I can't figure it out for Raspbian. I tried using the script that EmulationStation uses in es_systems.cfg. So my collection looks like this:

collection: NES
extensions: nes,zip
launch: /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ nes {file.path}

But no, it fails silently back to Pegasus. What's the preferred launch command? Or alternately, what launch command does it use when using ES as a data source?

The second, minor issue is that automatic asset search doesn't seem to work for roms that are in subfolders. So for example I have my roms in ~/RetroPie/roms/nes, along with metadata.pegasus.txt and a media folder with individual subfolders for each game. So far so good. But inside of /nes/ I have a subfolder called "favorites", with a handful of roms. These get found and displayed by Pegasus, but it won't find their assets either in /nes/media/ with all the others or in /nes/favorites/media/. Where should I put assets for roms in subfolders?

Finally a small third issue: the left pane in the default theme doesn't show the developer/publisher and summary/description text. It shows the logo art at the top and a screenshot at the bottom, but no text in between. The metadata includes developer, publisher, summary, and description. Is there anything else I need to do to make that text appear?

If you prefer that I split these into three separate issues let me know. Thanks for your help!

mmatyas commented 5 years ago

So if I understand correctly, Pegasus out of the box is set to look for EmulationStation's gamelist.xml and images, so that's how it was seeing my games without having to set up any collections.pegasus.txt files or pointing Pegasus at them in Settings. And although it can use EmulationStation's xml, it only supports an older version that doesn't include multiple image types, so that's why it was displaying screenshots (which were listed as the single image asset that ES 1 supported) and nothing else. Is that correct so far?

Yes, Pegasus support the original ES2 and the main RetroPie fork, these only support the <image>, <video> and <marquee> tags.

So to fix this, I need to turn off ES as a data source and instead add my roms as a collection, which means creating a collection file. I initially thought that there should be two files, "collections.pegasus.txt" (as mentioned in the Settings pane) and "metadata.pegasus.txt" (as described in the docs) but after a lot of bumbling I think the intent is for a single file with either name, containing both collections and metadata. Anyway that's what seems to work.

Yeah the text on the Settings screen was not updated, this is fixed now. There's now only one metadata file, containing both game data and collections. Both "metadata" and "collections" is accepted as its name.

But no, it fails silently back to Pegasus. What's the preferred launch command? Or alternately, what launch command does it use when using ES as a data source?

There was a bug with the launching a few days ago, this should be fixed now. If there are still problems, you can check the log under ~/.config/pegasus-frontend/lastrun.log which should tell more details.

The second, minor issue is that automatic asset search doesn't seem to work for roms that are in subfolders.

All the assets should be placed under [metafiledir]/media/, and the directory structure there should be the same as in the metadata file's directory, plus the game or file's name. For example:

├─ metadata.txt
├─ mygame.ext
├─ subdir/
│  └─ subgame.ext
└─ media/
   ├─ mygame/
   │  └─ boxfront.png
   └─ subdir/
      └─ subgame/
         └─ boxfront.png

Finally a small third issue: the left pane in the default theme doesn't show the developer/publisher and summary/description text. It shows the logo art at the top and a screenshot at the bottom, but no text in between. The metadata includes developer, publisher, summary, and description. Is there anything else I need to do to make that text appear?

Hm perhaps the file entries in the metadata file don't match to the games? Take a look into the log whether you see anything suspicious there. If you post the metadata file I can also take a look on it.

spoogemcfuck commented 5 years ago

Thanks for all your help! I updated to the latest version and it did indeed fix the launching issue. Great!

But I'm still having trouble with automatic asset search. Here's what my directory structure looks like:

Screen Shot 2019-03-20 at 1 51 13 AM

And here's the "collections" section of metadata.pegasus.txt:

collection: Tank
extensions: nes,zip
directories: /home/pi/RetroPie/roms/nes/Tank
launch: /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ nes {file.path}

collection: Spy
extensions: nes,zip
directories: /home/pi/RetroPie/roms/nes/Spy
launch: /opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ nes {file.path}

It's finding the games and matching up the metadata fine, but it's not finding the images. When I flatten it out and put media and the games and the metadata file all in the same directory it works, so I know there's nothing wrong with the image files.

I put the metadata file in a separate folder (as shown) because when it's in the root folder it automatically adds the contents of every subdirectory to every collection. There doesn't seem to be a way to tell it not to do this, so keeping the metadata in a foreign directory seems to be the only way to use the directories field.

So: my media folder is in the same directory as the metadata file, and has a structure that matches that of the folders with the games. I think I'm following your instructions, but it's not finding my images. Am I doing something wrong?

mmatyas commented 5 years ago

Yes, the automatic asset searching works for only the games that are in the same directory as the media directory. It can't be done automatically from somewhere else because there might be cases where two games have the same name but are in different directories. However, there can be more than one media directory, in each of your subdirectories (eg. Spy/media/Golgo 13 .../boxfront.png). I haven't tested this too much though but it should work. Alternatively in the worst case you could also define the assets for each game manually, but that's a bit tedious of course.

spoogemcfuck commented 5 years ago

Thanks again for replying. Sorry to take up so much of your time with this.

So just to verify that I understand correctly, if I have my directories laid out like this:

Screen Shot 2019-03-22 at 3 24 55 AM

it should work with the "collections" entries I listed previously? I tested it just now and unfortunately it is definitely not finding those images. Is this a bug or do I still have something wrong?

If it's a bug I guess for now I'll just go the tedious route and define assets for every game.

If you're open to adding features, an "ignore-directory" field would solve this problem neatly. I could put the metadata file in the root of my NES folder and set up collections for each subfolder, telling them to ignore the root so they don't vacuum up everything.

Thanks for all your help!

mmatyas commented 5 years ago

If it's not working with this setup, I'll consider it as a bug (this kind of structure wasn't really well tested). Will try to fix it soon! The ignore-directory could be added too, or maybe as some extension to ignore-files.

mmatyas commented 5 years ago

Ok, this should be now fixed, and the directory setup of the image above should work (but feel free to report if you still run into troubles).

spoogemcfuck commented 5 years ago

Works great now. Thank you!