Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin Submission -- Change Swap Timers Live #52

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

SushiKishi
Copy link

A simple plugin that uses an external text file to allow players to change the swap timers on the fly. Use cases include donation incentives -- every $X dollars makes games swap Y seconds faster until end of stream, etc.

It doesn't access the configuration or other files directly, but the way that the changes are made to end up effecting the config.lua file in the end; the numbers entered for this plugin end up being the default settings when starting up a new session of the Shuffler. It loads the plugin's configuration file, executes the lines inside (config.min/max_swap = X), then unloads the file both at the start of a new/resumed Shuffler session and right before every game swap.

This might not be the right way to handle it in a plugin, especially if it's meant to be shared to others. It might make a better feature request, so that someone with more experience can add it in a way that couldn't eventually break things -- by allowing the user to add any kinds of code they want to the plugin config, for example. I did try to figure out how to open the file and just look for the numeric values, then assign, say, config.swap_min = <config.txt line 1>, but ran into local / function variable errors. Most of my coding experience is in PHP; I imagine it's easy enough to do, but I wasn't able to figure out how to do it correctly with that approach.

I'm new to GitHub, so I made a fork to upload the plugin to to make the request. But I never like how GitHub doesn't make it obvious, especially if you're new or just looking for the daggone download link, whether you're looking at a fork or the original. So I modified the readme file so it would change the text on the front of my fork -- and now it's submitted that file as well. I'll try to take it out of the request, but I'll be honest, GitHub just confuses me most of the time so if I can't figure it out just know that, obviously, that wasn't part of the request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant