Help required to edit assets of a DOS game (cricket 96)

Fanboys report for duty.

Moderators: GreyWizzard, pilonv1

Post Reply
User avatar
BOOMY
Verication guaranteed!
Verication guaranteed!
Posts: 2897
Joined: 04 Jul 2006 07:25 pm

Help required to edit assets of a DOS game (cricket 96)

Post by BOOMY »

I dont hold much hope with this request but it is worth asking. Someone with more geek xp than me please answer me this;
Could I use a hex editor or something to edit the gamefiles of cricket 96 for MS-DOS so I can change the player names and stats?

Super international Cricket/Cricket 96 is the only cricket game that is any good EVER. I want to start a project similar to PESedit that keeps it up to date with the modern game by changing the names, stats and hopefully picture assets as well. Trouble is, I have no fucking clue what I am doing and need help of a super geek. Random pot luck shot someone at GR can help?
Here is a suitable weight as I assume this will sink to the bottom of the first page like a gamehed thread.
Image
User avatar
GreyWizzard
Boundless Generosity
Boundless Generosity
Posts: 18671
Joined: 04 Jul 2006 07:51 am
XBL ID: GreyWizzard
PSN ID: Grey_AU
Location: Brisbane

Re: Help required to edit assets of a DOS game (cricket 96)

Post by GreyWizzard »

It really depends on where and how the data is stored. You're first attempt is to open the exe with your hex editor and trawl through it. You might get lucky. If the game is more advanced it might have data files. Again hit it up with the hex editor and hope you get lucky.

If that doesn't work you might have to look into decompiling the software and going through the code. Which might be easier to read. But yeah decompiling and recompiling... No idea. To google! Or any of the vastly better search engines.
User avatar
Candy Arse
Elite Ginger
Posts: 20292
Joined: 04 Jul 2006 08:41 am

Re: Help required to edit assets of a DOS game (cricket 96)

Post by Candy Arse »

AB's Cricket on PC was damn good, but yes SIC was fantastic.
User avatar
BOOMY
Verication guaranteed!
Verication guaranteed!
Posts: 2897
Joined: 04 Jul 2006 07:25 pm

Re: Help required to edit assets of a DOS game (cricket 96)

Post by BOOMY »

seemingly all the important guts are in 2 data files; superstr.lvl and cricket.lvl which are about 3MB each the rest is just 1 or 2 kb files or larger fmv/sound files. I guess I'll see how I go.

I had never played the PC version of SIC until this venture and its full of pretty funny commentary and fmv; it has a local lofi humorous feeling similar to this advert; thrown together by 15-20 melbournites in their spare office with some good aussie spirit

ImageImage


I almost feel like rounding up the old beam software/melbourne house team on linkedin and asking them for help, lol. If I had endless time on my hands I would learn the shit out of unity 3d and try re-make it myself. SIC's interface seriously is the only way to approach videogame cricket.
User avatar
Gamma
Dot Eater
Posts: 4280
Joined: 04 Jul 2006 12:05 pm

Re: Help required to edit assets of a DOS game (cricket 96)

Post by Gamma »

The names begin at byte 441259 of PCCRICK.EXE with "B.Aitken".

I honestly don't know if it's reasonable to expect to be able to edit them and have it work in-game, but it can't hurt to try. I'd have to familiarise myself with the game before I'd have any hope of figuring out the stats, and I've never really poked around with this sort of thing before.

"M.Gandhi" :lol:
User avatar
BOOMY
Verication guaranteed!
Verication guaranteed!
Posts: 2897
Joined: 04 Jul 2006 07:25 pm

Re: Help required to edit assets of a DOS game (cricket 96)

Post by BOOMY »

You brilliant man!
I've been a lazy shit and havent done much on this myself. If this helps you nut it out, B aitken plays for Australia. His stats are Batting 9, Bowling 1, Fielding 7, Running 3 and he is a right handed batsmen, 1 in he batting order by default.
Ideally I'd want to test it by editing his name, stats and position and seeing what comes out, but for now is it possible to edit his name and see if the game boots?
or at least point a lazy man like me further in the right direction to getting that far myself?

