home *** CD-ROM | disk | FTP | other *** search
/ Home Edutainment Collection 4: Games & Extensions / Aztech-HomeEdutainmentCollection-Vol4-3DGamesExtensions.iso / wadtool / nwt.doc < prev    next >
Text File  |  1994-11-24  |  17KB  |  346 lines

  1.  
  2. NewWadTool NWT v1.1
  3. Copyright (c) 11/94 by Denis Möller, TiC, denis@doomsday.sh.sub.de
  4.  
  5. Documentation
  6.  
  7.  
  8. Introduction & Legal stuff
  9. --------------------------------------------------------------------------
  10.   Use NWT at your  own risk. The software in this archive  are distributed
  11. "as is" without  warrenty of  any kind. The  author is not liable  for any
  12. direct or indirect damage caused as a result of using this program.
  13. The software is distributed as  Freeware. NO fee or payment may be charged
  14. for this program. You are not allowed to change the program.
  15.  
  16.   Doom & Doom 2 are trademarks of id software.
  17.   DEU is written by Raphaël Quinet & Brendon J Wyber.
  18.   DeuTex & DeuSF are written by Olivier Montanuy.
  19.   Dmaud & Dmgraph are written by Bill Neisius.
  20.   Dmadds/f is written by Bernd Kreimeier.
  21.  
  22.  
  23. Credits
  24. --------------------------------------------------------------------------
  25.  Thanks to
  26.   - id software
  27.   - Raphaël Quinet & Brendon J Wyber for the great editor utility
  28.   - Hank Leukart / Matt Fell for the Doom Specs
  29.  
  30.   NWT is  completely  written  in  plain  Turbo C  with a lot  of assembly
  31. routines. No  part  of the  source  was  taken  from  other  programs, the
  32. complete source code is a work  of my evil brain  except the GIF save/load
  33. routines, taken from a SimTel CD, author unknown.
  34.   NOTE: NWT will not be converted for any other system. Get DeuTex & DeuSF
  35. if using another system.
  36.  
  37.  
  38. Description
  39. --------------------------------------------------------------------------
  40.   With NWT you got a very  powerful tool in your hands. NWT will offer you
  41. the following things to do with your Doom or Doom 2 IWAD:
  42.  
  43. - extract (export) any  kind of resource  saving it to GIF, PCX, WAV, VOC,
  44.   RAW or WAD (PWAD) files
  45. - insert (import) any kind of resource from GIF, PCX, VOC, WAV or RAW into
  46.   IWAD, PWAD or RAW files
  47. - view  any graphic-resources in standard VGA 320x200x256 or as  hex dump,
  48.   play any sound resource through a SoundBlaster (or compatible) soundcard
  49.   (internal pc speaker does not work anymore, sorry)
  50. - edit or add new texture patches, includes  editing PNames resource, save
  51.   it to WAD, RAW or TXT files (for compatibility to DeuTex :)
  52. - if you change  sprites or flats, you must pack all sprites/flats in your
  53.   PWAD - NWT will do it for you (replaces DMADDS/F & DeuSF)
  54. - open any WAD (PWAD) file and extract (export) all resources you want for
  55.   your own PWAD file
  56. - WAD cleaner - due to the use of tools (also NWT), a WAD file may contain
  57.   useless stuff - NWT will rewrite your WAD (IWAD or PWAD)
  58. - all features possible with every version of Doom & Doom 2 !
  59.  
  60.   Finally, you'll never need any other tool, except a level editor of your
  61. choice to make new levels. :-)
  62.  
  63.  
  64. Requirements
  65. --------------------------------------------------------------------------
  66.   NWT is a DOS program, you  don't need Wind*ws to  run it. It should work
  67. on any machine  Doom runs on (in Dos). I can't  guarantee NWT will work on
  68. your computer, but it works  well on my 486. You  need at  least 480k free
  69. memory to run it and a mouse is and will be NOT supported.
  70.   If you use the  arrows it is probably a bit slow because of checking and
  71. displaying  resource data  at the  screen. Norton's SPEEDISK  gives  great
  72. improvement. Also a cache is very good.
  73.   The  menu  idea  is taken  from 'Wad Tools 1.00' by  Jeff Miller. (never
  74. updated I think). First I wanted a tool like this but it became monstrous.
  75.  
  76.   At least  knowledge of the structur of WAD files is needed. If you don't
  77. know how to add a PWAD to Doom, how to use sprites in PWADs or even what a
  78. resource is - stop here and read the Doom Specs first.
  79.  
  80.  
  81. Setup
  82. --------------------------------------------------------------------------
  83.   After the  first start NWT will  prompt you to setup the program. Easily
  84. move with the cursor keys to change the configuration.Press RETURN to save
  85. your changes. ESCAPE ends  without saving but  using the current settings.
  86.   Remember: 'Primary graphic output file' means  that NWT will give  you a
  87. filename with this  extension. If you set it to GIF now and you want a PCX
  88. later, just type a  filename with this extension later. NWT will check the
  89. extensions to get the format to use.
  90.   Sometimes it is useful to  have a  window and the  original palette when
  91. viewing graphic resources. If you want it, just move the X to YES.
  92.   Everytime  you want  you can edit  the setup  again. Just  type ALT-S or
  93. delete the file NWT.CFG before starting NWT.
  94.  
  95.  
  96. Using NWT
  97. --------------------------------------------------------------------------
  98.   You  can  use NWT in  menu mode or  batch mode. Some  functions  are not
  99. available in  batch mode, others are not in  menu mode. See section 'Batch
  100. mode commands' for  details. To use  menu mode, just start NWT without any
  101. parameters.
  102.   At the  first view, NWT seems  to be a  bit confusing... Try it  and you
  103. will know how easy it is. If you  can't get it, print out 1STSTEPS.DOC and
  104. follow the instructions to see how it works.
  105.  
  106.  
  107. Viewing graphic and playing sound resources
  108. --------------------------------------------------------------------------
  109.   To view a  graphic resource or  play a sound resource through the output
  110. device  SoundBlaster , just  push RETURN. NWT will  check the  resource to
  111. get the type of it. You  can't view any  non-graphic  resources. You can't
  112. play the speaker sound resources (DPxxxxxx). To view a hex dump of it just
  113. type F1 and use the arrows to move.
  114.  
  115.   Btw:the SoundBlaster base adress MUST be 220h.
  116.  
  117. Extracting resources (export)
  118. --------------------------------------------------------------------------
  119.   To  extract a  single resource to a RAW file, just  choose the  resource
  120. with  the Up & Down  arrows and  push F2. You  can change  the name of the
  121. output file or just push RETURN to confirm.
  122.   If you  want more than one resource  to extract, just mark the resources
  123. with SPACE and finally push F2. NWT will now extract all marked resources.
  124. Push SPACE again  to unmark a  single resource  or push F10 to  unmark all
  125. marked resources.
  126.   To extract  resources to GIF/WAV files, type F3 - NWT will check for the
  127. type of every single resource (if more than one).
  128.   To extract  to a PWAD file type F4 - if the PWAD file already exist, NWT
  129. will  always APPEND resources  not existing  in  the PWAD. If  a  resource
  130. already exist in it, NWT will overwrite it leaving the old one in it!
  131. Right, the  old one is useless, but writing  everytime the hole PWAD takes
  132. a lot of  time. If you got all  resources you  want in it,  just CLEAN the
  133. PWAD with NWT. (Btw: Dmgraph & Dmaud are doing it mostly the same way)
  134.   To save to a new PWAD, change the name or delete the old one.
  135.  
  136.  
  137. Inserting resources (import)
  138. --------------------------------------------------------------------------
  139.   There are three ways of inserting resources:
  140.    - Insert into existing IWAD (opened DOOM.WAD or alternate PWAD)
  141.    - Insert into existing/new PWAD(s)
  142.    - Insert with saving to RAW
  143.  
  144.   Again, seems to be a bit confusing but it is very useful.
  145.  
  146.   If you  got a resource  as a RAW file and you want it to be a PWAD file,
  147. just type F6 and  change or confirm  the given name. Done. NWT will append
  148. PWAD files the same way described above.
  149.  
  150.   It works the same way with inserting GIF & WAV. Key commands are as
  151. follows:
  152.  
  153.    F5 - Import RAW file into IWAD (changing your DOOM.WAD)
  154.    F6 - Import RAW file into PWAD (append/overwrite if exist)
  155.    F7 - Import GIF/WAV into IWAD, NWT will check type by extension
  156.    F8 - Import GIF/WAV into PWAD
  157.    F9 - Import GIF/WAV to RAW, just converting GIF/WAV to RAW
  158.  
  159.   If you write a  resource into the main IWAD file, NWT will check for the
  160. new and old length  of it, smaller  resources will  be overwritten, larger
  161. will be appended at the end of the file. (just like Dmgraph & Dmaud)
  162.   If you insert a resource from a GIF or PCX file, the size of it is taken
  163. from the  original resource! (you  don't have to  save your  graphics with
  164. the  correct size, but you MUST  save your new  graphic in the  upper left
  165. corner!) - but you can  change the size and offsets  after typing the name
  166. of the file. To make it a bit more confusing, you can only enter new sizes
  167. and offsets if you are inserting single resources.
  168.   (This will  probably  change in  future versions.  Let me  know what you
  169. think!)
  170.   NOTE: If you want to  insert a new WAV or VOC file, they MUST have 11025
  171. samples per second! Convert it with your sound-editor before inserting.
  172.  
  173.  
  174. Editing Textures
  175. --------------------------------------------------------------------------
  176.   This is a  very nice feature of NWT. You can edit old texture-patches by
  177. overwriting them. Also you can edit completely new patches, with new names
  178. and use them in Doom or in DEU too!
  179.   You can  save the  new texture  data as  RAW, WAD or TXT files. TXT is a
  180. very plain method  of DeuTex to  edit new textures. You can  use DeuTex to
  181. generate the new data for Doom. (but why?)
  182.   To edit a  new texture-patch, you must find the texture resource in your
  183. Doom IWAD first. In Doom there are two of them, TEXTURE1 for the shareware
  184. version and TEXTURE2 for the walls used in the registered version. To find
  185. them in the  resource list of NWT, just type ALT-T or type the word 'text'
  186. and NWT will search for it. Choose the one you want (in Doom 2 is only one
  187. texture resource) and push RETURN.
  188.   NWT will  now show a list of all texture-patches defined in this texture
  189. resource. Press RETURN to  view one, F1 to list the  used  patches  in the
  190. active texture-patch.
  191.   To  edit a texture-patch  type F2, confirm the given name or enter a new
  192. one. Then confirm or enter the output filename. NOTE: the extension deter-
  193. mines the format to save. The next important parameter is the size of your
  194. texture patch. Don't  use  any  exotic size, normal  textures are 256x128,
  195. 64x64, 64x128... The  largest texture may be 256x128. Avoid  odd numbers!!
  196. The  sum of the  sizes of all  wall patches used  must be <= 64k. NWT also
  197. limits the  maximum of used  patches to 64. This  is the  maximum used  in
  198. Doom & Doom 2.
  199.   After you  entered the size, NWT will list all PNAMES. Doom  allows only
  200. graphic  resources  for texture  patches  listed  in  this PNAMES-list. Of
  201. course you could put all  graphic resources in  this list, but this is not
  202. very usefull. Now you can  mark all PNames you  want for your  new texture
  203. patch. NWT will display the name of a texture using this PName so  you can
  204. easily  choose them  without viewing all PNames. (Because these PNames are
  205. the  resource-names  they are  not called CEMENT or GRAY, mostly  they are
  206. called WALLxxx, not giving any idea of their type).
  207.   After you marked all PNames you want, type F2 again. Now you are able to
  208. edit the texture patch. Simply  push SPACE to add a patch to your texture.
  209. NWT will switch to  graphics mode and you can place the patch wherever you
  210. want. Press RETURN to confirm or escape to abort placing the patch.
  211.   Back in  textmode you can  view your texture (F2), list the patches used
  212. so far (F1) or clear the hole patch (F3), if you don't like it. Push SPACE
  213. to  add another patch, save the texture  with F10 or press ESCAPE to abort
  214. editing.
  215.   If you  save the texture, NWT will read the hole  texture data from  the
  216. output file (if existing) and overwrite it with your changes. This way you
  217. can edit a lot of new textures saving them in the same file. Of course you
  218. can edit the same texture many times, overwriting it everytime. :)
  219. If you  save every texture patch in a  single file you will NOT be able to
  220. combine them to  one texture resource! (You can't add two PWADs containing
  221. the same resource to Doom or DEU - one will overwrite the other.)
  222.  
  223.   That's all about texture editing. Trial and error is the  best method of
  224. learning it! :)
  225.  
  226.  
  227. Viewing/Editing PNames resources
  228. --------------------------------------------------------------------------
  229.   Every Doom IWAD needs this  resource. It's a list of wall patches, which
  230. are used in textures  resources. For more information read the Doom Specs.
  231.   With NWT you are able to edit this list; editing means adding & deleting
  232. objects (resources). To view/edit  the PNames  list, press ALT-P. Type RET
  233. to view a resource, F2 to  add pnames or F3 to delete pnames. You can mark
  234. more than one pname and delete them all by pressing F3.
  235.   NOTE: If you are a lucky guy trying to  irritate Doom - just delete some
  236. of the pnames and  start Doom. All other people - don't try to delete some
  237. of the given pnames. This function is implemented only for deleting pnames
  238. added by you.
  239.   Like saving  texture-resources, you  can't save  this pnames-list direct
  240. into the  main IWAD - better  save as a RAW file and  insert this RAW file
  241. later into your WAD.
  242.  
  243.  
  244. Working with PWADs
  245. --------------------------------------------------------------------------
  246.   With NWT  you  can  view  the  resource  directory  of any PWAD. You can
  247. extract single or all resources to  other PWADs (appending them) or export
  248. them for  editing (GIF, WAV). Also, you  can  load a PWAD and  delete  all
  249. resources you  want. Simply type '-' to  delete a resource.  Of course all
  250. marked resources will be deleted. I decided to use this key, because it is
  251. a very dangerous function.
  252.  
  253.   To open a PWAD type ALT-L.
  254.  
  255.   NOTE: NWT will NOT delete the resources, it will change the directory of
  256. the  opened PWAD. After  deleting  some  resources, I recommend  using the
  257. batch command -c (WAD-cleaner).
  258.  
  259.   Please use PWADs only with authors agreement!
  260.  
  261.   If you load a PWAD, it will be named as the active IWAD file, this means
  262. if you  save any  resource  into IWAD now, it will  be  written  into your
  263. opened PWAD. Of course your PWAD is still a PWAD file.
  264.  
  265.  
  266. Batch mode commands
  267. --------------------------------------------------------------------------
  268.   Now I will list all parameters available at the command line for NWT.
  269.  
  270. * NWT -file wadfile.wad
  271.   Will force NWT to load an alternate WAD file. The WAD file is now called
  272.   IWAD, because it replaces the (normally loaded) DOOM.WAD file. Of course
  273.   it is not really a IWAD file. With this option you can edit several WAD
  274.   files without having any Doom version installed.
  275.   NOTE: If you like to edit new textures in this kind of IWAD files, they
  276.   must contain the TEXTURE & PNAMES resource! Of course all P-resources
  277.   (wall patches) are needed! (So, better edit new textures having your
  278.   DOOM.WAD loaded :)
  279. * NWT -c wadfile.wad
  280.   Will rewrite any WAD file completely. Because after using tools
  281.   (including NWT) there may be unused stuff in WADs. Can take a while.
  282.    e.g. NWT -c doom.wad
  283. * NWT -as wadfile.wad
  284.   Will add all sprites not existing in your wad. If you got no sprite
  285.   resources in your PWAD, NWT will export all sprite resources.
  286.   You can have any other resources in your PWAD too. It doesn't matter.
  287.   Of course there must be a Doom IWAD in the same directory.
  288.    e.g. NWT -as mywad.wad
  289. * NWT -af wadfile.wad
  290.   The same as above but flats (floor & ceiling textures).
  291.    e.g. NWT -af thesame.wad
  292.  
  293.  
  294. Versions, Changes, Bug fixes
  295. --------------------------------------------------------------------------
  296. Version 1.0ß, 11/14/94
  297.  + Initial release
  298.  
  299. Version 1.1, 11/20/94
  300.  + Various little bugs fixed
  301.  + Dmgraph-GIF-bug fixed (because dmgraph adds unused extra stuff to GIFs)
  302.  + Better editing of filenames
  303.  + Added directory display (can display a maximum of 1500 files/dir !)
  304.  + Directory sort by NAME or DATE - default settings in setup
  305.  + New feature: editing PNames resources
  306.  + New feature: deleting resources from your opened WAD, very usefull :)
  307.  + NWT now remembers the name of the last texture file & the last PWad
  308.    file edited
  309.  + Speed up (file in-out functions)
  310.  + More free memory for resources (see Restrictions)
  311.  - Speaker sound output does not work anymore due to change of memory
  312.    model, maybe in future versions
  313.  
  314.   If you received an updated version of NWT, be sure to delete NWT.CFG
  315. before starting NWT!
  316.  
  317.  
  318. Restrictions, Error Codes, Known bugs, Future plans
  319. --------------------------------------------------------------------------
  320.   This version of NWT is restricted as follows:
  321. Saving to PWAD allows a maximum of 3500 resources, the Doom or Doom 2 IWAD
  322. file may contain a maximum of 3500 resources, 500 PNames and 500 Textures.
  323. (in one texture resource).
  324.  
  325.   Error #2 means: No DOOM.WAD or DOOM2.WAD found. Copy NWT in your Doom
  326. directory or use the command -file.
  327.   Error #3 means: Not enough memory. Kill some TSR's, free your memory.
  328. I think 480k free memory should be enough to run NWT.
  329.  
  330.  
  331.   Future plans? I think NWT has all functions you need. Anyway, if you got
  332. some really good ideas...
  333.  
  334.   If you prefer batch-wad-editing try DeuTex.
  335.  
  336.   What do you think? Do you like it? Not?
  337.   Any ideas? Comments? Suggestions? Bug reports? Let me know!
  338.  
  339.   Btw: Please upload this program wherever you are on. I don't have
  340. ftp access. Thanks.
  341.  
  342.  
  343.   (c) 11/94 Denis Möller, TiC
  344.       denis@doomsday.sh.sub.de
  345.       BBS: Error +49-4351-2796, login as gast/gast (guest/guest)
  346.