RetroPie forum home
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    1. Home
    2. Tags
    3. scripting
    Log in to post
    • All categories
    • nohitter151

      Tell another device what game is playing
      Help and Support • retropie 4.7.1 emulationstaton scripting addons • • nohitter151

      3
      0
      Votes
      3
      Posts
      109
      Views

      Lolonois

      @nohitter151 There is also a different way. ES has script callouts for some events: https://retropie.org.uk/docs/EmulationStation/#scripting

      Put your scripts in your favorite language in the respective folder. Make them executable (chmod a+x <script>) and you should be ready to go. With the values of %rom_path% %rom_name% (first and second parameter inputted to your script you can locate the respective entry in the gamelist.xml which leads you to the artwork.

      PS: Welcome to this forum :)

    • teethree89

      Quitting a game via command line / ssh
      Help and Support • scripting ssh • • teethree89

      9
      0
      Votes
      9
      Posts
      134
      Views

      teethree89

      @mitu ah perfect that worked too, thank you very much!

    • ExarKunIv

      testing custom script
      Help and Support • scripting script testing • • ExarKunIv

      5
      0
      Votes
      5
      Posts
      248
      Views

      ExarKunIv

      @mitu i dont think its a dependency. it is something that the guys who made OpenMW, built to help with the running the game

      this is what quicksliver said about in on the forum page about installing OpenMW

      Also a couple notes about running OpenMW on the raspberry pi. You cant use open scene graph from the apt repository, it has to be manually compiled against OpenGL NOT OpenGL ES otherwise the game will not run. OpenMW devs recommend using their fork of OSG for better performance though that is not strictly necessary (I used their fork and it works great https://github.com/OpenMW/osg). The following cmake arguments can be used to prevent building unneeded OSG plugins and prevent bloat

    • Ashpool

      Project VPC (some personal python scripts)
      Projects and Themes • filtering mamedat scripting viewport • • Ashpool

      4
      0
      Votes
      4
      Posts
      472
      Views

      Ashpool

      @Rion Thanks for the Feedback...
      But as this was a rushed release, because of me trying to be helpfull, it has taken me a while to come up with the next step...

      The VPCalc script itself was ready in the time I opened this topic, but me and readmes are only friends in context of me reading them, not writing such.... (and then, in (CP)2020 CP2077 came to be)... well, as life is passing by, instead of having the filter scripted and at least in beta stage by now, I may have that one ready in 202101/02 ... here we are with the viewport calculator: Project VPC: VPCalc at least. ...

      As I had to use used some markdown/html patchwork to create the readme which is, so far and for now, working on git, but unusable here.... I am only providing the link for now...

      Edit: And a look at the UI:
      VPCalc-UI

      Besides me living in Night City at the moment, the UI for the filtering App/Script is in its alpha and ready to be populated/used by/with further scripting.... sneak preview:

      VPC_DatFilter.png

    • ecto

      Web file server for game manuals (scummvm, dosbox, ...)
      Ideas and Development • manuals ms-dos scripting scummvm web server • • ecto

      6
      1
      Votes
      6
      Posts
      421
      Views

      Folly

      @ecto said in Web file server for game manuals (scummvm, dosbox, ...):

      Yes that's right! :D So far, when I select a pdf manual, it will be downloaded to the pad/phone for reading while I play. This way I can chack for copy protections and/or clues while I play a game on the Retropie.

      At first I was thinking that you could read the manual before you were going to play. but this is indeed better.

      Have you read my thread on translation ?
      https://retropie.org.uk/forum/topic/28461/translate-games-on-the-fly
      While thinkering with this I also discovered this :
      https://retropie.org.uk/forum/topic/28345/old-computer-appreciation-thread/420

      Perhaps an idea for you to tinker with.
      In theory you could match the sum of a screenshot, with extra information. and output it back in speech or as an overlay in the game.

    • sghedlund

      scripting question
      Help and Support • stretch scripting raspbian sh files • • sghedlund

      2
      0
      Votes
      2
      Posts
      87
      Views

      mitu

      Post your script.

    • red37

      Help with .sh scripts and global variables
      Help and Support • variable scripting help me please • • red37

      3
      0
      Votes
      3
      Posts
      96
      Views

      red37

      @mitu thank you for your reply, sorry i was distracted for a few days. I didnt figure out how to make variables work but i was able to make a txt file that i could read/write as a varriable so im good now.

    • WesleyBidsnipes

      I'd like the Retropie to power on our Xbox and switch to its OneGuide app
      Help and Support • python scripting xbox • • WesleyBidsnipes

      4
      0
      Votes
      4
      Posts
      157
      Views

      mitu

      @WesleyBidsnipes said in I'd like the Retropie to power on our Xbox and switch to its OneGuide app:

      @mitu It's been years since I've messed with udev... does that work with Bluetooth as well? We have one of the Playstation 3 wireless controllers, I think it's the Sixaxis.

      It should work.

    • theofficialgman

      Trouble using EmulationStation Scripting
      Help and Support • scripting • • theofficialgman

      1
      0
      Votes
      1
      Posts
      52
      Views

      No one has replied

    • BuZz

      Humble Book Bundle: Linux & UNIX by O'Reilly
      General Discussion and Gaming • linux books scripting • • BuZz

      1
      0
      Votes
      1
      Posts
      277
      Views

      No one has replied

    • wizhack

      RGB LED marquee
      Help and Support • scripting rgb led matrix runcommand emulationstaion • • wizhack

      9
      0
      Votes
      9
      Posts
      831
      Views

      alinke

      here's a couple projects I've done with an LED matrix marquee

      RetroPie based ==>https://www.instructables.com/id/Vertical-Bartop-Arcade-With-Integrated-PIXEL-LED-D/

      PC Based ==>https://www.instructables.com/id/Arcade-Machine-With-Changing-LED-Marquee/

      Here's a guide for setting up this LED marquee and RetroPie ==>http://ledpixelart.com/files/retropie/ .

      Runcommand onstart and onend is used here. When a new game is launched, a script runs which passes the rom name to the LED marquee software (http://pixelcade.org) which is then displayed on the panels. Both still image PNGs and GIF animations can be displayed by game.

      This project also includes artwork that has been manually re-mastered for 128x32 for that classic 8-bit look. Disclaimer, I'm the creator for this project and sell these as kits.

      alt text
      alt text
      alt text
      alt text
      alt text

    • Azsorlex26

      Setting up RetroPie without using the gui
      Help and Support • retropie setup scripting • • Azsorlex26

      6
      0
      Votes
      6
      Posts
      701
      Views

      mitu

      @azsorlex26 Each package exposes a standard set of commands to be executed - sources, build, install, remove, configure. Most packages have these options, there might be packages with special functions.
      Look at https://github.com/RetroPie/RetroPie-Setup/blob/master/scriptmodules/packages.sh#L55 and https://github.com/RetroPie/RetroPie-Setup/blob/bfaedb92cb86335b7fec34d23fb39890455ae05f/scriptmodules/packages.sh#L162 to see how the retropie_packages.sh script works.

    • Azsorlex26

      Trouble with setting up RetroPie in a custom script
      Help and Support • retropie setup scripting raspberrypi 3b • • Azsorlex26

      8
      0
      Votes
      8
      Posts
      546
      Views

      A Former User

      @jonnykesh I apologize. I was in a hurry and it kept telling me I needed someone else to

    • FlashPC

      Scripting help for replacing retroarch.cfg
      Help and Support • copy config file scripting automated overlays • • FlashPC

      49
      0
      Votes
      49
      Posts
      6154
      Views

      meleu

      @flashpc yeah, it's great. I took advantage of this feature in my rpie-art tool (link on my signature).

      Cheers!

    • coderkevin

      How to run games programmatically?
      Help and Support • runcommand scripting programming command line daemon • • coderkevin

      4
      0
      Votes
      4
      Posts
      1195
      Views

      coderkevin

      Okay folks, I've written up a script to handle this exactly the way I described before.

      It runs from the autostart.sh and watches /dev/shm/screen_manager.cfg for updates.
      That way any other system process can create/modify that file and this script will respond by either starting the rom, or starting the dashboard.

      Cheers!

      https://github.com/coderkevin/mini-nes/tree/master/screen

    • Zigurana

      Idea for experimental: Install Arbitrary ES-branch
      Ideas and Development • scriptmodule github scripting retropie-setup • • Zigurana

      75
      6
      Votes
      75
      Posts
      14098
      Views

      TMNTturtlguy

      @meleu you are the best! I will test when I return from my trip!

    • waltisfrozen

      Specifying emulator for arcade roms via command line?
      Help and Support • runcommand scripting mame command line config file • • waltisfrozen

      4
      0
      Votes
      4
      Posts
      2022
      Views

      BuZz

      @waltisfrozen This was already changed - if you update to the latest retropie-setup it no longer uses md5 hashes by default, but just includes system and rom name minus extension /path (excluding all characters except a-z A-Z 0-9 _ - in the format system_romname

      for per emulator settings, the format is emulator_romname

    • iCLint

      Convert batch file to a linux script
      Help and Support • scripting • • iCLint

      3
      0
      Votes
      3
      Posts
      1172
      Views

      iCLint

      Answering my own question. I will start a new thread with full usage

      #!/bin/bash # Script use $ sudo ./makexml.sh [RomDirectoryName] [-n optional] # -n does not right name to <name> tag useful for MAME roms as ES will autofill correct name # Store arguments arg1=$1 arg2=$2 output="gamelist.xml" # Change deliminator for $IFS # Allows script to work with names with white space SAVEIFS=$IFS IFS=$(echo -en "\n\b") # print scripts current status printf "Scanning dir: "$arg1"...\n" # Creates output XML file (gamelist.xml) printf "<?xml version=\"1.0\"?>\n\n" > ./$arg1/$output printf "<gameList>\n" >> ./$arg1/$output # Scans directory given by first argument for file in ./$arg1/* do # Just some manipulatiuon of data returned by $file filename=$(echo $file | cut -f 3 -d '/') name=$(echo $filename | cut -f 1 -d '.') # Checking for existance of correctly named image in ./images dir. [[ -f ./$arg1/images/$name.png ]] && theImage=./images/$name.png || theImage="" # Start writing to gamelist.xml printf "\n" >> ./$arg1/$output printf "\t<game>\n" >> ./$arg1/$output printf "\t\t<path>./"$filename"</path>\n" >> ./$arg1/$output # Checking whether the -n argument was used if [ $arg2 = "-n" ]; then name="" fi # Continuing writing to gamelist.xml printf "\t\t<name>"$name"</name>\n" >> ./$arg1/$output printf "\t\t<desc></desc>\n" >> ./$arg1/$output printf "\t\t<image>"$theImage"</image>\n" >> ./$arg1/$output printf "\t\t<rating></rating>\n" >> ./$arg1/$output printf "\t\t<releasedate></releasedate>\n" >> ./$arg1/$output printf "\t\t<developer></developer>\n" >> ./$arg1/$output printf "\t\t<publisher></publisher>\n" >> ./$arg1/$output printf "\t\t<genre></genre>\n" >> ./$arg1/$output printf "\t\t<players></players>\n" >> ./$arg1/$output printf "\t</game>\n" >> ./$arg1/$output # Print scripts current status printf $filename clear printf "Scanning dir: "$arg1"...\n" done # Closing gamelist.xml file printf "</gameList>" >> ./$arg1/$output # print scripts current status clear printf "Finished\n"
    • AmigaGamer

      Calling a specific function in a script (question)
      Ideas and Development • scripting development testing • • AmigaGamer

      3
      0
      Votes
      3
      Posts
      998
      Views

      AmigaGamer

      Thanks herb!

      Just read also in another thread about calling retropie_packages.sh with no options for a list of scripts/commands, very useful

    • obsidianspider

      [SOLVED] Variables with runcommand-onstart.sh
      Help and Support • runcommand scripting bash • • obsidianspider

      25
      0
      Votes
      25
      Posts
      11112
      Views

      Finch106

      This is a very old topic, but I wanted to throw my script in so you can edit it to your liking. I don't have an Adafruit display, so I had to do some tinkering but you've all done the heavy lifting. Here are the minor edits for using a 3.5" display with fbi. Make sure you have the system.jpg images in the correct system rom folders.:

      # /opt/retropie/configs/all/runcommand-onstart.sh # get the full path filename of the ROM rom=$3 # rom_bn receives $rom excluding everything from the first char to the last slash '/' rom_bn="${rom##*/}" # rom_bn receives $rom_bn excluding everything from the last char to the first dot '.' rom_bn="${rom_bn%.*}" # get the system name system=$1 # set the image file to the first result matching the ROM name - accounts for various possible file extensions img="$(find "/opt/retropie/configs/all/emulationstation/downloaded_images/${system}" -type f -name "${rom_bn}-image.*" | head -1)" # check to see if there was a file found (length of the file name not zero), if not, use an image based on system if [[ -z "${img}" ]]; then img="/opt/retropie/configs/all/emulationstation/downloaded_images/$system/$system.jpg" fi # run the python script to display the image sudo fbi -T 2 -d /dev/fb1 -noverbose -a "$img"