C2k5 Tournament Editor

mister-tee said:
Barmyarmy

ive downloaded the tournemant editor . i started a national league game division one lancashire(me) v glamorgan(pc) saved it ? went to the editor to put lancs in division two and i saved ? went to the game went thru the continue button till the lancs fixture came up but it selected another team ? for me to play for
in the editor teams on the left how do be lancashire but i want them in division two , would be so kind to guide thru this please
many thanks
mister tee

Are you sure you changed them in the National League and not the County Championship? Use the top-left combo-box to cycle between the 4 comps in the English season.
 
is there a list of what byte does what in the tmt file? i am interested in having a look. it looks very similar to the rugby 2006 tmt file, just bigger and am wanting to play with that to create tornaments for that.

btw great stuff barmy its a dream program :)
 
Ok. First thing to say is that all the tmt files are slightly different so I can't really give you a byte list.
The first thing the editor does is to get the tour type (which is the same byte for all tours):

Byte 830448 - Tour Type (in decimal)
02 = Knockout
03 = World Championship
04 = World Series
05 = Test Series
08 = English Season
09 = County Championship
10 = National League
11 = C&G
12 = Twenty20
13 = Australian Season
14 = PURA Cup
15 = ING Cup
17 = Long Aus Tour
18 = Short Aus Tour
19 = West Indies Tour
20 = Long English Tour
21 = Short English Tour
22 = Ashes Tour (Aus)
23 = Ashes Tour (Eng)
24 = ODI Circuit
25 = South African Tour
26 = Subcontinent Tour
27 = Zim/NZ Tour

There are then 4 offsets (at minimum) you have know for each tournament:

Where the teams are stored
Where the user controlled teams are stored
Where the standings are stored
Where the fixtures are stored

Annoyingly these vary from tmt to tmt.

Teams

These are stored at 4 byte intervals and use the team code for each team. Knockout is 857728 for example and there are 8 teams.
I've posted my code below so you can get the offsets for each one: (teamoffset - ignore the other stuff and standings offsets aren't included).

