Page MenuHomeFeedback Tracker

Feature request: File prefix for the currently loaded mission folder
New, UrgentPublic

Description

Similar to $currentdir:, $profile:, and $saves:, it would be nice if there was a fix prefix, such as $missiondir: or $mission:, that pointed to the currently loaded mission folder. This would allow mods to read/write files in the mission folder so that server owners can customize mission-specific mod settings.

I have tried to find a way to get the currently loaded mission folder without any success. For example, GetCLIParam("mission", var) , only works if the server was started with a -mission=path\to\mission command line parameter. It does not work if the mission is specified by the server config file (e.g. serverDZ.cfg).

I also tried using GetDayZGame().GetMissionPath() and GetDayZGame().GetMissionFolderPath() but both always return empty strings as they seem to be client-side only.

Please add a new file prefix for the mission folder so that mods can do things like:

MySettings settings;

JsonLoadFile("$missiondir:mysettings.json", settings);

If there is already some way to get the currently loaded mission path that works server-side, please let me know!

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
General

Event Timeline

tjensen created this task.Dec 28 2020, 7:46 PM
tjensen added a subscriber: Geez.Sep 3 2021, 2:58 AM

💖 1.14 💖 Thank you @Geez and the DayZ dev team! 💖