'YOUR_API_KEY_HERE', /** Base URL for IPS REST API calls (no trailing slash). */ 'api_base' => 'https://harpgamer.com/harpforum/api', /** Base URL for the forum site itself (used to build page/download URLs). */ 'site_base' => 'https://harpgamer.com/harpforum', /** * Optional, recommended: read-only access to the IPS database. With it, * each file's name and size come from ibf_downloads_files_records, with no * guest download requests, no throttling and nothing added to the public * download counts. Stored files are then read from disk to fill in * SHA-256 hashes and to classify Tools/Mods/Docs archives. Without it (or * if it fails), the generator falls back to the guest download flow. * * Use a dedicated user with SELECT only. The prefix is IPS's * sql_tbl_prefix from conf_global.php. */ 'ips_db' => [ 'host' => 'localhost', 'name' => 'ACCOUNT_ipsdb', 'user' => 'ACCOUNT_ipsdb_ro', 'pass' => 'CHANGE_ME', 'prefix' => 'ibf_', ], /** * Optional: the IPS install directory, substituted for {root} in IPS's * file-storage settings. Default: /public_html/harpforum. */ // 'ips_root' => '/home/ACCOUNT/sites/example.com/public_html/harpforum', /** * Optional: where IPS stores Downloads files, overriding what its own * settings say (the downloads_Files storage configuration). */ // 'ips_downloads_dir' => '/home/ACCOUNT/sites/example.com/IPB/IDM/downloads', // ------------------------------------------------------------------------- // File-system paths // ------------------------------------------------------------------------- /** * Directory where catalog.json (and catalog.json.tmp) will be written. * The web server must be able to read this directory. * Default: same directory as this config file. */ 'output_dir' => __DIR__ . '/hcl', /** * Directory for per-file metadata cache (size/filename lookups). * Must be writable by the process running hcl-catalog-generate.php. * Default: /cache */ 'cache_dir' => __DIR__ . '/hcl/cache', // ------------------------------------------------------------------------- // Catalog source metadata (written verbatim into catalog.json) // ------------------------------------------------------------------------- /** Short identifier for this source, used as a namespace prefix in IDs. */ 'source_id' => 'harpgamer', /** Human-readable source name. */ 'source_name' => 'HarpGamer.com', /** URL to the file-downloads landing page. */ 'source_url' => 'https://harpgamer.com/harpforum/files/', /** Contact e-mail or URL for catalog issues. */ 'source_contact' => 'admin@harpgamer.com', // ------------------------------------------------------------------------- // IPS Downloads category mapping // ------------------------------------------------------------------------- /** * IPS category ID that acts as the root for all Harpoon Classic content. * Only categories whose ancestor chain includes this ID are processed. * Adjust to match the actual "Harpoon Classic / HC / HCE / HUCE" category ID. */ 'hc_parent_category_id' => 1, /** * Maps IPS category IDs to HC Launcher artifact types. * * Categories not listed here but whose parent chain includes * hc_parent_category_id will attempt to inherit their parent's type, * or fall back to "Unknown". * * Category 12 (Tools/Mods/Docs) is mapped to "Tool", but each of its files * is inspected (see inspect_artifact_types below) and given a more specific * artifactType of its own — ExportDLL, Map, Sound or Graphic — when its * contents show one. Files with nothing more specific stay "Tool". * Scenario sub-categories (parentId == 5) automatically inherit "Scenario". */ 'category_artifact_map' => [ 3 => 'PlatformDB', // Databases (under HC) 5 => 'Scenario', // Scenarios (under HC) – parent of regional subcats 15 => 'BattleSet', // BattleSets (under HC) 12 => 'Tool', // Tools/Mods/Docs (under HC) – files inspected individually ], // ------------------------------------------------------------------------- // Optional tuning (omit any of these to keep the defaults shown) // ------------------------------------------------------------------------- /** * User-Agent for every request. IPS refuses downloads to the old * 'HCLauncher-CatalogGenerator/1.0' string (error EX1406), so avoid it. */ // 'user_agent' => 'HCLauncher-CatalogBuilder/1.1', /** * Files in categories of these types are downloaded once per version and * their archive listing inspected to find their real artifact type. * Needs PHP's zip extension; without it inspection is skipped (logged). */ // 'inspect_artifact_types' => ['Tool'], /** Archives larger than this (bytes) are not downloaded for inspection. */ // 'inspect_max_bytes' => 50 * 1024 * 1024, /** * A failed size/filename lookup is due again after this many seconds. * Keep it below the cron interval so every run retries within its budget. */ // 'meta_retry_seconds' => 10800, /** * Files given a live lookup (size/filename, or an archive inspection) per * run. Files in inspected categories go first, then never-looked-up files, * then due retries; the rest wait for a later run. The first deploy fired * all 740 at once and only ~45 succeeded, so the backlog is spread out. */ // 'max_lookups_per_run' => 100, /** Pause before each live lookup after the first, in milliseconds. */ // 'lookup_delay_ms' => 2000, /** * Previous-version files hashed (from disk) per run. Each is hashed once * and cached by record; the cap only spreads out the first run's backlog. */ // 'max_version_hashes_per_run' => 500, /** * Files an entry needs from another entry: IPS file ID => list of * [companion file ID, file name it supplies]. Published as the file's * 'companions'; the launcher fetches the companion and places the file * after an import. List only entries that name a specific file: a * database without its own commondb.rsr otherwise uses the stock one. * Setting this replaces the generator's built-in list (605, 257, 276, * 597 => 328's commondb.rsr), so copy that in. */ // 'companions' => [605 => [[328, 'commondb.rsr']]], ];