Code:
Select Case tourntype
            Case 2
                lbltournamenttype.Text = "Knockout"
                totalteams = 8
                tournoffset = 857760
                teamoffset = 857728
                fixturesoffset = 857792
                fixturesoffset1 = 0
                lblcc1.Hide()
                lblcc2.Hide()
                lblwc2.Hide()
                lbltw2.Hide()
                lbltw3.Hide()
                lblcgpre.Hide()
                fixtures.cbofixturesfilter.Hide()
                cboteamfilter.Hide()
            Case 3
                lbltournamenttype.Text = "World Championship"
                totalteams = 14
                tournoffset = 858588
                teamoffset = 858532
                fixturesoffset = 858644
                fixturesoffset1 = 0
                lblcc1.Text = "Pool 1 -"
                lblcc1.Show()
                lblcc2.Hide()
                lblwc2.Show()
                lblcgpre.Hide()
                lbltw2.Hide()
                lbltw3.Hide()
                fixtures.cbofixturesfilter.Hide()
                cboteamfilter.Hide()
            Case 4
                lbltournamenttype.Text = "World Series"
                totalteams = 5
                tournoffset = 857948
                teamoffset = 857928
                fixturesoffset = 857968
                fixturesoffset1 = 0
                lblcc1.Hide()
                lblcc2.Hide()
                lblwc2.Hide()
                lblcgpre.Hide()
                lbltw2.Hide()
                lbltw3.Hide()
                fixtures.cbofixturesfilter.Hide()
                cboteamfilter.Hide()
            Case 5
                lbltournamenttype.Text = "Test Series"
                totalteams = 2
                tournoffset = 857948
                teamoffset = 857728
                fixturesoffset = 857752
                fixturesoffset1 = 0
                lblcc1.Hide()
                lblcc2.Hide()
                lblwc2.Hide()
                lblcgpre.Hide()
                lbltw2.Hide()
                lbltw3.Hide()
                fixtures.cbofixturesfilter.Hide()
                cboteamfilter.Hide()
            Case 8
                lbltournamenttype.Text = "English Season"
                totalteams = 18
                tournoffset = 885800
                teamoffset = 885728
                fixturesoffset = 885872
                fixturesoffset1 = 918152
                fixturesoffset2 = 920672
                fixturesoffset3 = 950624
                fixturesoffset4 = 979244
                lblcc1.Hide()
                lblcc2.Hide()
                lblwc2.Hide()
                lblcgpre.Hide()
                lbltw2.Hide()
                lbltw3.Hide()
                cboteamfilter.Show()
                cboteamfilter.Items.Clear()
                cboteamfilter.Items.Add("County Championship")
                cboteamfilter.Items.Add("National League")
                cboteamfilter.Items.Add("C&G Trophy")
                cboteamfilter.Items.Add("Twenty20 Cup")
                fixtures.cbofixturesfilter.Show()
                fixtures.cbofixturesfilter.Items.Clear()
                fixtures.cbofixturesfilter.Items.Add("All")
                fixtures.cbofixturesfilter.Items.Add("County Championship")
                fixtures.cbofixturesfilter.Items.Add("National League")
                fixtures.cbofixturesfilter.Items.Add("C&G Trophy")
                fixtures.cbofixturesfilter.Items.Add("Twenty20 Cup")
            Case 9
                lbltournamenttype.Text = "County Championship"
                totalteams = 18
                tournoffset = 858520
                teamoffset = 858448
                fixturesoffset = 858592
                fixturesoffset1 = 0
                lblcc1.Show()
                lblcc2.Show()
                lblwc2.Hide()
                lblcgpre.Hide()
                lbltw2.Hide()
                lbltw3.Hide()
                fixtures.cbofixturesfilter.Hide()
                cboteamfilter.Hide()
            Case 10
                lbltournamenttype.Text = "National League"
                totalteams = 19
                tournoffset = 858612
                teamoffset = 858528
                fixturesoffset = 858688
                fixturesoffset1 = 861208
                lblcc1.Show()
                lblcc2.Show()
                lblwc2.Hide()
                lblcgpre.Hide()
                lbltw2.Hide()
                lbltw3.Hide()
                fixtures.cbofixturesfilter.Hide()
                cboteamfilter.Hide()
            Case 11
                lbltournamenttype.Text = "C&&G Trophy"
                totalteams = 18
                tournoffset = 857800
                teamoffset = 857728
                fixturesoffset = 857872
                fixturesoffset1 = 0
                lblcc1.Text = "Main -"
                lblcc1.Show()
                lblcc2.Hide()
                lblwc2.Hide()
                lbltw2.Hide()
                lbltw3.Hide()
                lblcgpre.Show()
                fixtures.cbofixturesfilter.Hide()
                cboteamfilter.Hide()
            Case 12
                lbltournamenttype.Text = "Twenty20 Cup"
                totalteams = 18
                tournoffset = 858520
                teamoffset = 858448
                fixturesoffset = 858592
                fixturesoffset1 = 0
                lblcc1.Text = "Pool 1 -"
                lblcc1.Show()
                lbltw2.Show()
                lbltw3.Show()
                lblcc2.Hide()
                lblwc2.Hide()
                lblcgpre.Hide()
                fixtures.cbofixturesfilter.Hide()
                cboteamfilter.Hide()
            Case 13
                lbltournamenttype.Text = "Australian Season"
                fixturesoffset = 885296
                fixturesoffset1 = 913732
                totalteams = 6
                lblcc1.Hide()
                lbltw2.Hide()
                lbltw3.Hide()
                lblcc2.Hide()
                lblwc2.Hide()
                lblcgpre.Hide()
                cboteamfilter.Show()
                cboteamfilter.Items.Clear()
                cboteamfilter.Items.Add("PURA Cup")
                cboteamfilter.Items.Add("ING")
                fixtures.cbofixturesfilter.Show()
                fixtures.cbofixturesfilter.Items.Clear()
                fixtures.cbofixturesfilter.Items.Add("All")
                fixtures.cbofixturesfilter.Items.Add("PURA Cup")
                fixtures.cbofixturesfilter.Items.Add("ING")
            Case 14
                lbltournamenttype.Text = "PURA Cup"
                totalteams = 6
                tournoffset = 857992
                teamoffset = 857968
                fixturesoffset = 858016
                fixturesoffset1 = 0
                lblcc1.Hide()
                lblcc2.Hide()
                lblwc2.Hide()
                lblcgpre.Hide()
                lbltw2.Hide()
                lbltw3.Hide()
                fixtures.cbofixturesfilter.Hide()
                cboteamfilter.Hide()
            Case 15
                lbltournamenttype.Text = "ING Cup"
                totalteams = 6
                tournoffset = 857992
                teamoffset = 857968
                fixturesoffset = 858016
                fixturesoffset1 = 0
                lblcc1.Hide()
                lblcc2.Hide()
                lblwc2.Hide()
                lblcgpre.Hide()
                lbltw2.Hide()
                lbltw3.Hide()
                fixtures.cbofixturesfilter.Hide()
                cboteamfilter.Hide()
            Case 17
                lbltournamenttype.Text = "Long Australian Tour"
                totalteams = 9
                tournoffset = 859484
                teamoffset = 859448
                fixturesoffset = 859520
                fixturesoffset1 = 0
                lblcc1.Hide()
                lblcc2.Hide()
                lblwc2.Hide()
                lblcgpre.Hide()
                lbltw2.Hide()
                lbltw3.Hide()
                fixtures.cbofixturesfilter.Hide()
                cboteamfilter.Hide()
            Case 18
                lbltournamenttype.Text = "Short Australian Tour"
                totalteams = 10
                tournoffset = 859488
                teamoffset = 859448
                fixturesoffset = 859528
                fixturesoffset1 = 0
                lblcc1.Hide()
                lblcc2.Hide()
                lblwc2.Hide()
                lblcgpre.Hide()
                lbltw2.Hide()
                lbltw3.Hide()
                fixtures.cbofixturesfilter.Hide()
                cboteamfilter.Hide()
            Case 19
                lbltournamenttype.Text = "West Indies Tour"
                totalteams = 5
                tournoffset = 859468
                teamoffset = 859448
                fixturesoffset = 859488
                fixturesoffset1 = 0
                lblcc1.Hide()
                lblcc2.Hide()
                lblwc2.Hide()
                lblcgpre.Hide()
                lbltw2.Hide()
                lbltw3.Hide()
                fixtures.cbofixturesfilter.Hide()
                cboteamfilter.Hide()
            Case 20
                lbltournamenttype.Text = "Long English Tour"
                totalteams = 15
                tournoffset = 860368
                teamoffset = 860304
                fixturesoffset = 860432
                fixturesoffset1 = 0
                lblcc1.Hide()
                lblcc2.Hide()
                lblwc2.Hide()
                lblcgpre.Hide()
                lbltw2.Hide()
                lbltw3.Hide()
                fixtures.cbofixturesfilter.Hide()
                cboteamfilter.Hide()
            Case 21
                lbltournamenttype.Text = "Short English Tour"
                totalteams = 12
                tournoffset = 859496
                teamoffset = 859448
                fixturesoffset = 859544
                fixturesoffset1 = 0
                lblcc1.Hide()
                lblcc2.Hide()
                lblwc2.Hide()
                lblcgpre.Hide()
                lbltw2.Hide()
                lbltw3.Hide()
                fixtures.cbofixturesfilter.Hide()
                cboteamfilter.Hide()
            Case 22
                lbltournamenttype.Text = "Ashes Tour (Australia)"
                totalteams = 10
                tournoffset = 859488
                teamoffset = 859448
                fixturesoffset = 859528
                fixturesoffset1 = 0
                lblcc1.Hide()
                lblcc2.Hide()
                lblwc2.Hide()
                lblcgpre.Hide()
                lbltw2.Hide()
                lbltw3.Hide()
                fixtures.cbofixturesfilter.Hide()
                cboteamfilter.Hide()
            Case 23
                lbltournamenttype.Text = "Ashes Tour (England)"
                totalteams = 16
                tournoffset = 859512
                teamoffset = 859448
                fixturesoffset = 859576
                fixturesoffset1 = 0
                lblcc1.Hide()
                lblcc2.Hide()
                lblwc2.Hide()
                lblcgpre.Hide()
                lbltw2.Hide()
                lbltw3.Hide()
                fixtures.cbofixturesfilter.Hide()
                cboteamfilter.Hide()
            Case 24
                lbltournamenttype.Text = "ODI Circuit"
                totalteams = 10
                tournoffset = 857776
                teamoffset = 857736
                fixturesoffset = 861240
                fixturesoffset1 = 861520
                fixturesoffset2 = 861716
                lblcc1.Hide()
                lblcc2.Hide()
                lblwc2.Hide()
                lblcgpre.Hide()
                lbltw2.Hide()
                lbltw3.Hide()
                fixtures.cbofixturesfilter.Hide()
                cboteamfilter.Hide()
            Case 25
                lbltournamenttype.Text = "South Africa Tour"
                totalteams = 6
                tournoffset = 859472
                teamoffset = 859448
                fixturesoffset = 859496
                fixturesoffset1 = 0
                lblcc1.Hide()
                lblcc2.Hide()
                lblwc2.Hide()
                lblcgpre.Hide()
                lbltw2.Hide()
                lbltw3.Hide()
                fixtures.cbofixturesfilter.Hide()
                cboteamfilter.Hide()
            Case 26
                lbltournamenttype.Text = "Subcontinent Tour"
                totalteams = 8
                tournoffset = 857768
                teamoffset = 857736
                fixturesoffset = 862936
                fixturesoffset1 = 863328
                lblcc1.Hide()
                lblcc2.Hide()
                lblwc2.Hide()
                lblcgpre.Hide()
                lbltw2.Hide()
                lbltw3.Hide()
                fixtures.cbofixturesfilter.Hide()
                cboteamfilter.Hide()
            Case 27
                lbltournamenttype.Text = "Zimbabwe/New Zealand Tour"
                totalteams = 5
                tournoffset = 861180
                teamoffset = 861160
                fixturesoffset = 861200
                fixturesoffset1 = 0
                lblcc1.Hide()
                lblcc2.Hide()
                lblwc2.Hide()
                lblcgpre.Hide()
                lbltw2.Hide()
                lbltw3.Hide()
                fixtures.cbofixturesfilter.Hide()
                cboteamfilter.Hide()
            Case Else
                MsgBox("format not yet supported", MsgBoxStyle.Critical)
                Me.Close()

