home *** CD-ROM | disk | FTP | other *** search
/ Over 1,000 Doom Levels / 1000DOOMLevels-3DSharewareGames.bin / mac / DOOMFAQS / DEHACKER / DEHACK2.BAS < prev    next >
BASIC Source File  |  1994-06-13  |  6KB  |  119 lines

  1. ' DEHACK - Doom Exe HACK
  2. ' by Matt Fell (matt.burnett@acebbs.com)
  3. ' written 3/4/94, last revised 6/13/94
  4. '
  5. ' DEHACK 2 - The THING TABLE
  6. '
  7. ' These crude programs extract information from the DOOM.EXE or DOOM.WAD
  8. ' files and store it into a TXT file, suitable for perusing or printing.
  9. ' If you want to print the results, you might have to reformat it. Please
  10. ' don't waste reams of paper. Thanks.
  11. ' All of these only work on the 1.2 registered doom.exe, because I use
  12. ' simple byte offset numbers, not search strings.
  13. '
  14. ' IMPORTANT: If you don't like typing pathnames, modify the next section,
  15. ' un-comment it, and remove or comment-out the input section.
  16.  
  17. ' infile$ = "c:\doom\doom.exe"
  18. ' outfile$ = "c:\-\doom\12\dehack2.txt"
  19.  
  20. CLS
  21. PRINT "Enter the full pathname to your DOOM.EXE file, then the full pathname"
  22. PRINT "to where you want the textfile to be (in an already existing directory)"
  23. PRINT "e.g. 'c:\doom\doom.exe' and 'c:\doom\txt\dehack2.txt'"
  24. PRINT "Note: modify the program with built-in pathnames, and skip this!"
  25. PRINT
  26. INPUT infile$
  27. INPUT outfile$
  28.  
  29. OPEN infile$ FOR BINARY AS 1
  30. OPEN outfile$ FOR OUTPUT AS 2
  31.  
  32. PRINT #2, "The 'Thing Table' contained in DOOM.EXE version 1.2 2-17-94"
  33. PRINT #2, "List-making program was written by Matt Fell (matt.burnett@acebbs.com)"
  34. PRINT #2, "=========================================================================="
  35. PRINT #2, "The columns are: (all 4-byte 'long' integers)"
  36. PRINT #2, "  1. Thing number. 3001 is an imp, 5 is a blue key, etc. Some of them are"
  37. PRINT #2, "     -1, e.g. the very first entry (players), the fireballs, ... "
  38. PRINT #2, "  2. First frame number of the thing's frame sequence, for 'regular' items."
  39. PRINT #2, "     For monsters, it's the first frame of the standing-in-place sequence."
  40. PRINT #2, "  3. Toughness/hit points."
  41. PRINT #2, "  4. 'moving' first frame #, monsters/player only"
  42. PRINT #2, "  5. 'see player' sound # for monsters, or 'first' sound for projectiles."
  43. PRINT #2, "     Note the sounds are 1-61, not 0-60. 0 indicates no sound. And the #s"
  44. PRINT #2, "     do NOT directly reference the sound resources in the wad file. There"
  45. PRINT #2, "     is another table in doom.exe, the SOUND TABLE, in which each sound #"
  46. PRINT #2, "     is assigned a name, like 'pistol' or 'shotgn'."
  47. PRINT #2, "  6. Always 8, except for player. What does it do?"
  48. PRINT #2, "  7. 'attack' sound #, monsters only."
  49. PRINT #2, "  8. 'injury' first frame #, monsters/player only."
  50. PRINT #2, "  9. ???. monsters/player only."
  51. PRINT #2, "  10. 'pain' sound #, monsters/player only."
  52. PRINT #2, "  11. 'close attack' frame #, monsters/player."
  53. PRINT #2, "  12. 'distance attack' frame #, monsters/player."
  54. PRINT #2, "  13. 'death' frame # for monsters, 'explode' frame # for projectiles."
  55. PRINT #2, "  14. 'explosive death' frame #, only PLAY, POSS, SPOS, TROO are this weak."
  56. PRINT #2, "  15. 'death' sound # for monsters, 'explode' sound # for projectiles. "
  57. PRINT #2, "  16. Speed of movement. Projectiles' speeds are * 65536 (or split this"
  58. PRINT #2, "      into two 2-byte integers."
  59. PRINT #2, "  17. Horizontal size * 65536"
  60. PRINT #2, "  18. Height * 65536"
  61. PRINT #2, "  19. Point value? Not implemented."
  62. PRINT #2, "  20. Missle damage. Also, SKUL has a 3 here, I presume it turns into a"
  63. PRINT #2, "      projectile when attacking."
  64. PRINT #2, "  21. 'act' sound #, monsters."
  65. PRINT #2, "  22. Attributes, controlled by bits. Bit set = condition true. bit0 ="
  66. PRINT #2, "      1/0, bit8 = 256/0, bit16 = 65536/0, ..."
  67. PRINT #2, ""
  68. PRINT #2, "   bit0     a gettable thing"
  69. PRINT #2, "   bit1     an obstacle to players and monsters (but not projectiles)"
  70. PRINT #2, "   bit2     can be hurt (note barrels have this set)"
  71. PRINT #2, "   bit3     ? teleport destination is only one with it set"
  72. PRINT #2, "   bit4     'automatics' like PUFF, TFOG, BLUD, projectiles"
  73. PRINT #2, "   bit5-7   unused?"
  74. PRINT #2, "   bit8     hung from ceiling"
  75. PRINT #2, "   bit9     floating monsters and not-on-ground things"
  76. PRINT #2, "   bit10    projectiles and player"
  77. PRINT #2, "   bit11    ? player only"
  78. PRINT #2, "   bit12-13 unused?"
  79. PRINT #2, "   bit14    floating monsters"
  80. PRINT #2, "   bit15    unused?"
  81. PRINT #2, "   bit16    projectiles"
  82. PRINT #2, "   bit17    unused?"
  83. PRINT #2, "   bit18    'Inviso' like Spectres!"
  84. PRINT #2, "   bit19    ? barrel only"
  85. PRINT #2, "   bit20-21 unused?"
  86. PRINT #2, "   bit22    Monster: counts towards KILL % at end-of-level screen"
  87. PRINT #2, "   bit23    Artifact: counts towards ITEM %"
  88. PRINT #2, "   bit24    unused?"
  89. PRINT #2, "   bit25    the 6 keys and the player"
  90. PRINT #2, "   bit26-31 unused?"
  91. PRINT #2, "=========================================================================="
  92.  
  93. table& = 570313         ' this should be 512709 for 0.99,
  94.                         ' 569109 for 1.1(dosextender 1.95),
  95.                         ' ______ for 1.1 (dosextender 1.94)
  96.                         ' 570313 for 1.2
  97.                         ' 666666 for 1.666
  98.  
  99. FOR i& = 0 TO 101
  100. FOR j% = 0 TO 21
  101.         GET #1, table& + i& * 88 + j% * 4, num&
  102.                
  103.         SELECT CASE j%
  104.         CASE 21
  105.                 PRINT #2, USING "##########"; num&;
  106.         CASE 16 TO 17
  107.                 PRINT #2, USING "####"; num& / 65536;
  108.         CASE 15
  109.                 IF num& > 65535 THEN PRINT #2, USING "####"; num& / 65536;
  110.                 IF num& < 65536 THEN PRINT #2, USING "####"; num&;
  111.         CASE ELSE
  112.                 PRINT #2, USING "####"; num&;
  113.         END SELECT
  114.         PRINT #2, " ";
  115. NEXT j%
  116. PRINT #2, " "
  117. NEXT i&
  118.  
  119.