Jump to content

New Script for mission builders: chat message IO library version 1 (chatIOlibv1)


Recommended Posts

Posted (edited)

New upload with improved README file, 4/20/11:

 

README for Speed’s chatIOlibv1

 

NOTE: THIS SCRIPT ONLY WORKS IN MULTIPLAYER!!!

NOTE #2: notepad++ is highly recommended for reading lua files. It is available for free download on the internet, and has no evaluation bull!@#$ to deal with. It’s high quality, 100% pure freeware. It is available for download at: http://notepad-plus-plus.org/

 

Speed’s chatIOlibv1 is a script inserted into a mission in the A-10C mission editor that allows clients and hosts in multiplayer missions to receive data from a mission in the form of multiplayer chat messages, and also allows them to send commands to a mission through chat messages. For example, with the right function calls in the mission editor, the current position of a moving group of enemy units could be displayed at the top of the screen, or a client could type in “helpme” and a group of F-15s could spawn and come to the rescue. This script sets up a number of global lua functions that can do things like this and are called through mission editor triggers. Furthermore, this is obviously open source, so anyone can make their own functions if they want. I can also take requests for new functions if they are needed.

 

The very first time that the init_IO_lib() function created with this script is run, it modifying the server.lua file so that it writes multiplayer chat messages to a certain text file, and also outputs as chat messages any text seen in a different text file. This code is INSERTED into the server.lua file, so any mods (such as a future version of servman for A-10) are NOT disabled/overwritten. Furthermore, a backup is made of server.lua into server_old.lua, before this operation is done, just to be safe. After this is done, then the game CLOSES. So the very first time that init_IO_lib() is run, the game will appear to CTD (it is not really a CTD).

 

With server.lua now inputting and outputting text from these text files, the game runtime is able to interface and read and write from those text files as well, allowing things such as setting a flag based off of someone saying “getupdate”, or outputting a group’s average position in MGRS as a multiplayer chat message.

 

Note that the script ONLY inserts code into the HOST’S server.lua file. It does not modify clients in any way; indeed, to my knowledge, modifying clients is impossible.

 

I intend to eventually create a youtube instruction video for scripting.

 

In the meantime, this document describes how to use the chatIOlibv1.

 

Basic setup:

 

1) In your mission, create a ground unit, and hide it far away from the action in the corner of the map. For this example, call him "scriptman"

2) Create a triggered action for "scriptman" of type Command->Run Script, and insert the chatIOlibv1 script in the text field. If desired, add your function calls to the END of the initialization script.

3) Create a trigger to run this script. Make a ONCE->TIME MORE (1)->AI ACTION(Run Script(scriptman, <name of chatIOlibv1 script>))

4)Now create another triggered action for scriptman. Make it another “Run Script” action, and insert the text “init_IO_lib()”. This will call the global lua function that will install the necessary code to support these scripts into server.lua.

5) Create a trigger that will run THIS script now. You might want to include a warning to the host that his server.lua file is going to be modified; that is why this is a separate function. Regardless, common coding sense plus testing indicates that these modifications are harmless. The trigger type needs to be a ONCE -> TIME MORE(<some time greater than 1 second) -> Run Script(scriptman( <name of script that does init_IO_lib()> ).

6) Now you are ready to insert your function calls as more “Run Script”-type triggered actions for scriptman. See the example mission and the descriptions of the global functions below for more information.

chatIOlibv1.zip

Edited by Speed
  • Like 1

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.

Posted (edited)

PART 2 OF README (edit 4/20/11):

 

GLOBAL FUNCTIONS:

Note on convention:

Anything inside [ ] in the function description indicates the variable type. Anything inside < > indicates a variable. For example, [string]<commandtext> indicates a variable I am calling <commandtext> that has a variable type of string; in lua this might look like ‘getupdate’.

Double hyphens “--“ denotes a comment in lua. A comment is just like a note- it is NOT code! In these examples, comments are shaded green.

