Skip to main content

Folders

TavernLib.TavernDirectories in TavernLib.dll. Both sides.

The paths TavernLib uses, so your mod doesn't have to build them. The how-to, with where your own mod's files should go, is Folders and files.

Members​

public static class TavernDirectories. Every member is a static string property, worked out each time you read it. None of them create the folder or file.

PropertyPathUsed by TavernLib
AppDataEnvironment.GetFolderPath(SpecialFolder.ApplicationData), so %APPDATA%. Inside the Wine prefix on Linux.
ATTSaveAppData\A Township Tale, the game's own folder: worlds, logs, presetsServer backups, cosmetic presets
ModdingTavernAppData\TheModdingTavern, TavernLib's and the launcher's configEverything below
ServerSettingsModdingTavern\server_settings.jsonServer
UsersModdingTavern\users.jsonServer
TavernServerModdingTavern\tavern_server.json, the portsServer
WhitelistRequestsModdingTavern\whitelist_requests.jsonServer
ModReposModdingTavern\mod_repos.json, mod sources added with modmanager addrepoServer
LastRejectionModdingTavern\last_rejection.json, why a server last refused youClient
LauncherPathModdingTavern\launcher_path.txt, where the launcher is. The launcher writes it.Client
QuickJoinModdingTavern\quick_join. Quick join is on while this file exists.Client
BlacklistModdingTavern\blacklist.jsonNo. The blacklist is in users.json now.
WhitelistModdingTavern\whitelist.jsonNo. The whitelist is in users.json now.

Some of TavernLib's files have no property. Their paths are in Files.

One more path lives elsewhere: TavernLib.Backend.Server.ServerBackup.ServerDirectory is ATTSave\Servers\-1, the server's world folder.

Example​

using System.IO;
using TavernLib;

public static class Paths
{
public static bool HasPlayed => File.Exists(TavernDirectories.Users);
public static string Presets => Path.Combine(TavernDirectories.ATTSave, "presets");
}

Gotchas​

  • Read these files, don't write them, unless the page for that file says how. The Server launcher writes several of them too. See Config files.
  • They're per Windows user (or per Wine prefix), not per game folder. Two game installs on one PC share them.
  • In Docker and on panels, the host maps TheModdingTavern to tavern-config. The paths still work from inside the game. See Config reference.

See also​