(switch-fightstick) Scripting inputs to automate games

Discussion in 'Switch - Exploits, Custom Firmwares & Soft Mods' started by Duo8, Feb 7, 2018.

  1. Duo8
    OP

    Duo8 I don't like video games

    Member
    8
    Jul 16, 2013
    I haven't seen a thread for this yet. There's a splatoon printer thread but that's just for one game.

    Anyway, as you know there are tools out there that lets you send inputs through USB to your Switch. This guy here modified the original switch-fightstick demo to accept inputs over a serial connection. This is very convenient because instead of having to program and pair the "controller" every time, you just run a script.


    Link: https://blog.feelmy.net/control-nintendo-switch-from-computer/

    I made this thread hoping that people will find this useful and share their scripts for games. There's a python example for Xenoblade 2 in the github repo. You can use any tool you want, it just needs to be able to communicate over a serial connection.
     
    Last edited by Duo8, Mar 17, 2018
  2. lordelan

    lordelan GBAtemp Addict

    Member
    8
    Jan 4, 2015
    Germany
    So what's that doing?
    Sending specific inputs to the Switch like "press UP for two seconds, then A three times, then DOWN two seconds"? So it makes the player a bot.
     
  3. Uumas

    Uumas GBAtemp Advanced Maniac

    Member
    6
    Sep 17, 2016
    Finland
    Yes
     
    lordelan likes this.
  4. SoslanVanWieren

    SoslanVanWieren Banned

    Banned
    4
    Feb 6, 2017
    Australia
    So some one could make mar/io for Mario odyssey. just plug the switch into a capture card and you can use a program to detect whats going on on screen.
     
  5. Ronhero

    Ronhero Too Weird to Live, Too Rare to Die

    Member
    9
    Jun 28, 2014
    United States
    Arizona Bay
    I'm sure this will be popular with speed runs
     
    Quantumcat likes this.
  6. SoslanVanWieren

    SoslanVanWieren Banned

    Banned
    4
    Feb 6, 2017
    Australia
    Tas bot
     
  7. StarGazerTom

    StarGazerTom GBAtemp Maniac

    Member
    8
    Feb 2, 2015
    Could be super handy for automating easily predicted farming methods aswell. Example being the Pot Dance Gem Bath farm in Shantae
     
  8. Uumas

    Uumas GBAtemp Advanced Maniac

    Member
    6
    Sep 17, 2016
    Finland
    It's already being used at least for BOTW snow bowling
     
    Quantumcat likes this.
  9. SoslanVanWieren

    SoslanVanWieren Banned

    Banned
    4
    Feb 6, 2017
    Australia
    Now its going to be easier to make shiny hunting bots for pokemon switch.
     
  10. Arkangelshadow

    Arkangelshadow Advanced Member

    Newcomer
    3
    Jun 6, 2013
    Mexico
    Bot vs PkHex, I don't know wich will provide players with a sense of pride and accomplishment for unlocking different Pokemon.
     
  11. StarGazerTom

    StarGazerTom GBAtemp Maniac

    Member
    8
    Feb 2, 2015
    Bot will be slower, but will make the pokemon 100% legit, literally no protection against it.

    Where as PKhex you have to make everything legit as possible, but its still debatable if its a legit mon or not.

    IMO, bot will be better, if we manage to make one that is
     
    Quantumcat likes this.
  12. Scarlet

    Scarlet Respect the Hero

    pip Reporter
    12
    GBAtemp Patron
    Scarlet is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    Jan 7, 2015
    United Kingdom
    Middleish North-Left
  13. Sasori

    Sasori GBAtemp Advanced Maniac

    Member
    8
    Jan 28, 2015
    United States
    Looks like this is an altered version of the BOTW snowball thrower

    https://github.com/bertrandom/snowball-thrower

    I was looking to make a tool for people to use to make more applications like this, unfortunately I haven't been able to make heads or tales of how the timing is determined for button presses.
     
  14. sup3rgh0st

    sup3rgh0st Top Tier Ghost

    Member
    4
    Apr 22, 2010
    United States
    Seeing an Odyssey TAS would be an entertaining watch. Unfortunately I'm pretty sure you need a way to interrupt V-Blanks, or some other way to sync with the frame rate. At least that's what TASBot does.
     
    Ronhero likes this.
  15. StarGazerTom

    StarGazerTom GBAtemp Maniac

    Member
    8
    Feb 2, 2015
    Don't believe you need to do that at all. You just wait until the system presses start at the beginning of teh game and done, it should stay synced, unless there are RNG elements for stuff like enemy positions, then you're kinda flumuxed.
     
  16. sup3rgh0st

    sup3rgh0st Top Tier Ghost

    Member
    4
    Apr 22, 2010
    United States
    That assumes that loading will be 100% consistent between every run, and there's no way that's the case. If you watch the early TASBot runs, desyncs were common, even on cartridge based NES games. Lag is unpredictable and will be different on every console. The Switch would be even more unpredictable if it throttles itself, or does routines behind the scenes.
     
  17. StarGazerTom

    StarGazerTom GBAtemp Maniac

    Member
    8
    Feb 2, 2015
    Hmmm.... I suppose I didn't take that into account, so admittedly, you may actually be fully right, in saying they need to use V-blank to keep in sync.
     
  18. Duo8
    OP

    Duo8 I don't like video games

    Member
    8
    Jul 16, 2013
    Yanda and Quantumcat like this.
  19. Yanda

    Yanda GBAtemp Regular

    Member
    2
    Aug 26, 2015
    Which is right?

    A.
    PC[script] creates [input] & sends it to MicroBoards.
    >MicroBoards sends [input] to Switch.
    >>Switch gets [input].

    B.
    PC sends [script] to MicroBoards.
    >MicroBoards[script] creates [input] & sends it to Switch.
    >>Switch gets [input].

    I already have Teensy 2.0++, can I do a similar thing with Teensy 2.0++?
     
  20. Duo8
    OP

    Duo8 I don't like video games

    Member
    8
    Jul 16, 2013
    A
    It has a different uC so check the splatoon printer repo for instructions.
     
    Yanda likes this.