launching image per game if using the same port
-
Hi guys/gals, I want to ask for your kindly help, you'll see, I have several ID/Raven Software games configured in "Ports", and I use the same "Port" to launch them ("doom" port), and the question, is there a way to show an independent "splashscreen" (or launching image, I don't know the right name) when I launch each game? I want a doom 1 image when I launch doom 1, an Heretic picture when I launch that game, etc, etc.
I tried to make an "images" folder ("/home/pi/RetroPie/roms/ports/images") put inside a .png image and rename it with the name of the .sh file I used to launch a game and a "-launching.png" after the name, like "heretic-launching.png" (the .sh file that I use to launch heretic is "heretic.sh" all lowercase) with no avail.
The only way I can show an independent launching images per game is, for example, cloning the doom port "/opt/retropie/configs/ports/doom" renaming the new folder to "heretic", paste a launching image inside that folder with the name "launching.png", then I go to "/home/pi/RetroPie/roms/ports/" and modify the file "heretic.sh" to use the port named "heretic", but I have to do that with every single game that could use the "doom" port in order to obtain an idependent image per game, a pain in the a**, because that port is used for a lot of games and MODs, for example:
Blasphemer
Chex Quest
Chex Quest 2
Chex Quest 3
Doom - Final Doom The Plutonia Experiment
Doom - Final Doom TNT Evilution
Doom - The Lost Episodes of Doom
Doom - The Ultimate Doom
Doom 64 - Brutal Doom 64
Doom 64 - Retribution
Doom II - Action Doom II - Urban Brawl Reloaded
Doom II - Brutal Doom
Doom II - Hell on Earth
Doom II - Hell to Pay
Doom II - Master Levels for Doom II
Doom II - No Rest for the Living
Doom II - Perdition's Gate
Hacx
Harmony
heretic.sh
Hexen - Beyond Heretic
Hexen - Deathkings of the Dark Citadel
StrifeAby help would be appreciate, thank you in advance.
-
ln -sf "/home/pi/.emulationstation/downloaded_media/ports/screenshots/$(basename ${0%.*}).png" /opt/retropie/configs/ports/doom/launching.png
Here is what I did for this situation. I added an additional line in my scripts, before the runcommand, that looks for an image in the downloaded media folder with the same basename as the script itself, and sym-links it to the launching image in the configs dir.
This is for Skyscraper, with images stored separate from the roms. If you use the built-in scraper in EmulationStation, your first image path will be slightly different. I think it is
/home/pi/.emulationstation/downloaded_images/ports/$(basename ${0%.*})-img.png
. If you keep the images in your rom folder, just point to wherever they are.Make sure none of them are jpegs (or that all of them are.)
This is for doom games. Change the second image path (the one that ends in ".../doom/launching.png") for each different ports-group that you use (one for doom, one for duke3d, one for quake, etc.). I put a line like this in all of my shared-engine port scripts and it works like a charm.
Example for
doom-ultimate.sh
:#!/bin/bash ln -sf "/home/pi/.emulationstation/downloaded_media/ports/screenshots/$(basename ${0%.*}).png" /opt/retropie/configs/ports/doom/launching.png "/opt/retropie/supplementary/runcommand/runcommand.sh" 0 _PORT_ "doom" "/home/pi/RetroPie/roms/ports/doom/ultimate/DOOM.WAD"
Example for
quake-dopa.sh
:#!/bin/bash ln -sf "/home/pi/.emulationstation/downloaded_media/ports/screenshots/$(basename ${0%.*}).png" /opt/retropie/configs/ports/quake/launching.png "/opt/retropie/supplementary/runcommand/runcommand.sh" 0 _PORT_ "quake" "/home/pi/RetroPie/roms/ports/quake/dopa/pak0.pak"
Edit: example for
duke-vacation.sh
(this one contains another little trick to make your life easier):#! /bin/bash ln -sf "/home/pi/.emulationstation/downloaded_media/ports/screenshots/$(basename ${0%.*}).png" /opt/retropie/configs/ports/duke3d/launching.png ln -snf /opt/retropie/configs/ports/duke3d/vacation /home/pi/.config/eduke32 "/opt/retropie/supplementary/runcommand/runcommand.sh" 0 _PORT_ "duke3d" "-j /home/pi/RetroPie/roms/ports/duke3d -g vacation/vacation.grp -x vacation/game.con -j /home/pi/RetroPie/roms/ports/duke3d/vacation" ln -snf /opt/retropie/configs/ports/duke3d /home/pi/.config/eduke32
-
@sleve_mcdichael That solution sounds very, very clever, thank you man, I'll do that !!
-
@sleve_mcdichael Works very well, hey, do you have any trick to allow spaces in the .sh filenames?
-
@NIGHTKILLER05 spaces in filenames is dirty practice but if you must, just quote the filename or escape the spaces
'this is a file.txt' so\ is\ this\ one.doc "double quotes work too.cfg"
-
@sleve_mcdichael You are right, but I like how look those filenames, thank you for the help my friend.
-
@sleve_mcdichael Would it be something like this?
ln -sf "/home/pi/.emulationstation/downloaded_media/ports/screenshots/$('basename' ${0%.*}).png" /opt/retropie/configs/ports/doom/launching.png ? I put the quotes in "basename" variable (sorry if this is something very basic to you).
-
@NIGHTKILLER05 I'm not at my device right now to test it but I think quoting the actual
"${0%.*}"
should do it. You'll need to use "double-quotes", since 'single-quotes' prevent ${variable_expansion}. Since it's inside the (parentheses), I think it's okay to have the quotes inside the other quotes and you shouldn't have to \"escape them\". Try:ln -sf "/home/pi/.emulationstation/downloaded_media/ports/screenshots/$(basename "${0%.*}").png" /opt/retropie/configs/ports/doom/launching.png
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.