Welcome to Haven Documentation!

The Haven Documentation is your go-to resource for guides and tutorials on Haven content and SPT modding. Whether you're just starting out or looking to dive deeper, you'll find everything you need here.

Use the search bar to quickly find specific content, or explore the categories in the sidebar to navigate through different topics.

The website is still a work in progress, and I'm continuously adding new content as time allows. So, please be patient as more updates and guides are added.

Want to contribute? Feel free to fork the repository and create a pull request on the GitHub repository with any improvements or additions you'd like to see.

Thank you for visiting the Haven Documentation!

Haven Zone Creator

The Haven Zone Creator is a robust tool for SPT mod developers to create, configure, and manage custom zones for VCQL, Loose Loot, and other mods with advanced settings and ease.

Download the Mod Here

Overview

Haven Zone Creator

The Haven Zone Creator is an all-in-one tool designed for mod developers working with SPT. It simplifies the process of creating and configuring custom zones for VCQL, Loose Loot, and world-building. With advanced configuration options, real-time adjustments, and intuitive tools, this mod allows you to quickly create, edit, and manage zones for gameplay or testing.

Whether you're building custom maps, adding loot zones, or managing world data, the Haven Zone Creator provides everything you need to streamline your workflow and enhance your creations.

Key Features:

Detailed Configurations

Zone Information

Zone Box Settings

VCQL Zone Settings

LooseLoot Settings

Map Locations

Haven World Builder

Showcase

fYkKNOL.gif

Known Issues

If you encounter an issue, report it on GitHub.

Disclaimer

Enjoy and use responsibly!

Haven Industries - Chloe

Welcome to Haven Industries - Chloe! This mod introduces exciting new items and features to enhance your gameplay experience.

Download the Mod Here

Description

Explore the exciting new items you can discover in-raid with this mod. From unique figurines to collectible TCG Anime Cards, there's something for everyone.

Note: Secure Containers and Storage Containers are not included in the in-raid items list. These items can be crafted or obtained through quests and other means within the game.

🌟 Features

Profiles

Hall of Fame

Showcase your special items in the Hall of Fame.

Crafting

TCG Anime Cards

Secure Containers

New Metal Fuel Tanks

Figurines

Storage Containers

Key Storage

Misc Items

📜 Quests

Start

Level & Other Requirements

📷 Showcase of all Items:

PS: not showing the other 75 cards...

All Items

❗ Notes

📜 License

This mod is distributed for free use. Feel free to modify it, but please give proper credit.

Haven Industries - Overhauled Raids

Welcome to Haven Industries - Overhauled Raids! This mod is for anyone who loves tweaking to their liking. Whether you’re going for a laid-back loot run or an intense hardcore grind, this mod gives you the tools to shape your raids how you want them.

Download Coming Soon

Description

This isn’t just a simple tweak mod. It dives into raid mechanics, loot systems, weight limits, trader interactions, container sizes, stack sizes, and so much more. If you’ve ever thought, “I wish I could control that,” this mod probably has it covered (probably).

🌟 Features

Debugging

Insurance

Trader Adjustments

Container Sizes

Weapon Adjustments

Weight System

Loot Multipliers

Raid Extensions

Energy and Hydration

Medical Changes

Customize every detail about healing items:

Stack Sizes

Pocket Sizes

Other Raid Options

📜 Notes

📜 License

Free to use and tweak as much as you want. Just give credit to the original creator.

Haven World Builder Documentation

Overview

Haven World Builder is a mod designed for SPT mod developers to create immersive, interactive environments by spawning custom objects in the game world. It supports advanced features like integrating objects with quest progression, ensuring seamless gameplay enhancements. The mod simplifies world-building and enhances customization.

Whether you're creating dynamic quest locations, adding hidden treasures, spawning PMCs, scavs, bosses or customizing the environment with unique objects, Haven World Builder provides the tools you need to bring your vision to life.

Download the Mod Here

Showcase Examples

Features

Object Spawning

Quest Integration

Data Management

Debugging and Customization

How It Works

  1. Initialize the Mod: The mod starts by identifying the map and loading corresponding configuration files.
  2. Load Bundles: Asset bundles for objects are loaded dynamically from specified directories.
  3. Quest Checks: If quests are active, the mod ensures objects are only spawned when the quests are in a valid status.
  4. Spawn Objects: Objects are instantiated at predefined locations with randomization for variety (if applicable).
  5. Monitor Changes: Quest statuses are monitored, and objects are spawned or removed accordingly.

