Making Your Own Changes, Adding New Tilesets and Backgrounds

You may manually add new tilesets and backgrounds, or change any, at any time. All the current tileset images are 396X280px; if you add tileset images with larger resolutions, the Mohave and X-mahjongg windows will expand to make them fit. This may not be good for small screens, but that's a personal decision.

To do this, simply add the image file (which must be GIF format) to the tileset or background folder. If you add a file (rather than switch it for an existing image) you must edit Mohave.v3.tcl (see below).

X-mahjongg tilesets need to be GIF format images, and I have sized them all in this package to be 396X280px because that seems to be a good size for the final x-mahjongg window geometry on my various computers. You may add or switch any tileset in the tileset folder.... keeping the name style [ mohavesetxx.gif]. Similar for backgrounds. I don't understand the layout files, so I can't comment on how they are created. If you add tilesets beyond #57, you need to edit the Mohave.v3.tcl file. Similar for backgrounds.

Your image file set must always be continuously numbered (no missing tileset numbers).

Resizing Image Files

To resize image files, if you have imagemagick on your computer, you can resize and rename any tileset (from the Kyodai tileset format) with a command like this...
convert picasso.jpg -resize 396X280! -quality 95 mohaveset38.gif

If you have a ton of files to convert .... this script worked for me....
for filename in *.jpg
do
let "ijk=ijk+1"
convert $filename -resize 396X280! -quality 95 new/mohaveset$ijk.gif
done

Of course, you can also do this, file by file, using The GIMP.

Editing Mohave.v3.tcl for Added Tilesets & Backgrounds

If you wish to replace an existing tileset image with your new tileset image, simply overwrite the old file, and you are done.

If you wish to add a tileset, place the new tileset image file(s) in the tileset folder. Then proceed as follows....

If you change the total number of tilesets, you must edit this Mohave command set as necessary. Say you added one tileset #58, the new Mohave commands would be :

# -----------------------
# need to create images before they can appear
for {set jkl 1} {$jkl < 59} {incr jkl} {
image create photo tileset$jkl.gif -file $tiledir/mohaveset$jkl.gif
}
# -----------------------

Then you need to add the new tileset to one of the tileset menus, by adding a set of commands like this:
# -----------------------
.menubar.tiles3.menu add command -label "mynewtileset"\
-font magicfont \
-command {
.midframe.settiles configure -image mynewtileset.gif;
set tileset mohaveset 58;
}
# -----------------------

Tikmark Home Page