ICC Fixture Editor (Now Supports 2016)

weetabixharry

County Cricketer
Joined
Jul 13, 2009
Location
Zurich, Switzerland
Profile Flag
England
This is starting to look better, but I can't get all the dates to align correctly. For example, the IPL dates are all off by a few days.

Instead of the first match (Mumbai vs Chennai) being on 29th March, it's on 1st April. However, the English matches start correctly on 2nd April. Therefore, it seems like the different leagues are somehow referenced from a different base date. This is possibly encoded somewhere in the fixtures file (or I'm missing a simple trick).


upload_2020-7-21_19-24-44.png

For future reference, here is my (colour-coded) interpretation of what we know about the fixture file data format (almost all discovered by @Isura, @mrtwisties and perhaps others, with very minor additions/clarifications by me).

Each calendar date has a 6-byte header, comprising a 2-byte date index, a 2-byte count of the number of matches being played on this date... and the last 2 bytes are always zero (maybe reserved for future functionality):

1644089036326.png

The start of each match has a 42-byte header (or 50 bytes starting from CC 2021). I think all bytes are now understood:

1644089084556.png

The continuation of a multi-day match (after the first day) is just denoted using a 2-byte match reference (where the first match in the file has reference 0002, with increment thereafter).

upload_2020-7-21_18-52-8.png

Putting this information together, we can start reading off the information from the fixture file like this:

Fixtures.png

After this, we get some examples of multi-day matches continuing (red highlight):

Fixtures.png

Note that a new match start header can appear in between match references for ongoing matches (e.g. the last 0A 00 appears after a new match header).

The greyed-out 00 00 00 at the start of the file is probably actually a date header for day 0 (with no matches). The next greyed-out part FF FF 01 00 09 00 43 72 46 69 78 74 75 is the file header (which appears after the first data header with a nonzero number of matches). This is actually FF FF 01 00 09 00 followed by CrFixture in ASCII. The final re is not considered as part of the file header in Isura's code; instead, it is treated as a special match info delimiter (instead of 01 80) for the first match. This fits well into the code, so I certainly wouldn't change it (just a clarification).
 
Last edited:

lojoda

School Cricketer
Joined
May 29, 2020
Great work, I’ve been looking into this recently too. This is a great reference. Just 2 comments: I might be missing something but why did you invert the 2 byte sections as in 01 00 to 0001, secondly in relation to date I’m under the impression that all seasons start on April 1 with date 0001 so in the game is IPL on 30th March? Also I read somewhere that in seasons with leap years the starting date moves back to 0000, how true this is I don’t know! Again thanks
 

weetabixharry

County Cricketer
Joined
Jul 13, 2009
Location
Zurich, Switzerland
Profile Flag
England
why did you invert the 2 byte sections as in 01 00 to 0001

These 2-byte numbers are what we call "little-endian": the least significant byte is stored at the lowest memory address.

In other words, given the original 16-bit number in binary: b15 b14 b13 b12 b11 b10 b09 b08 b07 b06 b05 b04 b03 b02 b01 b00, it is stored in bytes as follows:

Code:
b07  b15
b06  b14
b05  b13
b04  b12
b03  b11
b02  b10
b01  b09
b00  b08

(where address order is ascending from left to right). Therefore, "01 00" in hexadecimal means a value of 1 in a little-endian system (not 256).

You can read more about "endianness", but basically that's it in a nutshell.

IPL starts on 29th March in the 2020 season in Cricket Captain 2020. This possibly never happened in CC 2016 and earlier, which is why Isura's code didn't need to handle it.
 

lojoda

School Cricketer
Joined
May 29, 2020
Thanks, I've looked and IPL starts on 23 March in 2019 game so if playing as an IPL team the season starts on 23 March but if playing an English county it starts on 1st April. In 2018 the IPL starts on 7th April so the game starts on the 1st like normal.
 

Isura

Club Cricketer
Joined
Apr 19, 2004
Online Cricket Games Owned
I have made a little bit of progress updating the Fixture Editor for 2020. I think I have got most of the match types set up correctly, so it at least finishes loading a CC 2020 fixtures file.

Next, I need to set up the team names (a few are right, but a lot are showing as "T.B.D.").