User controlled teams

tournoffset is where the teams are listed again (4 bytes apart) with a 1 if they are user controlled and a 0 for computer

Standings

Stored in 40 byte intervals, shows the tables for the tournament.

e.g 857744 - Test Series

In a lot of tournaments there is more than one set of standings (and indeed teams). Hopefully the following code will help (!):

Code:
'test series
        For a = 0 To 50
            FS.Seek(fixturesoffset + a * 28 + 2, SeekOrigin.Begin)
            b = BR.ReadByte
            If b = 5 Then Exit For
        Next
        FS.Seek(fixturesoffset + a * 28, SeekOrigin.Begin)
        a = BR.ReadByte
        b = BR.ReadByte
        FS.Seek(857744, SeekOrigin.Begin)
        BW.Write(a)
        FS.Seek(857784, SeekOrigin.Begin)
        BW.Write(b)
        'world series 3 teams in position 2 "858600"
        'for aus ashes, sa tour, aus long tour, aus short tour, eng long tour      
        Dim i, j As Integer
        If tourntype = 22 Or tourntype = 25 Or tourntype = 17 Or tourntype = 18 Or tourntype = 20 Then
            j = 858600
            If tourntype = 22 Then i = 859892
            If tourntype = 25 Then i = 859748
            If tourntype = 17 Then i = 859856
            If tourntype = 18 Then i = 859836
            If tourntype = 20 Then i = 860992
            FS.Seek(i, SeekOrigin.Begin)
            a = BR.ReadByte
            b = BR.ReadByte
            FS.Seek(i + 28, SeekOrigin.Begin)
            c = BR.ReadByte
            d = BR.ReadByte
            FS.Seek(j, SeekOrigin.Begin)
            BW.Write(a)
            FS.Seek(j + 40, SeekOrigin.Begin)
            BW.Write(b)
            If a = c Or b = c Then
                FS.Seek(j + 80, SeekOrigin.Begin)
                BW.Write(d)
            ElseIf a = d Or b = d Then
                FS.Seek(j + 80, SeekOrigin.Begin)
                BW.Write(c)
            End If
        End If
        'odi series in position 2
        'for eng ashes, eng short tour, wi tour, nz/zim tour
        'odi series in in position 3 "859456"
        'for eng long tour
        If tourntype = 23 Or tourntype = 21 Or tourntype = 19 Or tourntype = 20 Or tourntype = 27 Then
            j = 858600
            If tourntype = 23 Then i = 859716
            If tourntype = 21 Then i = 859908
            If tourntype = 19 Then i = 859768
            If tourntype = 20 Then i = 861048
            If tourntype = 20 Then j = 859456
            If tourntype = 27 Then i = 861228
            FS.Seek(i, SeekOrigin.Begin)
            a = BR.ReadByte
            b = BR.ReadByte
            FS.Seek(j, SeekOrigin.Begin)
            BW.Write(a)
            FS.Seek(j + 40, SeekOrigin.Begin)
            BW.Write(b)
        End If
        'odi series in position 4 "860312" 
        'for nz/zim tour
        'test series in position 3
        'for nz/zim tour
        If tourntype = 27 Then
            i = 861480
            j = 860312
            FS.Seek(i, SeekOrigin.Begin)
            a = BR.ReadByte
            b = BR.ReadByte
            FS.Seek(j, SeekOrigin.Begin)
            BW.Write(a)
            FS.Seek(j + 40, SeekOrigin.Begin)
            BW.Write(b)
            i = 861564
            j = 858600
            FS.Seek(i, SeekOrigin.Begin)
            a = BR.ReadByte
            b = BR.ReadByte
            FS.Seek(j, SeekOrigin.Begin)
            BW.Write(a)
            FS.Seek(j + 40, SeekOrigin.Begin)
            BW.Write(b)
        End If

