Search This Blog

Exploring Monster Taming Mechanics in Final Fantasy XIII-2: Viewing More Monster Data and Abilities

We've been building up views and controllers in the Rails MVC architecture for the various tables of monster data we have in this Final Fantasy XIII-2 monster taming mechanics series. We're now almost ready to finish off these table views with the ability tables, but before we do that, we need a place for the links to those ability tables to exist. The number of abilities for each monster is too much to put in the main monster table page, so we'll need to first build a details page for each monster before we can link up the monster abilities with the ability tables. Let's get started on that details page.

Final Fantasy XIII-2 Battle Scene

Exploring Monster Taming Mechanics in Final Fantasy XIII-2: Viewing the Monster Data

Last time in this Final Fantasy XIII-2 monster taming mechanics series, we continued building views and controllers in the Rails MVC architecture for the monster characteristics and game locations tables. Now it's time to tackle the main table of the site: the monster table. Once we have this monster table, we'll want to add links to the elements of the table so that we can jump directly to related tables of interest. We'll learn how to do that task as well, and we'll see just how easy Rails makes it.

Final Fantasy XIII-2 battle scene

Exploring Monster Taming Mechanics in Final Fantasy XIII-2: Viewing More Data

In the previous episode of this Final Fantasy XIII-2 monster taming mechanics series, we started looking at the view and controller parts of the Rails MVC architecture by building views of the monster material table and the site index. Now it's time to expand our views to some more of the simpler tables, and in so doing, we'll need to improve our site navigation so that we don't have to keep going back to the home page to get anywhere else. We'll build up the monster characteristics and game locations views so that we have something to fill out our navigation, and then we can see how easy it is to build a site-wide navigation bar using Bootstrap. Let's get started.

Final Fantasy XIII-2 battle scene with Cactuar and Chocobo

Exploring Monster Taming Mechanics in Final Fantasy XIII-2: Viewing Data

Rails apps are built on an MVC (Model, View, Controller) architecture. In the last few articles of this miniseries, we've focused exclusively on the model component of MVC, building tables in the database, building corresponding models in Rails, and importing the data through Rails models into the database. Now that we have a bunch of monster taming data in the database, we want to be able to look at that data and browse through it in a simple way. We want a view of that data. In order to get that view, we'll need to request data from the model and make it available to the view for display, and that is done through the controller. The view and controller are tightly coupled, so that we can't have a view without the controller to handle the data. We also need to be able to navigate to the view in a browser, which means we'll need to briefly cover routes as well. Since that's quite a bit of stuff to cover, we'll start with the simpler monster material model as a vehicle for explanation.

Final Fantasy XIII-2 Battle Scene

Exploring Monster Taming Mechanics in Final Fantasy XIII-2: The Remaining Tables

Continuing this miniseries of exploring the monster taming mechanics of Final Fantasy XIII-2, we'll finish off the remaining database tables that we want for the data relevant to monster taming. In the last article, we filled in a second table of passive abilities and connected those abilities to the monsters that had them through references in the monster table that used foreign keys to the ability table. In the first article, we had identified four tables besides the monster table that we would need as well, these being abilities, game areas, monster materials, and monster characteristics. We did the passive abilities table, but we still need a table for role abilities. In addition to this role ability table, we'll finish off the game areas, monster materials, and monster characteristics tables. These tables are all small, so we should be able to get through them without much effort.

Final Fantasy XIII-2 Battle Scene

Exploring Monster Taming Mechanics in Final Fantasy XIII-2: Relational Data

In this next installment of the miniseries of exploring the monster taming mechanics of Final Fantasy XIII-2, we'll fill out another database table that we need in order to start connecting all of the monster data together. In the last article, we built the core monster table with hundreds of attributes for each of 164 monsters. In the first article, we had identified four other tables that we would need as well, these being abilities, game areas, monster materials, and monster characteristics. The data in these four tables is all related in one way or another to the monsters in the monster table. We'll start with the abilities table, which will end up being three tables because we actually have passive, command, and role abilities. Once the passive abilities table is complete, we'll see how to connect that data in the database so that we can later make inferences on the data.

Final Fantasy XIII-2 battle scene

Exploring Monster Taming Mechanics in Final Fantasy XIII-2: Data Validation and Database Import

Continuing on with this miniseries of exploring the monster taming mechanics of Final Fantasy XIII-2, it's time to start building the database and populating it with the data that we collected from the short script that we wrote in the last article. The database will be part of a Ruby on Rails project, so we'll use the default SQLite3 development database. Before we can populate the database and start building the website around it, we need to make sure the data we parsed out of the FAQ is all okay with no typos or other corruption, meaning we need to validate our data. Once we do that, we can export it to a .csv file, start a new Rails project, and import the data into the database.