Gunslinger52 Posted January 3, 2024 Posted January 3, 2024 Hi all, I guess you can gauge my level of knowledge from the title I'm wanting to learn Lua slowly, hopefully using VS as I already have it. But anything would do I guess. My only experience was a few years ago following some Unity tutorials for beginners using VS2019/VS2022. Does DCS use a particular build of Lua only? Or is there no such thing really? Just don't ant to spend 12 months learning the wrong thing by mistake Any help gratefully received. '52 i7-11700F 64GB RAM RTX3060 WIN 11 Pro HP Reverb G2 Meta Quest 3 TM Cougar & Logitech X56
Exorcet Posted January 4, 2024 Posted January 4, 2024 Unfortunately I can't answer your question, but I can tell you that despite being unable to answer, I've managed to do some scripting. There is some documentation for DCS scripting that you can use to get into it: https://www.digitalcombatsimulator.com/en/support/faq/1253/ https://wiki.hoggitworld.com/view/Simulator_Scripting_Engine_Documentation The hoggit wiki is particularly nice because it has some examples, which is mostly how I learned. Take an existing script, try to understand, and tweak it. If I need any general Lua knowledge I typically just search online and find the info I need. A place to test code outside of DCS is very useful: https://www.tutorialspoint.com/execute_lua_online.php I'm far from an expert but I like to help out when I can. I've been considering writing up a document with example scripts to share with others interested in scripting/learning, but this will be a long term thing. I don't mind sharing scripts if I have any relevant ones though. 1 1 Awaiting: DCS F-15C Win 10 i5-9600KF 4.6 GHz 64 GB RAM RTX2080Ti 11GB -- Win 7 64 i5-6600K 3.6 GHz 32 GB RAM GTX970 4GB -- A-10C, F-5E, Su-27, F-15C, F-14B, F-16C missions in User Files
cfrag Posted January 6, 2024 Posted January 6, 2024 On 1/4/2024 at 12:44 AM, Gunslinger52 said: Does DCS use a particular build of Lua only? AFAIK, DCS uses the 5.1 version of Lua (5.1.5?), non-compiled, in a single thread (i.e. no concurrency), and by default the libraries os, lfs and io are disabled. When the mission runs, a DCS MSE (mission scripting environment very nicer documentation here) context is run which is kept separate from the server context, and except for some very specific commands you cannot easily share data between the two contexts. 3
Gunslinger52 Posted January 7, 2024 Author Posted January 7, 2024 Thanks for that, I'll give those links a look at. Do you happen to know what I need to do in order to get VS to allow me to make a useable Lua file for DCS? I understand I may need to add something to it first, in order to get going. Cheers. '52 i7-11700F 64GB RAM RTX3060 WIN 11 Pro HP Reverb G2 Meta Quest 3 TM Cougar & Logitech X56
cfrag Posted January 7, 2024 Posted January 7, 2024 This may help: I have no experience with VS integration wrt DCS; in my eyes, DCS integration with any IDE is unfortunately inexistent. 1
Gunslinger52 Posted January 8, 2024 Author Posted January 8, 2024 Cheers for that. Have VS code now, so starting to chug my way through days worth of tutorial videos i7-11700F 64GB RAM RTX3060 WIN 11 Pro HP Reverb G2 Meta Quest 3 TM Cougar & Logitech X56
Recommended Posts