AKA_Clutter Posted April 13, 2011 Share Posted April 13, 2011 I am trying to start learning how to employ scripting and using Lau. I have lots of questions but not sure where to start. i hope that y'all can point me in the right direction. I have dabbled in programming over the years, so I understand the basic concepts. I have read 2/3 of Roberto Ierusalimschy's "programing in Lua" and still try to wrap my head around some of the concepts, but do have a start. I have downloaded Speed's zip file on chat IO lib and hope to be able to learn some from that. With that said, here are some of my questions to start! :helpsmilie: Is there a good source that describes some of the basics of setting up scripts to work with DCS products (ED manuals, ED forum threads, etc)? Is there a listing on some of the main functions, names, files, commands, that one needs to know/understand to work with scripting in DCS? How do you get scripts to interface with the DCS games? (how do you "call the" Do the scripts need to be in a certain directory? Is there a difference for script for SP and MP games? Would any of you be willing to mentor me and or send me simple problems to develop my skills and under standing. please explain to me all the other things that I need to know but haven't asked yet! :) Any and all advice will be greatly appreciated. Thanks in advance! ---------------- AKA_Clutter Win 10 Pro, Intel i7 8700k @4.6 GHz, EVGA RTX 3080 FTW, Ultra 64 GB G.Skill DDR4 3600 RAM, Acer 27" flat screen, Oculus Rift S, HP Reverb G2, CH Fighterstick, Pro Throttle and Pro Rudder Pedals HOTAS, TM Warthog HOTAS, MFG Rudder Pedals, TrackIR 5 Pro w/Vector Expansion, PointCTRL. Link to comment Share on other sites More sharing options...
Speed Posted April 13, 2011 Share Posted April 13, 2011 Well, obviously, I need to accelerate the development of my lua scripting guide. It will list functions that are specific to the game. Additionally, I plan to add some kind of youtube instructional videos eventually. The best way to learn lua is not necessarily to read a book, but to do yourself… though books are nice. Swift made a mission that lists all the global lua functions and variables that are available to you in the game’s runtime environment: http://forums.eagle.ru/showthread.php?t=61477 From this information, I was able to eventually figure out how to use quite a number of game-specific lua functions, a partial list of which is here: http://forums.eagle.ru/showpost.php?p=1162502&postcount=3 I will continue working on the lua scripting guide document, and I still need to update my readme for the chatIOlibv1 about single vs. double quotes. In the meantime, this problem will still give anyone fits with debugging lua scripts, unless they do a dual beta 4/current version install: http://forums.eagle.ru/showthread.php?t=68571 I am running a beta 4/current version dual install so that it is still possible to debug scripts. Last I checked (maybe a month ago), there were still a number of people seeding Beta 4, and it was still possible to get it rather rapidly. Get it while you still can, no telling how long it will take ED to fix the above problem. Anyway, generally, you want to run lua scripts on the triggered actions of a ground unit, placed somewhere far away. The triggered action it is Command->Run Script. Then you “call” these scripts with the “AI TASK” trigger action (note, that “triggered actions” means the “triggered actions” pane of a unit, while a “trigger action” is just the action column of a trigger. Totally different things). It may be useful to make some “hello world” examples to start with, learning lua. If you put this script: print(“hello world”) in the triggered actions of a unit, and then call that script with an AI TASK trigger action, then you will see: WinMain: hello world in your dcs.log file. dcs.log is where you view the outputs of scripts and read any script error messages. Intelligent discourse can only begin with the honest admission of your own fallibility. Member of the Virtual Tactical Air Group: http://vtacticalairgroup.com/ Lua scripts and mods: MIssion Scripting Tools (Mist): http://forums.eagle.ru/showthread.php?t=98616 Slmod version 7.0 for DCS: World: http://forums.eagle.ru/showthread.php?t=80979 Now includes remote server administration tools for kicking, banning, loading missions, etc. Link to comment Share on other sites More sharing options...
AKA_Clutter Posted April 14, 2011 Author Share Posted April 14, 2011 Speed, Thanks for the reply. I"ll read the attached links and try my had at a few simple "hello word" type of scripts. Also, for a dual install, is it as simple as installing Beta 4 into a different directory or do you also need to do some registry modifications? TIA :pilotfly: ---------------- AKA_Clutter Win 10 Pro, Intel i7 8700k @4.6 GHz, EVGA RTX 3080 FTW, Ultra 64 GB G.Skill DDR4 3600 RAM, Acer 27" flat screen, Oculus Rift S, HP Reverb G2, CH Fighterstick, Pro Throttle and Pro Rudder Pedals HOTAS, TM Warthog HOTAS, MFG Rudder Pedals, TrackIR 5 Pro w/Vector Expansion, PointCTRL. Link to comment Share on other sites More sharing options...
Rainmaker Posted April 14, 2011 Share Posted April 14, 2011 Now that I am settled back in the US again and out of the sandbox I will probably try to dabble in this a little down the road myself... Perhaps we need a sticky thread with this kind of info? It would should help seeing as how i haven't really seen one in this forum yet so far on this type of stuff. Perhaps someone could just sticky this one to get it started? Link to comment Share on other sites More sharing options...
Speed Posted April 14, 2011 Share Posted April 14, 2011 Speed, Thanks for the reply. I"ll read the attached links and try my had at a few simple "hello word" type of scripts. Also, for a dual install, is it as simple as installing Beta 4 into a different directory or do you also need to do some registry modifications? TIA :pilotfly: Sorry for the late reply, It's very simple to have a dual Beta 4/Release version install. You simply install Beta 4! Nothing else to it, unless you encounter issues that I didn't. Beta 4 goes into a different folder than non-beta versions. Beta 4 loads much faster than 1.1.0.7 (1 minute from "hit fly to pit" in beta 4 vs. 3-4 minutes in 1.1.0.7, and yes, I moved the comment from line 74 to line 73 of graphics.cfg, AND reinstalled 1.1.0.7 from scratch with full 1.1.0.7 version) so it's preferable to build missions in Beta 4 too. There is only a few minor issues when converting a Beta 4 mission to a release version mission, and they are easily rectified in the release version mission editor. Intelligent discourse can only begin with the honest admission of your own fallibility. Member of the Virtual Tactical Air Group: http://vtacticalairgroup.com/ Lua scripts and mods: MIssion Scripting Tools (Mist): http://forums.eagle.ru/showthread.php?t=98616 Slmod version 7.0 for DCS: World: http://forums.eagle.ru/showthread.php?t=80979 Now includes remote server administration tools for kicking, banning, loading missions, etc. Link to comment Share on other sites More sharing options...
Speed Posted April 14, 2011 Share Posted April 14, 2011 Now that I am settled back in the US again and out of the sandbox I will probably try to dabble in this a little down the road myself... Perhaps we need a sticky thread with this kind of info? It would should help seeing as how i haven't really seen one in this forum yet so far on this type of stuff. Perhaps someone could just sticky this one to get it started? Well, what we need is for me to finish the lua scripting guide at some point, and probably edit the DCS wiki (I don't know how to edit the wiki though... I looked at it and was confused). What we also need is for ED to fix it so that the reporting of lua compiling errors occurs the same way it did in the Betas. Intelligent discourse can only begin with the honest admission of your own fallibility. Member of the Virtual Tactical Air Group: http://vtacticalairgroup.com/ Lua scripts and mods: MIssion Scripting Tools (Mist): http://forums.eagle.ru/showthread.php?t=98616 Slmod version 7.0 for DCS: World: http://forums.eagle.ru/showthread.php?t=80979 Now includes remote server administration tools for kicking, banning, loading missions, etc. Link to comment Share on other sites More sharing options...
Recommended Posts