Skip to content
Dude McDude edited this page Sep 23, 2021 · 11 revisions

The data files used by Temple+ are located in the Temple+ installation folder:

C:\Users\<YOUR WINDOWS USERNAME>\AppData\Local\TemplePlus\<app-1.x.xx>\tpdata\

Many files are also packed into .dat files. Notably, tpgamefiles.dat and co8fixes.dat.

DAT Files

You can use this utility to pack/unpack DAT files.

File Search Path

All file names and folders are defined relative to the main ToEE folder, denoted <ToEE Folder> from here on.

The search path is as follows (from lowest precedence to highest):

  1. *.dat files found in the main ToEE folder (ToEE1.dat, ToEE2.dat etc.)
  2. data\ folder contents
  3. tpgamefiles.dat
  4. co8fixes.dat (or other module-specific files if applicable, e.g. kotbfixes.dat)
  5. overrides\*\ folder contents - see User file overrides section.

Remark about the data\ folder:
It's very important to emphasize that it is the contents of the data\ folder that are added to the search path, and NOT the folder itself.
This may be confusing if you are used to changing files inside that folder so let's make that clear - ToEE just loads everything inside that folder, and refers to it internally sans the data\. As an example, it is meaningless to refer to data\rules\protos.tab - the actual file reference is rules\protos.tab.
Similarly, when packing files to a DAT file, you should also observe this rule!

User file overrides

Temple+ supports additional mod override folders. These allow you to create mod packages that add or override existing files, so that your mod files don't get all tangled up under the same folder. It also makes it easy to turn off / remove individual mods.

To do so, create an overrides\ folder in your main ToEE folder, and a subfolder within it for each mod you want to add. Within the subfolder, create a file named mod_specs.json.
If done correctly, you will see the subfolder name in the ToEE main menu screen, at the bottom right (right above the version info).

As noted above, it has the highest precedence over all other search paths.

In terms of file structure you can use it as though it were the data\ folder.

For instance, a file originally found in data\scr\ should be replaced via a file in

<ToEE Folder>\overrides\my_awesome_mod\scr\<filename>

Similarly, if you want to replace a file from inside tpgamefiles.dat, such as the files in scr\tpModifiers or rules\char_class, you should create the following structure:

<ToEE Folder>\overrides\my_awesome_mod\scr\tpModifiers\<filename>
<ToEE Folder>\overrides\my_awesome_mod\rules\char_class\<filename>

Extender Files

ToEE concentrates many definitions in central files (such as protos.tab), which makes adding together contributions from multiple authors difficult.

Temple+ improves the situation somewhat by allowing users to extend several pre-existing files with additive Extender Files.

Original File Extender Folder File format
rules\protos.tab rules\protos\ *.tab
mes\description.mes mes\description\ *.mes
mes\long_description.mes mes\long_descr\ *.mes
mes\help.tab mes\help\ *.tab
rules\partsys*.tab rules\partsys\ *.tab
art\meshes\meshes.mes art\meshes\ext\ *.mes
rules\addmesh.mes rules\addmeshes\ *.mes
mes\spell.mes mes\spells\ *.mes
rules\spell_enums.mes rules\spell_enums\ *.mes
sound\snd_*.mes sound\user_sounds\ *.mes

The extender files should mirror the structure of the original file, but should contain just the entries you want to add (rather than the whole file with additions).

You can also use it for overriding specific entries, since it will take precedence over the original files in case of conflicts. For that same reason however, you should publicly stake claim to IDs you want to use, e.g. protos.tab IDs.

Example: Suppose you want to add a few entries to protos.tab.

You can now add a custom-made .tab file inside rules\protos, e.g. usermade_protos.tab, and it will load up that file alongside protos.tab.
You should not replicate the entire protos.tab of course, since that defeats the whole purpose of the extenders.

Mes files have a generic extension capability as of Temple+ 1.0.85. There are two ways to do this:

  1. <mesfilename>_ext.mes
  2. <mesfilename>_ext/*.mes

For example, if you wish to extend description.mes by adding entries or overriding existing ones, you'd either create description_ext.mes (in the same folder), or create a subfolder named description_ext and place mes files inside.

The former is mainly intended to be used centrally by Temple+, and the latter for user mods.
In case of conflicts, the latter takes precedence.

Clone this wiki locally