This week’s task had me navigating a completely new scene. It wasn’t the easiest job in the world, but that’s exactly why I’m around!
A New Scene
The scene I was to work on this week was the ActorBout scene. This is the scene of the main battle segment of the game, where the player combats the various wild and wacky characters in grueling battles to the death. (Okay, that’s a bit of an exaggeration, but they are RPG fights.) Not only can battles be won through violence, but enemies can also be befriended through jokes if you raise their affinity enough. However, trying to entertain the enemies before you’ve raised their affinity will prove rather pointless, which brings me to my job: disable the entertain option until an enemy is susceptible to it.
Normally, I’d just jump straight into the programming upon receiving a task, but after the harrowing experience of bug hunting that happened a little while ago, I decided to approach with a bit more preparation. It was a new scene, after all; there were plenty of unfamiliar scripts and connections I needed to investigate. After prodding around the editor and getting some helpful pointers, I was able to devise an effective plan on how to implement the disabling.
First, I wrote a code that disables the entertainment option until a viable target appeared. Since the battle menu used Unity’s UI buttons, disabling and reenabling them in code was fairly easy. Finding viable targets was a bit trickier, due to the potential of multiple different enemies in battle preventing me from simply assigning a combatant directly. In the end, I opted to have the code compile all the game objects with the “enemy” tag it could find in the scene, retrieve the data from their “combatant” components, and then check to see if any reached high enough affinity. It’s not as elegant as I had hoped, but what mattered most was that it worked.
The next step was to call the disabling and checking function of the program at the start of the player’s turn. Initially, I attempted to have it called every frame update, but not only was that inefficient, but it also didn’t really work. This meant once again working with ORK Framework’s event system, but this time around I was much more prepared.
Of course, the program will need a bit more tweaking before it’s finished, but with everything in place, I expect relatively smooth sailing from here on out.
After I finish up this task, I have another task waiting for me on the horizon. I’m also open to doing art jobs, depending on what comes up. I might start another character sheet in the meantime, but that’s up to debate.
This Week’s Media: Mario Party Superstars
This game came out a while ago already, but I’ve only recently purchased it for myself. I wondered if the rumors of this friendship-ruining RNG-dependent competitive nightmare casserole were true. And after just one 15-turn game, I can say for certain that they are. This game is lots of fun for sure, but I think I’ll have to parse out my play sessions for the sake of maintaining healthy relationships with my friends.
Also, this game has online play. I am too scared to try online play and you should be scared too.