RFS Database Reference
RFS Database Reference
This table is used to create all the competitions played or simulated in TFM
competitions competitionid The unique competition identifier
competitions name The name of the cpompetition in english
competitions competitiontype competition type (see enumeration)
competitions level level of the competition in the Country
competitions confederation confederation
competitions countryid country id
competitions assetid assetid (used for logo, wipes etc.)
competitions isvanishingsprayenabled vanishing spray is used
competitions isgoallinetechcompenable Goal line technology is used
competitions firstyear first year in which competition appears (0 everey year)
competitions period period in years between two competitions (0 everey year)
competitions duration duration of the competition in years (0 seasonal)
competitions rank overall rank from 0 (top) to 9 (bottom)
Pagina 1
Tables-Fields
competitions sponsorperc the percentage of sponsor contribution to team budget, use range 0 to 50
The year, 0 is Any Year, > 2000 is a specific year, other values are used to
competneutral year group locations for the same edition and are available for random assignment
competneutral teamid The team hosting the match
This table is part of the tables used to describe the competition structure, it defines wich teams have direct access to competition
competaccess competitionid The unique competition identifier
competaccess accessgroup The identifier of an access group for the given competition
competaccess nteams number of teams
competaccess fromcompetitionid the competition from which teams are selected
competaccess minpos The best position in the fromcompetition
competaccess maxpos the worst position in the fromcompetition
competaccess countrylimit the maximum number of acceptable teams for the same Country
This table is part of the tables used to describe the competition structure, it define stages, groups and how teams qualify (to another
stage) or advance (to another competition)
competitionformat competitionid The unique competition identifier
Tha stage type, the combination competitionid+stage is unique in this table (see
competitionformat stage enumerations)
An identifier for an access group of teams with dirct access to this stage (see
competitionformat accessgroup competaccess table)
competitionformat directaccess The number of teams with direct access at this stage
competitionformat nteams The total number of teams in this stage
competitionformat drawpots The number of pots in which the teams are organized for the draw
competitionformat avoidsamecountry if team of the same Country can be in the same group or not
competitionformat ngroups the number of groups in this stage
competitionformat nmatches the number of matches to be played against each opponent in the group
competitionformat qualifiedteams the number of qualified teams for the next stage
competitionformat qualifiedstage the next stage in this competition where the qualified teams will go
the number of teams that can advance to another competition (classified after
competitionformat advance the qualified teams, example 3rd place of UCL goes to UEL)
competitionformat advancecompid the competition where teams will advance
competitionformat advancestage The stage of the competition where team will advance
competitionformat tierule A rule for resolving ties (see enumerations)
competitionformat isinvisible If the competition is visible in TFM or just simulated
competitionformat colorgood1 numer of teams with good color 1 from top
competitionformat colorgood2 numer of teams with good color 2
competitionformat colorgood3 numer of teams with good color 3
competitionformat colorgood4 numer of teams with good color 4
competitionformat colorbad1 numer of teams with bad color 1 from bottom
competitionformat colorbad2 numer of teams with bad color 2 from bottom
competitionformat keeppoints The percentage of points preserved from another competition
competitionformat fromcompid The competition id that is used for keeping points
competitionformat isneutral if this stage is played in a neutral location
competitionformat prize the overall prize that will be shared among the teams participating to this stage
This table is used to specify when a competition is played, the season is split in 102 slots
gamecalendar competitionid The unique competition identifier
gamecalendar stage Tha stage type
The leg inside the stage, n=0 is for stage draw and is mandatory for each stage.
gamecalendar leg n>0 is for the specific leg
the year 0 means first year, 1 second year etc. (in case the competition requires
gamecalendar year more solar year, for example 2023/24)
Pagina 2
Tables-Fields
gamecalendar calendarslot the calendar slot of the year assigned (see enumerations)
how the matches are spread among the different days of the calendar slot (see
gamecalendar patternid calendarpattern table)
This table is used to define how matches are distributed in a calendar slot
calendarpattern patternid A unique id for the calendar pattern
calendarpattern day day of the week (0 is Friday)
calendarpattern hours hours
calendarpattern minutes minutes
calendarpattern nmatches number of matches
calendarpattern description mnemonic descriptor
roundrobin teamhome The conventional identifier of the home team (from 0 to teamnumber-1)
roundrobin teamaway The conventional identifier of the away team (from 0 to teamnumber-1)
teams fullname This name should match the name used in transfermarkt site for Web Scraping
teams city city
teams abbreviation 3 letters abbreviation (or less)
teams countryid country id
teams isnationalteam true if this is a national team
this is the corresponding field in FIFA 16 with range 1-20. Its value is important
teams domesticprestige because it is used to split merchandising budget across the teams of a league
teams teamcolor1r rgb team colors
teams teamcolor1g rgb team colors
teams teamcolor1b rgb team colors
teams teamcolor2r rgb team colors
teams teamcolor2g rgb team colors
teams teamcolor2b rgb team colors
teams teamcolor3r rgb team colors
teams teamcolor3g rgb team colors
teams teamcolor3b rgb team colors
teams monologoperc the percentage of kits with monochromatic re-colorable logo
The overall market value of the team in K€, it must be higher than 0 for all the
teams marketvalue teams that can appear in the game
the id of the parent team, if this is a secondary team (feature not implemented
teams parentteamid yet)
teams nextleagueid this field is used by RFS and should be left 0
This table is used to associate a team with a stadium and relative environment
teamstadiumlnk teamid the unique identifier of the team
teamstadiumlnk stadiumcustomname The name of the stadium
teamstadiumlnk stadiumid The stadium id in FIFA 16
teamstadiumlnk capacity This is the value used in FIFA 16 DB table stadiums
This is the value used in FIFA 16 DB table stadiums, conflict with similar value
teamstadiumlnk policetype in countries
teamstadiumlnk seatcolor This is the value used in FIFA 16 DB table stadiums (feature not implemented)
teamstadiumlnk mowpattern This is the value used in FIFA 16 DB table stadiums
teamstadiumlnk nethexagonal true if use hexagonal net (squared otherwise)
teamstadiumlnk netshorttop true if use short top
Pagina 3
Tables-Fields
This table is used to store special roles, RFS compute them automatically so left the table empty
teamseason teamid the unique identifier of the team
teamseason formationid the id of the current formation
teamseason captainid the player id of the captain
teamseason penaltyid the player id for the specifeid kick
teamseason leftfreeid the player id for the specifeid kick
teamseason rightfreeid the player id for the specifeid kick
teamseason longkicktakerid the player id for the specifeid kick
teamseason leftcornerid the player id for the specifeid kick
teamseason rightcornerid the player id for the specifeid kick
This data are the same used in the stadiums table by FIFA
stadiums stadiumid
stadiums name
stadiums istrainingstadium
stadiums adboardendlinedistance
stadiums adboardsidelinedistance
stadiums adboardtype
stadiums cameraheight
stadiums camerazoom
Pagina 4
Tables-Fields
This table defines players (many fields are the same of FIFA 16 table)
players playerid the unique player identifier
players firstname name string
players lastname surname string
players commonname "known as" string
players jerseyname string on the jersey
players birthdate birth date
players nationality
players height
players weight
players bodytype
players islegend mark if it is a legend player
players hasspecifichead
players hashighqualityhead
players headtype
players skintone
players skintype
players facialhairtype
players facialhaircolor
players eyecolor
players eyebrow
players hairtype
players haircolor
players hasjerseyuntucked
players sleevelength
players hasjerseyfit
players seasonaljersey
players hastrainingpants
players socklength
players shoetype
players gkglovetype
players accessorytype1
players accessorytype2
players accessorytype3
players accessorytype4
players accessorycolour1
players accessorycolour2
players accessorycolour3
players accessorycolour4
players animfreekickstartpos
players animpenaltieskickstyle
players animpenaltiesmotionstyle
players animpenaltiesstartpos
players attackingworkrate
players defensiveworkrate
players emotion
players gkkickstyle
players gksavetype
players preferredfoot
players preferredposition1
players preferredposition2
players preferredposition3
players preferredposition4
players skillmoves
players weakfootability
players runningstyle1
players runningstyle2
players finishingstyle1
players finishingstyle2
players trait
players internationalrep
players acceleration
players aggression
players agility
players balance
players ballcontrol
players crossing
Pagina 5
Tables-Fields
players curve
players dribbling
players finishing
players freekickaccuracy
players gkdiving
players gkhandling
players gkkicking
players gkpositioning
players gkreflexes
players headingaccuracy
players interceptions
players jumping
players longpassing
players longshots
players marking
players penalties
players positioning
warning: RFS recalculate potential applying some rules that limit potential
according to the age of the player, the value shown in RFS could be different
players potential from this value
players reactions
players shortpassing
players shotpower
players slidingtackle
players sprintspeed
players stamina
players standingtackle
players strength
players vision
players volleys
players overallrating warning: RFS recalculate overall based on skills, this value is not used
warning: RFS recalculate market value based on skills and other parameters,
players marketvalue this value is not used
Pagina 6
Tables-Fields
playerstats playerid
playerstats season
playerstats competitionid
playerstats teamid
playerstats minutes
playerstats matchcount
playerstats starting
playerstats entering
playerstats substituted
playerstats goals
playerstats assists
playerstats aggregatedperf
playerstats counterperf
playerstats cleansheets
playerstats goalsconceded
playerstats saves
playerstats mvp
playerstats redcards
playerstats doubleyellow
playerstats yellowcards
Pagina 7
Tables-Fields
This table is used for changing formation during match simulation (in simulated games only not in FIFA)
formationsai formationidmain the starting formation
formationsai formationiddefense the formation id with defensive approach
formationsai formationidattack the formation id with attacking approach
formationsai formationidten the formation id when in 10 players
formationsai tosubstitute role to substitute (0=midfielder 1=attacker)
This table is used for choosing substitutions during match simulation (in simulated games only not in FIFA)
substitutionai expectation the expectaion for the team in this match
substitutionai minutes minutes to trigger the substitution
substitutionai deltagol delta goals to trigger the substitution (positive is winning)
substitutionai tacticalchange The type of substiution to do
The maximum number of already done substitution that allow to trigger this
substitutionai tacticalcondition substitution
substitutionai turnoverchange The type of substiution to do
The maximum number of already done substitution that allow to trigger this
substitutionai turnovercondition substitution
This table is used for associating teams and players (national teams are not requested here)
teamplayerlinks teamid the unique team identifier
teamplayerlinks playerid the unique player identifier
teamplayerlinks jerseynumber the jersey number
contracts salary salary, TFM has an algorithm for computing salary, keep for future use
contracts previousteamid the previos team in case of transfer
contracts transfervalue the money paid for the transfer
Pagina 8
Tables-Fields
This table is the same used in FIFA 16 and is used to collect data for kits preinstalled before RFS (default is the original set of kits
used by FIFA 16 clean installation)
teamkits
This table is used to describe the standings of the previous season, it is used to create the access groups
previousseason competitionid The unique competition identifier
previousseason position position
previousseason teamid the unique team identifier
This table is used to build a tree of sentences used in various game situations (phrases are in the language database)
speechtree contextid the context to which the sentence belongs
speechtree topicid the topic of the context (0 is the root)
speechtree child1 the child topic (255 = no child)
speechtree child2 the child topic (255 = no child)
speechtree child3 the child topic (255 = no child)
speechtree child4 the child topic (255 = no child)
speechtree child5 the child topic (255 = no child)
This table is used to determine if a player born in one Country may have a name original from another Country
migration countryid the countriy identifier
migration surnamecountryid the countriy identifier used for surnames
migration forenamecountryid the countriy identifier used for forenames
migration percent a percentage of thus entry for the Country
migration doublenameprob the probability to have a name with 2 forenames
This table is used to determine if a player playing in a youth team of a Country can be original from another Country
youthteams countryid the countriy identifier
youthteams fromcountryid the countriy of origin identifier
youthteams percent this is expressed in per thousand 100% = 1000
This table is used to determine if a player playing in a team of a Country can be original from another Country
foreigners countryid the countriy identifier
foreigners fromcountryid the countriy of origin identifier
foreigners frequency this is score used to randomize the from Country
Pagina 9
Tables-Fields
This table is used to create random kits, specifically the kit numbers
kitnumbers kitnumberid a unique identifier for the socks
kitnumbers ncolors number of colors actually present (1, 2 or 3)
how many background colors in the jersey are compatible with this kit number
kitnumbers backgroundcolors style
This table is used to create random kits, specifically the kit manufacturer logo
manufacturers manufacturerid a unique identifier for the manufacturer
manufacturers name name
manufacturers countryid the home or preferred Country id
manufacturers regionid another Country or Region id where the manufacturer is active
manufacturers international 0=No, 1=Yes, 2_Occasionally
Pagina 10
Tables-Fields
manufacturers prestige a number in millions of team overall value that the manufacturer can target
manufacturers specificteamid team id if this brand is specific to a team only
manufacturers hasshoulderlogo true if uses shoulder logo
manufacturers hassleevelogo true if uses sleeve logo
This table is used to create random kits, specifically the sponsor logo
sponsors sponsorid a unique identifier for the manufacturer
sponsors name name
sponsors countryid the home or preferred Country id
sponsors regionid another Country or Region id where the sponsor is active
sponsors international 0=No, 1=Yes, 2_Occasionally
sponsors prestige a number in millions € of team overall market value that the sponsor can afford
This table is used to create random kits, specifically the collar folds
collarfolds collarid a unique identifier for the collar fold
collarfolds ncolors number of colors actually present (1, 2 or 3)
collarfolds frequency a score used to randomize collar fold usage
This table is used to create random kits, specifically the jersey borders
borders borderid a unique identifier for the border
borders ncolors number of colors actually present (1, 2 or 3)
borders frequency a score used to randomize collar border usage
This table is used to create random kits, specifically select random colors
randomcolors colorid a unique identifier for the random color
randomcolors r red
randomcolors g green
randomcolors b blue
randomcolors contrastcolor the colorid of a contrasting color
randomcolors colorgroup color group identifier
randomcolors colorname mnemonic descriptor
This table is used to create random kits, specifically define combinations of collar and borders colors
bordercolors bordercolorsid identifier for a combination of border colors
bordercolors colorsmono if the border has 1 color select the given palette combination
bordercolors colorsdual if the border has 2 color select the given palette combination
bordercolors colorster if the border has 3 color select the given palette combination
This table is used to create random kits, specifically define combinations logo\sponsor\number colors
lsncolor lsncolorid logo sponsor number colors id
lsncolor logocolors logo one color combinations
lsncolor sponsorcolors sponsor one color combinations
lsncolor numbercolors number one color combinations
teamkitpatterns ycolorid1 identifier of a randomcolor that can be used as fourth color of the palette
teamkitpatterns ycolorid2 identifier of a randomcolor that can be used as fourth color of the palette
teamkitpatterns ycolorid3 identifier of a randomcolor that can be used as fourth color of the palette
teamkitpatterns kitpalette string to combine 3 colors from team (RGB) + Y color in a 4 colors palette
teamkitpatterns frequency a score used to randomize alternative options for the same team and kittype
Pagina 11
Tables-Fields
This table is used to aggregate a jersey pattern with shorts and socks into a reusable kit pattern
kitpatterns kiypatternid The unique identifier for the kit pattern
kitpatterns jerseypattern mnemonic for the jersey pattern (see jerseypatterns table)
kitpatterns bordercollarstyle mnemonic for the border \ collars possible styles
select a color combination from table bordercolors to be applied to border and
kitpatterns bordercolorsid color
select a color combination from table lsncolor to be applied to sponsor, logo and
kitpatterns lsncolorid numbers
kitpatterns shortspalette1 string scrambling the jersey 4 colors palette for shorts
kitpatterns shortspattern1 string representing possible pattern and color combination
kitpatterns sockspalette1 string scrambling the jersey 4 colors palette for socks
kitpatterns sockspattern1
kitpatterns shortspalette2 string scrambling the jersey 4 colors palette for alternative shorts
kitpatterns shortspattern2
kitpatterns sockspalette2 string scrambling the jersey 4 colors palette for alternative socks
kitpatterns sockspattern2
This table is used to aggregate different jerseystyles as alternative version of a specific jersey pattern
jerseypatterns jerseypattern mnemonic for the jersey pattern
jerseypatterns jerseystyle1 mnemonic for a jersey style (see jersey table)
jerseypatterns jerseystyle2 mnemonic for a jersey style
jerseypatterns jerseystyle3 mnemonic for a jersey style
jerseypatterns jerseystyle4 mnemonic for a jersey style
jerseypatterns jerseystyle5 mnemonic for a jersey style
jerseypatterns jerseystyle6 mnemonic for a jersey style
jerseypatterns jerseystyle7 mnemonic for a jersey style
jerseypatterns jerseystyle8 mnemonic for a jersey style
Pagina 12
Enumerations
Confederation
None=0,
FIFA=1,
UEFA=2,
CAF=3,
CONMEBOL=4,
AFC=5,
OFC=6,
CONCACAF=7
Ethnicity
Random=0,
Nordic=1,
Caucasic=2,
Mediterranean=3,
Latin=4,
Arabic=5,
LightAfrican=6,
DarkAfrican=7,
Asiatic=8,
Indian=9
Weather Mnemonic
DEF Default
ALP Alpin Weather
UK UK Weather
NEU North Europe Weather
SEU South Europe Weather
Pagina 13
Enumerations
Competition type
League=1,
Cup=2,
InternationalCup=3,
Supercup=4,
InternationalSupercup=5,
NationalTeamsCup=6,
NationalTeamsQualification=7,
Playoff=9,
NationalTeamFriendly=10,
ClubFriendly=11,
AggregateLeague=99
stage
League = 0,
LeagueStage2 = 1,
LeagueApertura = 10,
LeagueClausura = 11,
LeagueConference = 20,
FirstAggregate = 91,
SecondAggregate = 92,
Final = 101,
Semifinals = 102,
ThirdPlaceFinal = 103,
Quarters = 104,
RoundOf16 = 108,
RoundOf32 = 116,
RoundOf64 = 132,
GroupStage1 = 200,
GroupStage2 = 201,
QualificationRound1 = 301,
QualificationRound2 = 302,
QualificationRound3 = 303,
QualificationRound4 = 304,
PreliminaryRound1 = 401,
PreliminaryRound2 = 402,
PreliminaryRound3 = 403,
PreliminaryRound4 = 404,
Friendly = 800,
Randomize = 900,
Fake = 999
Tie Rules
// For groups
None = 0,
GoalDiff_GoalScored_Random = 1, // Group
H2H_GoalDiff_GoalScored_Random = 2, // Group
// For 1 leg knockout
Penalties = 3, // Knockout Replay
ExtraTime_Penalties = 4, // Knockout 1 leg
ExtraTime_EntryPosition = 6, // First Round Playoff Serie B
// For 2 legs knockout
GoalDiff_AwayGoals_ExtraTime_Penalties = 5, // Knockout 2 legs
GoalDiff_EntryPosition = 7, // Semifinali e finali Playoff Serie B
GoalDiff_ExtraTime_Penalties = 8, // England Playoff Semifinals
GoalDiff_AwayGoals_ExtraTime_EntryPosition = 9, // Playoff Spain
Match Expectation
DontCare = 0,
Pagina 14
Enumerations
DrawIsGreat,
DrawIsAcceptable,
OnlyWin,
Tactical Substitution
0 no chage
1 make your team more defensive
2 make your team more balanced
3 make your team more attacking
Turnover Subsitution
0 no change
4 let enter a turnover player
5 let enter a young player
6 let's try a desperate attack
7 let's try a desperate defense
Contract Type
Cantera = 0,
Transfer = 1,
Loan = 2,
LoanOptionToBuy = 3,
LoanObligationToBuy = 4,
LoanOptionToBuyWithBuyBack = 5,
LoanObligationToBuyWithBuyBack = 6,
FreeAgent = 7,
Retired = 8
Pagina 15
Enumerations
RY = 8,
GY = 16,
BY = 32
3 colors selection
None = 0,
RGB = 1,
RGY = 2,
RBY = 4,
GBY = 8
Pagina 16
Enumerations
40 20/mag
41 23/mag
42 27/mag
43 30/mag
44 03/giu
45 06/giu
46 10/giu
47 13/giu
48 17/giu
49 20/giu
50 24/giu
51 27/giu
52 01/lug
53 04/lug
54 08/lug
55 11/lug
56 15/lug
57 18/lug
58 22/lug
59 25/lug
60 29/lug
61 01/ago
62 05/ago
63 08/ago
64 12/ago
65 15/ago
66 19/ago
67 22/ago
68 26/ago
69 29/ago
70 02/set
71 05/set
72 09/set
73 12/set
74 16/set
75 19/set
76 23/set
77 26/set
78 30/set
79 03/ott
80 07/ott
81 10/ott
82 14/ott
83 17/ott
84 21/ott
85 24/ott
86 28/ott
87 31/ott
88 04/nov
89 07/nov
90 11/nov
91 14/nov
92 18/nov
93 21/nov
94 25/nov
95 28/nov
96 02/dic
97 05/dic
98 09/dic
99 12/dic
100 16/dic
101 19/dic
102 23/dic
Pagina 17