Grimes Posted May 28, 2024 Posted May 28, 2024 On 5/26/2024 at 5:51 PM, Pizzicato said: I'm wondering if something changed in the last patch? The mission engine that I'm writing still works fine, but I've started seeing a bunch of MIST warnings in my DCS.log along the lines of: I will have to check it out. That error is from the database update scripts. Simply put the mist.DBs.X won't be updated with that object. You can get me the table that you passed to coalition.addStaticObject that generated the error would be most helpful. Assuming you have lfs and io commented out in missionScripting.lua, this line will write a table to a file in your dcs/logs folder. mist.debug.writeData (mist.utils.serialize,{'static', whateverTablePassedToAddStaticObject}, 'dbUpdateERror.lua') Or if you have other means of getting a serialized version of the table passed to the function. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
Pizzicato Posted May 29, 2024 Posted May 29, 2024 @Grimes Here's what got output to the dbUpdateERror.lua file. static = { ["y"] = 760119.6875, ["type"] = "S-300PS 5P85D ln", ["name"] = "Dead_SAM - SA-10 Grumble-4", ["x"] = -124575.9375, ["heading"] = 2.8198712957479, ["dead"] = true, } -- end of static i7-7700K @ 4.9Ghz | 16Gb DDR4 @ 3200Mhz | MSI Z270 Gaming M7 | MSI GeForce GTX 1080ti Gaming X | Win 10 Home | Thrustmaster Warthog | MFG Crosswind pedals | Oculus Rift S
Grimes Posted May 29, 2024 Posted May 29, 2024 I think it is the unique situation that a dead object is being spawned. It has a spawning event, but it can't get data about the object because it is dead, therefore an error. It is a little weird because the mist DB will populate the DB entries for statics set as dead in the mission file, but everything it knows about that is from the miz and not derived from other functions at runtime. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
Geff Posted June 1, 2024 Posted June 1, 2024 (edited) Let me start by saying that I love MIST, and use it for all MP missions my friends and I fly. This little problem however I cannot solve: when using the "mist.groupToRandomPoint" function for ground forces it does work. Most of the times. But not always. When the unit to move to is respawned / teleported and the group is ordered to go to the then new point they don't move, or stop moving. Cannot figure it out. The destination is "just is a point", a vec3 value, that is passed to the function. Also noticable is that when the group does not move (anymore) after exiting the mission it can take up to minutes to get back to the menu / mission editor, while looking at some in-between screen. Attached the mission file, and the function that I wrote. In testing you will see that most of the times after respawning or teleporting the goto test person the ground forces just stop moving, and then after exiting the mission it will take some time to get back to the ME. Tested it in both MT and no-MT versions, and in all kind of different scenarios and maps. Hope this demo/test mission will be of help. Again, thanks a lot for MIST !!! gotopoint.lua testGoTo.miz Edited June 1, 2024 by Geff typos
Grimes Posted June 4, 2024 Posted June 4, 2024 I think it is AI path calculation more than anything mist is doing. Most of what that mist function does is it generates the points given to the route table and assigns the task to the AI. Try it without the disableRoads being defined, meaning mist will find the closest road from the start and destination points. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
Pizzicato Posted June 11, 2024 Posted June 11, 2024 @Grimes Did you ever get the chance to look into the issue with the "This should not be possible." when updating the dynamic database? It's definitely related to me using destroy() on specific Units and then using coalition:AddStaticObject() to spawn a "dead" replacement. 2024-06-11 04:18:56.033 WARNING SCRIPTING (Main): MIST|dbUpdate|990: Dead_SAM - SA-6 Site-D-6 is not a Group or Static Object. This should not be possible. Sent category is: static 2024-06-11 04:18:56.033 WARNING SCRIPTING (Main): MIST|dbUpdate|990: Dead_SAM - SA-6 Site-C-9 is not a Group or Static Object. This should not be possible. Sent category is: static 2024-06-11 04:18:56.033 WARNING SCRIPTING (Main): MIST|dbUpdate|990: Dead_SAM - SA-19 Tunguska-B-1 is not a Group or Static Object. This should not be possible. Sent category is: static 2024-06-11 04:18:56.033 WARNING SCRIPTING (Main): MIST|dbUpdate|990: Dead_SAM - SA-15 Gauntlet-C-1 is not a Group or Static Object. This should not be possible. Sent category is: static 2024-06-11 04:18:56.033 WARNING SCRIPTING (Main): MIST|dbUpdate|990: Dead_SAM - SA-6 Site-D-10 is not a Group or Static Object. This should not be possible. Sent category is: static 2024-06-11 04:18:56.033 WARNING SCRIPTING (Main): MIST|dbUpdate|990: Dead_SAM - SA-19 Tunguska-A-1 is not a Group or Static Object. This should not be possible. Sent category is: static 2024-06-11 04:18:56.033 WARNING SCRIPTING (Main): MIST|dbUpdate|990: Dead_SAM - SA-6 Site-B-1 is not a Group or Static Object. This should not be possible. Sent category is: static 2024-06-11 04:18:56.033 WARNING SCRIPTING (Main): MIST|dbUpdate|990: Dead_SAM - SA-6 Site-C-6 is not a Group or Static Object. This should not be possible. Sent category is: static 2024-06-11 04:18:56.033 WARNING SCRIPTING (Main): MIST|dbUpdate|990: Dead_GND - Trucks-J-2 is not a Group or Static Object. This should not be possible. Sent category is: static 2024-06-11 04:18:56.034 WARNING SCRIPTING (Main): MIST|dbUpdate|990: Dead_SAM - SA-6 Site-A-1 is not a Group or Static Object. This should not be possible. Sent category is: static 2024-06-11 04:18:56.034 WARNING SCRIPTING (Main): MIST|dbUpdate|990: Dead_SAM - SA-15 Gauntlet-B-1 is not a Group or Static Object. This should not be possible. Sent category is: static 2024-06-11 04:18:56.034 WARNING SCRIPTING (Main): MIST|dbUpdate|990: Dead_SAM - SA-6 Site-D-1 is not a Group or Static Object. This should not be possible. Sent category is: static 2024-06-11 04:18:56.034 WARNING SCRIPTING (Main): MIST|dbUpdate|990: Dead_SAM - SA-6 Site-A-9 is not a Group or Static Object. This should not be possible. Sent category is: static 2024-06-11 04:18:56.034 WARNING SCRIPTING (Main): MIST|dbUpdate|990: Dead_SAM - SA-6 Site-C-1 is not a Group or Static Object. This should not be possible. Sent category is: static 2024-06-11 04:18:56.034 WARNING SCRIPTING (Main): MIST|dbUpdate|990: Dead_SAM - SA-6 Site-D-9 is not a Group or Static Object. This should not be possible. Sent category is: static i7-7700K @ 4.9Ghz | 16Gb DDR4 @ 3200Mhz | MSI Z270 Gaming M7 | MSI GeForce GTX 1080ti Gaming X | Win 10 Home | Thrustmaster Warthog | MFG Crosswind pedals | Oculus Rift S
Geff Posted June 23, 2024 Posted June 23, 2024 On 6/5/2024 at 1:57 AM, Grimes said: I think it is AI path calculation more than anything mist is doing. Most of what that mist function does is it generates the points given to the route table and assigns the task to the AI. Try it without the disableRoads being defined, meaning mist will find the closest road from the start and destination points. Thanks for your reply Grimes It indeed seems to be working without the disableRoads. Most of the times it works flawlessly that way, but sadly not always. I'm trying to find out what might be the cause of it not working sometimes ... If I can find it, and it has relevance, I will let you know. Again, many many thanks for Mist and your support !
Tricky11 Posted June 30, 2024 Posted June 30, 2024 Morning all. I have currently got a problem with the range script not working on the kola map. Now the range script uses mist but im not sure whether its mist not loading or the range script. Is there anyway i can see if mist is running?
Grimes Posted July 1, 2024 Posted July 1, 2024 On 6/30/2024 at 4:33 AM, Tricky11 said: Morning all. I have currently got a problem with the range script not working on the kola map. Now the range script uses mist but im not sure whether its mist not loading or the range script. Is there anyway i can see if mist is running? In DCS.log there will be a line stating mist loaded. The lines are basically it started loading and it finished loading. 2024-07-01 19:24:54.392 WARNING SCRIPTING (Main): MIST|init|1675: Init time: 0.101 2024-07-01 19:24:54.392 INFO SCRIPTING (Main): Mist version 4.5.127 loaded. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
Tricky11 Posted July 1, 2024 Posted July 1, 2024 Just now, Grimes said: In DCS.log there will be a line stating mist loaded. The lines are basically it started loading and it finished loading. 2024-07-01 19:24:54.392 WARNING SCRIPTING (Main): MIST|init|1675: Init time: 0.101 2024-07-01 19:24:54.392 INFO SCRIPTING (Main): Mist version 4.5.127 loaded. Cheers i will take a look
toutenglisse Posted July 9, 2024 Posted July 9, 2024 Hi, I don't know if it is normal or not, but when missing a variable by mistake using mist.scheduleFunction(function f ,table vars ,number t , number rep ,number st ), it creates an "error in error handling", instead of creating a usual log error with indication of problematic function and line inside the script to help debug (UTD mist 4.5.126).
Lekaa Posted July 12, 2024 Posted July 12, 2024 (edited) Helloooou Any ETA on the upcoming update? Cheers! 2024-07-12 15:57:41.297 ERROR SCRIPTING (Main): MIST|f|1471: Group not accessible by unit in event handler. This is a DCS bug Edited July 12, 2024 by Lekaa
RUNEofORM Posted July 16, 2024 Posted July 16, 2024 DCS patch screw up Mist? Got all sorts of random issues now. Things no longer working for Red side but will for Blue. AutoJTAC no longer works like it used to.
Skewgear Posted July 28, 2024 Posted July 28, 2024 We've had to disable MIST and everything reliant on MIST as it seems to have been broken thanks to the last DCS update. DCS WWII player. I run the mission design team behind 4YA WWII, the most popular DCS World War 2 server. https://www.ProjectOverlord.co.uk - for 4YA WW2 mission stats, mission information, historical research blogs and more.
Lekaa Posted August 19, 2024 Posted August 19, 2024 Anyone managed to sort this portion of mist? local function groupSpawned(event) -- dont need to add units spawned in at the start of the mission if mist is loaded in init line if event.id == world.event.S_EVENT_BIRTH and timer.getTime0() < timer.getAbsTime() then if Object.getCategory(event.initiator) == 1 then --log:info('Object is a Unit') local g = Unit.getGroup(event.initiator) if g and event.initiator:getPlayerName() ~= "" and not mist.DBs.MEunitsByName[event.initiator:getName()] then -- log:info(Unit.getGroup(event.initiator):getName()) local gName = g:getName() if not tempSpawnedGroups[gName] then --log:warn('addedTo tempSpawnedGroups: $1', gName) tempSpawnedGroups[gName] = {type = 'group', gp = g} tempSpawnGroupsCounter = tempSpawnGroupsCounter + 1 end else log:error('Group not accessible by unit in event handler. This is a DCS bug') end elseif Object.getCategory(event.initiator) == 3 or Object.getCategory(event.initiator) == 6 then --log:info('staticSpawnEvent') --log:info(event) --log:info(event.initiator:getTypeName()) --table.insert(tempSpawnedUnits,(event.initiator)) ------- -- New functionality below. ------- --log:info(event.initiator:getName()) --log:info('Object is Static') tempSpawnedGroups[StaticObject.getName(event.initiator)] = {type = 'static'} tempSpawnGroupsCounter = tempSpawnGroupsCounter + 1 end end end it's triggering this error: 2024-08-19 09:15:28.205 ERROR SCRIPTING (Main): MIST|f|1488: Group not accessible by unit in event handler. This is a DCS bug
AngelRR92 Posted August 28, 2024 Posted August 28, 2024 Hello all, first of all, THANKS to the creators of this wonderful tool. I'm creating a basic script to replicate a HUD with some pre-made images but i'm not sure if I can call them to be used with a DO SCRIPT with MIST. I tweaked some basic lua code but my main concern is how to tel the mission to load and manipulate a given image, I have this: --Image resize do local screen = platform.window local w, h = screen:width(), screen:height() local image01 = image.new(_R.IMG.image01) local im01w = image.width(image01) local im01h = image.height(image01) local imw, imh --Introducing 2 local vars that will be defined in the future function on.resize() im01w = image01w:width() im01h = image01h:height() image01 = image01:copy(0.5*im01w, 0.5*im01h) --Creates a 50% size copy of the image01 --screen:invalidate() +--Not sure if must be added, Test end function on.paint(gc) gc:drawImage(image01, (w - im01w)/2, (h - im01h)/2) --function to draw image centered, tweak “(h - im01h)/2” argument to put it up or down as required end
Grimes Posted August 28, 2024 Posted August 28, 2024 8 hours ago, AngelRR92 said: Hello all, first of all, THANKS to the creators of this wonderful tool. I'm creating a basic script to replicate a HUD with some pre-made images but i'm not sure if I can call them to be used with a DO SCRIPT with MIST. I tweaked some basic lua code but my main concern is how to tel the mission to load and manipulate a given image, I have this: You can't. The only rendering behavior with lua is only within the context of the mission editor. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
AngelRR92 Posted August 29, 2024 Posted August 29, 2024 hace 12 horas, Grimes dijo: You can't. The only rendering behavior with lua is only within the context of the mission editor. Thanks Grimes, is there any way to increase the "refresh rate" os DCS ME? every trigger is capped to 1 check per second and is not enough for a HUD...
Grimes Posted August 30, 2024 Posted August 30, 2024 On 8/29/2024 at 4:08 AM, AngelRR92 said: Thanks Grimes, is there any way to increase the "refresh rate" os DCS ME? every trigger is capped to 1 check per second and is not enough for a HUD... Nope, its hardcoded. Only option is to use lua where it is applicable to rewrite the conditions and actions to run at a faster rate. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
AngelRR92 Posted August 31, 2024 Posted August 31, 2024 En 28/8/2024 a las 23:09, Grimes dijo: You can't. The only rendering behavior with lua is only within the context of the mission editor. Thanks, I will end up digging into how to mod it.
rwbishUP Posted October 10, 2024 Posted October 10, 2024 Is there a way to script ground units to, patrol route using, MIST? AMD Ryzen 7 9800X3D, ROG ASTRAL RTX5080, G.SKILL TRI Z5 64gb, 4tb M.2 x 2, WIN 11 PRO x64
Lekaa Posted October 26, 2024 Posted October 26, 2024 (edited) @Grimes I think i fixed the Group not accessible by unit in event handler. This is a DCS bug local function groupSpawned(event) if event.id == world.event.S_EVENT_BIRTH and timer.getTime() > event.time + 1 then if Object.getCategory(event.initiator) == 1 then local g = Unit.getGroup(event.initiator) if g and event.initiator:getPlayerName() and event.initiator:getPlayerName() ~= "" then local unitName = event.initiator:getName() if unitName and not mist.DBs.MEunitsByName[unitName] then local gName = g:getName() if not tempSpawnedGroups[gName] then tempSpawnedGroups[gName] = {type = 'group', gp = g} tempSpawnGroupsCounter = tempSpawnGroupsCounter + 1 end end else log:error('Group not accessible by unit in event handler. This is a DCS bug') end elseif Object.getCategory(event.initiator) == 3 or Object.getCategory(event.initiator) == 6 then local staticName = StaticObject.getName(event.initiator) if staticName then tempSpawnedGroups[staticName] = {type = 'static'} tempSpawnGroupsCounter = tempSpawnGroupsCounter + 1 end end end end by adding > event.time + 1 then Edited October 26, 2024 by Lekaa 1
=475FG= Dawger Posted December 21, 2024 Posted December 21, 2024 @Grimes Hello, Do you know of any reason why this would not count CTLD dropped infantry? Quote mist.flagFunc.units_in_zones{ units = {'[red][vehicle]'}, zones = {'Jirah'}, flag = '_redJirah', zone_type = 'sphere', reqnum = 36, interval = 10, }
Bingo911 Posted December 31, 2024 Posted December 31, 2024 Is there an option in mist to set the alarm state of a group when cloning/spawning? I'm not placing the units on the map. I'm using their ID to spawn them and the answer has eluded me for a few days.
Grimes Posted January 2 Posted January 2 Easiest would be to pass the optional value to inherit initial tasks and set the alarm state as desired on the group it is using as a template. mist.cloneInZone('groupName', 'zone', nil, 4000, {initTasks = true}) Next easiest would be to use the table returned by the spawning functions to get the group name and then assign the setting via Controller.setOption() a short moment after it spawns. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
Recommended Posts