-
Notifications
You must be signed in to change notification settings - Fork 0
Colours and profiles definitions for the onscreen text displayer
This section covers use of the extended database and two of its internal tables (these are tables defined by RME and not by the user).
RME provides a series of commands in order to display text on screen. These commands sometimes require the use of a profile and/or a colour. Profiles and colours are stored in the static database in order to be easily definable and updatable. Let's see how to create texts' colours and profiles.
During the game's execution (in editor mode), RME builds the table
IColor
andITextProfile
if they do not exist. Usually, when a table is prefixed with the letterI
that means that the table is an internal one and is used by RME's system. That's in these tables that we will define new texts' colours and profiles.
Firstly, let's look on the table IColor
's schema:
class IColor < Static::Table
pk string :name
integer :red
integer :green
integer :blue
integer :alpha
end
This table has five fields. The first one: :name
is a sequence of characters identifying one colour from another (that's what we call a primary key); and the four other fields are integers corresponding to the value of red, green, blue and transparency (255=opaque, 0=transparent) used to define the colour. Adding a new colour is as simple as adding a new line in the file Database/tables/IColor.csv
(when you will open it, you will see that some colours have already been defined), just like this:
Through executing your project (from the editor), you will be able to see that the colours that we have previously defined are added in the list of available colours.
Let's look on the table ITextProfile
's schema:
class ITextProfile < Static::Table
pk string :name
integer :size
string :font
string :color_name
boolean :italic
boolean :bold
boolean :outline
string :outline_color_name
boolean :shadow
end
As for the colour, you will only have to modify the file Database/tables/ITextProfile.csv
. Here is an example:
Do not hesitate to create as many texts' profile as you want, especially for damages !
If by any chance you came up to delete default elements in the two previous tables, you can move the two corresponding files in the directory Database/backups
and restart the game. The tables will be rebuilt with default values and you will be able to copy/paste the values from the backup.
Introduction
Revised Syntax
- Switches and variables
- Local switches and local variables
- Tags and local tags
- Displaying informations in messages
Commands
Extended events
Advanced tools
RMEx use examples
- Create basic gauges
- Create gauges in battle
- Create easily a QuickTime Event
- A minimal multi-agents system
- Custom names typing system
- Titlescreen's skipper
Scripters corner