NAME

remap - Remap numbers inside the modules / haks


SYNOPSIS

remap [--help|-h] [--version|-V] [--verbose|-v] [--config config-file] [--start|-s start-number] [--end|-e end-number] [--newstart|-S new-start-number] [--tiles|-T path-to-roofless-tiles-2da-file] [--type|-t type-of-modification] [--output|-o output-filename] [filename ...]

remap --help


DESCRIPTION

remap will find specific types of things inside the modules, haks, or erfs, and renumbed them so that all numbers between start-number and end-number (inclusive) are mapped so that start-number is mapped to new--start-number. The end-number is not mandatory, and if it is not given, then map all numbers starting from start-number.

If no arguments is given, then '*' is assumed.

If given files are direct resource files from directory mode, then modified files are written back to the same place (i.e. this tool overwrites old files). If hak, mod or erf is given then this tool will write new hak, mod or erf with .new extension back unless --output option is given.


OPTIONS

--help -h
Prints out the usage information.

--version -V
Prints out the version information.

--verbose -v
Enables the verbose prints. This option can be given multiple times, and each time it enables more verbose prints.

--config config-file
All options given by the command line can also be given in the configuration file. This option is used to read another configuration file in addition to the default configuration file.

--type|-t type
Currently only supported types are 'placeables', 'tiles', 'metatiles', 'bicfeats', 'bicspells', and 'removeroofs'

--output|-o output-filename
Output filename if hak, erf or mod is given. This is ignored if we work in directory mode, and if multiple input files are given they are all written to this same file (i.e. only last file will be stored there).


PLACEABLES remap type

This mapping fixes placeables. This will update the Appearance field in 'Placeable List', and 'EnvironmentList' strucures in the *.git files and Appearance field in the *.utp files. This requires --start and --newstart options.

--start|-s start-number
Starting number from where to start mapping numbers. This is the first number which is mapped, and it is mapped to new-start-number.

--end|-e end-number
End number from where to end mapping numbers. This is the last number which is mapped. If this is not given then assume that all numbers starting from start-number are mapped.

--newstart|-S new-start-number
New starting number to where to map numbers. The old start-number is mapped to this value.


TILES remap type

This mapping fixes tiles. This will update the Appearance field in 'TileList' structure in the *.are files in case the MetaTile field is 0. This requires --start and --newstart options.

--start|-s start-number
Starting number from where to start mapping numbers. This is the first number which is mapped, and it is mapped to new-start-number.

--end|-e end-number
End number from where to end mapping numbers. This is the last number which is mapped. If this is not given then assume that all numbers starting from start-number are mapped.

--newstart|-S new-start-number
New starting number to where to map numbers. The old start-number is mapped to this value.


METATILES remap type

This mapping fixes metatiles. This will update the Appearance field in 'TileList' structure in the *.are files in case the MetaTile field is 1. This requires --start and --newstart options.

--start|-s start-number
Starting number from where to start mapping numbers. This is the first number which is mapped, and it is mapped to new-start-number.

--end|-e end-number
End number from where to end mapping numbers. This is the last number which is mapped. If this is not given then assume that all numbers starting from start-number are mapped.

--newstart|-S new-start-number
New starting number to where to map numbers. The old start-number is mapped to this value.


BICFEATS remap type

This mapping fixes feats in the player character file (bic file). This will update the feats in the toplevel FeatList (list of all feats), LvlStatList/FeatList (feats given at that level), and feats stored in the HotbarList. This requires --start and --newstart options.

--start|-s start-number
Starting number from where to start mapping numbers. This is the first number which is mapped, and it is mapped to new-start-number.

--end|-e end-number
End number from where to end mapping numbers. This is the last number which is mapped. If this is not given then assume that all numbers starting from start-number are mapped.

--newstart|-S new-start-number
New starting number to where to map numbers. The old start-number is mapped to this value.


BICSPELLS remap type

This mapping fixes spells in the player character file (bic file). This will update the spells in the MemorizedList (memorized spells) and KnownList (known spells) in the toplevel ClassList (spells per class) and KnownList (known spells) in the LvlStatList structure (spells gained at that level), and spells stored in the HotbarList. This requires --start and --newstart options.

--start|-s start-number
Starting number from where to start mapping numbers. This is the first number which is mapped, and it is mapped to new-start-number.

--end|-e end-number
End number from where to end mapping numbers. This is the last number which is mapped. If this is not given then assume that all numbers starting from start-number are mapped.

--newstart|-S new-start-number
New starting number to where to map numbers. The old start-number is mapped to this value.


REMOVEROOFS remap type

This mapping removes roofs from tiles, by chaing their variation. This requires --tiles option that will point to the tiles.2da file of the roofless hak. This will update the 'Variation' in the .are file.

--tiles|-T path-to-roofless-tiles-2da-file
Path to the tiles.2da file of the roofless hak.


EXAMPLES

    remap --start 2001 --newstart 3001 mymod.mod myhak.hak myhak.erf
    remap --start 5000 --end 5999 --newstart 7000
          -o itemplaceablesnew.erf itemplaceables.erf
    remap --type removeroofs --tiles tiles.2da myarea.are


FILES

~/.remaprc
Default configuration file.


SEE ALSO

gffmodify(1), gffprint(1), Erf(3), ErfWrite(3), ErfRead(3), Gff(3), GffWrite(3) and GffRead(3).


AUTHOR

Tero Kivinen <kivinen@iki.fi>.


HISTORY

This program was written to help to remap external haks so they do not overlap with the haks already in the module.