Table of Contents for
Gaming Hacks

Version ebook / Retour

Cover image for bash Cookbook, 2nd Edition Gaming Hacks by Simon Carless Published by O'Reilly Media, Inc., 2004
  1. Cover
  2. Gaming Hacks
  3. Credits
  4. Contributors
  5. Acknowledgments
  6. Foreword
  7. Preface
  8. How to Use This Book
  9. How This Book Is Organized
  10. Conventions Used in This Book
  11. Using Code Examples
  12. Comments and Questions
  13. Got a Hack?
  14. 1. Playing Classic Games
  15. Legal Emulation
  16. Play Commodore 64 Games Without the C-64
  17. Play Atari ROMs Without the Atari
  18. Use Atari Paddles with Your PC
  19. Run Homebrew Games on the Atari 2600
  20. Create Your Own Atari 2600 Homebrew Games
  21. Play Classic PC Graphic Adventures
  22. Play Old Games Through DOSBox
  23. Play Reissued All-in-One Joystick Games
  24. Play Arcade Games Without the Arcade
  25. Add and Manipulate a MAME Frontend
  26. Keep Your ROMs Tidy and Organized
  27. Learn Game-Specific MAME Controls
  28. Filter Inappropriate MAME ROMs
  29. Autoboot into MAME Heaven
  30. Play Emulated Arcade Games Online
  31. Play Classic Pinball Without the Table
  32. Emulate the SNES on the Dreamcast
  33. 2. Playing Portably
  34. Play Games on Your iPod
  35. Mod Your Game Boy
  36. Take and Print Photos with Your Game Boy
  37. Compose Music on Your Game Boy
  38. Explore the GP32 Handheld Gaming System
  39. Take Your Console with You
  40. Explore the Bandai WonderSwan
  41. Play Real Games on Your PDA
  42. Install a PlayStation 2 in Your Car
  43. 3. Playing Well with Others
  44. Practice Proper MMORPG Etiquette
  45. Understand MMORPG Lingo
  46. Grind Without Going Crazy
  47. Make a Profit in Vana’diel
  48. Write MMORPG Macros
  49. Build an Effective Group
  50. Catch Half-Life FPS Cheaters Redhanded
  51. 4. Playing with Hardware
  52. Build a Quiet, Killer Gaming Rig
  53. Find and Configure the Best FPS Peripherals
  54. Adapt Old Video Game Controllers to the PC
  55. Choose the Right Audio/Video Receiver
  56. Place Your Speakers Properly
  57. Connect Your Console to Your Home Theater
  58. Tune Console Video Output
  59. Tune Your TV for Console Video
  60. PC Audio Hacking
  61. Optimize PC Video Performance
  62. Build a Dedicated Multimedia PC
  63. Use a Multimedia Projector for Gaming
  64. 5. Playing with Console and Arcade Hardware
  65. Play LAN-Only Console Games Online
  66. Hack the Nuon DVD Player/Gaming System
  67. Play Import Games on American Consoles
  68. Find a Hackable Dreamcast
  69. Play Movies and Music on Your Dreamcast
  70. Hack the Dreamcast Visual Memory Unit
  71. Unblur Your Dreamcast Video
  72. Use Your Dreamcast Online
  73. Host Dreamcast Games Online
  74. Burn Dreamcast-Compatible Discs on Your PC
  75. Burn Dreamcast Homebrew Discs
  76. Buy Your Own Arcade Hardware
  77. Configure Your Arcade Controls, Connectors, and Cartridges
  78. Reorient and Align Your Arcade Monitor
  79. Buy Cart-Based JAMMA Boards
  80. Programming Music for the Nintendo Entertainment System
  81. 6. Playing Around the Game Engine
  82. Explore Machinima
  83. Choose a Machinima Engine
  84. Film Your First Machinima Movie
  85. Improve Your Camera Control
  86. Record Game Footage to Video
  87. Speedrun Your Way Through Metroid Prime
  88. Sequence-Break Quake
  89. Run Classic Game ROM Translations
  90. Change Games with ROM Hacks
  91. Apply ROM Hacks and Patches
  92. Create PS2 Cheat Codes
  93. Hack Xbox Game Saves
  94. Cheat on Other Consoles
  95. Modify PC Game Saves and Settings
  96. Buff Your Saved Characters
  97. Create Console Game Levels
  98. 7. Playing Your Own Games
  99. Adventure Game Studio Editing Tips
  100. Create and Play Pinball Tables
  101. Put Your Face in DOOM
  102. Create a Vehicle Model for Unreal Tournament 2004
  103. Add a Vehicle to Unreal Tournament 2004
  104. Modify the Behavior of a UT2004 Model
  105. Download, Compile, and Create an Inform Adventure
  106. Decorate Your IF Rooms
  107. Add Puzzles to Your IF Games
  108. Add Nonplayer Characters to IF Adventures
  109. Make Your IF NPCs Move
  110. Make Your IF NPCs Talk
  111. Create Your Own Animations
  112. Add Interactivity to Your Animations
  113. Write a Game in an Afternoon
  114. 8. Playing Everything Else
  115. Tweak Your Tactics for FPS Glory
  116. Beat Any Shoot-Em-Up
  117. Drive a Physics-Crazed Motorcycle
  118. Play Japanese Games Without Speaking Japanese
  119. Back Up, Modify, and Restore PlayStation Saved Games
  120. Access Your Console’s Memory Card Offline
  121. Overclock Your Console
  122. Index
  123. Colophon

