Doom to Delphi Total Conversion (DelphiDoom)


documentation
An example of how to use console to dynamically load external textures.

 


We will use the 'exec' console command to see how we can make a batch file with console commands to execute.
The 'exec' command takes one parameter: The filename of a text file (default extension is .con) that contains other console commands. All the console commands that are in the file will be executed one by one.
Lets see the contents of the console file:
 
// DelphiDoom console commands example.
// To use this please locate the addpakfile command below and specify your hi-resolution texture pak
// To run this place this file to DelphiDoom directory, go to console and type:
// exec hires

//
// cls - clear the screen
//
cls
printf Preparing DelphiDoom system for hi-resolution textures.
printf

//
// addpakfile: change the 'HIRES*.pk3' parameter to a pk3/pk4/zip/pak file witch contains
// the hi-resolution textures you want to use
// Wildcards allowed
//

printf Adding hi-res pak files.
addpakfile HIRES*.pk3
printf

//
// 32bittexturepaletteeffects: Palette change effects for 32 bit color textures
//
printf Enable palette effects for 32 bit textures.
32bittexturepaletteeffects true
printf

//
// interpolate: set frame interpolation
//
printf Setting interpolation.
interpolate true
printf

//
// detaillevel: set the detail
//

printf Setting detail level to normal (32 bit).
detaillevel normal
printf

//
// Turn on transparency effects
//
printf Turn on transparency effects.
usetransparentsprites true
printf

//
// Use external textures
//
printf Turn on usage of external textures.
useexternaltextures true
printf

//
// Use lighting effects
//

printf Turn on light effets.
uselightboost true
printf

//
// Don't use limited colormaps
//

printf Turn off limited colormaps.
forcecolormaps false
printf


//
// cleartexturecache: clears all the hi-resolution texture cache to force reload
//

printf clearing texture cache.
cleartexturecache
printf
 

Change the 'HIRES*.pk3' parameter of addpakfile command to a pk3/pk4/zip/pak file witch contains the hi-resolution textures you want to use. Save the file as hires.con in the same directory as DelphiDoom. The start DelphiDoom, bring down the console and type:
exec hires
You can also try it while playing. Bring down the console (game will pause) and type 'exec hires'.
You can download this console example here.

NOTE: Recursive calls of con files is not allowed and a warning message will be displayed in the console.

See also: List of all console commands.


© 2004-2007 Jim Valavanis