Lua strings are shaded in grey. You know you have correctly entered a lua string in Notepad++ because it turns grey. LUA STRINGS CAN BE DEFINED WITH EITHER SINGLE QUOTES ( 'example string' ) OR DOUBLE QUOTES ( "example string" ); BUT DO NOT MIX AND MATCH THE TWO.

 

init_IO_lib()

-creates or empties files chatmessagefile.txt and messagefile.txt

- copies server.lua to server_old.lua

-Inserts, updates, repairs, (or does nothing if the file is up-to date) the necessary scripts into server.lua.

THE FIRST TIME THIS FUNCTION IS RUN ON A HOST IT WILL CAUSE THE GAME TO CLOSE (THIS IS REPORTED AS A CTD BUT IT IS REALLY NOT ONE).

command_check( [string]<commandtext>, [positive integer]< flag>)

-Checks to see if the string <commandtext> has been said over chat. If it has, then "flag" is set true. This function runs a single time.

Example:

--When called in a trigger, this script checks to see if the chat message ‘getupdate’ has been said; if so, it sets flag --99 to true

commandcheck('getupdate', 99)

NOTE: There are some restrictions on what characters can be used. For example, you cannot use the dash character, as in the dash in the word, “F-15”.

command_check_start_loop( [string]<commandtext>, [positive integer]<flag>, [positive number]<interval>)

-Once started, this function checks if the string <commandtext> has been said over chat every <interval> seconds. If it has, then <flag> is set true. It only needs to be called ONCE (i.e., on a ONCE trigger). Once started, it will run the check for <commandtext> every <interval> seconds for the rest of the mission.

Example:

--When called in a trigger, this script looks to see if the chat message ‘fall back to Gori’ has been said over chat --every 5 seconds, and if so, sets flag 1000 to true

command_check_start_loop('fall back to Gori', 1000, 5)

NOTE: There are some restrictions on what characters can be used. For example, you cannot use the dash character, as in the dash in the word, “F-15”.

chatmsg([string]<msgline>)

-Outputs text to screen as a chat message. The host will see this message as white text, without a sender, while clients will see the text as sent from themselves, in orange-yellow writing.

Example:

--When called in trigger, this script outputs to screen the message ‘All targets destroyed, good job, RTB!’ once

chatmsg('All targets destroyed, good job, RTB!')

chatmsg_repeat([string]<msgline>, [positive integer]<numtimes>, [positive number]<interval>)

-Repeats the chat message <msgline> , <numtimes> times, with an interval spacing of <interval> seconds. Since a chat message typically has a life of five seconds, then you want <interval> to be like 5 or 6 seconds usually.

Example:

--When called in a trigger, this script repeats the ‘All targets destroyed, good job, RTB!’ message 10 times, with a --spacing between each repeat of 6 seconds

chatmsg_repeat('All targets destroyed, good job, RTB!', 10, 6)

chatmsg_unitLL([string]<prefacemsg>, [string]<unitname>, [positive integer]<numtimes>, [positive number]<interval>)

-Sends a chat message containing <prefacemsg> followed by the latitude and longitude of the unit named <unitname> in the mission editor. This message repeats <numtimes> at an interval of <interval>.

Example:

--When called in a trigger, this script repeats the L/L location of a unit named ‘sa15unit1’ in the mission editor 10 --times, with a spacing between each repeat of 6 seconds

chatmsg_unitLL('Darkstar to all allied aircraft, SA-15 emitting at: ', 'sa15unit1', 10, 6)

chatmsg_unitMGRS([string]<prefacemsg>, [string]<unitname>, [specific number]<numdigits>, [positive integer]<numtimes>, [positive number]<interval>)

-Sends a chat message containing <prefacemsg> followed by the MGRS coordinates of the unit named <unitname> in the mission editor, with the number of digits in the MGRS grid of <numdigits>. Just like real MGRS grids, <numdigits> can only take values of 2, 4, 6, 8, or 10 (i.e., if <numdigits> is 8, then you get an eight-digit grid). This message repeats <numtimes>, with an interval of <interval>.

Example:

