Jump to content

Recommended Posts

Posted
Really? Group Dead trigger should only work the first time. At least the last time I checked the triggers only recognize groups in the mission editor and not groups added via scripting.

 

 

Also I pushed a fix for mist to the dev branch. There was apparently a small issue with the respawn/clone/teleport scripts running on groups that belong to the new countries. I've fixed the issue.

 

 

yup - i attached a 4.0.55 test with the mentioned trigger structure and it is repeating the respawn pretty nicely.

mist test.miz

ASUS Tuf Gaming Pro x570 / AMD Ryzen 7 5800X @ 3.8 / XFX Radeon 6900 XT / 64 GB DDR4 3200 

"This was not in the Manual I did not read", cried the Noob" - BMBM, WWIIOL

Posted

Stonehouse, are you using v4 release? It looks like it is sending messages in the new (default) format instead of the old, thats why there are so many of them. As for the CA message stuff in the code I have it convert any coa and combined arms wide message to just go to red or blue. I've started a slight re-write of how messages are handled so messages can be directly sent to players controlling CA units. In addition to making the update rate variable dependent on when messages get updated as I've noticed some "message popping" between messages sent to the whole coalition and to groups.

 

 

 

Dooom, well I'll be damned, thats nice to know that was inadvertently fixed. Although I switched the aircraft out to 1 F-16 vs 4 Mig-29s, ain't nobody got the time to watch an AI WW2 dogfight. Fun Fact, the F-16 spawned 15 times before the Migs started running out of gas and heading home.

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

Hi Grimes,

Yes reworking GCICAP using v4_0_55 of mist. I haven't changed this chunk of code but have noticed the issue since first beginning to test under DCS1.5 beta. I assumed I had code that was no longer valid but reading through the mist doco I got the understanding that you had updated the message.add so that it should work as per 1.2.16 without us changing code.

 

So was obviously puzzled why it wasn't working. The group id is populated as below slightly higher up than the previous code snip:

 

local actualintrudergroupID = Group.getID(actualintrudergroup)

 

So if it isn't a mist issue is kind of sounds like it may be something going wrong with Group.getID and so I get a different message name each pass through??? That sounds wrong though because Group.getID is used all over the place and if it was buggy you'd think there would be heaps of people posting about it.

 

Thanks,

Stonehouse

Posted
Stonehouse, are you using v4 release? It looks like it is sending messages in the new (default) format instead of the old, thats why there are so many of them. As for the CA message stuff in the code I have it convert any coa and combined arms wide message to just go to red or blue. I've started a slight re-write of how messages are handled so messages can be directly sent to players controlling CA units. In addition to making the update rate variable dependent on when messages get updated as I've noticed some "message popping" between messages sent to the whole coalition and to groups.

 

 

 

Dooom, well I'll be damned, thats nice to know that was inadvertently fixed. Although I switched the aircraft out to 1 F-16 vs 4 Mig-29s, ain't nobody got the time to watch an AI WW2 dogfight. Fun Fact, the F-16 spawned 15 times before the Migs started running out of gas and heading home.

 

LOL - shows where my head's at... I can't believe I never thought of swapping them out for BVR to test....

 

"You know you have been flying DCS WWII planes too long when......"

ASUS Tuf Gaming Pro x570 / AMD Ryzen 7 5800X @ 3.8 / XFX Radeon 6900 XT / 64 GB DDR4 3200 

"This was not in the Manual I did not read", cried the Noob" - BMBM, WWIIOL

Posted

Using mist.utils.tableShow to try to dump the table of waypoints being generated by the GCICAP script for each group of CAP fighters and I am finding that I only get about 75% of the first waypoint listed in dcs.log. I assume it is just too large for something and is truncating the remainder of the table.

Any ideas on getting the full table dumped into the log?

 

Thanks,

Stonehouse

Posted

Make a for i = 1, #points do loop to print off each waypoint. Or use the following to write the table to your DCS saved games folder. Note to use the writeData function you need to give it permission to write files by commenting out the io and lfs modules in missionScripting.lua

 

mist.debug.writeData(mist.utils.serialize,{'anything', variableName}, 'fileName.lua')

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

Ok thanks Grimes. Will have to be the 2nd method you mention though as only a portion of the first waypoint gets written to the log. It finishes part way through the advanced task list for the first waypoint and doesn't display all of it.

 