Put Your Face in DOOM

Increase the immersiveness of id’s classic FPS by replacing the space marine’s pictures with your own.

id Software’s groundbreaking DOOM almost singlehandedly created the modern FPS genre. With style oozing from every crevice, a near-infinite amount of customizability, and an open source codebase, it’s no wonder that people still play variants such as PrBoom (http://prboom.sourceforge.net/).

As any dedicated modder will tell you, half the fun is in making your own fun. Earlier games were also hackable, but DOOM was unique in encouraging gamers to add their own maps, weapons, and graphics. Since it was a pre-Windows pioneer, the tools aren’t very user-friendly, but they exist and work with a little prodding.

Creating your own maps is a lot of work, but it’s much easier to replace individual graphics. One good way to start is to change the picture of your character in the game’s status bar.

Finding DOOM

Start by downloading PrBoom or an equivalent. PrBoom is nice in that it supports Windows and Linux equally well. Windows installation is as easy as downloading the latest Windows ZIP archive (2.2.4 at the time of writing) and unzipping it into an appropriate directory.

If you have the registered version of DOOM somewhere,[17] copy its .wad files into the PrBoom directory. Otherwise, look for a file called doom1.wad online. This is the shareware version.

How WADs Work

DOOM stores all its maps, images, and sounds in WAD files. There are two types. IWADs are the original internal WADs shipped with the game; they contain the default game information. PWADs are player-supplied WADs that change or add parts of the game. They can be much smaller, because anything they don’t supply directly comes from the original IWAD.

Think of a WAD as a directory containing subdirectories and files, somewhat like a ZIP archive. To replace a particular graphic, you have to know its details within the IWAD and add an equivalent graphic to your PWAD. That’s where tools such as DeuTex (http://www.teaser.fr/~amajorel/deutex/) come in.

Tip

Technically, you’re not supposed to be able to create or use PWADs with the shareware IWAD. I renamed doom1.wad to doom.wad, and PrBoom and DeuTex were happy.

DeuTex is a WAD disassembler, meaning that it can disassemble a WAD into a real directory. It runs on DOS and Linux. Download and extract DeuTex into its own directory, then extract the data from doom.wad with a command resembling:

$ ./deutex -extract /usr/share/games/doom/doom.wad

This creates several directories such as textures/ and sounds/ as well as a file called wadinfo.txt.

Replacing an Image

Besides trial and error, there’s really no good way to figure out which image within this WAD to replace. Fortunately, I can tell you that the files in graphics/stf* represent the face in the status bar. I replaced the god-mode powerup image (type iddqd while playing) with a picture of my nephew. DeuTex extracts this image to graphics/stfgod0.pnm.

The trickiest part of this process is building a 24 29 image that looks good in DOOM, especially with its restricted palette. I cropped and adjusted the picture until it fit, then saved it as a 256-color GIF file in graphics/stfgod0.gif. Be sure to keep the same base name as the file you’re replacing; otherwise, DOOM won’t know how to find the resource. It’s okay to use a different file extension; DeuTex converts BMP, GIF, or JPEG files to PPM files automatically when it builds a WAD. If you do use a different extension, though, be sure to move the original file out of the way so that DeuTex will use your replacement.

Tip

For best results, remove the background of the image, leaving only the subject’s face and head. The image is much less jarring this way.

The next step is to build a manifest file to tell DeuTex which files to assemble. Open the wadinfo.txt file in your favorite text editor. It has several internal sections for the different types of files within the WAD. Delete everything that you haven’t replaced. In my case, I had a very short file:

# List of Pictures (with insertion point)
[graphics]
STFGOD0 -5      -2

Be sure to keep the [graphics] heading, though you can delete the entries beneath it for the images you want to stay the same. Save the file with a different name, perhaps godinfo.txt, so you can make other modifications by copying the relevant lines from the original manifest.

Building a PWAD

The final step is to assemble all the new resources into a PWAD. DeuTex again can do this. Use a command resembling:

$ ./deutex -build godinfo.txt baby.wad

If everything goes well, this will write a new PWAD called baby.wad in your current directory. DeuTex helpfully refuses to overwrite an existing file, so delete or move baby.wad if you’ve already generated one.

Launching Your New PWAD

To see the effects of your work, launch PrBoom with your new PWAD. Use the -file switch to give the location of the file:

$ prboom -file baby.wad

Start a new game, type iddqd, and marvel at the connection between innocence and ultimate power, seen in Figure 7-4.

An alternate god-mode image

Figure 7-4. An alternate god-mode image

The same technique here works for replacing any image or sound within the IWAD files, including monsters and weapons. Remember, if you can do it for one image, you can do it for many.