TESfaith is a utility to Move, Copy or Delete cells stored in a TES3 file (such as Morrowind: Elder Scrolls III). It also processes the landscape and all objects associated with that cell. e.g. if you make a copy of a region or cell (internal or external) then all objects (NPCs, statics such as furniture, lighting, sound) will be copied with it. Likewise if you move a cell all objects will be moved with it.
You can easily do the following:
All TESfaith needs to run is an ESM/ESP file
(a Morrowind master or plugin file) and a Rules file (always called TFAITH.CFG) which
you can easily modify using Notepad. You should already have an example TFAITH.CFG file when you downloaded this distribution.
1. TA: Transposing all external cells a new location:TA, -100, 80
This would move all the cells contained in the master/plugin and all objects in it far to the North-West (-100 is West by 100 cells, 80 is north by 80 cells).
2. CA: Copying all external cells to a new location:CA, 30, -28
This would make a copy of all cells contained in the master/plugin and everything in them to the South-East (30 is east by 30 cells, -28 is south by 28 cells).
3. CR: Copying a Region to a new location:CR, "Ascadian Isles Region", -100, 80
CR, "Ashlands Region", -100, 80
CR, "Azura's Coast Region", -100, 80
CR, "Bitter Coast Region", -100, 80
CR, "Grazelands Region", -100, 80
CR, "Molag Mar Region", -100, 80
CR, "Red Mountain Region", -100, 80
CR, "Sheogorad", -100, 80
CR, "West Gash Region", -100, 80
This would make a copy of Vvardenfell and everyone in it far to the North-West (-100 is West by 100 cells, 80 is north by 80 cells).
4. TR: Moving a Region (Transpose Region) to a new location:
TR, "Azura's Coast Region",3,0
This would detach all cells in the Azura's Coast Region from the rest of Vvardenfell, moving each cell in the region east by 3 cells, declaring clear independence for The Lady. ;)
5. Deleting a RegionDR,"Red Mountain Region"
Would delete all cells in the Red Mountain Region, leaving a big hole in the north of Vvardenfell, but solving the problem of Dagoth Ur once and for all. (Note that TES will complain about any Dialogue, Doors or AITravel references to any deleted cells when the new file is first opened).
6. Copying an Exterior Cell.CE, -2, 5, 23, 5
Would make a copy of the cell at (-2,5) and place this copy at (23, 5). Note: (-2, 5) happens to be Buckmoth Legionnary Fort, so this would create an identical Fort and landscape somewhere off the east coast.
7. Moving an Exterior Cell.MC, 0, 0, 25, 25
Would move the cell at (0,0) to (25,25), leaving a hole in the centre of Vvardenfell; presumably it was Vvarden who first found this out. Hoho.
8. Transposing an Exterior Cell.TC, 1, -13, 0, -10
TC, 2, -13, 0, -10
Would move the cells at (1,-13) and (2,-13) by an offset of (0,-10). Therefore (1,-13) would be moved to (1,-23) and (2,-13) would be moved to (2,-23).
This example would move the exterior of Ebonheart south by 10 cells. This option is just a little more handy than 'MC' if you want to displace a group of cells, without having to calculate the exact position for each.
9. Deleting all Exterior Cells.DA
This would delete all the external cells contained in the master/plugin and everyone/everything located in them. It's a pretty devastating option to use.
10. Deleting an Exterior Cell.DE, 2, 8
This would remove the cell at (2,8) from the land, leaving a flat wilderness in its place; since (2,8) is the ruins of Dagoth Ur, this would make the game incompletable.
11. Copying an Interior Cell.CI, "Vivec, Arena Pit", "My Arena 1"
Would create anew interior cells called "My Arena 1" which is an exact duplicate of "Vivec, Arena Pit". Very handy if you quickly want to duplicate the internal structure of an existing building or ship without spending ages starting from scratch.
12. Delete an Interior Cell.DI, "ken's test hole"Note that lines beginning with a # or a space character are ignored. So a # usually denotes a comment.You can do this in the TES editor anyway, but it was so easy to implement I put it in anyway. This example deletes the interior cell called "ken's test hole" - something Bethesda left in the original "Morrowind.esm".
Copy these 3 files to the same directory containing the mod (ESM/ESP) that you want to move:
TESfaith.exe tfaith.cfg tf_interiors.dat
Whilst TESfaith was originally designed to be run from a command prompt (a DOS-style prompt from Windows) and still can be, this has been unecessary since January 2004. It is also possible to tell TESfaith which ESM/ESP file it should process and other options by adding a single line to the rules file, tfaith.cfg. The simplest line you could add add to tfaith.cfg to tell TESfaith it should process the Morrowind plugin file called MyFile.ESP is:tesfaith MyFile.ESPThat should be all most people will want to run. If you save the tfaith.cfg file with a line like this in it and double-click on TESfaith.exe in Windows explorer then TESfaith will do the rest: It will read MyFile.ESP, test each cell it encounters against the rules in TFAITH.CFG and create a modified version in a file called TFOUT.ESP. If no rules were matched then the contents of TFOUT.ESP will be identical to MyFile.ESP. NOTE: TESfaith never alters your original input file! (unless your original ESP file happened to be called TFOUT.ESP. ;)
You can also run ESM (Master) files through TESfaith in the same way. e.g.tesfaith Morrowind.esmThis will still place the output in TFOUT.ESP, but you can simply rename the extension to '.ESM' and load it in to Morrowind as a Master if you wish.
TESfaith writes a log of everything it changes to TFTHLOG.TXT, which you can open in Wordpad (it'll probably look wrong in Notepad) if you wish to confirm all the changes that it has made.
You may also specify more verbose ([b]highly detailed[/b]) logging by specifying '-v' on the command line; every record and object that is found is recorded in the log file with this option, regardless of whether a rule matched it or not.tesfaith -v MyFile.ESP
You can tell TESfaith to only save moved or copied Cells, Land and Objects to TFOUT.ESP using the '-n' option. This is ideal if you just want to rip land from another Master or plugin file in to a fresh plugin. For example, to only save modified or copied cells from Bloodmoon.esm to TFOUT.ESP:tesfaith -n Bloodmoon.esmNote that when using '-n', information such as scripts or region data are not stored, so you may get some warnings when you try to load the resulting file in to TES CS or Morrowind itself.
You can ask TESfaith to dump a verbose explanation of your Rules by using the '-r' option. It won't make any modifications - it's just for information purposes. A copy of these verbose (plainer English) rules will be stored in TFTHLOG.TXT which you can easily view in Notepad:tesfaith -r
For backwards compatibility you can tell TESfaith NOT to modify any Scripts or Dialog commands by using the '-d' option:tesfaith -d "Siege at Firemoth.esp"
Finally you can also ask TESfaith to dump a list of all the cell co-ordinates that exist in your ESP/ESM file by specifying '-l':tesfaith -l MyFile.ESPThis will create a file called CELL_LOG.TXT with all the cell co-ordinates listed. This output file may easily be turned in to a TFAITH.CFG file - the co-ordinates of your cells will already be listed. No modifications are made in list cell mode.
tesfaith "Siege at Firemoth.esp"4. Save the file.
TR, "Firemoth Region", -10, -15
MC, -2, 9, -60, 40
tesfaith -v "Siege at Firemoth.esp"and then carry out step 9 again.
1. When deleting cells from a ESP or ESM file, the object references that were placed in them are also removed. This will not delete the availability of that type of object from the original file, so if you had a NPC called "Fred" situated in cell (-20,20) and you deleted that cell, then Fred will no longer be associated with (-20,20), but the NPC will still be available in the file; You can still place that NPC elsewhere in the TES Construction Set (TCS) or using script commands in the game.
2. A plugin (ESP) file is a 'changes' file. Deleting Cells from the ESP will remove the changes: If a cell already exists at the deleted location in the Master file, then the Master file cell will still exist.
3. Sometimes TESfaith will fail to detect that a cell that requires processing is an external cell because it has not been assigned to a Region. The safest workaround is to assign any cells in your plugin to a region. This is a sensible thing to do anyway, since it allows you to control the weather for that cell.
4. When using the TA or CA options to move or copy all external cells in a plugin, note that if your plugin contained changes to existing external cells contained in the master file (e.g. you added an object or modified landscape on Vvardenfell) then the change will also be moved which is probably not what you want. Use the TR/CR or TE/ME commands if you want better control.
5. TESfaith only moves cells, objects associated with those cells and the landscape and updates Interior doors, Scripts and Dialog Script commands that pointed to the moved cells. This should take away the vast majority of work involved in relocating or duplicating all or part of a plugin. Some less used functions such as specifying AITravel or AIFollow values using the drop-down AI box on a NPC in TES CS are not currently modified.
6. When copying Internal Cells, the name of the new cell must be of equal or smaller size to the original. If you try something larger, TESfaith will warn you of the reason and immediately exit without making any modifications. This was just to make the programming simpler and you can trivially rename the duplicated cell in TCS later. Note that it's relatively easy to copy and paste all the objects from one cell to another (interior or exterior) in TES CS anyway, so you don't have to use TESfaith to do this.
7. There may well be internal limits to TCS or Morrowind that mean cells of very large offsets may not work. Hypothetically (2^32/8192) = +262144 to -262143 may be stored in the TES3 file and objects will still be addressible. In reality the limit may be far less (try moving cells to far off locations if you're curious about the limits).
8. The summary at the end of TESfaith will include the total number of landscape records changed. Note that a CELL record (name and objects) and a LAND record (the landscape details) are separate records, so the summary number may appear twice the number you expected under certain circumstances. That's normal!
This program is provided without warranty, but you're free to distribute
it as much as you please (just please remember to include me somewhere!
I doubt I'll have time to bolt a front-end on to it, though it's possible for someone to write an independent front-end that uses the '-l' option with TESfaith to dump out a list of all the cells contained within a plugin, reads this back in and writes out a rules file with all the user's requested changes and runs TESfaith on those rules ...
Diolch yn Fawr. :-)
Paul Halliday (aka Lightwave)
Updated: 19-December-2006 (sixth release).