RPG Maker VX AceHacked Together Credits Script

There are two ways to use this script. First is changing the current scene to Scene_Credits. It will automatically return to the last scene after it's done. This scene is completely bare, save for the credits stuff. Any music or other effect should be done before this scene. You can also subclass it to add new functionality.

The other way is to open a Window_Credits. You can either open one yourself or use CXJ::HT_CREDITS.refresh to open a global window. You must run CXJ::HT_CREDITS.update yourself each tick to run the window. To close the window, use CXJ::HT_CREDITS.terminate_message. Finally, CXJ::HT_CREDITS.credits_end? checks if the credits reach its end.

A credits file is a regular text file which contains various data. It consists of several blocks, defined by square brackets. The [credits] section is the actual credits text. You can use certain formatting for that. None of the formatting will transfer over to the next line.

\IFT[code] - Insert an icon font character.
\C - Change color. The value that follows is four characters wide, and is a hexadecimal value representing RGBA.
\{ - Enlargen the text by eight.
\} - Shrink the text by eight.
\Ax - Align the text to the center position.
L: Align left.
C: Align center.
R: Align right.
\Px - Sets the center position.
L: At a quarter of the screen.
C: At the center.
R: At three quarters of the screen.
0-8: A position between the left and right position of the screen.
\>> - Will process the next line on the same line as the current.

There is also an easy way to insert unicode characters, by using \u{code}, where code is the hexadecimal code value of the glyph you want to insert. Do note that the u has to be lower case.

The [timeline] section defines events that should happen during the credits sequence. You can define methods here, either as a symbol or as an evaluated line. You correctly format the lines as follows:

time_in_seconds:method string
time_in_seconds::symbol

Example:

5.00:puts('Haldo world!')
5.10::make_font_bigger

The [on_credits_end] block is actually a script block, which triggers once the script terminates, either by reaching the end or by getting terminated by the player. As the script is run inside the Window_Credits class, you can use the methods of this class inside this script.

Finally, [settings] contains the settings. You can assign settings however you like, if you like. If you decide not to change a setting, you can always remove them.

font - The font or fonts (comma separated and in double quotes).
line_height - The font size.
color - The font color, as an eight character hexadecimal value.
duration - The duration of the credits sequence.
scroll_duration - The duration of the scrolling text.
speed - The speed of the scrolling text.

Icon fonts

Icon fonts are generally used for web applications, but I decided to add compatibility for it in this credits script. Basically an icon font is a font that only contains icons. This makes the images very scalable. To define an icon font, you need to make a hash, which contains the following blocks:

:name - The name of the font as it's defined in the font itself
:prefix - The prefix, used to identify the font
:glyph - A list of glyphs

The glyph block in itself is a hash as well, where the key is the identifier of the font, and the value is the hexadecimal value associated with the glyph.

In the demo I've added an example. I've used FontAwesome as the icon font to show how it works. I also added a short bit below to show you the structure of the hash.

This script adds aliases for several methods. If you are sure no method that is used by other scripts get overridden, you can place it anywhere, otherwise, make sure this script is loaded after any other script overriding these methods, otherwise this script stops working.

Cookie consent

Okay, let me get straightforward with you. This site uses cookies and sessions so that Google services like AdSense can be used. I cannot guarantee the data these services require will not be shared, because I simply don't know. By default, though, no cookies, and by extension sessions, are stored, and no advertisements will be displayed.

However, I do appreciate it if you accept some cookies and sessions, as they allow me to actually hide this notification. I might "require" it for other things that are specific to just this site, but I will guarantee that if you do accept these cookies that I will not use any data that I might be able to collect, mostly because I don't know how to collect this data, and I really have no use for it.

Also I need to set up a session so that this notification doesn't appear again in the next thirty days or so. This isn't to pressure you into using cookies, it's just that cookies are the only way to reliably remember that you don't want to see this notifications bar again, though I've tested this site for mobile use, and the bar isn't really that annoying.

Regardless of what you choose, if you accept any cookies and / or data, they will expire thirty days after you last logged in.