UNPKG

v3mt

Version:

A CLI toolkit for managing and deploying Victoria 3 mods, including sending mod files to the game, launching the game, and more.

14 lines (13 loc) 506 B
import fs from 'fs'; import path from 'path'; import os from 'os'; import Logger from '../../logger/logger.js'; export default function findGameModDirectory() { const userHome = os.homedir(); const modBasePath = path.join(userHome, 'Documents', 'Paradox Interactive', 'Victoria 3', 'mod'); if (!fs.existsSync(modBasePath)) { Logger.warn(`Victoria 3 mod directory not found in the expected location: ${modBasePath}`); return null; } return path.normalize(modBasePath); }