Jump to content

MIssion Scripting Tools (Mist)- enhancing mission scripting Lua


Recommended Posts

1 hour ago, Grimes said:

Unfortunately no. That is all ED's UI. 

Thank you for your reply Grimes.

Any other way to pre-"ghost/gray" the group/slot before mission reaches UI ? (even if it is listed in UI)

F.e. something like heuy's multi crew slots.

PS: It would be perfect if there was the ability to switch AI to Client and Client to AI at the runtime 🙂

 


Edited by ADHS

Democracy was already invented, while Scrat was eating oak fruits.

Link to comment
Share on other sites

Hello.

I was looking to find a way to check events (f.e. S_EVENT_BASE_CAPTURED).

The documentation in hoggit is not givin a working syntax example so i  stacked, again.

I've also checked inside some missions, but i couldn't understand the proper syntax.

Any help ?

Thank you


Edited by ADHS

Democracy was already invented, while Scrat was eating oak fruits.

Link to comment
Share on other sites

11 hours ago, ADHS said:

...I was looking to find a way to check events (f.e. S_EVENT_BASE_CAPTURED).

The documentation in hoggit is not givin a working syntax example so i  stacked, again...

 

Mist hoggit (or Mist guide.pdf) has example for event handler :

Mission Scripting Tools Documentation - DCS World Wiki - Hoggitworld.com

MIST addEventHandler - DCS World Wiki - Hoggitworld.com

  • Thanks 1
Link to comment
Share on other sites

11 hours ago, toutenglisse said:

Mist hoggit (or Mist guide.pdf) has example .....

Hello toutenglisse

Thank you (again 😃) for your help.

Is not that i am not reading or searching, but now i've got it.

I was looking just in one place and mostly google elsewhere = wrong.

SSE and MIST are in the same place so now i've found all the structure 's

information and the functions to go further.

Thank you very much.


Edited by ADHS

Democracy was already invented, while Scrat was eating oak fruits.

Link to comment
Share on other sites

Trying to get a patrol route working with MIST 4_5_107 and the "Boat Armed Hi-speed". I can't get it to work and wondering if it doesn't work with boats?

mist.ground.patrolRoute({gpData = 'MyBoats', pType = 'nil', offRoadForm = 'diamond', speed = 15})

The script is definitely running, and that's definitely the correct group name. tia

DCS Wishlist: | Navy F-14 | Navy F/A-18 | AH-6 | Navy A-6 | Official Navy A-4 | Carrier Ops | Dynamic Campaign | Marine AH-1 |

 

Streaming DCS sometimes:

Link to comment
Share on other sites

28 minutes ago, ruprecht said:

Trying to get a patrol route working with MIST 4_5_107 and the "Boat Armed Hi-speed". I can't get it to work and wondering if it doesn't work with boats?

mist.ground.patrolRoute({gpData = 'MyBoats', pType = 'nil', offRoadForm = 'diamond', speed = 15})

The script is definitely running, and that's definitely the correct group name. tia

Hi, your code line works with boats (except of course the parameters, like off road formation, that apply only if group is ground vehicles).

test-boat-patrol.miz

Link to comment
Share on other sites

Ah, I see how you've done it. I was calling the script once from triggers and assuming it just worked forever, but you're calling it in a Perform Command > Run Script at the last waypoint. Thanks heaps!

DCS Wishlist: | Navy F-14 | Navy F/A-18 | AH-6 | Navy A-6 | Official Navy A-4 | Carrier Ops | Dynamic Campaign | Marine AH-1 |

 

Streaming DCS sometimes:

Link to comment
Share on other sites

It should automatically assign a new route once it reaches the end since that function is supposed to add a script to the last waypoint to execute the patrol function again. 

  • Thanks 1

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

Link to comment
Share on other sites

12 hours ago, ruprecht said:

...I was calling the script once from triggers and assuming it just worked forever...

After Grmies' post I see it also works when ran once from a trigger (and is better because it's not necessary to repeat it at each pattern).

5 hours ago, Grimes said:

It should automatically assign a new route once it reaches the end since that function is supposed to add a script to the last waypoint to execute the patrol function again. 

Thanks for the explaination.

