Tuesday, June 28, 2016

Guests have items!



It might not look like much, but let me explain this image:

This is a guest character imported from a different save file. She brought all her equipment with her. Important to note: Because of the planned crafting/enchanting system in this game, this is way more hard than it was in the original RPGMaker MV.

RPGMaker uses a design pattern called "Flyweights," meaning that items in RPGMaker are just pointers to a "prototype" item that represents all items of that class. For example, because all "shortswords" are identical, whenever anybody buys a shortsword, rather than creating anew shortsword and giving it to the player, it just gives the player a  pointer to the original swortsword.

This causes problems when you want to enchant things or otherwise edit how items work. If I don't actually have my own shortsword, but just a pointer to some "base" shortsword, then if I make my shortsword a fiery shortsword, all other shortswords in the world change to match.

To fix this problem, Yanfly wrote some code she called "independent items" that makes it so whenever you get a new item, it actually creates a new item that can be modified independently of the original. The problem is, in order to maintain compatibility with other RPGMaker plugins, she had to do it in sort of a hacky way. The new item is also a flyweight, and is stored with all the other flyweight classes in the same database!

This made it a real pain to copy equipment from one save to another. I couldn't just copy it, I needed to dig in the original save's database, copy it into the new database, and then re-align all the pointers to match up. It took way too long to do this; at this rate, the game isn't going to be done in time. I hope either I start solving these problems faster or the problems get smaller as I progress, or I'm going to have to cut some features to make the deadline.

But the good news is that you can now play with guests, and they keep their items when they arrive. This means I can test the dungeons in the conditions I intend: a party of 2-3 characters working together. That means I can balance the first dungeon or two and get the system out to my alpha testers before too much longer.

Thank goodness.

Thursday, June 23, 2016

Finally! Regime Changer

I have now created an external utility to create training regimes for Heroes Life.

It is ugly as sin because basically I hate Java Swing. Swing makes a lot of sense from a data structure standpoint, and it also (in theory) supports responsive design (meaning if you change the size of the window, the components resize or re-arrange themselves to fit the new window.)  In practice, though, it's hard to make anything look aesthetically pleasing. I greatly prefer visual basic's GUI editors.



This interface allows you to edit both training, repeatable, and epic tasks. It lets you load regimes and save regimes.

This was a pain to make, but it represents the first step in going from a program that my wife and I enjoy using to something that can be distributed to more people to enjoy as well.

I'm going to work a little more on trying to make this user friendly and take another pass at beautifying it.

EDIT: That's better. Now it looks somewhat respectable, and help text has been added as well.



Next step is to figure out how on earth to load this from RPGMaker. I mean, RPGMaker does file IO already, but only in a really weird way that emulates the way that a PS1 memory card used to work. Also, RPGMaker has no keyboard support. There's some UI stuff that'll need to be solved to get this to work...

Wednesday, June 15, 2016

A second party member, more control over help text.

Done. You can now recruit another save file's character into your game.



Sadly, right now, it only works for a single other protagonist. No parties of more than two right now. I need to think about the best way to handle party management. How will you remove party members? How will you "Update" party members if you want to use the most recent version of your friend's character? There are still some logistical challenges to solve.



Also, I ended up learning a lot about the CommandWindow source code and the debugging tools bundled with RPGMaker MV as I solved a different problem. It was important that you could not swap out the equipment on "guest" characters, because otherwise, you could recruit a friends character, take all his stuff, dismiss him, then have your friend "update" his save file (refreshing his stuff) and you could rob him again for essentially infinite items. To prevent this, I made it so you could not alter the equipment of guest characters. Problem is, it was hard for the player to realize this; there was just an annoying "Buzz" sound when they tried with no other feedback. To solve this, I dove into the code and figured out how to replace the "updateHelpWindow" function on the equip command window to give each command a sentence of help text. And if you are in the equip screen of a non-party member...



...It'll let you know in nice shiny text why precisely you get a buzzing sound every time you try to mess with the guest's equipment.

Tuesday, June 14, 2016

Recruiting other Saves!

Sorry for the week delay. My parents were in town for a week, so we took a "Stay at home vacation".

At any rate, Today's progress (and Mondays) was to work on the algorithm that lets you recruit the main characters from other save files.

I wanted the Gamification framework to have a social element; I pictures families or groups of children playing this game together, motivating each other to do homework or chores. The problem was, whenever my wife and I played this during testing, we'd end up having a hard time with it. The game needed to "live" on either my computer or hers, and so if she did chores but I was using my computer, I'd have to get off for long enough for her to start the game, get in, and record her work. Likewise, we'd have the same problem if the game was on her computer. Also, if we wanted to do a dungeon run, it felt bad to do it alone, but sometimes our schedules wouldn't line up so we could do the dungeon together.

The end solution to this, I feel, would be for each player's game to be separate, but for players to be able to "recruit" their friends on the same network. So, I have a character that I run and my wife has one that she runs, but my character can (with her permission) make a "guest appearance" in her game and vice versa.

Later, I'll want to do it over the network, but for now, I'm just making it so you can recruit the main characters from other save games.

I don't quite have it adding the other protagonists to your party yet, but here's a picture of the loaded protagonists in the tavern waiting for recruitment, all wearing their gray newbie robes.


