terça-feira, 22 de setembro de 2020

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

Create All The Things

Before we create the view for the monster material model, we'll want to create an index page that will have links to all of the views and different analyses we'll be creating. This index will be a simple, static page so it's an even better place to start than the material view. To create the controller and view for an index page, we enter this in the shell:
$ rails g controller Home index
This command creates a bunch of files, but most importantly for this discussion it creates app/controllers/home_controller.rb and app/views/home/index.erb. If you haven't guessed by the names, these are our home controller and view for the index page, respectively. The command also creates an entry in config/routes.rb for the route to the index page. We want to add an entry to this file so that going to the root of our website will also take us to the index:
Rails.application.routes.draw do
get 'home/index'
root 'home#index'
end
These routes are simple. The first one says if we go to our website (which will be at http://localhost:3000/ when we start up the server in a minute), and go to http://localhost:3000/home/index, the HTML in app/views/home/index.erb will be rendered to the browser. The next line says if we go to http://localhost:3000/, that same HTML will be rendered. Currently, that page will show a simple header with the name of the controller and action associated with the page, and the file path to the view:
<h1>Home#index</h1>
<p>Find me in app/views/home/index.html.erb</p>
Let's change that to something closer to what we're aiming for:
<h1>Final Fantasy XIII-2 Monster Taming</h1>
<%= link_to 'Monster Materials', '#' %>
That second line with the link is created with a special line of code using the '<%= ... %>' designation. This file is not pure HTML, but HAML, an HTML templating language. The '<%= … %>' tag  actually means that whatever's inside it should be executed as code and the output is put in its place as HTML. The link_to function is a Rails function that creates the HTML for a link with the given parameters. Now we have a proper title and the first link to a table of data that doesn't exist. That's why I used the '#' character for the link. It tells Rails that there should be a link here, but we don't know what it is, yet. More precisely, Rails will ignore the '#' at the end of a URL, so the link will show up, but it won't do anything when it's clicked. Now let's build the page that will fill in the endpoint for that link.

Create a Monster Materials Page

Notice that for the index page we created a controller, but we didn't do anything with it. The boilerplate code created by Rails was sufficient to display the page that we created. For the materials page we'll need to do a little more work because we're going to be displaying data from the material table in the database, and the controller will need to make that data available to the view for display. First thing's first, we need to create the controller in the shell:
$ rails g controller Material index
This command is identical to the last Rails command, and it creates all of the same files for a material controller and view and adds an entry in config/routes.rb for the new page:
Rails.application.routes.draw do
get 'material/index'
get 'home/index'
root 'home#index'
end
In both cases we're creating a controller with only one action, but a Rails controller can have many different actions for creating, reading, updating, and deleting objects from a model. These are referred to as CRUD actions. Since we're only going to be viewing this data, not changing it in any way, we just need the read actions, and more specifically the index action because we're only going to look at the table, not individual records. Therefore, we specified the 'index' action in the generate command so the others wouldn't be created. Now it's time to do something useful with that action in app/controllers/material_controller.rb:
class MaterialController < ApplicationController
def index
@materials = Material.all
end
end
All we had to do was add that one line in the index action, and we've made all of the material model data available to the view. The view has access to any instance variables that are assigned in the controller, so @materials contains all the data we need to build a view of the material table. The HTML code to render the view is a bit more complex, but still pretty simple:
<h1>Monster Materials</h1>

<table>
<tr>
<th>Name</th>
<th>Grade</th>
<th>Type</th>
</tr>

<% @materials.each do |material| %>
<tr>
<td><%= material.name %></td>
<td><%= material.grade %></td>
<td><%= material.material_type %></td>
</tr>
<% end %>
</table>
The first half of this code is normal HTML with the start of a table and a header defined. The rows of table data are done with a little HAML to iterate through every material that we have available in the @materials variable. The line with '<% ... %>' just executes what's within the brackets without outputting anything to render. The lines that specify the table data for each cell with '<%= ... %>' will send whatever output happens—in this case the values of the material properties—to the renderer. We could even create dynamic HTML tags in this embedded code to send to the renderer, if we needed to. Here we were able to create the 40 rows of this table in seven lines of code by looping through each material and sending out the property values to the table. This tool is simple, but powerful.

Now we have another page with a table of monster materials, but we can only reach it by typing the correct path into the address bar. We need to update the link on our index page:
<h1>Final Fantasy XIII-2 Monster Taming</h1>
<%= link_to 'Monster Materials', material_index_path %>
It's as simple as using the provided helper function for that route! Rails creates variables for every route defined in config/routes.rb along with a bunch of default routes for other things that we won't get into. We can see these routes by running "rails routes" in the shell, or navigating to /routes on the website. Actually, trying to navigate to any route that doesn't exist will show the routes and their helper functions, which is what happens when we try to get to /routes, too. How convenient. Now we can get to the monster material table from the main index, and amazingly, the table is sorted the same way it was when we imported it. It's pretty plain, though.

Adding Some Polish

The material table view is functional, but it would be nicer to look at if it wasn't so...boring. We can add some polish with the popular front-end library, Bootstrap. There are numerous other more fully featured, more complicated front-end libraries out there, but Bootstrap is clean and easy so that's what we're using. We're going to need to install a few gems and make some other changes to config files to get everything set up. To make matters more complicated, the instructions on the GitHub Bootstrap Ruby Gem page are for Rails 5 using Bundler, but Rails 6 uses Webpacker, which works a bit differently. I'll quickly summarize the steps to run through to get Bootstrap installed in Rails 6 from this nice tutorial.

First, use yarn to install Bootstrap, jQuery, and Popper.js:
$ yarn add bootstrap jquery popper.js
Next, add Bootstrap to the Rails environment by adding the middle section of the following snippet to config/webpack/environment.js between the existing top and bottom lines:
const { environment } = require('@rails/webpacker')

const webpack = require('webpack')
environment.plugins.append('Provide',
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
Popper: ['popper.js', 'default']
})
)

