From 1f63096cdb7c270e5feceb5cb856b66505e8f4d9 Mon Sep 17 00:00:00 2001 From: smthspec Date: Thu, 18 Jun 2026 22:29:07 +0300 Subject: [PATCH] Fix mod loading: PBO prefix file + $profile path Two issues prevented the mod from running on the live server: - Add $PBOPREFIX$.txt (=YAInteraction) matching the toolchain convention so the packer mounts scripts at YAInteraction/... where config.cpp defs expect them. Without it the script modules were silently never compiled. - Replace GetGame().GetProfileFolder() (undefined function in this engine build, caused a World module compile error) with the "$profile:" virtual path, the portable idiom used by ZenRepairWells / TerjeMods. Verified on the live server: modules compile, MissionServer.OnInit runs, and settings.json + interactables.json are generated under profiles/YAInteraction/. Co-Authored-By: Claude Opus 4.8 --- $PBOPREFIX$.txt | 1 + .../YAInteraction/Config/YAInteractionConfigLoader.c | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 $PBOPREFIX$.txt diff --git a/$PBOPREFIX$.txt b/$PBOPREFIX$.txt new file mode 100644 index 0000000..1cf3188 --- /dev/null +++ b/$PBOPREFIX$.txt @@ -0,0 +1 @@ +YAInteraction \ No newline at end of file diff --git a/scripts/4_World/YAInteraction/Config/YAInteractionConfigLoader.c b/scripts/4_World/YAInteraction/Config/YAInteractionConfigLoader.c index e428bda..a2e5ef8 100644 --- a/scripts/4_World/YAInteraction/Config/YAInteractionConfigLoader.c +++ b/scripts/4_World/YAInteraction/Config/YAInteractionConfigLoader.c @@ -33,8 +33,12 @@ class YAInteractionConfigLoader // ------------------------------------------------------------------ static void Init() { - string folder = GetGame().GetProfileFolder() + DIR_NAME + "/"; // GetProfileFolder() has trailing slash - MakeDirectory(folder); // no-op / harmless if it already exists + // "$profile:" is the engine-mounted virtual path to the server profiles + // folder. (DayZGame has no GetProfileFolder() in this build; $profile: is + // the portable idiom used by e.g. ZenRepairWells / TerjeMods.) + string folder = "$profile:\\" + DIR_NAME + "\\"; + if (!FileExist(folder)) + MakeDirectory(folder); string settingsPath = folder + SETTINGS_FILE; string dataPath = folder + DATA_FILE;