In order to 'test' I assume going into one day match, picking australia and seeing what comes up in the batting order menu before the game, seeing if the name or stats have changed(if the game even gets that far)
User avatar
Gamma
Dot Eater
Posts: 4280
Joined: 04 Jul 2006 12:05 pm

Re: Help required to edit assets of a DOS game (cricket 96)

Post by Gamma »

Grey was on the money, but now you don't need as much luck. Get a (free) hex editor, make a backup of PCCRICK.EXE, then open the original. You're looking at the bytes that make up the executable file. If you jump to byte 441259, you'll see old mate Aitken (I'm using Hex Fiend on OSX):
CricketHex.png
You can also see the position names, countries, country abbreviations, handedness... you'd know the rest better than I. If you don't know how hexadecimal works, now would be a good time to learn.

First things first, I think it's safe to assume that if the size of this file changes, you're more than likely screwed. When you're editing stuff, only ever replace a byte with a different byte, don't just add or remove things. It will be a huge case of trial and error, so backup often, only change one thing at a time until you're confident you know what that one thing is doing, and roll back to the last version that worked if something goes wrong.

I think the player information is stored in a structure of 42 bytes. Looking at the speed descriptions that appear immediately before the player names, they each begin 10 bytes apart from each other, so the last one ("Very fast") ends at 441237. This is where B.Aitken begins. The first 22 bytes are likely where the stats are hiding, and the remaining 20 bytes are for the name. This then repeats for A.Blanch, and so on for 5376 bytes. 5376 ÷ 42 = 128 players. The country list tells us there's 8 teams, so 128 ÷ 8 = 16 players per team.

Now, looking at the first 22 bytes of each of these 42 byte records (the part we suspect is the stats), we have:

Code: Select all

00 00 78 00 B5 01 0F 00 3D 0E 55 00 01 00 5F 00 01 00 06 00 20 04
01 00 73 00 D1 01 0A 00 44 1C 55 00 02 00 8C 00 04 00 04 00 20 0C
02 00 6E 00 FD 01 05 00 3D 26 5F 00 03 00 7D 00 03 00 03 00 01 04
03 00 78 00 B2 01 87 00 4E 01 50 00 01 00 87 00 04 00 12 00 01 06
04 00 69 00 32 02 73 00 76 01 55 00 04 00 64 00 01 00 0E 00 20 0C
...
The first number looks like an index, or the default batting order. You'll notice it goes from 00 to 0F (remember 0F is 15 in hexadecimal disguise) then back to 00 again. This lines up with the assumption that there are 16 players per team. I guess "K.Gosh" is first up on the Indian team?

The next step is to make a table with all of the stats from, say, the first 32 players, compare it to the above info from the file, and start looking for correlations. For example: 00 (B.Aitken), 03 (G.Linden) and 0B (R.Connor) all have 78 as the third byte... if one of their in-game stats are all the same, that's probably what it is. There are a lot of columns of straight 00's, so you might want to try interpreting the bytes in groups of two.

So this:

Code: Select all

03 00 78 00 B2 01 87 00 4E 01 50 00 01 00 87 00 04 00 12 00 01 06
...becomes this:

Code: Select all

0300 7800 B201 8700 4E01 5000 0100 8700 0400 1200 0106
...which looks little-endian. Now, that seventh value "0100" (just 1, being sneaky) doesn't seem to have much range when you look through the records, so it probably represents something that only has a handful of different states. Five states (0-4), at least from the look of these first 32 records. J.Andrews is the only player with a 0 here- what's different about him? Etc, etc.

This is proper nerd territory. It's a daunting task, but hopefully these ramblings will get you started on your journey down the rabbit hole.
You do not have the required permissions to view the files attached to this post.
User avatar
GreyWizzard
Boundless Generosity
Boundless Generosity
Posts: 18671
Joined: 04 Jul 2006 07:51 am
XBL ID: GreyWizzard
PSN ID: Grey_AU
Location: Brisbane

