Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

PyNXBot Switch: Difference between revisions

From GameBrew
(Created page with "{{Infobox Switch Homebrews |title=PyNXBot |image=pynxbotswitch.png |description=Python Lib for Pokemon Sword and Shield, including many bots! |author=wwwwwwzx |lastupdated=2022/03/18 |type=Hack Utilities |version=2022 |license=GPL-3.0 |download=https://github.com/wwwwwwzx/PyNXBot |website=https://github.com/wwwwwwzx/PyNXBot |source=https://github.com/wwwwwwzx/PyNXBot |donation= }} {{#seo: |title=Switch Rom Hacks (Hack Utilities) - GameBrew |title_mode=append |image=pynxb...")
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Infobox Switch Homebrews
{{Infobox Switch Homebrews
|title=PyNXBot
|title=PyNXBot
|image=pynxbotswitch.png
|image=pynxbot.png
|description=Python Lib for Pokemon Sword and Shield, including many bots!
|description=Python library for Pokemon Sword and Shield, including many bots.
|author=wwwwwwzx
|author=wwwwwwzx
|lastupdated=2022/03/18
|lastupdated=2022/03/18
Line 13: Line 13:
|donation=
|donation=
}}
}}
{{#seo:
PyNXBot is a Python library for Pokemon Sword and Shield that offers multiple bots.  
|title=Switch Rom Hacks (Hack Utilities) - GameBrew
 
|title_mode=append
'''Note:''' The author is not responsible if your Switch get damaged or banned. Use at your own risk.
|image=pynxbotswitch.png
|image_alt=PyNXBot
}}
PyNXBot is a Python library for Pokemon Sword and Shield that offers multiple bots. However, please note that using it carries a risk of damaging or banning your Switch. Therefore, you should use it at your own risk, and I will not be held responsible for any such occurrences.


== Features ==
== Features ==
=== SwSh: ===
* SwSh:
* Check Dens info
** Check Dens info.
* Check Wilds info
** Check Wilds info.
* Check Party Pokémon info
** Check Party Pokémon info.
* Check Box Pokémon info
** Check Box Pokémon info.
* Check Save info
** Check Save info
 
* Bots:
== Bots ==
** RaidFinder - Useful to softreset Den Seed (Event Raids, Rare Beam Raids, perfect IVs, Shininess at low frames, etc).
=== SwSh: ===
** StarsFinder - Useful to softreset Den Species + Stars.
* RaidFinder - useful to softreset Den Seed (Event Raids, Rare Beam Raids, perfect IVs, Shininess at low frames, etc.)
** BerryPicker - Useful to farm berries/apricorns from trees.
* StarsFinder - useful to softreset Den Species + Stars
** ASpammer - Useful to spam A button during boring dialogues, can be used also to farm Items in Cram-o-Matic machine.
* BerryPicker - useful to farm berries/apricorns from trees
** LegendaryFinder - useful to softreset Legendary (incoming).
* ASpammer - useful to spam A button during boring dialogues, can be used also to farm Items in Cram-o-Matic machine
* LegendaryFinder - useful to softreset Legendary (incoming...)