Fixtures

This is probably the easiest part to understand (the offsets for c2k5 are in the first block of code):

Fixtures come in 28 byte blocks as follows:

(28+) 0 - Team 2
1 - Team 1
2 - Length of match (days)
3 - Match result
4-13 - match result and scorecard info (haven't checked it out properly)
14-15 - Overs
16-18 - date and venue (also changes when match is over)
20-23 - Match Type (e.g. test match, tour match etc).


I realise this isn't as helpful as it might be but the tmt file was quite a lot more complicated than I was expecting. I can give you a breakdown of exactly how the fixture bytes work if you like or if you have any other questions then feel free to post them.
 
this will be a big help actually, probably more than you realise :) cheers for that.

I have been workin on the rugby2k6 and have changed the teams and such, just about to change the fixtures now, with the help you just sent me but saying that they are different for all of the tmt files is putting me off a little.

we will see how things go though :) hopefully i can do something.

cheers
 
woosaah said:
this will be a big help actually, probably more than you realise :) cheers for that.

I have been workin on the rugby2k6 and have changed the teams and such, just about to change the fixtures now, with the help you just sent me but saying that they are different for all of the tmt files is putting me off a little.

we will see how things go though :) hopefully i can do something.

cheers

The offsets are different not the format. Once you've got one you've just got to do what I did with the filetypes sub and assign variables for the teamoffset etc.
 
