-
Notifications
You must be signed in to change notification settings - Fork 0
How to change duration of spawning
Important
This tutorial is now archived because Ballsdex has made their own way to change the duration of spawning. If you want to ditch this method of changing the spawn duration in favor of the official method, simply update your bot using git pull and then make sure to rebuild using docker compose build.
After seeing it so many times, I decided to make a proper tutorial for changing spawn duration. Now you can send this to your friends or anyone else who is curious on how to do this!
Tip
You do not need to do both methods in order for this to work.
- Open your bot in File Explorer and go to
ballsdex/packages/countryballs
The directory that you are in now should look like this:
- Open the
spawn.pyfile in your text editor of choice.
At the very beginning of the file, you will see this:
SPAWN_CHANCE_RANGE = (40, 55)- Change the 2 numbers to zero, so that it will look like this:
SPAWN_CHANCE_RANGE = (0, 0)This will set the spawn duration to 10 minutes.
Tip
These 2 numbers are a counter, and once the counter hits 0 it will spawn a ball. SPAWN_CHANCE_RANGE determines the range that the counter can start at. 40 messages is the minimum while 55 messages is the maximum.
- Save your changes once you are done, and restart using
docker compose restart. Once your bot is back up, test your new spawn duration.
- Open your bot in File Explorer and go to
ballsdex/packages/countryballs
The directory that you are in now should look like this:
-
Open the
spawn.pyfile in your text editor of choice. -
Go to line 182, it should look like this:
# at this point, the goal is reached
if delta_t < 600:
# wait for at least 10 minutes before spawning
return False- Change 600 to the amount of seconds you want. For example, if you want the bot to spawn every 5 minutes, change it to 300.
Tip
If you are still unsure what to put here, I suggest you look up "X minutes to seconds" (replace X with the amount of minutes you would like) and put the amount of seconds that comes up. Otherwise, use this online minutes to seconds converter
- Save your changes once you are done, and restart using
docker compose restart. Once your bot is back up, test your new spawn duration.
If you have any errors, join the Ballsdex Developers server by clicking this blue text.