module.exports = environment
Then, set up Bootstrap to start with Rails in app/javascript/packs/application.js by adding this snippet after the require statements:
import "bootstrap";
import "../stylesheets/application";

document.addEventListener("turbolinks:load", () => {
$('[data-toggle="tooltip"]').tooltip()
$('[data-toggle="popover"]').popover()
})
We may never need the tooltip and popover event listeners, but we'll add them just in case. As for that second import statement, we need to create that file under app/javascript/stylesheets/application.scss with this lonely line:
@import "~bootstrap/scss/bootstrap";
Finally, we need to add a line to app/views/layouts/application.html.erb for a stylesheet_pack_tag:
<!DOCTYPE html>
<html>
<head>
<title>Bootstrapper</title>
<%= csrf_meta_tags %>
<%= csp_meta_tag %>

<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= stylesheet_pack_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
</head>

<body>
<%= yield %>
</body>
</html>
Whew. Now, we can restart the Rails server, reload the Monster Material page…and see that all that really happened was the fonts changed a little.


Still boring. That's okay. It's time to start experimenting with Bootstrap classes so we can prettify this table. Bootstrap has some incredibly clear documentation for us to select the look that we want. All we have to do is add classes to various elements in app/views/material/index.html.erb. The .table class is a must, and I also like the dark header row, the striped table, and the smaller rows, so let's add those classes to the table and thead elements:
<h1>Monster Materials</h1>

<table id="material-table" class="table table-striped table-sm">
<thead class="thead-dark">
<tr>
<th scope="col">Name</th>
<th scope="col">Grade</th>
<th scope="col">Type</th>
</tr>
</thead>
I added an id to the table as well so that we can specify additional properties in app/assets/stylesheets/material.scss because as it is, Bootstrap stretches this table all the way across the page. We can fix that by specifying a width in the .scss file using the new id, and since we're in there, why don't we add a bit of margin for the header and table, too:
h1 {
margin-left: 5px;
}

#material-table {
width: 350px;
margin-left: 5px;
}
We end up with a nice, clean table to look at:


Isn't that slick? In fairly short order, we were able to set up an index page and our first table page view of monster materials, and we made the table look fairly decent. We have five more tables to go, and some of them are a bit more complicated than this one, to say the least. Our site navigation is also somewhere between clunky and non-existent. We'll make progress on both tables and navigation next time.

segunda-feira, 21 de setembro de 2020

Download Pubg Mod For Gta Sandeas







                                               

                                gta sandeas feature in _pubg mod