I also failed to create a new Version (I can't figure out how the project resources are built), so I'm currently "borrowing" 2016 for 2020.

View attachment 234566

Awesome, glad you made progress. Correct, team names will be TBD until you add a new text file with teams. You need Visual Studio installed to build the program. In Visual studio you add a new resource file for the team names and also a new resource file for the match types. It should build on the free version of visual studio 2019 (however I used an older version originally)[DOUBLEPOST=1595564120][/DOUBLEPOST]Thanks for documenting the format! It was all in my head these past years :)
 

muzzys

School Cricketer
Joined
Nov 6, 2013
Online Cricket Games Owned
Any idea when the fixture editor will be released?
really looking forward to it as its needed in the game.
 

weetabixharry

County Cricketer
Joined
Jul 13, 2009
Location
Zurich, Switzerland
Profile Flag
England
@lojoda and @muzzys

I haven't worked on this for a few weeks. I have attached what I currently have. Please try it out and let me know what does and doesn't work.

The main issue I know about is that the dates for Indian domestic games (and possibly others) are displaying incorrectly. Also, I have just hacked CC 2020 into the existing 2016 Version dropdown, so just select 2016 (I will fix this later).

I know a lot of teams are still missing. If you scroll down a bit, you will see some garbage like this:

upload_2020-8-7_15-29-51.png

The appearance of "Derbyshire T20" is totally incorrect and seems to be due to a change in the formatting of the fixtures file. However, the hexadecimal numbers like "0038", "0037", "083C", etc. are just codes that I haven't mapped to team names yet.

If you want the fixture editor to be released any time in the foreseeable future, then I will need help to fill in these gaps. You can do this by finding the fixtures in Cricket Captain 2020. For example, if I run an Australian career mode game, then I can find this in the "Fixtures and Results" screen:

upload_2020-8-7_15-37-46.png

From this, we can clearly see:
  • 0038 = Queensland
  • 0037 = New South Wales
  • 003A = Tasmania
  • 003B = Victoria
In this case, you could help me out by providing these mappings in the following specific format:

New South Wales One Day, 0037
Queensland One Day, 0038
Tasmania One Day, 003A
Victoria One Day, 003B


Note in particular:
  • These are in numerical order (where hexadecimal order is 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F). You will probably notice that this often (but not always) corresponds to alphabetical order of the team names within each competition, which sometimes makes life easier.
  • The team names are suffixed with "One Day", "T20", "IPL", "PSL", "CPL", "BPL", "100", etc. depending on the league. There is no suffix for First Class teams.
There are probably hundreds of teams to map, so I need as much help as possible. (Of course, anything that already displays correctly is not required). If you plan to help, please say which country's fixtures you will help with, so we don't duplicate effort.
 

Attachments

  • Fixtures.zip
    399.2 KB · Views: 21
Last edited:

lojoda

School Cricketer
Joined
May 29, 2020
Bangladesh Premier League
Chattogram BPL, 0156
Comilla BPL, 0155
Sylhet BPL, 01C9
Rangpur BPL, 0158
Dhaka BPL, 0157
Rajshshi BPL, 015A
Khulna BPL, 0159
 

lojoda

School Cricketer
Joined
May 29, 2020
Quaid-e-Azam Trophy
Central Punjab, 0277
Southern Punjab, 0278
Sindh, 0197
Balochistan, 0145
Khyber Pakhtunkhwa, 00EA
Northern, 0279
It seems its the same team codes for Pak One Day Cup
And Pakistan Twenty Over Trophy
 
Last edited:

weetabixharry

County Cricketer
Joined
Jul 13, 2009
Location
Zurich, Switzerland
Profile Flag
England
Quaid-e-Azam Trophy
Central Punjab, 0277
Southern Punjab, 0278
Sindh, 0197
Balochistan, 0145
Khyber Pakhtunkhwa, 00EA
Northern, 0278
It seems its the same team codes for Pak One Day Cup
And Pakistan Twenty Over Trophy

This doesn't look quite right. It shouldn't be possible for both Southern Punjab and Northern to have the same code. I think Northern should be 0279.
 

lojoda

School Cricketer
Joined
May 29, 2020
This doesn't look quite right. It shouldn't be possible for both Southern Punjab and Northern to have the same code. I think Northern should be 0279.
Whoops, my mistake! Just typed it in wrong. I’ve edited the post for future reference
 

lojoda

School Cricketer
Joined
May 29, 2020
Nzl Twenty Over Trophy, Nzl One Day Cup and Plunket Shield
Auckland, 0056
Canterbury, 006A
Wellington, 0058
Central Districts, 0059
Northern Districts, 0057
Otago, 0055
 

Users who are viewing this thread

Top