Toribash Season 7
Original Post
[LUA] SelfPlay 2.1
Hello everyone, this is my first script made for toribash, if you have any feedback to share, let me know, i'm looking to improve my toribash scripts.

With this script you will be able to create singleplayer replays even quicker, since it automates the tasks of switching from one player to another after pressing spacebar, and goes to the next turn only when all characters are ready to continue to the next "round".

How does it work?
Load the script and play like you would normally do
When you press spacebar, the turnframes do not get applied untill ALL players finish the turn, once the final player finishes its turn, the turnframes get applied.



Download
The file attached to this post is the version 1.0, which was made only to support 2 players (works in toribash versions < 5.53, in other words, it doesn't support three, four or more players, only two)


Contribute and report bugs
The GitHub page for SelfPlay is the right place for contributing to the source code and reporting bugs, you can also give me feedback trough this page


Changelog


Selfplay v2.1
  • Added on_unload hook, no restart required anymore to unload the script.
  • Name of the player's turn is displayed on screen
  • Remaining turns are displayed on screen
  • Game progress is displayed on screen
  • Remaining rounds are displayed on screen


Selfplay v2.0
  • Removed ingame GUI temporarily.
  • Added multiple player support for the new 5.53 four player update.


Selfplay v1.0
  • Initial version, no changelog was made.

Attached Files
selfplay.lua (2.1 KB, 48 views)
Last edited by mega34; 2 Weeks Ago at 05:59 AM. Reason: Added new video
- Gann4Life -
BUMP

Script updated to v2.0
Changelog:
  • Added multiple player support. (For 3 or 4 players, if toribash ever decides to increase the player count for any weird reason, hopefully this will cover that)
  • Tweaked few functionality for making it more flexible and modular.
  • Removed ingame GUI temorarily
EDIT:
Script updated to v2.1
Changelog:
  • Added on_unload hook, no restart required anymore to unload the script.
  • Name of the player's turn is displayed on screen
  • Remaining turns are displayed on screen
  • Game progress is displayed on screen
  • Remaining rounds are displayed on screen
Last edited by mega34; Nov 16, 2021 at 09:07 AM.
- Gann4Life -