Max_ARG Posted April 19, 2017 Posted April 19, 2017 (edited) Hi guys. I am trying to improve my coding speed, i am new to the Scripting engine so everything i do takes time. It takes years(Not really, probably 3-4 minutes), to load for every line i want to test in my Lua files, but just multiply it by 3 new lines or functions added, 15 minutes for 3 lines/short_functions. I was wondering if there is any way to execute simple script lines via some console or some other way to improve times. At the moment i have found Witchcraft, but its last update on gitHub was 3 years ago. Opening 2 games, 1 Sp and another MP wont work as suggested in the hot tips since DCS doesnt allow 2 instances of the game at the same time. Edited April 19, 2017 by Max_ARG
Pikey Posted April 26, 2017 Posted April 26, 2017 I might have replied in slack, but for the forums, yes. You need a DO SCRIPT that points to your mission script file: assert(loadfile("E:\\PATH\\TO\\FILE.lua"))() Then call it continuously. via a menu in F10 Call it with a flag condition, set the flag via the F10menu. After its called, reset the flag. It will only then run once, and once each press only. Saves weeks of time. ___________________________________________________________________________ SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *
ESAc_matador Posted April 27, 2017 Posted April 27, 2017 I might have replied in slack, but for the forums, yes. You need a DO SCRIPT that points to your mission script file: assert(loadfile("E:\\PATH\\TO\\FILE.lua"))() Then call it continuously. via a menu in F10 Call it with a flag condition, set the flag via the F10menu. After its called, reset the flag. It will only then run once, and once each press only. Saves weeks of time. Where can i get more info about how to do this???
Wrecking Crew Posted April 27, 2017 Posted April 27, 2017 Me too. Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.
Pikey Posted April 27, 2017 Posted April 27, 2017 Damn, forced my hand. I'll do a tutorial. You'll beat your heads with your keyboards when you see how simple it is. I'll make it a seperate thread since it will get lost (it will get lost anyway) ___________________________________________________________________________ SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *
FSFIan Posted April 27, 2017 Posted April 27, 2017 At the moment i have found Witchcraft, but its last update on gitHub was 3 years ago. Opening 2 games, 1 Sp and another MP wont work as suggested in the hot tips since DCS doesnt allow 2 instances of the game at the same time. The last update was three years ago, but the Lua Console part of Witchcraft still works with current versions of DCS. For my 3D preview mission editor thing that replaced the unit moving functionality of Witchcraft, the README describes how you can set up a second installation of DCS: World so you can run two instances on the same computer. I don't know if that still works with current versions as I am not using it myself, but so far I have not received any reports that it won't. DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua
Wood Posted June 25, 2020 Posted June 25, 2020 Hi guys. For the life of me I’m trying to run my lua scripts from a directory on the server instead of placing them in the mission itself. From the info I’m finding keeps leading to assert(loadfile( “xxxx.lua”))() but for some reason it just is not working. I’ve set the trigger as switched / condition is Flag equals (1.1) and action do script with set flag value of 1.0. Is there something I’m missing here because for me it just does not seem to work. Thanks Cheers Wood Windows 10, Intel i7-6700 CPU @3.40GHz, 32GB ram , GTX 4060Ti
Sedlo Posted June 25, 2020 Posted June 25, 2020 Check DCS BIOS, it has a console built in and works great! Saves tons of time for me. My Youtube Channel MY DCS MISSIONS
fargo007 Posted June 26, 2020 Posted June 26, 2020 In the assert you may have to escape all the backslashes. e.g. \\Path\\to\\My_Scripts_Directory\\script.lua Watch the dcs log for the error which should be helpful. Have fun. Don't suck. Kill bad guys. https://discord.gg/blacksharkden/
Wood Posted June 26, 2020 Posted June 26, 2020 (edited) Great thank you guys very much. Sedio forgive my ignorance but Is DCS bios more for hardware programming. I’ll defiantly check it out for my pit though. Thanks again Fargo thanks I’ll give it a shot. :thumbup: EDIT: Sorry to say none of this is working. I'm at a frickin loss here. On top of that I'm checking the DCS log and there is no reference to the script I'm trying to load in. I can see all other scripts that are loaded via do script file but not the one I'm trying to load as do script.:(:( Edited June 26, 2020 by Wood Cheers Wood Windows 10, Intel i7-6700 CPU @3.40GHz, 32GB ram , GTX 4060Ti
ZlinMan Posted June 26, 2020 Posted June 26, 2020 maybe this one can help: Waiting for the return of: -TLP- -True LAN Play- Multiplayer without permanent internet connection to ED master-server. Plane wishlist: Antonov - AN-2
Sedlo Posted June 26, 2020 Posted June 26, 2020 DCS BIOS is primarily for hardware, but it's got a console aspect to it, too. You can set flags, run scripts etc, all within a mission. If you want to test some aspect of your mission, you can open it, move your aircraft to the part of the map you want, save a copy, fly it and then fire your flag or run your script to see if it does what you think it does. My Youtube Channel MY DCS MISSIONS
Sedlo Posted June 26, 2020 Posted June 26, 2020 It basically can do what witchcraft can do, if that's what you're looking for. My Youtube Channel MY DCS MISSIONS
Recommended Posts