I have half confirmed that it isn't the waypoints points being built that cause the CAP flights to wander off as what I did manage to do was to write the y,x co-ords out for each waypoint to the log and I was able to use those in conjunction with a hand edit of a dummy mission to demonstrate that all the waypoints are within the cap zones. So it may be the switch waypoint command to go from last waypoint to 2nd is failing intermittently (don't really think so) or possibly the waypoint options are causing grief or some other part of a waypoint (your 2nd method will help there) or some other event in the script is making it happen. It only happens sometimes and it only seems to happen to a single group of the 4 spawned (as in 2 red and 2 blue).

 

Question: would a Controller.resetTask change the points for the route or make the AI not potentially follow them? no enemy is close by the way. These guys have been following the generated waypoints and then just head off in a random direction. Sometimes they head back after awhile and seem to start following their route and other times they just go off the map. It's an irritating problem because it causes a new cap group to spawn at least and if they head over the border they trigger an unplanned war for the mission builder.

Posted

Don't know specifically whats causing it, but if you say they just go in one direction, possibly ignoring enemy threats around them, then it is behavior I've seen before. It is quite literally the AI "bugging out" for a given task. They just don't know how to execute a task and they get into a bugged state.

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

Ok that's useful to know. The only things I know in the script that could cause that is the resettask function and the RTB function. Both do a reset of the current task for the aircraft in particular tables. Perhaps the CAP flights are ending up on these tables by mistake. So I can add some more debug and see whether that is the case.

Posted
Question about messaging via the mist message.add function. I'm getting the issue where the same group of intruders are triggering a separate message line. Additionally each message is taking two line due to the "----------Combined Arms Message-----------"

 

It turns out that the "clearview" option for messages to coalition is not working, so it just sends a new message everytime in the new format instead of the old. Providing you aren't updating the message or want to display it at a high rate I recommend just sending the messages directly with the function. Alternatively you can just sitting in a cockpit for that side and the mist messages should be in the right format and display correctly.

 

I was working on a slightly new display function, but other scripting engine bugs have put that on hold for now.

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

Ok thanks Grimes. Unfortunately it does update pretty often as it's giving BRA info on intruders that have been detected by EWR. I will try to rethink it. Perhaps I will end up having to release the new version with that as a known issue and have the GCI messages turned off by default especially if Ajax's AWAC's function is ok under 1.5 as that is a much more elegant solution in any case which I often recommend to people using GCICAP. So first thing I will check Ajax's script as if that is ok then the priority is much lower than the other issues.

Posted

Like I said, you should be ok if you are in an aircraft as the messages that get sent are to each group which is working ok. It will just be messed up for anyone in a Combined Arms 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

Posted (edited)

Hi Grimes,

Yep confirmed that it works fine in cockpit for a player. It was only spamming the messages when in the game master or observer slot. Thanks.

 

Like I said, you should be ok if you are in an aircraft as the messages that get sent are to each group which is working ok. It will just be messed up for anyone in a Combined Arms slot.

 

PS AWACS 1.7 works pretty well too

Edited by Stonehouse
  • Like 1
Posted (edited)

Hey guys,

I'm having trouble with the mist flag functions. Since I'm completely new to mist it could be an error on my side ... anyways, here's what I see.

 

I was trying to use the functions mist.flagFunc.units_in_moving_zones and mist.flagFunc.units_LOS and when using the function as follows, everything is fine.

mist.flagFunc.units_in_moving_zones{ 
   units = {'[red]'}, 
   zone_units = {'hmv1', 'hmv2'}, 
   flag = 1, 
   radius = 1200, 
   zone_type = 'sphere', 
} 

However, if I try to use UnitNameTables for zone_units as in,

mist.flagFunc.units_in_moving_zones{ 
   units = {'[red]'}, 
   zone_units = {'[blue]'}, 
   flag = 1, 
   radius = 1200, 
   zone_type = 'sphere', 
} 

the flag will never activate.

 

 

The problem with mist.flagFunc.units_LOS is similar to this but for both sets (unitset1 and unitset2). "Custom" sets of units work, but UnitNameTables (e.g. '[red]' and '[blue]') do not.

 

Could be an underlying issue or just me.:)

 

PS: If anyone would like to do a quick check, here's the mission I used for testing. (mist_test.miz)

 

edit: Observed in DCS 1.5 hotfix 2 with mist 4.0.55.

Edited by methosXX
Posted