A remark about this function and the other function, mist.ground.patrol, I see that now they don't work properly if all variables are not declared (no more optional variables) : either it doesn't work at all (with just groupname declared) or it just do 1 pattern and stop (groupname + patrol type declared) - ex attached with mist.ground.patrol used on 2 groups, 1st with all variables and 2nd with 2 variables (does 1 pattern doubleback and stop).

EDIT : at least for boats, for ground units it works with just groupname as declared variable.

test-mist-ground-patrol.miz


Edited by toutenglisse
Link to comment
Share on other sites

  • 1 month later...

Hi everyone,

I am using the mist.respawnGroup() function and everything goes right in solo mode.

However using the same with a "client" instead of a "player" I get an error message that seems to indicate that this function doesn't work in MP mode.

So the question is, is there a respawn function that would work in MP ?

Thanks

 

PS : already posted in wrong room...

Link to comment
Share on other sites

It is dependent on DCS scripting capability and uses this function. 

https://wiki.hoggitworld.com/view/DCS_func_addGroup

"Function can NOT spawn new aircraft with a skill level of "client". However in single player a group can be spawned with the skill level of "Player". When this occurs the existing player aircraft will be destroyed."

 

So no you cannot use it in multiplayer on client aircraft. However client aircraft don't need it because they can respawn at any point as long as they can still access the slot. 

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

Link to comment
Share on other sites

Hi Grimes,

Thanks for the answer.

I am doing this for a kind of a-la-Falcon furball mode.

So typically when the red or blue flight is down, both flights are respawned  for a new run at their respective original places (with weapons).
As I said in solo mode it works pretty well and from your answer I do see that this will not work in MP because of native DCS function limitation.
So in your opinion what would be the best approach to have this also working in MP ?


Thanks

 


Edited by CougarFFW04
Link to comment
Share on other sites

On 5/4/2022 at 4:51 PM, CougarFFW04 said:

Hi Grimes,

Thanks for the answer.

I am doing this for a kind of a-la-Falcon furball mode.

So typically when the red or blue flight is down, both flights are respawned  for a new run at their respective original places (with weapons).
As I said in solo mode it works pretty well and from your answer I do see that this will not work in MP because of native DCS function limitation.
So in your opinion what would be the best approach to have this also working in MP ?


Thanks

 

 

You could probably write a server side script that forces the client into a slot when one dies of either plane. That would make the mission require 4 slots, two each side and when one dies both are abruptly forced into a new slot, but honestly that quite forceful on people and just hitting escape and picking a slot isn't such a hardship that could give a VR user a trauma.There aren't any mission side API controls to do this from a Mission script. You could make the cockpit unuseable by shoving a picture up that blcoks the view, or destroy the other plane too, none of it is elegant. Also depends on what you really want to achieve.

___________________________________________________________________________

SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *

Link to comment
Share on other sites

I've long made missions, but I'm just now getting into MIST, I was wondering if there is a one stop shop location for a bunch of ready to go MIST files (beyond what's in the download, as in user made lua's) I can download at once?


Edited by Ghostrider142

i7-4770K @3.50GHz; EVGA 1070 8GB Superclocked; 16GB Ram; MSI Z97 Gaming; two Samsung 500GB SSD's in RAID; TrackIR; 32" 2560x1440 Samsung

Link to comment
Share on other sites

16 hours ago, Ghostrider142 said:

I've long made missions, but I'm just now getting into MIST, I was wondering if there is a one stop shop location for a bunch of ready to go MIST files (beyond what's in the download, as in user made lua's) I can download at once?

 

I know there are several scripts using Mist at the bottom of this page Simulator Scripting Engine Documentation - DCS World Wiki - Hoggitworld.com

  • Like 1
Link to comment
Share on other sites

On 5/15/2022 at 9:44 AM, toutenglisse said:

I know there are several scripts using Mist at the bottom of this page Simulator Scripting Engine Documentation - DCS World Wiki - Hoggitworld.com

Thanks, that's what I was looking for

i7-4770K @3.50GHz; EVGA 1070 8GB Superclocked; 16GB Ram; MSI Z97 Gaming; two Samsung 500GB SSD's in RAID; TrackIR; 32" 2560x1440 Samsung

Link to comment
Share on other sites

  • 2 weeks later...

