Kyridious Posted March 30, 2018 Posted March 30, 2018 Good Morning, I can't get DCS to find & load custom server scripts anymore. Pre 2.5, we'd put these files in the Saved Games\DCS\Scripts\ path with a name like *gameGUI.lua. According to the recent ED documentation, that changed several months ago: DCS Simulation Control User Scripts The behaviour of the DCS can be altered using the Lua scripts. You define the hooks to the DCS events, and then do what you want using the provided API. When loading, DCS searches for Saved Games\DCS\Scripts\Hooks\*.lua files, sorts them by name and then loads into the GUI Lua-state. Each user script is loaded into an isolated environment, so the only thing they share is the state of the simulator. I moved my work into the "Hooks" path but I still don't see any indication that they are being parsed in the dcs.log. Any ideas?
Kyridious Posted March 30, 2018 Author Posted March 30, 2018 (edited) To follow up: The post below suggests that DCS.openalpha remains the active path for 2.5. This conflicts with the documentation (?) Regardless, I'll push my scripts into the /DCS.openalpha/Scripts/Hooks/ and report back. https://forums.eagle.ru/showthread.php?t=205395&highlight=Scripts%5CHooks Edit: No luck - issue persists Edited March 31, 2018 by Kyridious
Grimes Posted March 31, 2018 Posted March 31, 2018 It'll depend on whichever saved games folder that specific DCS install is looking to. Launch the game, check your saved games folders, and figure out whichever one has a DCS.log file getting updated on. That'll be the folder that it is actively looking into for the Hooks folder. Alternatively you can check your DCS install folder to see if there is a dcs_variant.txt file in there. If there is it'll be defining the saved games folder used. Specifically it'll be DCS.whateverTextIsInThere. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
Kyridious Posted April 2, 2018 Author Posted April 2, 2018 Thanks Grimes, but no luck =/ The dcs.log updated at run time is in the default Saved Games\DCS\Logs\ path. Scripts are located at Saved Games\DCS\Scripts\Hooks\*.lua. Can't find a dcs_variants.txt on the system. I may just reinstall... perhaps something went haywire during the 2.5 update?
Kyridious Posted April 2, 2018 Author Posted April 2, 2018 Well, I apologize to souls reading this thread in the future. The server scripts, despite being in the exact same location as they were when I started this quest (Saved Games\DCS\Scripts\Hooks\*.lua), are now recognized and loaded appropriately.
Igneous01 Posted April 5, 2018 Posted April 5, 2018 I had a problem with this back in 1.5 but the issue was that the name of my script did not include GameGUI in the filename. Can't recall if that check was dropped in later versions. Developer of Kaukasus Insurgency - a customizable Dynamic PvE Campaign with cloud hosting and stats tracking. (Alpha) http://kaukasusinsurgency.com/
Recommended Posts