What I have to say is highly cheaty and highly spoily, but the main reason that I present it is because it is excellent for conducting research on ADOM 1.0.0. The method does not involve defeating checksums or CRCs, nor does it involve editing the ADOM binary. I'll save a description of the methodology for below the spoiler space.
The objective here? To obtain a blessed wand of wishing with 231-1 (2,147,483,647) charges. Unless you want to play the game as an almost invincible tourist, acquiring this object is almost certain to ruin your gameplay (though I personally like to go through a game as a tourist at least once, especially after I have won legally several times). As I alluded to above, this is most useful for conducting legitimate research on the game and its behavior.
Without further ado ...
T
H
I
S
I
S
H
I
G
H
L
Y
S
P
O
I
L
Y
A
N
D
E
V
E
N
M
O
R
E
H
I
G
H
L
Y
C
H
E
A
T
Y
I play ADOM exclusively under Linux and FreeBSD, so I can only 100% vouch for the procedure on those systems. I imagine, however, that this method should also work for Windows-variant systems (it would probably actually take effort on Mr. Biskup's part to make it not work). Also, I have only tested this procedure for ADOM 1.0.0 - it is not likely to work for other versions of ADOM.
We need two things to acquire our wand of wishing. We need a game in progress (technically we just need the file $ADOM_DIR/tmpdat/adom_tld05_1, the temporary file which represents Terinyo) and a hex editor. A third thing would also be useful - proficiency with your hex editor. I used KHEXEDIT, the hex editor whichcomes with the K Desktop Environment (KDE); it's not a particularly good hex editor (very buggy with a lousy converter) but it works in a pinch.
Here are the steps:
1. Start a new game. Any race and gender will do, but we must create a Wizard. The reason for this is that a Wizard begins the game with at least one wand. We could technically create a Merchant, but we'd need a little luck to get the requisite wand affinity.
2. Venture to Terinyo and enter it.
3. Walk as far north as possible without leaving the town. Walk as far west as possible without leaving the town. This grid location is (2,2).
4. Walk one square to the east. This grid location is (3,2). This is where we want to be. (Any location will do technically, but this removes some of the mechanical difficulty of the impeding edit.)
5. Select a wand from your inventory and drop it. Any wand will do. Be certain that the wand is the only item at the (3,2) location. If it is not, then pick up all other items (but leave the wand). Remember how many charges are in your wand.
6. Leave Terinyo (just walk north one square). Do NOT exit your game.
7. Using a shell, a DOS prompt, a file manager - something - enter the $ADOM_DIR/tmpdat directory. Do whatever is appropriate to your interface to retrieve a file listing of this directory. You should observe that a file adom_tdl05_1 has been created. This is an unencrypted, unchecksummed binary file representing Terinyo and its contents (inhabitants and items) as 2's complement binary integers in little-endian order (don't worry about the jargon, you don't really need to understand it if you don't). It was created when you left Terinyo.
8. Open adom_tdl05_1 using the hex editor of your choice. Familiarize yourself with your hex editor before continuing. Hopefully you have some rudimentary experience with this kind of utility, though not much is needed and the basics are quickly learned.
9. Using your editor's hex search feature, locate the hex string 03 02 (the grid coordinates of your wand). In my experience, there will only be one such match in the adom_tdl05_1 file.
10. Move your cursor ahead two bytes (starting at 03).
11. The signed short (2-byte quantity) that you are now pointing at marks the beginning of an item record in the temporary file. This quantity is the object id number, effectively an index into ADOM's item table - it tells the game engine what kind of object is located here. I can't tell you what these two bytes will be since a) I don't know what wand you dropped and b) I haven't mapped out all the object indices yet. By changing this quantity, we can transform any item into any other item. Now overwrite these two bytes with 3E 01, the object id number of a wand of wishing. (Starting with the grid coordinates you should now see: 03 02 3E 01.)
12. Move your cursor back two bytes to the location containing 3E. Count 112 bytes forward. Most hex editors display sixteen bytes per row - if this is the case for your hex editor, you can simply move the cursor down 7 rows (7 * 16 = 112).
13. The signed long (four-byte) quantity that you are now pointing at represents wand charges. You should double-check that the number under the cursor matches the charges in the wand that you left behind. Overwrite this quantity with FF FF FF 7F (231-1 in decimal). You have now upped the number of charges in your wand of wishing to 2,147,483,647.
14. Reposition the cursor at the location in Step 11 (the byte that you set to 3E). Count 28 bytes forward with your cursor.
15. This byte quantity represents the cursed/uncursed/blessed status of the object. A value of 00 represents cursed, a value of 01 represents uncursed, and a value of 02 represents blessed. Set this byte to 02 (if it isn't already). You now have a blessed wand of wishing with 2,147,483,647 charges.
16. Save the modifications to adom_tdl05_1.
17. Switch back to ADOM and reenter Terinyo. Walk to the (3,2) location. If all went well, then you will see a wand of wishing (2147483647 charges) - it will be blessed, though if the item is not fully identified then the game will not report this fact. If things didn't go well, then your game may have crashed when you tried to a) reenter Terinyo or b) step on grid location (3,2).
18. Enjoy!
As a suggestion, you may want to backup the modified adom_tdl05_1 file so that you can import it for different characters in the future (so that you don't have to edit the binary again).
This is not all that I have learned about the structure of the object records in the temporary files - I have also learned where DV bonus, PV bonus, melee-to-hit bonus, missile-to-hit bonus, damage bonus, attribute selector, attribute bonus, item count, and one or two other quantities are located. If there is sufficient interest in mapping out the item record structure fully (i.e. if people offer to volunteer their time and resources to assist me), then I shall endeavor to conduct and publish further research on the subject.
If these directions seem unclear, then please e-mail me at kirnamat@yahoo.com for further assistance. An already hacked adom_tdl05_1 file is available at http://enigmastation.com/~cislyn/misc/adom_tdl05_1 - this is my wife's website and she really loves traffic (though this file will have a new official home once my resource site goes live).
I hope that those of you who are conducting ADOM research find this post useful. Please write me or extend this thread if you have any questions, comments, or feedback which you think would be useful or worthwhile for public consumption.
Thank you all for your patience and interest. Perhaps you will be hearing more from me in the future.
Todd Smith
Here's the hacked file: adom_tdl05_1