-- general --
main
links
about
personal

-- community --
forum
guestbook
interview

-- tech stuff --
download
old news
change ZZT messages
zzt++ wish list

tutorial -- change zzt messages


the official ZZT++ web page -- http://planetzztpp.com

how to change zzt messages

warning

The information on this page is for expert users only. The directions you can read here instruct you on how to edit a binary executable. Editing binary executables can cause system crashes and loss of information on your computer if not executed correctly. Follow these instructions at your own risk.

I strongly advise you NOT to follow these instructions because doing so is probably an infringement of copyright law, or will at least be in conflict with the maker of the binary executable. The information given here can be applied to -any- executable that has been compressed with the lzexe utility. ZZT is just an example.

Now to the good stuff

introduction


ZZT contains a large number of standard messages and strings. These messages are embedded in ZZT and cannot be changed by the user with ZZT OOP programming. However, there are cases where a programmer doesn't want to see certain messages, or the standard messages are not really appropriate in his game. Let's face it: "You don't have any of ammo!" doesn't sound so cool in a gangster type game. Certainly not when it's been used in a hundred western type games before.

You have a moral obligation when you start spreading altered versions of ZZT. The purists among is argue that spreading mutilated version of ZZT will only cause a big mess and is basically bad form. I personally subsribe to this opinion as well.

Please note that the gamer is always in control of which zzt.exe he uses to play your ZZT game. You can only advise the gamer to use an altered version.

When ZZT was built its main distribution channel was the Bulletin Boards which was basically the precursor to the internet. Communication speeds were low (1200 baud, 2400baud, 9600baud, etc) and downloading files was a pain. When Tim Sweeney made ZZT he wanted to make his executable as small as possible and he probably wanted to protect his sources. So, he used a very popular tool in those days for compressing executables. This tool was called lzexe and it compressed the executable and placed a tiny decompression routine at the end of the file. As soon as the executable was started the original source was uncompressed using this routine. This technology is much like today's self-extractors, with the added feature that the extracted executable was started automatically. If you want to know more about lzexe and the compression algorithm it uses, go to www.stud.enst.fr/~bellard.

what you need


You will be downloading some stuff that is compressed using WinZip. Get a shareware version of it here.

You need the standard ZZT package containing the ZZT.EXE executable file. This is the one we will be changing. You can download ZZT from either one of these web sites:

Next, you need a tool to compress and uncompress the ZZT.EXE file. It is called unlzexe and you can get that here: lzexe91e.zip for Dos/Windows (85Kb)

You also need an editor that will allow you to change strings and bytes in ZZT.EXE. You -could- use standard editors like vi (linux/unix) or edit (dos) or even notepad (windows), but please take care. Editors will sometimes add stuff to your files, thinking it is a simple text file. Remember that we're editing a binary executable here. We must be careful about what we change. Altering stuff that's shouldn't be altered (like actual programming) will probably result in crashes and possible loss of data.

The editor I use under windows is WinVi. This is a free vi editor for windows that is really, really good. You have to know vi, though. If you don't know how to use vi, then please find something that you can use. You can get WinVi at www.snafu.de/~ramo.

Download and unpack all these files into one directory. You now have all you need to alter strings in ZZT!

what you do


Before you do anything, make a backup of your ZZT files. Then, you execute the following command:

unlzexe zzt.exe

lzexe will have created the following files:

ZZT.EXE - 96,080 bytes
ZZT.OLZ - 47,764 bytes (this is a copy of the original)

Start your hex editor and load up ZZT.EXE. You can now search for the string you wish to change. I looked for the "You don't have any of ammo!" message and it looks like this in WinVi:

You can edit this string, but you have to keep in mind that the string you put in there must be the same length as the original or ZZT will crash!! I changed the string into "...loser...". It looks like this in WinVi:

When you're done editing just save the zzt.exe file. It should still be the same size as before (96,080 bytes). If I loaded up a game and started shooting on a board where I had no ammo, it would come out like this:

If you're satisfied with the result, you can compress zzt.exe back again using the command:

lzexe zzt.exe

The ZZT.EXE that was there is renamed to ZZT.OLD and the current ZZT.EXE is like the one you've come to know and love, but with your own messages.

So that's basically it. If you need help you can email me here.


zzt++ now!
link to us

V3-URL
http://welcome.to/wep
for free at
http://come.to

bravenet free services
this forum is courtesy
of Bravenet

nestat stats
the stats are from
NedStat

zzt.org
the best zzt source

click me hard!
Come join the fun!

RedHat linux
Get Linux!

this page has been optimized for viewing with miscrosoft internet explorer 4.x at a resolution of at least 800x600. i guess the content is copyright 1999 by wep, but feel free to copy what you like. you can't hold me responsible for any damage resulting from stuff you download from this page. it's all work in progress.