Page 1 of 1

Command-line Arguments (v1.1.0.9 +)

Posted: Sat Jul 09, 2022 12:29 am
by Erik Rutins
Distant Worlds 2 has the following command line options. Some of these are specifically designed for managing Steam workshop mods:

--use-dxvk Use a packaged distribution of DXVK 1.x instead of native D3D11.
--use-dxvk2 Use a packaged distribution of DXVK 2.x instead of native D3D11.
--use-dx11 Force the use of native D3D11 for this launch.
--non-interactive Don't assume there is human input available.
--tool-mode Force enable tool mode and thus show a console.

--ugc-sync Sync up your subscribed Steam Workshop mods.
--ugc-publish Upload a mod to the Steam Workshop.
--ugc-id Specify a previous Workshop ID to update in the Steam Workshop.
--ugc-log Specify a change log entry for the Steam Workshop.
--ugc-dont-open Don't open the URL in the browser once submitted.

Also, for helping modders get their code to run, we have provided a generic foot-in-the-door for community projects such as the Chinese Localization mod and Mod Loader projects.

There's a new command-line parameter for the game that uses a standardized pattern to refer to a component to load or execute at the game's start up.

Mod projects can then provide a batch file or launchers to run the game with their low-level mod.

Examples of using the new parameter (--low-level-inject) on the command-line are provided below.


Basic example of loading and running a module initializer.

DistantWorlds2.exe --low-level-inject ManagedAssembly.dll

Examples of loading and running the static initializer of a class.

DistantWorlds2.exe --low-level-inject ManagedAssembly.dll!SomeClass
DistantWorlds2.exe --low-level-inject ManagedAssembly.dll!SomeNamespace.SomeClass

Examples of invoking a simple parameterless static method.

DistantWorlds2.exe --low-level-inject ManagedAssembly.dll!SomeClass.SomeStaticMethod
DistantWorlds2.exe --low-level-inject ManagedAssembly.dll!SomeNamespace.SomeClass.SomeStaticMethod

The parameter can be provided with multiple arguments and they will be loaded in the order specified from left-to-right.
Example of multiple arguments.

DistantWorlds2.exe --low-level-inject ManagedAssembly1.dll ManagedAssembly2.dll

Re: Command-line Arguments (v1.0.5.3 +)

Posted: Sat Jul 09, 2022 9:05 am
by frankycl
Hm -"modders get their code to run" ? - Well, normally modders don't expect the need to be a coder to get your mods to run, I think. :| - So, do you mind to elaborate how to get/use this ManagedAssembly.dll that's everwhere needed, according to the listing from above :?:

Re: Command-line Arguments (v1.0.5.3 +)

Posted: Tue Aug 30, 2022 8:10 pm
by rxnnxs
is there any way/place where there are some better to use examples how to use that and what arguments are possible?

Re: Command-line Arguments (v1.0.5.3 +)

Posted: Sat Oct 15, 2022 8:14 am
by rxnnxs
Is this a bad question?
I am looking for a list, i.e. no sound switch.