Create Addons for Haven World Builder

Before You Begin

Before creating addons for Haven World Builder you should have a basic understanding of Unity, asset bundles, and JSON file formats. You should also be familiar with the Haven Zone Creator mod for fetching object positions.

Follow the steps below to create custom addons for Haven World Builder:

Step 1: Add Your Bundles

  1. Navigate to the folder: BepInEx/plugins/HavenWorldBuilder/Bundles/.
  2. Create a new folder for your category (e.g., MyNewCategory).
  3. Place your .bundle files inside the folder (e.g., poster1.bundle, poster2.bundle).

Step 2: Create MyNewCategory.json

  1. Navigate to the folder: BepInEx/plugins/HavenWorldBuilder/MapLocations/.
  2. Open the folder of the map you want to add objects to.
  3. Create MyNewCategory.json file.
  4. Add your category to the desired map using the structure below
  5. Then save the file and restart the client. Your objects will now spawn in the specified map and positions.
[ "Category": "Posters", "Positions": [ { "Position": { "x": -31.82145, "y": 2.76337886, "z": 34.09983 }, "Rotation": { "x": 0.0, "y": 271.796234, "z": 0.0 } } ] ]

Step 2.5: Fetching the positions

For fetching the positions, i will refer you to the Haven Zone Creator mod.

It will help you understand how to add positions and categories to the json file.

After you have the positions, you can add them to the json file, or use the file as it is generated.

Step 3: Optional - Lock Objects Behind Quests

You can lock objects behind quests by specifying a quest ID and status.

For example, the below configuration will only spawn the posters if the quest The Survivalist Path - Tough Guy is started.

[ { "Category": "Posters", "IsForQuest": true, "Quests": [ { "QuestId": "5d25cf2686f77443e75488d4", "QuestStatus": ["Started"] } ], "Positions": [ { "Position": { "x": 21.4039536, "y": 5.159445, "z": -109.309143 }, "Rotation": { "x": 0.0, "y": 271.796234, "z": 0.0 } } ] } ]

Preparing the Mod for Release

  1. Ensure all asset bundles and map location files are correctly placed.
  2. Test the mod in-game to verify object spawning and quest integration.
  3. Package the mod files into a zip archive for distribution.
    • Include the Bundles and MapLocations folders that are yours only.
      • Folder BepInEx/plugins/HavenWorldBuilder/ should be path in your zipped folder.
    • Include any additional documentation or instructions for users for the Hub Page.
    • Provide information that they must use Haven World Builder for the Objects to spawn.
  4. Provide documentation and instructions for users on how to install and use your addon with Haven World Builder.
Do NOT include the CathieNova.HavenWorldBuilder.dll file in your release.

Additional Information

Quest Status Names and Numbers (use names in json for QuestStatus)

Map Names and Their IDs (left is for map folders)

Known Issues

Contributing

If you want to contribute or report issues, visit the GitHub repository.

Server Mods Guide

This is the content for Server Mods Guide. Will be added soon.

Server Modding - Setup Project

In this guide, I will walk you through how I personally set up a new server mod project. This guide will cover the following steps:

Though this guide mentions version 3.10, it should work for other versions too. It was made with 3.10 in mind.

Other developers may use different methods, but this method works for me. It might not be perfect, but it’s a good starting point in my opinion.

By the end of this guide, you will have a Server Mod with the following:

Before You Begin:

New to Typescript? Find comprehensive documentation on the official website: Typescript Documentation

Download Tools and Dependencies:

Before you can start creating your server mod, you will need to download the following tools and dependencies:

Create a New Folder to Work In:

It's always good to have a proper folder to work in for your project. I store mine in "D:\SPT-AKI\MyMods\Server Mods\SPT-3.10\" as it's easy to find and work with.
Extract the content of "13.1AddTraderWithAssortJSON" from the SPT 3.10 Template into the folder you created.

Server Modding - Understanding the Code

Usually, the Mod Example will have comments in the code to help you understand what each part does, but I will explain the basics here with said comments:

Now Let's Get Started with "mod.ts" in the "src" Folder:

The imports at the top are the dependencies for the mod, and you can add more if you need them.

