#How to hot-reload Arma 3 mods

1 messages · Page 1 of 1 (latest)

magic island
#

Haswell — Today at 2:43 AM
is there a way to hot-reload a mod in arma 3?

Katushka — Today at 2:44 AM
in dev build as I know A3 allows to update config values on the fly
Release doesn't allow to do that. Probably for security reasons.
https://community.bistudio.com/wiki/diag_mergeConfigFile
diag mergeConfigFile

Haswell — Today at 2:49 AM
@Katushka
I dont really get it, if I edit the sqf files I need to reload the config file?

Katushka — Today at 2:50 AM
You didn't notice anything abotu sqf. No. In case you edit sqf you don't need to reload .pbo.

Haswell — Today at 2:52 AM
I'm just trying to edit some sqf files and console log the changes.
so lets clarify:
if I edit the sqf files in the mod what should I reload to reflect the changes if anything?
what is the deal with the config files, what are they used for?

#

Katushka — Today at 2:59 AM
in this case you can -EnableFilePatching on the machine your run ArmA 3, put your mod SQF files into the directory saving the structure and change the files on the fly
you need to extract files into the game folder saving PBO prefix and all directory structure!
for example:

execVM "ARMA_3_ROOT>\x\prefix1\prefix2\mod_root_folder\functions\mycode.sqf";
or
MYMOD_fnc_myFunc = compileScript ["\x\prefix1\prefix2\mod_root_folder\functions\mycode.sqf"];
will recompile your function right in the game

Haswell — Today at 3:04 AM
I think I found an article talking about file patching, THANKS A LOT!
and one last question, what are the config files for?

Katushka — Today at 3:05 AM
it's primary way to store everything (almost) related to configuration for the game
For example in config you're storing the type (a path to the file) of texture for your car. Or you can register pre init event handler for your mod. Or you can define the load order of your mods, enable or disable / GPS in vehicle, add / remove compatible optics for your weapon or add new entities like new units, tanks etc with the physics of UFO.
Even binarized mission file is a config (binarized raP format).

#

Haswell — Today at 3:10 AM
I saw something about pre init handlers, what are those for?
Like where would I use them
I think I got it, thanks

Katushka — Today at 3:12 AM
First off you have to start from this table
https://community.bistudio.com/wiki/Initialisation_Order

Katushka — Today at 3:18 AM
this one is probably #1
https://community.bistudio.com/wiki/Category:Arma_3:_Scripting_Commands

Katushka — Today at 3:19 AM
and at some point I recommend you to read this one
https://community.bistudio.com/wiki/Code_Optimisation

Katushka — Today at 3:23 AM
you also need to know how preprocessor works because the macros are widely used in medium - large projects. For example Community Base Addons (CBA_A3)
https://community.bistudio.com/wiki/PreProcessor_Commands