Photography Patch v0.5
This patch implements simple photography. It adds two items (the photograph and the photo album) and allows photographs to be taken (with the expensive camera) and examined (via the 'read' command). Photo albums can store photographs. Expensive cameras now have timers.
As always, thanks to all the folks of rec.games.roguelike.nethack who gave ideas and suggestions. I got quite a few ideas from Rob Ellwood's web page.
All of the new code is enclosed in #ifdef PHOTOGRAPHY.
This patch WILL break save files/bones compatability.
Here are some more details:
The photograph object is in the scroll class. I couldn't think of a better place to put it. Yet Another tool just doesn't seem right.
You can photograph one square and its contents. The photo records the first monster, object or dungeon feature/trap it comes across, in that order of preference.
An inventory listing of the photograph gives a short description of what its subject is. Examples:
m - a photograph of a gnome lord
n - a photograph of an emerald ring
o - a photograph of a throne
p - a photograph of the scenic Gnomish Mines
Using the read command will give you a more descriptive look at the photograph. Examples:
You examine the photograph:
You see a close-up shot of a gnome lord. He looks rather stunned. He is wielding a thonged club. He is by a fountain.
Part of the gnome lord's head is cut off.
You can't make out much of the surrounding area.
You examine the photograph:
You see a shot of a fountain.
It looks like this photograph was taken in the scenic Gnomish Mines.
You examine the photograph:
You see a shot of an aligned priest. He is wearing a robe. He is by an altar.
It looks like this photograph was taken in a temple.
Autographed glossy for bribing demon lords
To use the photo album object:
a)pply the album to insert/remove photos and r)ead the album to examine the photos.
To use the camera with flash use z)ap, with no flash use a)pply.
To set the timer on the camera, use the extended command #timer. You will be prompted for a direction, whether to use the flash, and for how many turns to delay the photo.
Plans for future versions:
Less awkward sounding descriptions?
More ideas on autographed photo text
Add postcard and poster objects
More kinds of cameras?
Artifact camera: Soul Stealer. Level drains monsters photographed, cancels objects. (Chaotic of course).
Add trophy shots (as per Rob Ellwood's idea)
Add more hallucination text
Change wish code to allow wishing for specific photos
Change level compiler to allow predefined photos
Maybe figure out around the special room flags being cleared. (So you can take a picture of say, a zoo, after you've been in it once.)
Some kind of voodoo capability with photographs?
Photo collector: keep track of species photographed and list them at game end
Some suggestions by K. Bailey that I'm still considering:
Horror movies tell me that taking pictures of scary places (altars of
Moloch?) can result in summoning demons, or something like very bad
"Memento" references... ("don't believe his lies" might work for a
Response to reflection?
Changes in v0.1.1
Added tile support with Rob Ellwood's tile for a photograph.
Changes in v0.2
A few bug fixes, including blind reading and strncmpi for strnicmp.
Changed photography.h to photo.h for 8.3 file name compatibility.
Added photo album object to store photos.
Changed the camera to support flash/no flash applications.
Photos and photo albums will appear randomly now, albeit quite rarely.
Added a random photo generator for random photo generation, poly-piling, etc.
Changes in v0.3
Converted to 3.4.1 code base
Added timer capability to cameras with a new extended command (#timer).
To support timer capability, added a new type of shot: inside of objects.
Added support for named creatures and objects in a photograph.
Added some predefined photos (family shots for tourists, the wiz).
Changed bones code to strip names from objects/monsters in photographs.
Now to photograph dark areas you need to use the flash.
Changed logic of upwards/downwards shots.
To help avoid abuse, photos won't show single use items in monster's inventory.
Disallow photos of ghosts and shades.
Photos of submerged monsters are automatically out of focus.
Bug fix: don't allow characters expecting to start with a scroll or spellbook to get a photo or a photo album instead.
Bug fix: don't photograph concealed monsters.
Bug fix: don't photograph underwater objects.
Bug fix: calling photographs fixed.
Bug fix: don't photograph invisible hero.
Bug fix: photographs of polymorphed hero.
Save/bones files are NOT compatible with previous versions (yes, even though vanilla 3.4.1. is compatible with 3.4.0. I've changed the photograph structure).
Changes in v0.3.1
Taking photographs from inside a pit now handled better.
Flashing yourself now more consistent with flashing monsters.
Using a camera underwater (via timer) will damage the camera. ("Using your camera underwater would void the warranty.")
Bug fix: Photos of trapped hero now handled correctly.
Bug fix: Camera will no longer take pictures of itself.
Bug fix: You can no longer zap non-camera tools.
Save/bones files ARE compatible with patch version 0.3
Changes in v0.3.2
Bug fix: reading invisible photographs (if INVISIBLE_OBJECTS is defined).
Support for photographs of engravings. (Thanks to email@example.com for suggesting this.)
Minor bug fixes and tweaks.
Changes in v0.4
Updated to 3.4.2 code base.
Changes in v0.5
Updated to 3.4.3 code base.
If you have any recommendations, ideas, suggestions, comments, etc. please let me know.