import { DependencyContainer } from "tsyringe"; // <-- This is the dependency container // SPT types import { IPreSptLoadMod } from "@spt/models/external/IPreSptLoadMod"; // <-- This is the main interface for the mod import { IPostDBLoadMod } from "@spt/models/external/IPostDBLoadMod";// <-- This is the interface for the mod after the database is loaded import { ILogger } from "@spt/models/spt/utils/ILogger"; // <-- This is the logger interface import { PreSptModLoader } from "@spt/loaders/PreSptModLoader"; // <-- This is the loader for the mod import { DatabaseServer } from "@spt/servers/DatabaseServer"; // <-- This is the server for the database import { ImageRouter } from "@spt/routers/ImageRouter"; // <-- This is the router for the images import { ConfigServer } from "@spt/servers/ConfigServer"; // <-- This is the server for the config import { ConfigTypes } from "@spt/models/enums/ConfigTypes"; // <-- This is the enum for the config types import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; // <-- This is the trader config interface import { IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; // <-- This is the ragfair config interface import { JsonUtil } from "@spt/utils/JsonUtil"; // <-- This is the JSON utility import { Traders } from "@spt/models/enums/Traders"; // <-- This is the traders enum // New trader settings import baseJson = require("../db/base.json"); // <-- This is the base JSON file for the trader import assortJson = require("../db/assort.json"); // <-- This is the assort JSON file for the trader to have items for sale, barter, etc. import { TraderHelper } from "./traderHelpers"; // <-- This is the trader helper class

The constructor is where you set up the mod, like the name, version, debug settings, etc. This will be used later in the mod.

constructor() { this.mod = "acidphantasm-131AddTraderWithAssortJSON"; // Set name of mod so we can log it to console later - match this to your folder name that's built for \user\mods\ }

The "preSptLoad" function is the first function that gets called when the mod is loaded. It’s where you set up the mod.

public preSptLoad(container: DependencyContainer): void { // Get a logger this.logger = container.resolve("WinstonLogger"); // <-- This is the logger this.logger.debug(`[${this.mod}] preSpt Loading... `); // <-- This is the debug message // Get SPT code/data we need later const preSptModLoader: PreSptModLoader = container.resolve("PreSptModLoader"); // <-- This is the preSPT mod loader const imageRouter: ImageRouter = container.resolve("ImageRouter"); // <-- This is the image router const configServer = container.resolve("ConfigServer"); // <-- This is the config server const traderConfig: ITraderConfig = configServer.getConfig(ConfigTypes.TRADER); // <-- This is the trader config const ragfairConfig = configServer.getConfig(ConfigTypes.RAGFAIR); // <-- This is the ragfair config // Create helper class and use it to register our traders image/icon + set its stock refresh time this.traderHelper = new TraderHelper(); // <-- This is the trader helper class this.traderHelper.registerProfileImage(baseJson, this.mod, preSptModLoader, imageRouter, "cat.jpg"); // <-- This is the profile image this.traderHelper.setTraderUpdateTime(traderConfig, baseJson, 3600, 4000); // <-- This is the trader update time in seconds // Add trader to trader enum Traders[baseJson._id] = baseJson._id; // <-- Add trader to the traders enum // Add trader to flea market ragfairConfig.traders[baseJson._id] = true; // <-- Add trader to the flea market this.logger.debug(`[${this.mod}] preSpt Loaded`); // <-- Debug message }

The "postSptLoad" function is the last function that gets called when the mod is loaded. It’s where you can perform any final tasks before the mod is fully loaded.

public postDBLoad(container: DependencyContainer): void { this.logger.debug(`[${this.mod}] postDb Loading... `); // <-- Debug message // Resolve SPT classes we'll use const databaseServer: DatabaseServer = container.resolve("DatabaseServer"); // <-- This is the database server const jsonUtil: JsonUtil = container.resolve("JsonUtil"); // <-- This is the JSON utility // Get a reference to the database tables const tables = databaseServer.getTables(); // <-- Get the database tables // Add new trader to the trader dictionary in DatabaseServer - this is where the assort json is loaded /* * The assortJSON includes the following: * Milk available for roubles at LL1 * Milk available for item barter at LL1 * Helmet w/ soft armour available for roubles at LL1 * Helmet w/ soft armour available for item barter at LL1 * * It is *highly recommended* to use MongoIDs for the IDs in the assort, this example does not in order to make it easier to understand. */ this.traderHelper.addTraderToDb(baseJson, tables, jsonUtil, assortJson); // <-- Add trader to the database this.traderHelper.addTraderToLocales(baseJson, tables, baseJson.name, "Cat", baseJson.nickname, baseJson.location, "This is the cat shop"); // <-- Add trader to locales this.logger.debug(`[${this.mod}] postDb Loaded`); // <-- Debug message }