In Poly-Vinyl Pests! there are a lot of upgrades that can appear to players. The goal of this tool was to get the pick rate of each upgrade after each play session and get it into an organized graph for our team’s designers to look at and balance upgrades around the pick rate. I was able to accomplish this by tracking when an upgrade was seen and picked, saving data to a csv, and creating a python script that would combine all the data from all sessions that day and create a graph. Before creating this tool I talked with the designers on the upgrade side of our team to discuss what values we would need to track.
Before I talk about how I created this tool I’ll give a quick runthrough of how the upgrade selection sequence goes. First the player who won the last round will get to pick an upgrade. This player will see 3 upgrades and will be able to reroll all 3 to see new upgrades. After the first player has picked an upgrade the second player will get to see their upgrades. The player picking second will always see two upgrades. The second player can also reroll to see new upgrades, but they will only be able to see 2 new upgrades instead of 3.
To determine pick rate I would need to find out when the game showed an upgrade and when a player picked an upgrade. To find the pick rate we would need to get the picked times divided by the times the upgrade had been seen. To accomplish this I added code in the upgrade manager that tracked each time an upgrade was shown and picked. To do this I created a struct called “UpgradeData” that would store the information I needed for each upgrade. This struct only needs to do two things: increase the amount of times an upgrade has been seen and picked. This is what the struct looks like:
Now that I got CSV files with our data exporting I just needed to combine them and turn them into a graph. I decided to write a python script that would combine all CSV files into one large file and turn this one CSV file into the graph. After writing the script I turned it into an exe file and sent it to the designers on my team to use. To use the script you just needed a folder with all the CSV files and the exe. Next you just needed to run the exe and it would automatically create a new CSV file with all the data from the other files.
Finally with the combined CSV file we could bring these files to an online graph generator to get our final product. This is an example of what one of the QA testing session’s data looks like:
Developing this tool helped me work with file inputs and talking to designers about what they needed to balance values. Implementing this tool helped me and designers balance upgrade values and will continue to in the future. I plan to add more data tracking to this tool in the future if our game requires more focused balancing.