Virtual Garage

HM_Settings_Virtual_Garage

ServerProfile\Hunter_Mods\HM_Virtual_Garage\HM_Settings_Virtual_Garage.json

General

EnableAutoParking

Default 1

Set to 1 so vehicles nobody uses for a long time get parked in their owner's garage by themselves. Set to 0 to turn that off.

AutoParkingInactiveVehiclesAfterMinutes

Default 10080

How many minutes a vehicle can sit unused before it gets auto-parked (10080 is 7 days).

EmptyAutoParkedVehicles

Default 0

Set to 1 so auto-parked vehicles lose what's inside them. Set to 0 to keep it.

ParkingRadius

Default 10

A vehicle within this many meters of the parking spot can be parked.

SpawningVehicleDistance

Default 2.5

How far from the parking box a vehicle is delivered, in meters.

ReceiptSpawningVehicleMaxDistance

Default 30

Maximum distance (in meters) between the player and the spot where a vehicle spawns from a receipt.

LimitVehiclesInGarage

Default 10

Maximum number of vehicles in one garage.

AllowCargoOnCar

Default 1

Set to 1 so vehicles can be parked with stuff inside. Set to 0 so they have to be empty.

ForbiddenItems[]

Default list of 2

Items that block parking while they're in the vehicle.

Messages

FullGarageMessage

Default "Your garage is full."

Message when the garage is full.

ParkingMessage

Default "Your vehicle has been parked!"

Message when a vehicle is parked.

UnparkingMessage

Default "Your vehicle has been delivred!"

Message when a vehicle is delivered.

NoCarToParkMessage

Default "There's no vehicle to park."

Message when there's no vehicle on the parking spot.

CargoNotAllowedMessage

Default "Please remove all the cargo from the v..."

Message telling the player to empty the vehicle first.

IllegalItemMessage

Default "Please remove from the vehicle or empt..."

Message that lists those items.

LastDriverMessage

Default "You must claim this vehicle or be last..."

Message when the player didn't claim the vehicle or wasn't the last one to drive it.

VehicleInUseMessage

Default "Nobody may be inside the vehicle and i..."

Message when someone is inside the vehicle or it's moving.

GarageUnreadableMessage

Default "This garage can't be opened right now...."

Message when the garage file can't be read.

HM_Parking_Spawns

ServerProfile\Hunter_Mods\HM_Virtual_Garage\HM_Parking_Spawns.json

Entries

[]

Default 2 entries

Garages placed by the server (a parking box plus a parking spot).

[].Name

Default "Vehicles Garage"

The garage's name.

[].PlaceBoxAt.Position

Default [3766.64, 404.199, 5971.17]

Where the parking box is [x, y, z].

[].PlaceBoxAt.Orientation

Default [-119.203, 0, 0]

Which way the parking box is turned.

[].PlaceParkingSpotAt.Position

Default [3777.88, 404.496, 5967.54]

Where the parking spot is (where cars get parked from and delivered to).

[].PlaceParkingSpotAt.Orientation

Default [56.6001, -4.8, -2.2]

Which way the parking spot is turned.

[].enableMarkers

Default 1

Set to 1 to put a marker on the map for it. Set to 0 for no marker. Works with the HM Groups, Expansion, LBmaster or VPP map, whichever one you have.

[].enable3D

Default 1

Set to 1 to also show it as a 3D marker, not just on the map. Set to 0 for map only.

[].markerIcon

Default "car"

Which icon the marker uses, for example parachute, star, skull, car, lock or tent. It's changed automatically for Expansion and LBmaster maps.

[].markerColorA

Default 255

How see-through the marker is, from 0 to 255. 255 means fully solid. If A, R, G and B are all 0, the marker is light grey.

[].markerColorR

Default 100

How much red is in the marker colour, from 0 to 255.

[].markerColorG

Default 160

How much green is in the marker colour, from 0 to 255.

[].markerColorB

Default 255

How much blue is in the marker colour, from 0 to 255.

Economy files

