RFS Tutorial Database Editing
RFS Tutorial Database Editing
Database Editing
please refer to “RFS Database Reference” for a detailed explanation of all table and fields
TFM Editor
TFM Editor is a simple database editor for TFM.
TFM Database is designed in order to have an optimal compromise between speed and
size.
The most important thing to know is that strings may not exceed a maximum length
specific for each field. Each field has a predefined maximum string length. To exceed this
length will cause the DB failure.
The database structure is described in an xml file, this description includes the maximum
string length.
TFM Allows to open a DB in two steps, first open the XML file, then open the DB file itself.
Any table can be exported in a .txt file with a CSV format that can be edited with Excel or
Open Office Calc and then imported back.
The save operation writes only the DB file while the xml remains unchanged.
There is another visible menu for modifying the database structure “Change XML”. It is
recommended that you do not use this feature at all.
Change XML works this way, first modify an xml file. With menu Change XML load the
modified xml file, the DB tables and fields are modified to respect the new structure. The
DB file must be saved to make changes effective.
RFS engine uses three types of databases:
the main database: RFS-meta.xml and RFS.DB files
the preference database: RFS_PREF-meta.xml and RFS_PREF.DB files
language database: RFS_LANG-meta.xml and RFS_xx.DB files where xx can be replaced
by a two letter ISO code of the language for example RFS_en.DB for English or
RFS_it.DB for Italian
If you have downloaded the game you can find the files in the following paths:
xml files: in C:\ProgramData\RFS\DB folder. (You need to choose “Show hidden files" in
your File Explorer in order to see ProgramData folder.)
main DB file: <MyDocuments>\RFS\DB
language DB files: <MyDocuments>\RFS\Languages
preference DB file: C:\Users\<YourName>\AppData\Roaming\RFS (You need to choose
“Show hidden files" in your File Explorer in order to see AppData folder.)
How to create a League
In order to create a new league you have to modify several tables:
• competition
• competformat
• competaccess
• previousseason
• gamecalendar
• competneutral (optionally)
In this example we will create the Canadian Premier League, it has 8 teams that play a
regular season of 28 matches, the first 4 progress to a playoff with two legs semifinals and
one-leg final in a neutral location. We assume there are no promotion and relegations.
Let's start adding a line in competitions table as follows
Now we also need to set the standings of the previous season so, the first year, RFS will
know which teams to use. Let's go to the previousseason table and add one line for each
position in the standings. We do not need to specify points or other but just the position.