yep thats about right :)

thanks again dude :)
 
tournemant editor link

Ive downloaded the c2k5 tournemant editor version 1.0.0.2 but i dont get the comob box top left ? , is a an updated version of this editor ??

yours

toene-arks
 
I have one doubt on this Editor...though havent downloaded it yet :D ...Actually I am a Test match freak..usually playing Test Series/Frizell/Pura...
I would love to play the Foreign Tour but it includes One-days as well...So, will this Editor help in removing all those Onedayers ( i.e retaining only 4/5 day matches )
 
jacobfelix said:
I have one doubt on this Editor...though havent downloaded it yet :D ...Actually I am a Test match freak..usually playing Test Series/Frizell/Pura...
I would love to play the Foreign Tour but it includes One-days as well...So, will this Editor help in removing all those Onedayers ( i.e retaining only 4/5 day matches )

Yes, you can change them into 4/5 day matchs (or even as part of the test series) or just cancel them altogether.
 
I seem to be stuck on this...Downloaded the Tournament Editor...In C2005 I saved a .tmt file ( NZL & Zim tour )....

Opened the .tmt file in Tournament Editor....the first match was a One day agst. N.Districts....converted it into a 3 day game....Next up was the ODI series agst hosts NZL...I made None ( in place of NZL ) for all 5 ODI's...Retained the 3 Match test series and a 4 dayer agst. Canterbury.