is it possible to use MIST to create a radio station on a particular vhf freq? I have used the start/stop transmission actions in the dcs mission editor but i would like more granular control- randomization of songs, genre selection, fade in/out, automatic muting when scripted sounds and messages play.

4930K @ 4.5, 32g ram, TitanPascal

Link to comment
Share on other sites

  • 2 weeks later...

Trying to use MIST to Unit:FindByName() then link them in a large formation of B17 the games mission editor works but trying to get units that are already spawned to link up fly to an Ingress then to target carpet bomb.  Then egress and head home.  

I have tried MOSSE for 2 weeks now and cannot get them to connect.  

Blacknight

Link to comment
Share on other sites

9 hours ago, king1hw said:

Trying to use MIST to Unit:FindByName() then link them in a large formation of B17 the games mission editor works but trying to get units that are already spawned to link up fly to an Ingress then to target carpet bomb.  Then egress and head home. 

Unit:FindByName is a moose construct. Really you don't need to use mist or moose to do such a thing. Assuming you know the names of the units/groups its pretty straight forward with directly using the scripting engine function calls. This gives the group "whatever" a follow task to a group named "leader."

 

local mainGP = Group.getByName("leader")
local gp = Group.getByName("whatever")
gp:getController():pushTask({
  id = 'FollowBigFormation',
  params = {
    groupId = mainGP:getID(),
    pos = {x = 200, y = 0, z = -200},
    lastWptIndexFlag = false,
     }) 

 

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

Link to comment
Share on other sites

  • 4 weeks later...

trying to get mist.getUnitsByAttribute({typeName = 'TACAN_beacon'}, 1, false) to work but have no luck. The returned list is empty.

The command works with coalition, but with typeName nothing returns.

Is the typeName an other typeName than what we get back with getTypeName()?

Link to comment
Share on other sites

7 hours ago, buur said:

Is the typeName an other typeName than what we get back with getTypeName()?

There was a typo/omission on my part within the function that prevented it from working. That said the function is overloaded to accept type, typeName, or typename as the passed values. I've updated mist on the development branch. https://github.com/mrSkortch/MissionScriptingTools/tree/development

ADDED: coalitionId to databases for everything placed in the editor.
FIXED: Bug in getUnitesByAttribute not working when passed a type value
FIXED: Bug in getGroupsByAttribute not working when passed a type value
ADDED: getDeadMapObjectsFromPoint function
MODIFIED: getDeadObjsInZones to call getDeadMapObjectsFromPoint
FIXED: getPointOnSegment doing math on the wrong value
FIXED: getWindBearingAndVel using the wrong math function
ADDED: mist.pointInZone function. Is passed a point and a zone or a zone name. 
ADDED: echo to logger class. When called this will print a message to the DCS.log file and display a message via trigger.action.outText for 30 seconds. 

 

  • Thanks 2

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

Link to comment
Share on other sites

I love this scripting tool. However I have encountered an issue I cannot seem to defeat. 

Using the teleport in zone to move a spawn after it activates, to a random location in a zone seems to make aerial NPCs, not able to see or attack anyone. They will fly away and chaff in a straight line. It's almost as if it's deleting the waypoint actions.

I tried modifying the script I had coded to use initTasks, and a variety of other cars, no matter what I do, they do not attack me.

If I remove them from teleporting, and just have them activate normally they WILL attack me, so it's either something wrong with the script, or something I am doing wrong. It works perfectly fine for ground units and naval units. They will still shoot at me, but planes will not ...

 

Could somebody help me out please or explain a way to force a group to Cap or change their actual task to something I can define after they teleport so they do not act stupid?

Link to comment
Share on other sites

You would need to also use either offsetRoute or offsetWP1. It has to do with how aircraft AI function. If they just have an initial waypoint and no other points they reach the end of their route and will try to RTB immediately. Once AI get into this state they can't be assigned new tasks or attack targets on their own. So they still have their task but they have no route when they get teleported. Both of those options give the AI a route back. 

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

Link to comment
Share on other sites

I'm working in a script with mist.getGroupData() to get the frequency of an unit, working well.

When I use a late activated unit in the output of mist.getGroupData() the value frequency is missing. And also a lot of other values.

Is there a reason for this behavior? Is there an other way to get the value for the frequency from late activated units?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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