Re: Help required to edit assets of a DOS game (cricket 96)

Post by GreyWizzard »

Top work Gamma. I only ever used hex editors to find cheat codes in games :D
User avatar
Ambrose Burnside
All accusations are unsubstantiated
All accusations are unsubstantiated
Posts: 8687
Joined: 04 Jul 2006 09:15 pm
XBL ID: AmbroseBurnside
Steam ID: Ambrose Burnside
Location: Perth, WA

Re: Help required to edit assets of a DOS game (cricket 96)

Post by Ambrose Burnside »

Makes me appreciate games with built-in editors even more, like the Cricket Academy in Don Bradman Cricket 14.
Currently playing: Age of Empires 2: Definitive Edition (PC), Far Cry 6 (PC), FIFA 21 (Series X), TimeSplitters 2 (Series X BC)
Hercy
Makes poor choices in hats
Posts: 2893
Joined: 07 Jul 2006 10:04 pm
XBL ID: Hercy

Re: Help required to edit assets of a DOS game (cricket 96)

Post by Hercy »

I'd have thought the next step would be seeing how the player portraits are stored, otherwise the whole update will be unsatisfactory. Hopefully it's just an image file with a grid of faces.
User avatar
unfnknblvbl
googlebomber
googlebomber
Posts: 9783
Joined: 04 Jul 2006 10:17 pm
XBL ID: unfunk
Steam ID: unfnknblvbl
Location: Just behind GameHED

Re: Help required to edit assets of a DOS game (cricket 96)

Post by unfnknblvbl »

one thing at a time, yeah? Get the easy shit out of the way before tackling graphics assets.
The sky calls to us; if we do not destroy ourselves, we will one day venture to the stars
User avatar
Gamma
Dot Eater
Posts: 4280
Joined: 04 Jul 2006 12:05 pm

Re: Help required to edit assets of a DOS game (cricket 96)

Post by Gamma »

A nice grid of faces would be ideal, but I think we're shit out of luck there. It's going to be tricky if they're buried in the exe, but I guess in some ways they might be easier to find than the stats.

Fun Fact: There is an error message that can appear that says "What the fuck!" (693088).
:aussie:
User avatar
BOOMY
Verication guaranteed!
Verication guaranteed!
Posts: 2897
Joined: 04 Jul 2006 07:25 pm

Re: Help required to edit assets of a DOS game (cricket 96)

Post by BOOMY »

So I've began my baby steps. My progress has been seized 5 minutes in; I have made an edit I would like to test; how do I do that? Is it going to be a cunt and make me export in C or C++ then re compile or something?
User avatar
GreyWizzard
Boundless Generosity
Boundless Generosity
Posts: 18671
Joined: 04 Jul 2006 07:51 am
XBL ID: GreyWizzard
PSN ID: Grey_AU
Location: Brisbane

Re: Help required to edit assets of a DOS game (cricket 96)

Post by GreyWizzard »

You edit the exe and then save it and then run the game. No compiling necessary.

Backup the exe first!
User avatar
BOOMY
Verication guaranteed!
Verication guaranteed!
Posts: 2897
Joined: 04 Jul 2006 07:25 pm

Re: Help required to edit assets of a DOS game (cricket 96)

Post by BOOMY »

it doesnt save as an application after an edit, im using HxD freeware btw. is it the program i'm using that is the problem? sorry for the noob questions.
User avatar
GreyWizzard
Boundless Generosity
Boundless Generosity
Posts: 18671
Joined: 04 Jul 2006 07:51 am
XBL ID: GreyWizzard
PSN ID: Grey_AU
Location: Brisbane

Re: Help required to edit assets of a DOS game (cricket 96)

Post by GreyWizzard »

HxD looks to be the goods. What is it saving the file as? Does it remove the extension?
Hercy
Makes poor choices in hats
Posts: 2893
Joined: 07 Jul 2006 10:04 pm
XBL ID: Hercy