Friday, June 3, 2016

Bug fixes, Shop Screen, etc.

Today I fixed a bunch of bugs and gameplay issues, the ones Johnathan pointed out yesterday. Most of them were small and uninteresting; monks dialogue suggesting they have never met you when you lost to them minutes prior, people using plurals instead of singulars in encounters where you used to fight multiple enemies and now only fight one, etc. Some more interesting stuff are the additions of signs in front of shops that you can read, more hints given by Ghostie if you lose the tutorial battles, and the inability to purchase items if you don't have the ability to equip items yet.

If you beat the third tutorial segment, you gain the ability to learn and use skills. I might make a training battle that you can only win by using a skill sometime next week. Until then, the Blue Knight just tells you how to use them real fast. Still betting it won't stick in player's heads. Also, while players can open up the "Learn skill" screen, there is nothing that forces them (or asks them) to do so. It will probably also languish in obscurity until I use an NPC to specifically highlight it.

I also made the shop screen better. One major mechanic in this game is the difference between flat bonuses and percent bonuses. Flat bonuses are excellent for low level adventurers, because a +5 to attack is always a +5 to attack. Percent bonuses are better for high level adventurers, because a +10% attack is worth +1 if you have 10 attack, but +20 if you have 200 attack! The problem is, the % bonuses were not being displayed in shops.

Before:


Why is this knife so expensive again?

Now the percent increase bonuses are. It took way less time than it did when Yanfly was writing in Ruby.

After:


Oh, I see. Now THAT's a knife!

I'm still not happy with it. I wish there was a way to show more information about the weapon, such as its range, the damage type it does, etc. There was an addon that did that for me back in the old version, but no such add-on exists in MV, I'll have to either port it over to Javascript or write a new one from scratch. Either way, it won't be today.

I' going to work on "save file recruitment" next. I might put up another blog post today depending on how far I get in my two remaining hours of work today.

Thursday, June 2, 2016

Onboarding testing and Guildhall.

Today I made a new map for the town called the "Heroes' Guild", which has a cutscene in it in which you learn how to use skills in combat.

I also got one of my game design friends, Johnathan Liu, to test the game, and got a lot of good feedback on my onboarding process. More on that tomorrow when I fix it.


Wednesday, June 1, 2016

Status Screen:

Today I spent a bunch of time making the stat screen look better. The old Yanfly status menu had a gross looking page in which all the protagonist's statistics were displayed as a bar graph, which let you see clearly what stats were higher relative to other stats. This was... of limited use, in my opinion. I co-opted the code and made it instead display your training values:

BEFORE:


AFTER:


This level 2 character can train each stat up to six times. HP has been trained three times, and MP has been trained four times in this example. The bar shows what proportion of training has been done. As the protagonist gains levels, the bars grow in length until they reach the other side of the screen.

The window in the middle helpfully gives into on whatever screen you are looking at. (It used to have a two line "Bio" of the character, which is meaningless in my game because all the characters are "self inserts" of the player.

I also removed the "Luck" stat from this screen, because my game doesn't use luck. Instead I added MapHP and MapMP as training values.

Current state of Heroes' Life:

I'm going to start this blog in situ. I've been working on the framework for about a month, and I can't really backpedal and make a blog post for every milestone I've accomplished thus far, so here's the cliff notes version:

  • The game was started in RPGMaker VX Ace, but was ported to RPGMaker MV so it could have mobile support. This implies a lot of the framework is provided for me; items, skills, enemies, a basic combat system, a complex eventing system, etc, are already present.

  • You can start the game, select a character sprite to represent you, and rename your character.

  • There is an introductory sequence that teaches you how to move around and interact with objects, as well as the basics of combat. The sequence contains a little ghost I sprited and that I am inordinately proud of.

  • There is a combat system, mostly based around Yanfly's version of RPGMaker's default combat. There are about two dozen enemies, most of which are currently inaccessible and are missing their skills.

  • There used to be about 30 skills, but they died in the transition over to MV and haven't  been re-implemented yet.
  • There used to be three completely functional dungeons. They are still mostly complete, but they are untested and inaccessible in the main game.
  • There are a plethora of items ported over from the VX Ace version. They are mostly inaccessible until the shops are re-implemented.
  • There is a system in which you report what chores you have done, and it gives you XP and Gold for doing them. It is completely functional, but kinda ugly.

  • There is a system where once per day, you can complete "Daily tasks" that increase your combat statistics. If you don't do your tasks, you risk lowering these stats. It is completely functional, relying on the system clock.

That's all I can think of for now. Now future blog posts can give incremental updates to my progress as I continue.

What is this Blog?

I am a Graduate Student working on a Gamification Framework to help parents motivate children to do their chores. (Or to help parents motivate themselves to do their chores!)

I needed a place to post a development blog for two reasons. First, I've got some people who care enough to ask how my project is doing, so I figured it would be a good way to disseminate my project's status. Second, it helps me to stay motivated if I feel I have an "audience" that I am accountable to.

The idea is that every time I finish a milestone of any kind, I post about it here. If I finish a major workday without a major milestone being completed, I post about what the issue is and how I'm trying to solve it.

If you just randomly stumbled across this blog... welcome! If you have any questions, make sure to let me know.