--When called in a trigger, this script repeats a six digit MGRS grid of a unit named ‘sa15unit1’ 10 times, with a --spacing between each repeat of 6 seconds

chatmsg_unitMGRS('Darkstar to all allied aircraft, SA-15 emitting at: ', 'sa15unit1', 6, 10, 6)

chatmsg_groupLL()

-Not implemented yet… MGRS is superior!

chatmsg_groupMGRS([string]<prefacemsg>, [table]<units>, [specific number]<numdigits>, [positive integer]<numtimes>, [positive number]<interval>)

-Sends a chat message containing <prefacemsg> followed by the MGRS coordinates of the average location of the units in <units>, with the number of digits in the MGRS grid of <numdigits>. Just like real MGRS grids, <numdigits> can only take values of 2, 4, 6, 8, or 10 (i.e., if <numdigits> is 8, then you get an eight-digit grid). This message repeats <numtimes>, with an interval of <interval>.

The format of <units> is as follows:

{ [string]<unit #1 name>, [string]<unit #2 name>, … [string]<unit #X name> }

Example:

--When called in a trigger, this script repeats a four digit MGRS grid of the average location of the moving units --identified in the table ‘tanks1’. The grid is repeated 10 times with a spacing of 6 seconds.

tanks1 = { 'tank1_1', 'tank1_2', 'tank1_3', 'tank1_4', 'tank1_5', 'tank1_6', 'tank1_7' }

chatmsg_groupMGRS('Hawgs, Darkstar, engage moving armor at: ', tanks1, 4, 10, 6)

EXAMPLE MISSION:

 

In the example mission included in this zip file, you can look in the far northwest corner of the map to find “scriptman”. The example mission contains two multiplayer slots. At 15 seconds into the mission, the init_IO_lib() function will run. If this is the first time you are running this mission, the game will appear to CTD at this point (it is not really a CTD). Just restart it.

After the 15 second mark, type in “spawn f15s” and F-15s will spawn. At 60 seconds into the mission, the MGRS coordinates of a moving tank group will appear as a chat message, and will reappear every three minutes after that.

OTHER QUESTIONS AND COMMENTS AND SPECIAL THANKS

If you have questions or comments, I can be contacted via email OR you can send a private message to “Speed” on the ED forums.

Special thanks to all the members of my squad, the 16th ACCW Flying Tigers for helping me test these scripts!

Also thanks to Grimes and greywo1fg for demonstrating that people really will in fact use these scripts!

Edited by Speed

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.

Posted

Great! This will really help JIP players. I can't wait to add this into my next mission. Thanks for sharing and great explanation.

Posted (edited)
Cool! Message concatenation will be very useful.

 

Actually, with the included functions, the coolest thing in my mind is being able to output the current position of a moving group. This was inspired by your "On Station" mission, as a matter of fact, where you had to output three positions of a moving group to players due to MESSAGE TO ALL trigger text being fixed at mission start.

 

To me though, the coolest thing overall is that with this library, you can in fact output anything at all to the screen. The text output is NOT set at mission start! So the possibilities are limitless. If only there was a way to string sound files together more smoothly than what we have now. Unfortunately, I don't think there will be anytime soon, as the sounds for the "play sound" trigger are downloaded at mission start by the clients, and thus, fixed at mission start.

 

I'm still planning on making my own version of an "On Station"-like mission, with tasking logic done mostly through scripts as a demonstration of the simplicity, ease of debugging, and robustness of scripting in comparison with triggers when doing very complex logic. It should be a pretty fun mission to build and fly, too :)

Edited by Speed

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.

Posted
If only there was a way to string sound files together more smoothly than what we have now. Unfortunately, I don't think there will be anytime soon, as the sounds for the "play sound" trigger are downloaded at mission start by the clients, and thus, fixed at mission start.

 

I think something like that would need an external application to run in order to output sound based on exported lua orders.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted (edited)
I think something like that would need an external application to run in order to output sound based on exported lua orders.

 

I experimented around with text to speech command line programs, but then I realized it would only work for hosts, since lua scripts only operate on hosts.

 

Its not likely we will see any kind of custom, not-present sounds or text messages other than this script (or one very similar) due to the limitation that scripts only operate on hosts. The only way I know of to exchange text with clients that is not preset at mission start is with chat messages- which is exactly what this script utilizes.

 

It may be possible to hack around with radio messages and get them to string things together- indeed, I've made scripts that force the AI to say preset radio messages- but that doesn't currently work in multiplayer. Only the host hears this stuff. I donno if ED ever intends to fix that.

 

So while it's possible to output custom sounds for single player or single player multiplayer (host a multiplayer and fly it by yourself) probably using some third party software, I don't foresee any kind of custom sound outputs that work in multiplayer that outputs a sound that is not preset at mission start. It would require clients to run scripts, which would be a major change and complication.

 

Now outputting sounds that are not preset at mission start and stringing them together to form sentences is a different matter. The way you hacked it together in On Station v3+ is probably the only way, unless ED adds a script that will run a sound at a very specific and precise time- which may in fact happen... I certainly hope so. With the current SOUND TO ALL or SOUND TO COALITION trigger action, there is often a variable delay in when the sound happens, by about a second, from my testing results at least... not very dependable.

Edited by Speed

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.

  • 2 weeks later...
Posted

Thanks Speed,

need a quiet weekend for this not the night of a new patch. Hope to get my head round it soon:thumbup:

i5 8600k@5.2Ghz, Asus Prime A Z370, 32Gb DDR4 3000, GTX1080 SC, Oculus Rift CV1, Modded TM Warthog Modded X52 Collective, Jetseat, W10 Pro 64

[sIGPIC][/sIGPIC]

Posted

I am trying to figure this out. I seem to be stuck. I am doing a simple test with your scripts and I can't get them to work. Will you take a look at my attached mission and tell me what I am doing wrong. I looked at your sample mission and ATO and seems what I am doing is correct.

 

I am trying to type in the chat "TASK". Then I will get the position of the group I have placed in the editor.

 

I was up to the AM last night and I couldn't figure out what I was doing wrong.

MPTEST.miz

Posted (edited)
I am trying to figure this out. I seem to be stuck. I am doing a simple test with your scripts and I can't get them to work. Will you take a look at my attached mission and tell me what I am doing wrong. I looked at your sample mission and ATO and seems what I am doing is correct.

 

I am trying to type in the chat "TASK". Then I will get the position of the group I have placed in the editor.

 

I was up to the AM last night and I couldn't figure out what I was doing wrong.

 

Unfortunately, there are multiple things wrong. First and most seriously, and this is mostly my bad, you were using some kind of weird character rather than the character I erroneously refered to as "single quote". The correct character is this: ' . It looks to me just like half of a double quote character, ", so I just refered to it as "single quote" even though I knew it was the same button as the apostrophe. It is in fact an apostrophe according to my Windows character map. Is there such thing as a single quote then? I never really considered that they were two separate characters. I'm pretty sure we refered to it in my programming classes as "single quote". But I'm not english major, lol. But you don't have to use ehmm, apostrophe, you can use double quotes instead- THESE " ". Either these: ' ' or these: " " are acceptable to denote a lua string. Is that more clear?

 

The way that you know that you have it right, when you are creating the function call in Notepad++, that anything that is supposed to be a string turns grey (assuming you have lua selected as your current language). I need to update the README about this, for sure.

 

Second problem was that there is no "commandcheck" function, which is the function you try to call. There is a "command_check" function, which you really won't use much, and there is the more useful "command_check_start_loop" function, which repeatedly looks for a text input command without you having to call it repeatedly in the triggers.

 

The third problem is that you never called any command checking function at all in the triggers. You need create a trigger that does the AI TASK that calls the command checking function you are using, just as you needed one for everything else.

 

Another problem is that the chatmsg_groupMGRS function only runs a single time, since you have it on a ONCE trigger. In this example, you want to set this on a SWITCHED trigger, with condition FLAG 99 IS TRUE and actions AI TASK (<call chatmsg_groupMGRS>) and CLEAR FLAG 99. Now you will be able to request tasking multiple times.

 

Finally, your input arguements to chatmsg_groupMGRS indicated that you wanted the message to appear once, with 30 seconds between each appearance of the message, which doesn't make sense since you only display the message once. Keep in mind that since you cannot change how long a chat message appears on the screen for, you have to repeat it. A chat message has a typical life of 5-7 seconds, so if you want it to be up on the screen for 60 seconds, you should set the <numtimes> and <interval> variables to 10 and 6, respectively.

 

Anyway, I uploaded the fixed mission. Don't beat your head against a wall for hours on this... just ask on here and I can get back to you within a day.

MPTEST_fixed.miz

Edited by Speed

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.

Posted

Thank you so much for taking your time and taking a look at it. I noticed the character thing as well. The funny thing is in the ATO and your sample mission it does the same thing for me. I figured since it worked I could copy and paste it from them instead of the notepad ++ script. Obviously it didnt work and it gave me them funny characters.

 

Thanks for the explanation!

 

I see how you used the switch triggers in your ATO. For now I was just trying to get it to work. Next I will have to deal with randomization and these switches.

 

Eventually I would like 3 task with each task having a possibility of 3 outcomes.

 

Alpha task: 1 convoy or 1 convoy2 or 1 covoy3

Bravo task: activate group1 or activate group2 or activate group 3

Charlie task: same as above different groups

 

I think I seen this in another thread.

 

Thanks again Speed!

Posted (edited)

mia, did you get this working to your satisfaction now?

 

About the single quote/double quote discussion, here's some information about single and double quotes for lua strings, from the offical lua website:

http://www.lua.org/pil/2.4.html

 

 

We can delimit literal strings by matching single or double quotes:

 

a = "a line"

b = 'another line'

 

As a matter of style, you should use always the same kind of quotes (single or double) in a program, unless the string itself has quotes; then you use the other quote, or escape those quotes with backslashes.

 

They call the apostrophe key a "single quote" as well. So I told you I wasn't alone :)

 

There were actually two reasons I went with the single quote way of defining strings. Firstly, in another scripting language that I program in (for work), MATLAB, strings have to be defined with single quotes. Lua is kinda special in that you can define strings with both single and double quotes. The second reason I went with single quotes is that Eagle Dynamics uses single quotes in their lua scripts.

 

But you can use double quotes just as well... I'm working on the updated README file.

Edited by Speed

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.

Posted

I got that part figured out. I am getting close to the logic of my mission down. Right now the way I have it set up is that when the player enters a zone the mission will look for "TASK" in the chat. Once someone types that it will give you a random "task/mission" out of 10. After that task/mission is complete it waits 15 seconds then will give you a new one automatically. Its so sweet that I actually got that part to work.

 

I am having an issue with the getupdate part. I would like for anytime during the mission a client be able to type "getupdate" and it would show the last mission. Right now when I tpye that it actually toggles the next random one. I took it out and haven't messed with it again because my brain is triggered and switched out haha. I attached what I have so far.

 

UPS came with my new videocard as I was typing this so I am going to get this puppy installed and continue latter.

 

 

Mission is still named MPTEST_fixed

MPTEST_fixed.miz

Posted

Speed,

Thanks for your efforts with this. I've been following the development with interest in the hopes of learning a little scripting and ultimately the creation of a template to increase client interaction.

 

The question is: Can the message library be used to write a script that allows a client(s) access to the host's F10 menu? I guess another way to look at it is, can a script be written that allows clients to request an update of some sort, which calls the hosts PC to execute a radio call accessing the F10 menu and then displaying that menu to the client that requested it? Following that, the ability for that client to request execution of the next keystroke of choice on the host's machine?

Posted (edited)
Speed,

The question is: Can the message library be used to write a script that allows a client(s) access to the host's F10 menu? I guess another way to look at it is, can a script be written that allows clients to request an update of some sort, which calls the hosts PC to execute a radio call accessing the F10 menu and then displaying that menu to the client that requested it?

 

No, but you just use a command_check_start_loop() function, and it totally replaces the F10 "other" radio options, and everyone can use it. For example, in one mission I made, anyone, host or client, can type in as a chat message "BUFF1, CLEARED HOT" and a B-52 will carpet bomb an army base. In another mission I am working on, you get tasks assigned to you. You can view the list of active tasks by saying "SHOW TASK LIST", which will cause multiplayer chat messages to appear on your screen that say something like:

 

Task 1: destroy artillery position 1, say "TASK 1 GET UPDATE" to get an update on this task.

Task 2: destroy artillery position 2, say "TASK 2 GET UPDATE" to get an update on this task.

Task 3: destroy tanks moving along southern road, say "TASK 3 GET UPDATE" to get an update on this task.

 

Then, if you type in like, "TASK 3 GET UPDATE" then you will see more information and the current coordinates of the targets you need to destroy.

 

So the F10 "other" radio options list is no longer necessary at all. The whole inflexibility of it, it's inability to work with MP clients, and the inablity to write dynamic messages for "Message to All" triggers, was the whole reason I wrote chatIOlib in the first place. This script is intended to completely replace the F10 "other" radio options, which only works for host, while chatIOlib works for everyone, and this script is also intended to largely replace "Message to All" triggers, at least for tasking purposes.

 

And before someone might ask, that tasking system I talked about above (which I wrote yesterday and is only about 200 lines of code) is going to be simplified and improved, and included in a chatIOlibv2 release, ETA on that will be: ????????

Edited by Speed

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.

Posted

Speed did you get a chance to look at my attacked mission above? I am still searching for a way to get the getupdate to run only on the task that was picked from the random triggers. When I had it in before it would cycle to the next task when asking for an update.

 

I would also like to know if its possible to change it so you have to type "Task" to get to the next task instead of typing it once and it cycling through the list. Later part being the way I have it set up now in the attached mission.

Posted

Good to know you're on it. Sounds like you've already considered the limitations of the F10 menu and are working out ways to forego its use and still expand multiplayer capability beyond what I was thinking. I'll give this a go and continue to watch for further developments.

Posted
Speed did you get a chance to look at my attacked mission above? I am still searching for a way to get the getupdate to run only on the task that was picked from the random triggers. When I had it in before it would cycle to the next task when asking for an update.

 

I would also like to know if its possible to change it so you have to type "Task" to get to the next task instead of typing it once and it cycling through the list. Later part being the way I have it set up now in the attached mission.

 

I can take a look at it tomorrow. Been working on scripts and missions this weekend in all my free time. This is a triggering issue though, not a scripting issue... you've got to get a trigger system figured out that works, like Grimes has in his On Station v5. Either that or write a new script to handle multiple and random tasks... the one I'm working on right now works great, but it's a little complex for the average user at the moment, and I will work on simplifying it.

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.

  • 2 weeks later...
Posted (edited)

Ok, I finally got around to making note about double and single quotes in relation to lua strings in the README. I just re-uploaded. The code is unchanged.

 

I'm hard at work on chatIOlibv2. Upgrades will include:

 

Parallel Tasking System:

A global list of tasks can now be created that players can query at any time. Mission creators can add and remove tasks to this task list by using the addtask and removetask functions. A player just has to type in "SHOW TASK LIST" and the list of all current tasks will be displayed. A player can type in "TASK <number> GET UPDATE" and a update will be shown for the specific task. This system is currently functional, but I need to clean it up before I can release it.

 

report_contact function:

 

A function is currently functional that makes it so ground units (or air units) when they see enemy units line of sight and within a certain range, will report that they are in contact and give the coordinates of the closest enemy unit that they see. This function is currently working, but I need to clean it up before I can release it. You also have to be careful that you don't bog down your computer with this one... it can take alot of CPU cycles if you use it in certain ways.

 

chatmsg_MGRS_leadingunits() function:

This is still being worked on, and is only partially function ATM. It will give you the coordinates of the LEADING units in a certain direction. Say an enemy attack is stretched out over many miles and is composed of many different groups, and you just want to display the coordinates of the units that are closest to friendly lines. You would use this function.

 

There are several functions that have already been added but I do not mention here. There are also a few other upgrades planned... some of which may be... quite exciting and novel. I don't want to go into them yet in case I can't deliver for some reason.

 

Though I did discover a slight error in the code that is inserted into server.lua, it is not an error that will cause any kind of problems... I just declare a local variable and then never use it. I'd like to fix it, but in the interest of keeping compatability, I will not. So v2 will not cause you to CTD the first time you run it, and you will still be able to fly missions with v1 in them.

 

And finally, I have continued work on the lua scripting guide... but work on it is discouraged somewhat till ED fixes the lua error reporting bug.

Edited by Speed

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.

Posted

I cant wait for that tasking system. I got my mission to work using triggers but I burned my brain out getting it all to work. The parallel tasking system would of been perfect and I am sure alot easier to use than my 40 triggers :-)

