Jump to content

Skylords Ultimate Battle Simulator (SUBS)


Metagross31

Recommended Posts

Is it a bird? Is it a plane?
No! It's a worm! And he has a new little tool for you!

 

Hello Everyone,
today I want to present you a little tool I have been working on recently, which some of you might find useful.
I call it the "Skylords Ultimate Battle Simulator", or SUBS for short. It is a small tool that let's you simulate power levels of two players in a game of Skylords.

What does that mean?
It means that SUBS can track power pool, void pool, number of power wells and value of the standing army for two players and enables you to interact with those numbers! This allows you to, for example, simulate PvP fights with multiple units and spells played, wells built and kicked and then later check, who is ahead in terms of power. Or you can use it to see how much power a player would have in a PvE scenario after playing some spells/units/buildings and might be helpful in planning power efficient speedrunning strategies.
But let's look at some screenshots:

702440916_Screenshotfrom2021-04-2315-22-06.thumb.png.8afafaf688ca16ecb34f82aba194c3c3.png

This is the main window of SUBS. On the very left you see the current power, void, well and army values for both players. Next to it you see the inflow of power every 2 second (the same numbers as you can see ingame). Between the numbers for the two players is a button that says "Toggle powerflow". This button starts/pauses the flow of power from your wells/void to the power pool. When you start the program, it will be stopped by default. Let's see what happens, when we start it and wait for some time:

1525397006_Screenshotfrom2021-04-2315-27-09.png.a475076b001b4fa559ad54122f7baed7.png

As you might have expected, some of the power from the void has flown into the power pool. Additionally, some power from the wells has flown into the power pool as well. You can pause the flow by clicking the button again. This allows you to estimate the situation in further detail.

But let's continue with the exploration of the main window. Next to the current values, there are two buttons "Build Well" and "Kick Well". These buttons do what you expect from them - building a well takes away 100 power and adds a well, kicking one just takes away a well without giving any refund.

Then there is the "Spells" column. This, obviously, allows you to simulate the casting of spells. If you click on the "cast" button next to any of the power costs, that much power will be taken out of the power pool and 90% will be added to the void pool.

Lastly, there is the "Units and buildings" column. There you can spawn units and buildings with a certain value by clicking the respective "spawn" button. This takes power from the power pool and adds it to the value of your standing army. You can kill the unit by clicking the "kill" button. This will remove its cost from the standing army and add 90% of it to the void.

That's all there is right now in terms of functionality, but I plan to extend it a bit, at least so much, that you can play cards with other costs than the ones hard coded right now and that you can change the starting values without messing with the source code.

"That sounds cool! How can I use it?"
The program itself is written in Python3 using the tkinter library. So it should run on most operating systems without any problems, if you have python installed. You can find the source code of the program at my github page. Just download it from there, go to the src/ directory and run the file main.py in python.

https://github.com/Metagross31/SUBS

If you want to change the starting values of power etc., open the file config/default.txt in a text editor and change it from the values given to whatever value you like.

In the following video I show you how to use SUBS:

That's it for now, I hope you find this interesting. If so, I will definitely continue to work on it and keep you all updated. If you have any suggestions on what to add or how to implement it, feel free to ask them here!

 

Edited by Metagross31
Deadman and Loriens like this
Link to comment
Share on other sites

Nice tool, I know things like that take time and energy, so the following is feedback and not meant in any negative way at all:

  • Does the code run in a python environment natively or are there some dependencies? If so you might want to add a requirements.txt
  • Also people probably do not want to install python on their computer just to run the program. A solution for that would be to create a html file for the gui and do power calculation and other functionality in javascript. This way everyone could just open the html file in their browser. Or you host a webserver and people could load the website from there. A python backend can be done easily with FLASK.

However, this tool is an interesting toy, so keep up the good work  :)

Edited by cDKiLLr0y
Metagross31 and DieToPlay like this
Link to comment
Share on other sites

4 hours ago, cDKiLLr0y said:

Nice tool, I know things like that take time and energy, so the following is feedback and not meant in any negative way at all:

  • Does the code run in a python environment natively or are there some dependencies? If so you might want to add a requirements.txt
  • Also people probably do not want to install python on their computer just to run the program. A solution for that would be to create a html file for the gui and do power calculation and other functionality in javascript. This way everyone could just open the html file in their browser. Or you host a webserver and people could load the website from there. A python backend can be done easily with FLASK.

However, this tool is an interesting toy, so keep up the good work  :)

Thanks for the feedback! I will definetely add a requirements.txt, eventhough I think all you need (i.e. tkinter) is included in Python3 by default.

I have already thought, that installing python is an additional step, which not everybody might want to make, but sadly I don't know any Javascript, so I can't really make a web interface yet. But I might look into your idea of using FLASK to put a web interface in front of a python backend.
Another idea I had was trying to write it in C++, but I want to have it OS independent and cross compiling can be a pain, especially with GUIs.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use