types.xml56 lines
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<types>
    <type name="HM_Parking">
        <nominal>0</nominal>
        <lifetime>3888000</lifetime>
        <restock>0</restock>
        <min>0</min>
        <quantmin>-1</quantmin>
        <quantmax>-1</quantmax>
        <cost>100</cost>
        <flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
        <category name="containers"/>
    </type>
    <type name="HM_Parking_Cones">
        <nominal>0</nominal>
        <lifetime>3888000</lifetime>
        <restock>0</restock>
        <min>0</min>
        <quantmin>-1</quantmin>
        <quantmax>-1</quantmax>
        <cost>100</cost>
        <flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
        <category name="containers"/>
    </type>
    <type name="HM_Parking_Static">
        <nominal>0</nominal>
        <lifetime>3888000</lifetime>
        <restock>0</restock>
        <min>0</min>
        <quantmin>-1</quantmin>
        <quantmax>-1</quantmax>
        <cost>100</cost>
        <flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
        <category name="containers"/>
    </type>
    <type name="HM_Parking_Kit">
        <nominal>15</nominal>
        <lifetime>14400</lifetime>
        <restock>0</restock>
        <min>12</min>
        <quantmin>-1</quantmin>
        <quantmax>-1</quantmax>
        <cost>100</cost>
        <flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
    </type>
    <type name="HM_Parking_Wrench">
        <nominal>15</nominal>
        <lifetime>14400</lifetime>
        <restock>0</restock>
        <min>12</min>
        <quantmin>-1</quantmin>
        <quantmax>-1</quantmax>
        <cost>100</cost>
        <flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0" crafted="0" deloot="0"/>
    </type>
</types>
cfgignorelist.xml5 lines
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<ignore>
	<type name="HM_Parking_Static"></type>
	<type name="HM_Parking_Cones_Static"></type>
</ignore>

Other files

Converts an old Virtual Garage database to the newest update (only needed when updating from an old version, needs Python). It makes a backup folder first, then rewrites every file. 1. Go to ServerProfile\Hunter_Mods\HM_Virtual_Garage\Database. 2. Drag your Garage folder and drop it on this file. 3. Your database is now updated.

drag_and_drop_garage_folder_to_convert_data.py80 lines
import json
import os
import sys
import shutil

# Get folder from drag & drop or input
if len(sys.argv) < 2:
    print("Drag and drop the folder containing JSON files onto this script.")
    input_folder = input("Or type the folder path manually: ").strip()
else:
    input_folder = sys.argv[1]

if not os.path.exists(input_folder):
    print("The folder does not exist!")
    sys.exit(1)

# Create backup folder inside the input folder
backup_folder = os.path.join(input_folder, "backup")
if not os.path.exists(backup_folder):
    os.makedirs(backup_folder)

# Function to convert old InventoryAttachments (strings) to object structure
def convert_inventory_attachments(inventory):
    new_inventory = []
    for item in inventory:
        if isinstance(item, dict):
            item["InventoryAttachments"] = convert_inventory_attachments(item.get("InventoryAttachments", []))
            new_inventory.append(item)
        elif isinstance(item, str):
            new_inventory.append({
                "ClassName": item,
                "Quantity": 0,
                "Health": 100.0,
                "InventoryAttachments": []
            })
    return new_inventory

# Function to convert a single vehicle
def convert_vehicle(vehicle):
    for cargo_item in vehicle.get("Cargo", []):
        if "Quantity" not in cargo_item:
            cargo_item["Quantity"] = 0
        if "Health" not in cargo_item:
            cargo_item["Health"] = 100.0
        cargo_item["InventoryAttachments"] = convert_inventory_attachments(cargo_item.get("InventoryAttachments", []))

    for attachment in vehicle.get("Attachments", []):
        if "Health" not in attachment:
            attachment["Health"] = 100.0
        if "CargoItems" not in attachment:
            attachment["CargoItems"] = []

    return vehicle

# Function to convert a single JSON file
def convert_json_file(input_path):
    with open(input_path, "r") as f:
        data = json.load(f)

    new_data = [convert_vehicle(v) for v in data]

    # Save back to the original file (overwrite)
    with open(input_path, "w") as f:
        json.dump(new_data, f, indent=4)

# Process all JSON files in the folder
for filename in os.listdir(input_folder):
    if filename.lower().endswith(".json"):
        input_path = os.path.join(input_folder, filename)
        backup_path = os.path.join(backup_folder, filename)

        # Copy to backup first
        shutil.copy2(input_path, backup_path)
        print(f"Backed up {filename} to {backup_folder}")

        # Convert and overwrite original
        convert_json_file(input_path)
        print(f"Converted {filename}")

print("\nAll files converted and originals overwritten. Backup is in the 'backup' folder.")