Posted
I cant wait for that tasking system. I got my mission to work using triggers but I burned my brain out getting it all to work. The parallel tasking system would of been perfect and I am sure alot easier to use than my 40 triggers :-)

 

Well, a parallel tasking system is still going to require alot of triggers, it just allows you to very simply and easily add multiple taskings.

 

What I could think about adding is a random tasking system- but the problem is, how someone wants his random tasking to work is going to vary greatly across missions, so I know if it's something I can just pre-package.

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.

  • 1 month later...
Posted

I'm uploading the work in progress (WIP) version of chatIOlibv2 below. It's got most of the features that are going to be in chatIOlibv2, but some of them still need testing, cleaning up, or expanding. The reason I am uploading it is that it should be functional with servman now. Additionally, all the old functions from chatIOlibv1 are included and should work just fine. The new stuff I haven't included documentation for yet.

 

But yea, if you want to use chatIOlibv1 functions with Panzer's new version of Servman, use this file below. Just insert this script where you would have put the script for chatIOlibv1, and you're done- except that you no longer need to separately run the init_IO_lib() function. Shouldn't hurt anything if you do though.

chatIOlibv2_WIP.zip

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.

Posted

Thanks for this!

Have used it in a mission and have enjoyed the features. I really like the fact you can have the vehicle coordinates without having to rely on JFAC or AFAC who sometimes just don't seem to report properly. Also like the ability to call in assistance when SA sites are present.

