Making editors for cricket games

barmyarmy

Retired Administrator
Joined
Mar 12, 2003
Location
Edinburgh
It's the the same principles (and in many parts the same code!) as the tutorials in this thread. I suggest you complete them first.
 

nofeet

Club Captain
Joined
Jul 17, 2005
Location
Geelong
Online Cricket Games Owned
Colin could you give me the Source Code of your AC09 editor so i can have a go at some of the features you haven't done?
 

barmyarmy

Retired Administrator
Joined
Mar 12, 2003
Location
Edinburgh
I'd rather not at the moment to be honest.
Maybe after I've got a first full release out. If you want to help then you can do some roster cracking for what the game does when the string variables increase.
I'm almost there but things are still going wrong.
 

Hitterman

International Coach
Joined
Dec 28, 2006
Location
India
Online Cricket Games Owned
Hi Colin can i ask you a big favor? Could you do a tutorial on how you are making the AC09 Skills Editor? Because i want to learn how to make a editor like yours. Could you please help?
Colin is right, it works on the same principal. The tutorial was posted by Colin long time back and that worked for BLIC 07, C07. It is really a good tutorial.

All you need is some good logic and ability to implement basic function in vB.net.
 

blake

School Cricketer
Joined
Jul 15, 2007
Location
Brisbane, Australia
Online Cricket Games Owned
I realise this thread is almost three years old.. and that everybody is way better than me now.. :(

However.. the GUI in Visual Basic is extremely appealing to me.. compared to the extreme amount of code required in C++.. so I thought I might give it a quick shot. Just as a muck around - it definitely looks waaaaay easier to make than C++, but obviously doesn't have the same capacities.

Anyway.. tutorial two.. complete. First try as well, it only took me about 5 minutes. Okay, I know, you're all laughing at me for being so proud of some meaningless little accomplishment, but did you make it on your first... never mind. I'll go sit in the corner.

vbtest.jpg


Yes, I realise the colours look hideous, I just wanted to test them. :p
 

yakuza003

Club Cricketer
Joined
Sep 30, 2007
Online Cricket Games Owned
can u guys make a editor for cricket 07 game where we can change venue of existing tournament which is saved?
 

blake

School Cricketer
Joined
Jul 15, 2007
Location
Brisbane, Australia
Online Cricket Games Owned
I've only just really started the basics of my ICC09 Fixture Editor.. did a lot of it a while ago and have tried to re-start work on the project again, but I'm still hitting the same snag.

I was analysing the hex of the fixtures file.. and basically I've worked out that before each match starts, there is a certain symbol which translates to 80 in hex.

So, in my editor, I try and search for that hex symbol, so then I know that the hex code for a match starts after that symbol. However, my code is failing to find that symbol.

This is what I have:
If bytFile(j) = &H80 Then

bytFile basically contains every single byte in the file - I have this code a few lines earlier.

bytFile = BR.ReadBytes(nLen)

Whilst j is used in a simple for loop to the end of the file. So, basically, it reads every byte until the end of the file, and then if it sees the symbol 80 (&H80) it adds 1 to the number of matches in the fixture file.

However, I consistently get this error:
'A first chance exception of type 'System.IndexOutOfRangeException' occurred in ICC Fixture Editor.exe'

and it isn't recognising the symbol 80 like it is supposed to. :(

Any help?
 

AbBh

Panel of Selectors
Joined
Jan 13, 2007
Online Cricket Games Owned
It probably means that the value of j is exceeding the index range of the byte array bytFile which would be nLen - 1. Post the code if you can.
 

Hitterman

International Coach
Joined
Dec 28, 2006
Location
India
Online Cricket Games Owned
System.IndexOutOfRangeException' occurred in ICC Fixture Editor.exe'
The array index always starts from 0. You are writing len which means you are exceeding a single byte/index. AbBh's way is the correct one.

I always used to had this problem:p
 

blake

School Cricketer
Joined
Jul 15, 2007
Location
Brisbane, Australia
Online Cricket Games Owned
So, AbBh, you're saying that the value of j is exceeding (nLen - 1)? This would be the obvious answer, because j is set to the value of nLen. I appreciate the answer a lot by the way, as this is really only the only thing holding me back from coding this.

Here's the relevant code (only relates to this subject, left the rest out):

Dim bytFile() As Byte
Dim j As Integer = 1
Dim nLen As Long

FS = New FileStream(strFileName, FileMode.Open, FileAccess.ReadWrite)
BR = New BinaryReader(FS)
BW = New BinaryWriter(FS)

nLen = BR.BaseStream.Length
bytFile = BR.ReadBytes(nLen)

For j = 1 To nLen
If bytFile(j) = &H80 Then
nRec = nRec + 1
nRecStarts(nRec) = j + 1
End If
Next

nRec basically counts the number of matches in a fixture file. So, when the bytFile(j) is &H80, the symbol before a start of the match, it adds one to nRec so it knows there is a match. nRecStarts basically counts where each match starts. So, nRecStarts(1) would be the address of the first match, and so on so forth.

Hopefully can get this sorted out. :)
 

AbBh

Panel of Selectors
Joined
Jan 13, 2007
Online Cricket Games Owned
I'm haven't used VB.NET so I could be wrong but wouldn't you need to redim bytFile to declare the size of BytFile once you have nLen?
The loop should be going from 0 to nLen - 1 because by default the first index in an array is 0. You could declare the array as ReDim bytFile(1 to nLen) to specify that you want the starting index to be 1.
 

Users who are viewing this thread

Top