pubg mod for gta sandeas this mod contain all online plying in gta sandeas and diffrent types of wepons avlable in gta sandeas_pubg you can play like a pubg in gta sandeas all steam servers in this game

                                                        apps recomanded for pubg mod
  • update your directx
  • update your net frame work
  • download updated winrar file



                                                            mod password is fulla1






click here to downllicoad in fast way-click
click here to download pubg mode-click



                                                     







sábado, 12 de setembro de 2020

Exploring Monster Taming Mechanics In Final Fantasy XIII-2

Let's just get this out of the way. I'm a huge Final Fantasy fan. I adore the original game even today, Final Fantasy VI is definitely the best of the franchise, and I've found things to enjoy in every one that I've played, which is nearly all of the main-line games. (I still haven't managed to crack open FFIII, but I plan to soon.) Even each of the games in the Final Fantasy XIII trilogy had something that drew me in and kept me going through the game, wanting to learn more. These games get a lot of flack for being sub-par installments in the Final Fantasy franchise, and some of the criticism is warranted. The story is convoluted, and the plot is as confusing as quantum mechanics.

That debate, however, is not why we're here now. We're here to look at one of the great aspects of FFXIII-2: the monster taming and infusion system.


This system is deep and complex, but not in the off-putting way that the plot is. The amount of variety and configurability in the monsters that you can recruit to fight alongside Serah and Noel is astonishing, which is nice because those two are somewhat lacking in that department. Their development paths are fairly linear. There are a few choices about what strengths to give them as they level up in the "crystarium," but it's mostly a matter of ordering the abilities they learn and doesn't make much difference in the end. The monsters, on the other hand, allow for huge variations in development that results in a system with fascinating choices for optimization and prioritization. Figuring out how to capture and develop powerful monsters early in the game is great fun, and its this characteristic of Final Fantasy games—of finding ways to build a strong party early in the game without tedious grinding—that I really enjoy.

On a totally different note, I've been considering different ways to practice using databases and building simple websites, and the monster taming system is complex enough and interesting enough that it would make for a good collection of content to use for that practice while having some fun in the process. So, the other goal of this series, other than exploring the monster taming system in FFXIII-2, is to explore how to get a data set into a database, put it up on a website with Ruby on Rails, and experiment with that data set in some novel ways. Before we get into all of that, however, we need to understand what the heck we're putting in the database in the first place, and to do that we need to understand this monster taming system in detail.

Monster Taming

Okay, what is this monster taming, and why is it so complicated? We'll have to start at the beginning and work our way through the system. At the start of the game there's just Serah, trying to stay alive. (Actually, the very start of the game is a flashy battle sequence and confusing plot points with Lightning, but let's ignore that.) Pretty soon Noel shows up and decides to help Serah out, so now it's a party of two. This setup goes on for a couple levels, but it's pretty weird for a Final Fantasy game. Normally there's three or four characters in a party. Then we come to a pitched battle with a Cait Sith and a Zwerg Scandroid. There will be a lot of weird monster names throughout this series. You're just going to have to roll with it. Anyway, after creaming the cat and the droid, they turn into monster crystals, which are basically the essence of monsters. These crystals are stored in your monster inventory, and you can assign three of them to coveted spots in your "Paradigm Pack" (not the name I would have picked). These three monster spirits will fight with you in battle, and so begins your long and precarious journey as the monster whisperer.

Monsters come in six basic varieties, conveniently matching the six roles that Serah and Noel can assume. These six role are briefly explained as follows:
  • Commando - The Arnold Schwarzenegger role, plenty of strength, short on finesse.
  • Ravager - The mage role, uses attack magic.
  • Sentinel - This is a tank role, not many attacking options, but it absorbs damage like it's nothing.
  • Saboteur - Weakens the enemy by removing protections and inflicting ailments like poison and slow.
  • Synergist - Strengthens the party with offensive and defensive enhancements. Also moonlights as a business executive.
  • Medic - Heals the party, and possibly the only obvious role name of the bunch.
While Serah and Noel can switch between these roles, the tamed monsters have fixed roles. Switching the monster's role switches the monster, and there are three role possibilities for any given battle corresponding to the three monsters that are on deck. The monster's type is only the beginning of what a monster is, though. There is so much more.

Monster Training

Monsters can gain experience just like Serah and Noel. Both the humans and the monsters have crystariums where they advance along a path to gain abilities and increase their stats. While the humans have a crystarium for each of their six roles, the monsters each have one crystarium, possibly with multiple levels, where they gain their abilities and stats. Because the crystariums of the monsters are more unique to the monster itself, each monster type will learn a unique set of abilities and end up with different stats. Additionally, while the humans can move through their crystariums by spending crystarium points gained from winning battles, monsters can only advance on their crystariums by using various types of monster materials that are dropped by defeating monsters in battle. This seems to be some form of cannibalism, but it's pretty mild because the materials are bolts and orbs and other things like that. Monsters require different materials for their crystariums depending on what level they're on their crystarium, and if they're biological or mechanical monsters. Different materials will also give different bonuses to the monster's health, strength, magic, or all three stats.

Following so far? Because we're just getting started. This monster whispering is intricate stuff. On top of the unique upgrade paths, abilities, and materials, each monster spirit has a set of characteristics that relate to how they will develop as they level up. A monster can be a "late bloomer," meaning it may be weak to start with, but it can reach the upper levels 70-99 of its crystarium. Maybe the monster is "brainy," meaning that it will learn lots of abilities, or it's "flameproof," which is pretty self-explanatory. There are 29 characteristics in all, and any given monster can have up to four of them. Monsters will also come with some initial abilities, whether that be actions like casting certain spells and attacking or passive abilities like "armor breaker" that allows it to penetrate an enemy's physical defense. Taming and training monsters are not the only ways to get monsters with certain abilities, however. This is where things get real, as in real complicated.

Monster Infusion

The third way to give a particular monster new and wonderful abilities is to take another monster that has the desired ability(ies) and fuse them into the desired monster through a magical monster infusion process. How does this work exactly? Who knows! How did materia work in FFVII, or guardian force cards in FFVIII? It's a Final Fantasy game; some things you just have to accept without question and move on. The source monster spirit is lost in this process of infusing the target monster with new abilities. It's a destructive process.

Losing the source monster is not the only cost, though. There are restrictions as well. The first restriction is that a monster can only have 10 passive abilities. If a monster accumulates more than 10 passive abilities, some of them are going to have to go. These abilities all have a rank, and higher ranked abilities will stick to a monster better than lower ranked abilities. Also, newer abilities are stickier than older abilities, according to when the monster learned them. The lowest ranked abilities will get the boot first, with order of acquisition being the tie-breaker—first in, first out.

The next restriction is red-locked abilities. These are abilities that cannot be transferred to or removed from a monster, ever. This restriction is pretty simple, unlike the next one.

Monsters can also have yellow-locked abilities, although these locks never exist by default. Yellow locks can be created, propagated, and destroyed by infusing abilities of the same type in various ways. Two abilities are the same type if they modify the same attribute. For example, HP +10% and HP +25% would be of the same type. Also, HP +10% is a lower rank than HP +25%. That's important for yellow locks because if you infuse a monster that already has a lower rank ability with an equal or higher rank ability of the same type, the infused ability comes with a yellow lock and will stay put when the monster's abilities overflow. Generally, if an ability of higher rank is added to a yellow-locked ability of lower rank, the yellow lock is kept. If an ability of equal or lower rank is added to a yellow-locked ability, the yellow lock is destroyed. It's a bit more complicated than that because there are about a dozen different combinations, but this summary should be sufficient for the purpose of setting the requirements of the database. Basically, we want to make sure we know the rank of each ability so that we can figure out the best way to develop monsters' abilities.

All of the red lock and yellow lock stuff has to do with passive abilities, but there are two other types of abilities that come into play with monster infusion: role abilities and hidden abilities. Role abilities are the actions that the monster will take in battle, and there is no limit to the number of these abilities that a monster can have. When a source monster is infused, you can choose from its role abilities up to the number that its crystarium stage is at, which will be 1-5 depending on how much you can level up the monster and how much you actually leveled it up. The disadvantage of infusing too many role abilities on a monster is that you don't have control over what it does in battle, and if it has too many options, it probably won't be doing what you want it to do when you need it most. Decide what you're going to use a monster for, and then don't give it choices. You can't remove role abilities once they're infused.

Lastly, hidden abilities are learned by a monster when it is infused with 99 levels worth of monsters of the opposite role. Commando and Ravager are opposites (makes sense), Saboteur and Synergist are opposites (makes even more sense), and Sentinel and Medic are opposites (the leftovers, I guess). For example, you could infuse nine level 17 Zwerg Scandroids onto your Red Chocobo, and it'll learn Jeopardize, which boosts the bonus the chocobo gets when attacking a staggered enemy. Each role has it's own hidden ability that it gets when those 99 levels of monsters of the opposite role are infused into it.

Acquiring the Data for the Database

Okay, that was a bunch of intricate, complicated stuff, but it gives us a good idea of what kind of data we want to put in our database so we can link it up and ask interesting questions about monster infusion. 

First, we want to know all about monsters:
  • What's its name?
  • Is it tamable? We might have a separate tamable monster table since most of the following properties wouldn't apply to non-tamable monsters.
  • What materials does it drop in battle?
  • What's its role?
  • Where in the game can we find it?
  • What are its characteristics?
  • What's its max level?
  • What are its starting and ending stats (HP, strength, and magic)?
  • What are its starting abilities?
  • What abilities does it learn and at which crystarium levels?
  • How many crystarium stages does it have?
  • What is its feral link? (We didn't talk about this. It's a special action that can be triggered when the monster gets hit too much.)
  • What does the feral link do?
  • We could also include pictures if we want to get fancy.
We also want to know about abilities. This will be a separate table:
  • What's its name?
  • What's its rank?
  • What does it do?
  • Is it passive, role, or hidden? These may be separate tables, since they're different enough to warrant it.
  • Which role is it associated with?
We'll be interested in at least one aspect of the areas in the game:
  • What's its name?
  • How early can we reach this area? I.e. which area unlocks this area?
Since there's a fair number of monster materials, we'll want to keep track of those:
  • What's its name?
  • Is it biological or mechanical?
  • What stage of the crystarium is it for?
  • Does it boost HP, strength, magic, or all three? (The name does give this away, but let's be thorough.)
We'll also want to know a little about the monster characteristics because the names are not self-explanatory:
  • What's its name?
  • What does it mean?
This is shaping up to be a reasonably complex database with 5-8 tables interlinked by these different items' names. The relations in the database will happen through IDs, but everything does have a name as well. The names will be what appears in the tables presented as views of the database, likely with hyperlinks to their information in their own tables. So how should we get all of this data into a database? I certainly don't want to enter it by hand. There's over 150 monsters, dozens of abilities, and dozens of properties for each monster. 

Luckily, some ambitious people have already done the hard work of writing out all of these things in an FAQ, and it's available on gamefaqs.com. The Monster Infusion FAQ by sakurayule, BMSirius, and Taly932 contains almost everything we want to put in the database. It also contains example builds for post-game super monsters, but we're going to look at something a bit different with this series. We want to figure out the best monster builds we can do during the game in order to have monsters that can help us through the game without the need to do any grinding. All of the necessary information is in that FAQ. We just have to write a script to parse it and put it in a form that's easy to import into the database. That parsing script is what we'll figure out how to write in the next episode.

Kickstarter Ending Soon - Dreamforge Games Grav-StuG Tank


Take me to the Kickstarter...


What does this project include?


The project was created to fund the tooling and production of a polystyrene plastic model kit. The Eisenken Grav StuG.




We also offer 3d printable building terrain sets, modular, stackable and and loaded with details.


The icing on the cake... Two lucky backers will receive an extra free kit, painted by the extremely talented David Woods! Each StuG you back will provide an entry into the raffle!


Good luck to all of you! now lets get this Kickstarter across the finish line!


sexta-feira, 4 de setembro de 2020

NEAT XII

Some shots for this past weekend. We ended up with 18 guys from across the northeast. Karl surprised everyone (including himself) by going 3-0 with AMTL and winning the Epic trophy (first place), Frank claimed the Dice of Dave (last place) yet again. I won Best Crit for crashing my Cobra into a tree while trying to avoid Jon's pin-point attacks. And I believe Jimmy took home "Best Painted" for his not completely painted Imperial Fists. Enjoy!