Game Development Reference
In-Depth Information
Figure 4-13. The encounters table for the world map
As you can see, I made the total weight of the encounters 100, although that is not strictly true. For example,
there are only three total encounters available in Region 1, with a total weight of 70. That means that you have a
30/70 chance of meeting two Slimes, a 20/70 chance of seeing two Bats, and a 20/70 chance of engaging three Rats
(the Rat typo is present by default in RMVXA; it's as easy to fix as a single press of Backspace, should it particularly
bug you). Wisps, being the strongest enemy type by far, are a rare sight in Region 3 (5/25 chance of seeing them, as
compared to a 20/25 chance of seeing Rats). Now, we need to speak more about battlebacks.
A Discussion on Battlebacks
Up to now, we've had a single area with a single encounter. When you have a map that has uniform terrain
(much like most dungeons), you can just set the area's battleback in the map properties. However, the world map is a
conglomeration of various types of terrain (a cursory peek at Field 3 reveals snow and lava areas). It would be rather
odd to have a forest battleback for a brawl in the snow, wouldn't you say? So, what we can do is apply past knowledge
in a neat little exercise.
Create an event that allows the battleback to change, based on the region the player is in when an
encounter occurs.
Objective
How do we go about this? If you think back to Chapter 2, we used a Parallel Process event that wrote the values of
the player's X and Y to variables to determine map boundaries for area transitions. Here, we can use the Get Location Info
event command in conjunction with Control Variables , conditional branching, and Change Battleback within a Parallel
Process to make sure the battle background is always appropriate to the area in question. As Change Battleback is pretty
much equivalent to just setting a default area battleback in a map's properties, let me speak a little more of Get Location
Info . Figure 4-14 is a screenshot of that event command.
 
 
Search WWH ::




Custom Search