Re: Help required to edit assets of a DOS game (cricket 96)

Post by Hercy »

Just remake the game from the ground up. Here, I'll get you started:

Code: Select all

10 Print "Cricket 96"
20 Print "B Aitken"
You can take it from here.
Megaman
a bad sheriff
Posts: 3694
Joined: 05 Jul 2006 06:28 am
XBL ID: megaman 2k7
PSN ID: mm2k8
Location: Melbourne

Re: Help required to edit assets of a DOS game (cricket 96)

Post by Megaman »

I think you've done enough to launch a Kickstarter. Ask for $500k. Remember, there's no obligation to deliver anything once you get funded.
Image
Madmya
Forum Faggot
Forum Faggot
Posts: 19118
Joined: 04 Jul 2006 01:51 am
XBL ID: Madmya
Steam ID: Madmya
Location: Brisbane

Re: Help required to edit assets of a DOS game (cricket 96)

Post by Madmya »

*looks at Project Phoenix page*

Put me down for the game with credits tier please.
User avatar
GreyWizzard
Boundless Generosity
Boundless Generosity
Posts: 18671
Joined: 04 Jul 2006 07:51 am
XBL ID: GreyWizzard
PSN ID: Grey_AU
Location: Brisbane

Re: Help required to edit assets of a DOS game (cricket 96)

Post by GreyWizzard »

The big issue with editing via hex is that you have a good chance of altering the file size, which gamma talked about. When checksums occur (at attempted launch) it'll probably freak out.

Editing data in a save file is easy as all this file size crap isn't an issue.

The safest option, and this is where it gets tricky, is to see if it can be decompiled. I believe you will need to find out what it was written in. I might look into the possibility of decompiling... heh if you could locate the source code you'd be laughing...
User avatar
GreyWizzard
Boundless Generosity
Boundless Generosity
Posts: 18671
Joined: 04 Jul 2006 07:51 am
XBL ID: GreyWizzard
PSN ID: Grey_AU
Location: Brisbane

Re: Help required to edit assets of a DOS game (cricket 96)

Post by GreyWizzard »

This page is a good resource on what you are attempting to do.

http://stackoverflow.com/questions/2731 ... e-assembly" onclick="window.open(this.href);return false;
User avatar
BOOMY
Verication guaranteed!
Verication guaranteed!
Posts: 2897
Joined: 04 Jul 2006 07:25 pm

Re: Help required to edit assets of a DOS game (cricket 96)

Post by BOOMY »

Yea it removes the extension grey. It also changes file size by changing the "A" in "Aitken" to a "B" (41 to a 42).


As for that kick starter money hat, I'll gladly 'supervise' a team of grey and gamma taking time off from their work and family life in order to complete this project while I masturbate to japanese porn and play 20 year old videogames.
User avatar
GreyWizzard
Boundless Generosity
Boundless Generosity
Posts: 18671
Joined: 04 Jul 2006 07:51 am
XBL ID: GreyWizzard
PSN ID: Grey_AU
Location: Brisbane

Re: Help required to edit assets of a DOS game (cricket 96)

Post by GreyWizzard »

Where can I acquire a copy of the game? I might have a look if I can spare a few minutes. You have piqued my curiosity.
User avatar
BOOMY
Verication guaranteed!
Verication guaranteed!
Posts: 2897
Joined: 04 Jul 2006 07:25 pm

Re: Help required to edit assets of a DOS game (cricket 96)

Post by BOOMY »

theisozone

Do yourself a favour and play yourself a few overs, fmv is too good
User avatar
Gamma
Dot Eater
Posts: 4280
Joined: 04 Jul 2006 12:05 pm

Re: Help required to edit assets of a DOS game (cricket 96)

Post by Gamma »

It's written in C. Decompiling shouldn't be too difficult, but recompiling it (whether or not it's been edited) is basically bullshit.
Post Reply