RSS

Making a Variable Display Window part 1: Area Info Window

I came up with this because I see a ton of requests for a script by people to display the various crap from their event system and such.  Most of these use variables and do very specific things, making a script would be a big pain in the ass, I’m guessing.  So instead I will show you how to make your own, combining script and common events.

This is an example I came up with that displays variable area info.  This pops up an informative window that tells you information about the town or dungeon you are currently exploring.  In regards to the dungeon info we will see in the example, it uses variables to keep track of a variety of things:

  1. The enemy types and how many have been killed*
  2. The amount of treasure found
  3. The amount of the area that has been explored
  4. This information is then used to calculate the completion percentage.
  • *This is based on a game with touch encounters not random ones, so it is easy to add to the appropriate variables.  For a game with random encounters you would change a lot of things.

It shows all of the above information and a picture of the dungeon as you would see it from the Over World map

Here’s what the window ended up looking like:

Looks like a menu script right?  Well it’s not, this is actually a message box.

This method uses two scripts both from Yanfly:  Ace Menu Engine and Ace Message System.  Part two of this method uses an additional script from Fomar0153.

Before attempting to recreate this (it is a good way to learn for some folks) or using these methods in your own way (this is the whole idea of this), it is very important to read the instructions for the scripts.  In particular, I’ve found, Yanfly usually has a good example on the blog and well written instructions in the scripts themselves, but some scripts you really have to play with it first before it clicks exactly how it can be used.

The reason for using the Ace Menu Engine (AME) is to enable you to access common events from the main menu.  The  Ace Message System (AMS) does everything else.  AMS isn’t modified, but AME will need minor modifications:

AME lets you add common events that can be ran from the menu.  This example focuses on the Area Info menu command so the other Common Event Commands can be ignored for now.  Here’s what the menu ends up looking like:

The one we will be using for this example is Area Info.  So when the player selects this it will run the common event Area Info Window:

This stores the Map ID in a variable that I labeled Map ID (you will probably already have one anyways, since there is a variety of uses for a Map ID). It then checks that variable to determine which window needs to be opened.  After it displays the window it returns to the Menu Screen.  This is also where you would add other windows you wished to be displayed after the Area Info Window such as a map or quest info window if you make them.

  • If you have maps that don’t allow the info to be shown or would have nothing to display, then set a switch to disable the Area Info menu command in the  AME script and disable it when applicable.

We are on Map ID 8 so it calls the Spooky Forest Page common event:

First, it runs another common event, but this is only used for calculation of a variable for the completion percentage so we will look at it in a bit.

Second, we have to change the number of rows by changing the variable Window Rows (this is the default for the AMS script and this option is why I chose the AMS script).  By changing it to 16 it will cover the screen at least in standard screen size.  If you choose to use a different screen size you will need to experiment with the number of lines.

Third, we create the Message Boxes.  We are using 4 one right after the other.  With the AMS script you can use a variety of text codes and spacing to make the menu look the exact way that you want in 16 lines.  The text codes don’t count for spacing issue, but whatever a text code inserts may.  For example: the \v[x]  text codes put in the value of the variable so you will have to keep that in mind.  Also, I used the \pic [x] text code with a 160 x 160 pixel image so I had to use spaces so that the text wasn’t hovering over the picture (text over the picture might be handy for some), it also draws from the top-left so keep that in mind when you are choosing where to put your pictures in the Message Boxes.  Note:  Using the Face Graphic option it will only use the one in the top message box and will shift all the text in all four message boxes to the right.

That’s how we get this lovely image:

Finally, after the player finishes reading the message, we adjust the Window Rows variable back to the default.

Here’s the common event SF % Complete we skipped earlier:

First, it resets the variable back to 0 before we calculate the completion percentage.

Then, it adds in each of the monster, treasure, and sections of the area variables.

Finally, to change it to a percentage we have to multiply by 100 first and then divide by the max of each variable.

For reference here is my variable window:

Note:  Some of the variables here are used in part 2 of this series:  Choose an Area Info Window

Remember any add-ons for the AMS script should work.

Hope you find it helpful.  Feel free to ask questions in the comment section.

Advertisements
 

3 responses to “Making a Variable Display Window part 1: Area Info Window

  1. Sidbot

    June 17, 2012 at 10:12 pm

    This is great! Do you have a demo of this? I’m still learning but this is a great tutorial.

     
    • infamous bon bon

      June 20, 2012 at 4:05 am

      I don’t have one currently because this tutorial was made with the Japanese version of the demo which erased your project when you closed it, but I will try to remake it sooner than later.

       

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: