How to Edit tournaments in WBM 2007.

First of all you must understand the tournaments structure in WBM 2007 which is the following:
Tournament à Phase à Group à Position
A Phase could be Regular Season or Semi Finals
A Group could be a pair of teams in Semi Finals
Position is the placement of a team inside the Group of a Phase. For example the position of a team in a group of a semi finals phase could be 1 or 2 as there are only 2 teams in this group.

Before edit anything you must back up the template.wbmgame in case you make any serious mistakes.

You can also download an excel with all the changes we are going to make here in order to copy paste them in the db.

Use the password 3ni0fl0at2em to open the database.

The db tables that control the tournaments are the following:
tTournament
tTournamentPhase
tTournamentGroup
tTournamentFixture
tTournamentTarget
tTournamentProgress
tTournamentProgress1
tTournamentProgress2
tTournamentProgress3
tTournamentTimetable
tTournamentTimetable0
tTournamentTimetable1
tTournamentTimetable2
tTournamentTimetable3

In this tutorial we will use as an example the Estonian league and we will show how to edit in order to add it as a full league in the game.

Since we are going to need all the teams that take part in this league you must go to tTeams and create them. 3 teams from Estonia are already included in the db with ID 5701 and 5702 and 5703. Notice that the team Ids have a special way to be created. The first 2 or 3 digits must always be the same for teams of the same country and the other 2 the team code inside the country. So in our case we must create 7 new teams (since Estonia has 10 in the league) with ids like these: 5704, 5705, 5706, 5707, 5708, 5709, and 5710.
Now that you have created the new teams, just use the data editor to update their data and their rosters or you can just leave that for later.

tTournament:
This is the main table. Here you can see the ID number of every tournament in order to identify it in the other tables. Most fields of this table are self explanatory or have comments that you can see in design view. Note that NationalityID refers to the country ID inside the tCountry table and DayInitialization is the calendar day (see ID in tDates) on which this tournament will start to run.
The Estonian league has the ID 47. As you can see here most of the leagues are already included in the game but not as full leagues in every case. To make Latvia a full league you will need to change its type to 1. Also InfoTeamsCount must be set to 10 (as the teams of the Estonian league) and InfoPhasesCount must be 4 (cause Estonia has Regular Season, Quarter Finals, Semi Finals and Finals = 4 Phases). So you will also need to update all other fields according to the rest of Estonian league data.

Things to watch out:
InfoPhasesCount holds the number of phases this tournament has WITHOUT the Final Standings (Phase 255) which is common for all tournament.
Ignore ProgressSeason and CheckPerformancePhaseNumber. Just set both to 1.
IsHostTeam: Check if there is a host country for all the matches of this tournament.
CountrySelection: Check if there is a host country for the final of this tournament.
Randomize: 1 = Randomize team places inside phase 1, 2 = Randomize team places inside groups in phase 1.

This is how the table must look after you edit:

ID NationalityID DayInitialization DayStartCheckPerformance DayFinishCheckPerformance InfoPhasesCount CheckPerformancePhaseNumber InfoTeamsRelegated InfoTeamsCount IsNational IsHostTeam Type Randomize Name DificultyValue CountrySelection Recurrent Notes TitleHolderTeamID TournamentImageName ProgressSeason Viewable Playable PeriodTime MatchFouls
47 81 0 96 263 4 1 0 10 No No 1 1 ESTONIAN LEAGUE 2 No 1 10 TEAMS PARTICIPATE. TOP TEAM QUALIFY TO EUROCUP-EAST. 0 tournaments\tour_estonia_league.WBMImage 1 Yes Yes 10 5

 

tTournamentPhase:
Again most fields here are self explanatory or have comments that you can see in design view. Filter the table in TournamentID for Estonian League ID (47). Estonian league is currently a fake tournament and has only 2 phases 1 for Regular Season and 255 for Final Standings. So we need to create 3 more phases. 2 for Quarter Finals with 4 Groups. 3 for Semi Finals with 2 Groups and 4 for Finals with 1 Group.

Things to watch out:
The StandingsFormID
holds a code for the program to understand which screen must use to present this phase. These codes are:
10 for phases with Knock-Out single matches.
51 for league table standings like those in Regular Season that uses wines – loses rank teams.
52 for league table standings like those in Regular Season that uses a point system to rank teams.
53 for league table standings in phases with single games like those in Euroleague or Eurobasket.
55 for Play offs.
57 for Final Standings.

The Priority filed holds the info about the home advantage. 0=Ignore, 1=Create home priority table at the end of this phase, 2=Use the home priority table for this phase. 

This is how the table must look after you edit:

