User:ParadiseAdi

From Bejeweled Wiki
Jump to navigation Jump to search

Bejeweled Twist Savegame

Here are some notes concerning the savegame data files (like savegame_classic.dat or savegame_zen.dat). The structure is on my code page and described here more in-depth. Please drop a line on my talk page, if you can contribute.

My file was stored in: C:\ProgramData\PopCap Games\BejeweledTwist\users\<user>

Board layout

The board layout is saved after the first appearance of hex 08 00 00 00 08 00 00 00. This indicates the board size, even though it should not be changed. Each gem is represented by the structure Gem and is 24 Bytes.

Examples of cool combinations, see image description

The gem types can be combined: It is possible to create a locked Bomb with Gem.Type = Type.Bomb | Type.Locked. However, the game only uses this possibility for the Supernova gem which has Gem.Type = Type.Flame | Type.Lightning. With some combinations, the game crashes when loading the savegame (it happend for me on Gem.Type = Type.Skull | Type.Flame) and with others, the game crashes when warping to the next level (since it does not know how to handle the specially typed gems, I guess).

| is the binary OR operator

Note that a Coal gem can be matched with its coded color, unless Gem.Matchable is set to 0.

Gem.Type = Type.VioletSparkles | Type.Locked is a Doom Gem with a counter = 1. Strange...

Type.LockedHidden looks like a normal gem, but it can not be moved.

Others

Gem.Unknown2 = 50 if Gem.Type == Type.Doom, Gem.Unknown2 = 100 if Gem.Type == Type.Locked, otherwise 0.

Gem.Unknown3 = 0x100, if a Locked gem is forming on the next move. Together with Gem.Type = Type.VioletSparkles, a Doom gem is forming. Type.VioletSparkles does not do something on its own, though.

Next gems

It is predetermined which gems appear when the board needs to be refilled from the top.

It follows right after the board layout section. Since the gems appear randomly, this data is random as well.

struct NextGems {
short Length; // often 2500
char Unknown1;
char Unknown2;
short Unknown3; // always 0
char Data[Length];
}

The length of the data is always (exceptions?) 2500 Bytes.

Try this: Find the hex string C4 09, take the starting offset + 6 and fill the next 2496 (0x9C0) bytes with 0x01. Now you can watch the game going rogue! :-)

Bejeweled Twist command line parameters

  • -4x3
  • -artres1200
  • -artres768
  • -artres600
  • -autoplay
  • -changedir
  • -crash
  • -demofile
  • -noacceleration
  • -nod3d9
  • -play
  • -playback
  • -playnum
  • -recnum
  • -record
  • -screensaver
  • -skipmenu
  • -widescreen

Personal links