Then I opened the same .tmt file in C2005...after the first match( the 3 day agst ND) the game crashed back to Desktop when I clicked Continue.

The only option left for me is Using the Rt. Arrow Remove NZL and put in None..But in such a scenario I cant even play the Test Series agst. them..
(Imagine going on a NZL tour and playing only agst. N Districts and Canterbury and returning home :D )..

I think the same problem will happen to other tours. So, How to cancel only the ODI's agst the host and play only the 4 /5 day matches OR even vice-versa for that matter ( some people may want to play only ODi's and Cancel Tests)

One more thing is, I went to the Domestic Mode->Pura Cup. In place of the Australian Counties, I put in 6 International teams. When I saw in Cric 2005 this thing looked pretty awkward ( See the screenshot )...

BTW, How do I change all these matches to 5 day instead of 4 day AT ONE GO.
 

Attachments

  • Awk.jpg
    Awk.jpg
    31 KB · Views: 45
Last edited:
jacobfelix said:
I seem to be stuck on this...Downloaded the Tournament Editor...In C2005 I saved a .tmt file ( NZL & Zim tour )....

Opened the .tmt file in Tournament Editor....the first match was a One day agst. N.Districts....converted it into a 3 day game....Next up was the ODI series agst hosts NZL...I made None ( in place of NZL ) for all 5 ODI's...Retained the 3 Match test series and a 4 dayer agst. Canterbury.

Then I opened the same .tmt file in C2005...after the first match( the 3 day agst ND) the game crashed back to Desktop when I clicked Continue.

The only option left for me is Using the Rt. Arrow Remove NZL and put in None..But in such a scenario I cant even play the Test Series agst. them..
(Imagine going on a NZL tour and playing only agst. N Districts and Canterbury and returning home :D )..

I think the same problem will happen to other tours. So, How to cancel only the ODI's agst the host and play only the 4 /5 day matches OR even vice-versa for that matter ( some people may want to play only ODi's and Cancel Tests)

One more thing is, I went to the Domestic Mode->Pura Cup. In place of the Australian Counties, I put in 6 International teams. When I saw in Cric 2005 this thing looked pretty awkward ( See the screenshot )...

BTW, How do I change all these matches to 5 day instead of 4 day AT ONE GO.

Your method was correct; my code was buggy. All fixed now.
You should be able to cancel any match without it crashing.
I've not added a multiple days feature as I've not got time I'm afraid. You'll have to do them manually.
 
colin, why are you so smart? I briefly browsed through the thread and I can't understand one thing that has been said... nice work.
 

Users who are viewing this thread

Top