ID TournamentID PhaseNumber GroupsCount WinPoints LosePoints Priority Present StandingsFormID Name Notes ScoreFactor
169 47 1 1 1 0 1 Yes 51 REGULAR SEASON HOME-AWAY GAMES. TOP 8 TEAMS ADVANCE TO PLAY OFFS QUARTER FINALS 1
457 47 2 4 1 0 2 Yes 55 PLAY OFFS QUARTER FINALS BEST OF 3 GAMES. WINNERS ADVANCE TO PLAY OFFS SEMI FINALS 2
458 47 3 2 1 0 2 Yes 55 PLAY OFFS SEMI FINALS BEST OF 3 GAMES. WINNERS ADVANCE TO PLAY OFFS SEMI FINALS 2.5
459 47 4 1 1 0 2 Yes 55 PLAY OFFS FINALS BEST OF 5 GAMES.  3
170 47 255 1 0 0 0 Yes 57 FINAL STANDINGS   0

 

tTournamentGroup:
Here is were we edit the Groups for each phase. Filter again for any rows with TournamentID value = Estonian ID (47).
As you remember Estonian league has 4 phases.
In phase 1 there is only 1 Group with 10 teams.
Phase 2 has 4 Groups (A,B,C and D) with 2 teams each. Group A teams are Regular season 1st team that plays with regular season 8th team, in Group B RS2 plays RS7, in Group C RS3 plays RS6 and in Group D RS4 plays RS5.
Phase 3 has 2 Groups E and F with 2 teams each. In E the winner of A Group plays the winner of D Group and in F the winner of B plays the winner of C.
Phase 4 has only Group G with 2 teams where the winner of E plays the winner of F.
Phase 255 (Final Standings) has 1 Group with 10 teams. S

This is how the table must look after you edit:

ID TournamentID PhaseNumber FixturesText GroupNumber TeamsCount Name
344 47 1 REGULAR SEASON 1 10  
832 47 2 PLAY OFFS QUARTER FINALS  1 2 A>RS1-RS8
833 47 2 PLAY OFFS QUARTER FINALS  2 2 B>RS2-RS7
834 47 2 PLAY OFFS QUARTER FINALS  3 2 C>RS3-RS6
835 47 2 PLAY OFFS QUARTER FINALS  4 2 D>RS4-RS5
836 47 3 PLAY OFFS SEMI FINALS  1 2 E>WA-WD
837 47 3 PLAY OFFS SEMI FINALS  2 2 F>WB-WC
838 47 4 PLAY OFFS FINALS  1 2 WE-WF
345 47 255 FINAL STANDINGS 1 10  

 

tTournamentProgress:
0,1,2 and 3 are completely the same. So is the tTournamentProgress except of the field TeamID which is always set to 0 for this table.
So first we are going to work with tTournamentProgress, then we will make the same changes (and some more) to tTournamentProgress0 and then we will copy and paste tTournamentProgress0 as 1,2 and 3.
As always open the table in design view and read the descriptions to better understand the fields and their values.
This table handles the progress of the tournaments. The general idea for the progress is that every team spot of every phase in every tournament is filled by a team from a position, of another phase, of another or the same tournament. tTournamentProgress can read this from itself if the ProgressSeason field is set to 0 or from the tTournamentProgress of the last 3 previous seasons and this is why we keep tTournamentProgress 0, 1, 2 and 3.

For Estonian league we must take for positions 1 to 10 of Group 1 of Phase 1, from TournamentID 47 (itself), from Phase 255 (final standings), from Group 1, from positions 1-10, from season 1 (previous).

That means that this season will take part in the league the same teams as the last season. If we want to relegate the last 2 teams then we must take only the first 8 teams from phase 255 and the teams 1 and 2 from Estonian second division as team 9 and 10 of the current season. In that case of course you would have to create also a fake league for the second division. But for now we assume that no teams are relegated in Estonia and we continue.

In Phase 2 we have 4 Groups of 2 teams. For Place 1 of Group 1 of Phase 2 (Quarter Finals) we take the team from Position 1 of Group 1 of Phase 1(regular season) and for Place 2 of Group 1 of Phase 2 (Quarter Finals) we take the team from Position  8 of Group 1 of Phase 1(regular season). And so on until we describe the full progress of this tournament.

Things to watch out:
The News field can take the following values:
32 This team wins the tournament.
33 This team wins the tournament and qualifies to another tournament.
66 This team qualify to the final of this tournament
72 This team qualify for an international tournament.
71 This team is relegated.

This is how the table must look after you edit:

ID TeamID TournamentID PhaseNumber GroupNumber FromTournamentID FromPhaseNumber FromGroupNumber FromPlace PointsTransfered AsTeamNumber News ProgressSeason
1396 0 47 1 1 47 255 1 1 0 1 0 1
1395 0 47 1 1 47 255 1 2 0 2 0 1
1394 0 47 1 1 47 255 1 3 0 3 0 1
4437 0 47 1 1 47 255 1 4 0 4 0 1
4438 0 47 1 1 47 255 1 5 0 5 0 1
4439 0 47