Just wanted to leave a note to let you know your work is appreciated.

 

RTR ;)

Intel i7-3770K,Windows 10 64,Noctua NH-U12S ,ASRock Z77 Extreme4 ,G.Skill 32GB DDR3 2400,EVGA GTX 1080,ADATA XPG900x2 RAID 0, CM HAF XB Case,Thrustmaster Warthog,Combat Rudder Pedals,Logitech G930 with wireless TrackIR 5, 39" Insignia LED 120Hz Monitor, Oculus Rift

Posted (edited)

This will be great to use with realistic voice commands because the current F10 radio menu moves items around a lot, so you can't assign key strokes to "Uzi Cleared to land" ect..

 

With this you could make a command to open up the chat box and type the correct text all via realistic voice command instead of having to say F2 etc.

 

Hopefully it will be easy enough to impellent to get most multiplayer servers running it.

Edited by jib

Mods I use: KA-50 JTAC - Better Fire and Smoke - Unchain Rudder from trim KA50 - Sim FFB for G940 - Beczl Rocket Pods Updated!

Processor: Intel Q6600 @ 3.00GHz

GPU: GeForce MSI RTX 2060 6GB

RAM: Crucial 8GB DDR2

HDD: 1TBGB Crucial SSD

OS: Windows 10, 64-bit

Peripherals: Logitech G940 Hotas, TrackiR 5, Voice Activated commands , Sharkoon 5.1 headset. ,Touch Control for iPad, JoyToKey

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...