== Requirements ==
==User guide==
=== Requirements ===
* [https://www.python.org/downloads/ Python]
* [https://www.python.org/downloads/ Python]
** Install z3-solver and pyserial via [https://pip.pypa.io/en/stable/ pip] if <code>ImportError</code> happens. <code>pip install z3-solver</code> <code>pip install pyserial</code>
** Install z3-solver and pyserial via [https://pip.pypa.io/en/stable/ pip] if <code>ImportError</code> happens. <code>pip install z3-solver</code> <code>pip install pyserial</code>
* CFW
* CFW
* Internet Connection
* Internet Connection
* [https://github.com/olliz0r/sys-botbase sys-botbase]
* [[Sys-botbase Switch|sys-botbase]]
* [https://github.com/spacemeowx2/ldn_mitm ldn_mitm] (SwSh only)
* [[Ldn mitm Switch|ldn_mitm]] (SwSh only)
* [https://github.com/3096/luxray Luxray] (only for some bots, SwSh only)
* [[Luxray Switch|Luxray]] (only for some bots, SwSh only)


== Usage ==
=== How to use ===
Use [[CaptureSight Switch]]/CheckDen script to check your Den id
Use [[CaptureSight Switch|CaptureSight]]/CheckDen script to check your Den id.


=== Raid Finder: ===
====Raid Finder====
# Connect your Switch to Internet
# Connect your Switch to Internet.
# Start sys-botbase and ldn_mitm
# Start sys-botbase and ldn_mitm.
# Go to System Settings, check your Switch IP and write it inside the &quot;config.json&quot; file
# Go to System Settings, check your Switch IP and write it inside the &quot;config.json&quot; file.
# Start the game and set game text speed to normal
# Start the game and set game text speed to normal.
# Save in front of an empty Den and leave the game opened. You must have at least one Wishing Piece in your bag
# Save in front of an empty Den and leave the game opened. You must have at least one Wishing Piece in your bag.
# Modify research filters inside the script according to what is written below
# Modify research filters inside the script according to what is written below.
# Run the script
# Run the script.


* Util.STRINGS.natures[r.Nature] == 'Nature' (i.e. Util.STRINGS.natures[r.Nature] == 'Timid')
* Util.STRINGS.natures[r.Nature] == 'Nature' (i.e. Util.STRINGS.natures[r.Nature] == 'Timid')
Line 64: Line 59:
* Util.GenderSymbol[r.Gender] == '♂'/'♀'/'-'
* Util.GenderSymbol[r.Gender] == '♂'/'♀'/'-'


=== Stars Finder: ===
====Stars Finder====
# Connect your Switch to Internet
# Connect your Switch to Internet.
# Start sys-botbase, ldn_mitm and luxray (the yellow cursor of luxray has to be over &quot;+3&quot; button)
# Start sys-botbase, ldn_mitm and luxray (the yellow cursor of luxray has to be over &quot;+3&quot; button).
# Go to System Settings, check your Switch IP and write it inside &quot;config.json&quot; file
# Go to System Settings, check your Switch IP and write it inside &quot;config.json&quot; file.
# Start the game, save in front of an Den whose beam has been generated through a Wishing Piece and leave the game opened
# Start the game, save in front of an Den whose beam has been generated through a Wishing Piece and leave the game opened.
# Run the script
# Run the script.


=== Stationary Finder: ===
====Stationary Finder====
# Connect your Switch to Interet
# Connect your Switch to Interet.
# Start sys-botbase and ldn_mitm
# Start sys-botbase and ldn_mitm.
# Go to System Settings, check your Switch IP and write it inside the &quot;config.json&quot; file
# Go to System Settings, check your Switch IP and write it inside the &quot;config.json&quot; file.
# Save in front of a stationary and leave the game opened
# Save in front of a stationary and leave the game opened.
# Modify research filters inside the script according to what is written below
# Modify research filters inside the script according to what is written below.
# Run the script
# Run the script.


* pk8.getAbilityString() == 1/2/'H'
* pk8.getAbilityString() == 1/2/'H'
Line 85: Line 80:
* Util.GenderSymbol[pk8.gender()] == '♂'/'♀'/'-'
* Util.GenderSymbol[pk8.gender()] == '♂'/'♀'/'-'


=== GUI in Python: NXController ===
====GUI in Python (NXController)====
 
This is a port from C++, please check more details from [[NXController Switch|NXController my prior project]].
This is a port from C++, please check more details from [[NXController Switch|NXController my prior project]].


# Install the PyQt5 module via [https://pip.pypa.io/en/stable/ pip]: <code>pip install pyqt5</code>
# Install the PyQt5 module via [https://pip.pypa.io/en/stable/ pip]: <code>pip install pyqt5</code>.
# Connect your Switch to Internet or Arduino
# Connect your Switch to Internet or Arduino.
# Go to System Settings, check your Switch IP
# Go to System Settings, check your Switch IP.
# Run the script. The Qt Gui will pop up.
# Run the script. The Qt Gui will pop up.


You may change the button setting by editing the json file according to [https://doc.qt.io/qt-5/qt.html#Key-enum this website]. Please note that only decimal numbers are allowed in json.
You may change the button setting by editing the json file according to [https://doc.qt.io/qt-5/qt.html#Key-enum this website]. Please note that only decimal numbers are allowed in json.


== Features for fun ==
=== Additional features ===
Use the binaries and structures from your browsers (iOS, Android): [https://mybinder.org/v2/gh/wwwwwwzx/PyNXBot/master?urlpath=lab/tree/test.ipynb Binder]. You may have to expose your switch to the internet.
Use the binaries and structures from your browsers (iOS, Android): [https://mybinder.org/v2/gh/wwwwwwzx/PyNXBot/master?urlpath=lab/tree/test.ipynb Binder]. You may have to expose your Switch to the internet.
 
=== Notes ===
Sometimes button inputs of your joycons won't work. This because the fake controller isn't detached from your Switch.
 
So, everytime you want to stop the bot, always press CTRL+C and follow the instructions. The bot will detach the fake controller and buttons will work correctly.


== Always Remember! ==
==Screenshots==
Sometimes button inputs of your joycons won't work. This because the fake controller isn't detached from your Switch. So, everytime you want to stop the bot, always press CTRL+C and follow the instructions. The bot will detach the fake controller and buttons will work correctly.
https://dlhb.gamebrew.org/switchhomebrews/pynxbot.png


== Credits: ==
== Credits ==
* olliz0r for his great [https://github.com/olliz0r/sys-botbase sys-botbase] which allows us open sockets on the Nintendo Switch
* olliz0r for his great [https://github.com/olliz0r/sys-botbase sys-botbase] which allows us open sockets on the Nintendo Switch.
* spacemeowx2 for his livesafer sys-module [https://github.com/spacemeowx2/ldn_mitm ldn_mitm]. It avoids Switch to disconnect from wifi once SwSh game is opened
* spacemeowx2 for his livesafer sys-module [https://github.com/spacemeowx2/ldn_mitm ldn_mitm]. It avoids Switch to disconnect from wifi once SwSh game is opened.
* 3096 for his great days advancer Switch tool [https://github.com/3096/ipswitch Luxray]
* 3096 for his great days advancer Switch tool [https://github.com/3096/ipswitch Luxray].
* Admiral-Fish for his great app [https://github.com/Admiral-Fish/RaidFinder RaidFinder] always up to date
* Admiral-Fish for his great app [https://github.com/Admiral-Fish/RaidFinder RaidFinder] always up to date.
* zaksabeast for his great Switch tool [https://github.com/zaksabeast/CaptureSight CaptureSight] (many addresses/checks are taken from there)
* zaksabeast for his great Switch tool [https://github.com/zaksabeast/CaptureSight CaptureSight] (many addresses/checks are taken from there).
* Leanny for his great plugin [https://github.com/Leanny/PKHeX_Raid_Plugin/tree/master/PKHeX_Raid_Plugin PKHeX_Raid_Plugin] (many addresses/checks are taken from there)
* Leanny for his great plugin [https://github.com/Leanny/PKHeX_Raid_Plugin/tree/master/PKHeX_Raid_Plugin PKHeX_Raid_Plugin] (many addresses/checks are taken from there).
* Kurt for his great app [https://github.com/kwsch/SysBot.NET SysBot.NET] (many addresses/checks are taken from there)
* Kurt for his great app [https://github.com/kwsch/SysBot.NET SysBot.NET] (many addresses/checks are taken from there).
* [https://github.com/Real96 Real96] for working on the various bots
* [https://github.com/Real96 Real96] for working on the various bots.


== External links ==
== External links ==
* Github - https://github.com/wwwwwwzx/PyNXBot
* GitHub - https://github.com/wwwwwwzx/PyNXBot

Latest revision as of 12:35, 22 Haziran 2023

PyNXBot
Pynxbot.png
General
Authorwwwwwwzx
TypeHack Utilities
Version2022
LicenseGPL-3.0
Last Updated2022/03/18
Links
Download
Website
Source

PyNXBot is a Python library for Pokemon Sword and Shield that offers multiple bots.

Note: The author is not responsible if your Switch get damaged or banned. Use at your own risk.

Features

  • SwSh:
    • Check Dens info.
    • Check Wilds info.
    • Check Party Pokémon info.
    • Check Box Pokémon info.
    • Check Save info
  • Bots:
    • RaidFinder - Useful to softreset Den Seed (Event Raids, Rare Beam Raids, perfect IVs, Shininess at low frames, etc).
    • StarsFinder - Useful to softreset Den Species + Stars.
    • BerryPicker - Useful to farm berries/apricorns from trees.
    • ASpammer - Useful to spam A button during boring dialogues, can be used also to farm Items in Cram-o-Matic machine.
    • LegendaryFinder - useful to softreset Legendary (incoming).

User guide

Requirements

  • Python
    • Install z3-solver and pyserial via pip if ImportError happens. pip install z3-solver pip install pyserial
  • CFW
  • Internet Connection
  • sys-botbase
  • ldn_mitm (SwSh only)
  • Luxray (only for some bots, SwSh only)

How to use

Use CaptureSight/CheckDen script to check your Den id.

Raid Finder

  1. Connect your Switch to Internet.
  2. Start sys-botbase and ldn_mitm.
  3. Go to System Settings, check your Switch IP and write it inside the "config.json" file.
  4. Start the game and set game text speed to normal.
  5. Save in front of an empty Den and leave the game opened. You must have at least one Wishing Piece in your bag.
  6. Modify research filters inside the script according to what is written below.
  7. Run the script.
  • Util.STRINGS.natures[r.Nature] == 'Nature' (i.e. Util.STRINGS.natures[r.Nature] == 'Timid')
  • r.Ability == 1/2/'H'
  • r.ShinyType == 'None'/'Star'/'Square' (!= 'None' for both Square/Star shiny type)
  • r.IVs == spread_name (spread_name = [x,x,x,x,x,x])
  • Util.GenderSymbol[r.Gender] == '♂'/'♀'/'-'

Stars Finder

  1. Connect your Switch to Internet.
  2. Start sys-botbase, ldn_mitm and luxray (the yellow cursor of luxray has to be over "+3" button).
  3. Go to System Settings, check your Switch IP and write it inside "config.json" file.
  4. Start the game, save in front of an Den whose beam has been generated through a Wishing Piece and leave the game opened.
  5. Run the script.

Stationary Finder

  1. Connect your Switch to Interet.
  2. Start sys-botbase and ldn_mitm.
  3. Go to System Settings, check your Switch IP and write it inside the "config.json" file.
  4. Save in front of a stationary and leave the game opened.
  5. Modify research filters inside the script according to what is written below.
  6. Run the script.
  • pk8.getAbilityString() == 1/2/'H'
  • Util.STRINGS.natures[pk8.nature()] == 'Nature'
  • pk8.shinyString() == 'None'/'Star'/'Square' (!= 'None' for both star/square)
  • pk8.IVs == spread_name (spread_name = [x,x,x,x,x,x])
  • Util.GenderSymbol[pk8.gender()] == '♂'/'♀'/'-'

GUI in Python (NXController)

This is a port from C++, please check more details from NXController my prior project.

  1. Install the PyQt5 module via pip: pip install pyqt5.
  2. Connect your Switch to Internet or Arduino.
  3. Go to System Settings, check your Switch IP.
  4. Run the script. The Qt Gui will pop up.

You may change the button setting by editing the json file according to this website. Please note that only decimal numbers are allowed in json.

Additional features

Use the binaries and structures from your browsers (iOS, Android): Binder. You may have to expose your Switch to the internet.

Notes

Sometimes button inputs of your joycons won't work. This because the fake controller isn't detached from your Switch.

So, everytime you want to stop the bot, always press CTRL+C and follow the instructions. The bot will detach the fake controller and buttons will work correctly.

Screenshots

pynxbot.png

Credits

  • olliz0r for his great sys-botbase which allows us open sockets on the Nintendo Switch.
  • spacemeowx2 for his livesafer sys-module ldn_mitm. It avoids Switch to disconnect from wifi once SwSh game is opened.
  • 3096 for his great days advancer Switch tool Luxray.
  • Admiral-Fish for his great app RaidFinder always up to date.
  • zaksabeast for his great Switch tool CaptureSight (many addresses/checks are taken from there).
  • Leanny for his great plugin PKHeX_Raid_Plugin (many addresses/checks are taken from there).
  • Kurt for his great app SysBot.NET (many addresses/checks are taken from there).
  • Real96 for working on the various bots.

External links

Advertising: