Sorry for not seeing your comment for a day, I'm currently in the process of moving from windows to linux so I cannot check as I'm in the middle of getting MO2 + Anomaly to work properly - once I got it running I'll take a look if what you want to do works.
----
It might work if the file in question doesn't get cached somehow when starting the game from desktop.
As long as the function ini_file(...) is not called directly in the script (so outside any function like on_game_start) it should in theory work.
My script runs before on_game_start is executed and makes changes to the files.
Anomalies "on_game_start", that most scripts use to register callbacks or run other scripts, runs when the "loading" screen appears - so only once you started a new game or loaded an existing savegame.
A note on the #include - if you edit "items\\settings\\npc_loadouts\\npc_loadouts.ltx", the #includes inside that file get parsed and the file then contains the contents of all files that are normally included via #include
(this is expected for now and working "properly" - this is a sideeffect of me using the vanilla anomaly functions, until I get around to write my own methods to handle the ltx files Github.com ).
This means if you want to change any properties of the included files you can either use the main file "items\\settings\\npc_loadouts\\npc_loadouts.ltx" or you can edit included files like for example "items\\settings\\npc_loadouts\\npc_loadouts_stalker.ltx".
But you should not try to do both at once, as this can have side-effects like changes from included files not applying.
In this case I would suggest modifying the included files, given that you do not need to change any properties like "scope_chance" in "items\\settings\\npc_loadouts\\npc_loadouts.ltx"
EngineOfDarkness
joined
This member has provided no bio about themself...