Ok attaching my dumps of the CAP aircraft groups data used to spawn them using addGroup. If Grimes and some other people who are up on spawning units via add Group can check them over and offer feedback on where there might be issues it would be really helpful. Generally barring the difference expected due to aircraft name, altitude etc they look as I expected to see but then again I'm still learning this stuff so more experienced people's comments are very valuable.

 

Thanks,

Stoney

CAP-blue #1.lua

CAP-blue #2.lua

CAP-red #1.lua

CAP-red #2.lua

Posted
Hey guys,

I'm having trouble with the mist flag functions. Since I'm completely new to mist it could be an error on my side ... anyways, here's what I see.

 

Yeah it was bugger. The LOS stuff had a minor issue where I forgot to change a value name when I made it so the flag func wills will correctly update and account for units dynamically added. units_in_moving_zones had a similar issue. Here is the latest release with a few fixes in there.

 

https://github.com/mrSkortch/MissionScriptingTools/releases/tag/4.0.57

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

DictKey_GroupName, DictKey_UnitName in DCSW 1.5 ???

 

Grimes, are you having the same issues in MIST in DCSW 1.5 ?

 

http://forums.eagle.ru/showthread.php?t=150809

 

In env.mission.coalition groups and units now suddenly have completely other names ...

 

Sven

[TABLE][sIGPIC][/sIGPIC]|

[/TABLE]

Posted
In env.mission.coalition groups and units now suddenly have completely other names ...

 

It's not a bug, it's a feature to enable localization of mission content. See the Known Scripting Engine Issues thread for details. Grimes has accounted for these changes in MiST v55:

 

Due to localization changes within the mission editor a large number of items are now named "dictKey_whatever_x". As such any function that grabs any of this text will no longer get the key you are looking for. As a result env.getValueDictByKey() was added. This will convert any string dictionary key into its actual value.

 

MIST v55 is required if you want to use MIST in 1.5.

Posted

Pushed an update to development branch primarily to fix an issue I was having in a mission script I am developing. The issue was related to DB update functions and spawning groups the old school way via group activation and loss of data. For example the livery ID and callsign was lost if I activated a group and later respawned it. Let me know if you have any weird oddities with DBs with this version.

 

 

Also I might as well ask if there are any feature requests you guys have for mist. At the moment the chaos of open beta is starting to calm down so I've been devoting time to developing scripts, missions, and mods.

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

Hello everyone, I am trying to use this function.

 

do

trigger.action.illuminationBomb(mist.getAvgPos(mist.makeUnitTable({'[g]extract1'})))

end

 

But I cannot make it work, I think, that since the altitude is the group average position, It does not work. How can I put let say, 200m??

 

thank you

Posted

Thank you!!

 

I guess since :

point.y=point.y+200

 

is after the first sentence, i am overwriting the given initial "y position" and then, i put the function.

 

Cool, it solved more than one doubt!

Posted (edited)

Another one.

This function requires to give the name of the zone unit to work

 

 

mist.flagFunc.units_in_moving_zones{

units = {'[blue]'},

zone_units = {'[red]'},

flag = 500,

radius = 10000,

stopflag = 9999,

req_num = 4,

zone_type = 'sphere',

interval = 10,

}

 

Problem is that when i put an extractable unit from CTLD script (transport script) the identification of the unit changes when the unit is dropped. I can make it work if it were "unit in group zone". I could make a trigger zone using avgposition of a group but since this is a predefined function i dont see how can i make it work. Any suggestion?

Edited by ESAc_matador
  • 2 weeks later...
Posted (edited)

So here i go again with one of my crazy scripts.

 

What i want to do?: AI sometimes is quite dumb and when they are in a clear disaventage they keep figthing, in a combat of 10xF86 vs 4xMig15 the Migs keep figting until they die. Since the threat is similar, they prefer to risk.

 

I want to make a single rule that is

 

If number of blue aircrafts in trigger zone is twice or more number of red aircrafts in trigger zone.then

Blue aircrafts in trigger zone return to base.

 

Ok... i am learning slowly but i still neeed help.

 

So i want to do something like this.

 

redunits = Group.getSize (mist.getUnitsInZones('[figthers][red]' , zone1))

blueunits = Group.getSize (mist.getUnitsInZones('[figthers][blue]' , zone1))

If blueunits <= 1/2×redunits then
trigger.action.setAITask(blueunits, number taskIndex ) 
number taskIndex= this would be return to base.... i dont know how to put this.
End

 

I know that my code its a mess but... i guess you get my point. And the idea is interesting for me.

Edited by ESAc_matador
  • Recently Browsing   0 members

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