Releases: mrSkortch/MissionScriptingTools
4.5.126 Fixes
FIXED: mist.groupIsDead to account for instances where isExist() still returns true.
FIXED: mist.getCurrentGroupData to inherit all values that are saved in DB.
FIXED: returning markId rather than id
FIXED: error occurring when oil well and gas platform are destroyed. Will investigate further and report the bug to ED.
FIXED: mist.getUnitsLOS to verify each unit being checked is alive
MODIFIED: validateColor to verify the passed table is 4 digits, if digit is missing it will default a value to 0.8
FIXED: typo in S_EVENT_MARK_ADDED event
MODIFIED: removeMark to check if the passed table has a markId value, if so then use that to remove the mark
FIXED: error check if getMarkId is nil
FIXED: draw using markScope value when drawing a maker panel
FIXED: passing markScope to the draw function
FIXED: error message inside of scheduledFunctions
FIXED: typo in getUnitsLOS that caused an error
4.5.122
4.5.121
Cumulative Fixes from dev branch:
FIXED: But related to sound files not playing if there was no text message updates.
FIXED: typo in getUnitsByAttribute
FIXED: typo in getGroupsByAttribute
Reverting message display to v4 of function.
Added isExist() to a number of scripting functions to counteract a bug in DCS due to objects returning when they shouldn't.
FIXED: Error in databases caused by respawning static objects via mist.dynAddStatic. DB updater was adding a new groupName entry for the static object instead of inheriting it from the missing editor. If the groupName didn't match the unitName then the problem occurred.
FIXED: Loading mistSetting value for dbLog
FIXED: Error in segmentIntersect function. Correctly to return vec2 table rather than entries 2 and 3 being the x, y values
FIXED: Typo in getWindBearingAndVel function
FIXED: locality bug in mist.marker.add where the passed coordinates were still referenced and converted to vec3
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.
CHANGED: default unitId and groupId values to start at 70000 instead of 7000
ADDED: linkUnit to database entries
ADDED: linkOffset to database entries
ADDED: mist.DBs.const.nato table for phonetic conversion of letters
CHANGED: mist.getUnitPlayload to return an empty table if nothing found
CHANGE: mist.getGroupPayload to return an empty table if nothing found
FIXED: mist.getLeadPos to check if leader object is accessible and will iterate whole table to find the first one that is accessible
FIXED: mist.groupIsDead to only call Group.getByName once
FIXED: mist.Logger:setLevel to default to warning level.
FIXED: mist.Logger:setLevel to use string.lower in case where one forgets that the formatting.
ADDED: dbNum entry to unit table to define which index the the unit is at in the unitsByNum DB table
OPTIMIZED: multiple calls of getPosition to just be a single getPoint call
MODIFIED: process for updating and writing DB files. Moved the editing of DB into its own function
ADDED: error messages and handling if a DB entry fails to be updated
ADDED: mist.forceAddToDB function which accepts a groupName or a static objects name to force add it to the databases.
MODIFIED: zones DB point.y entry for to be set to ground level at the center of the zone
MODIFIED: zones DB properties to be saved as a string
ADDED: zone.linkUnit info if present
MODIFIED: mist.DBs.missionData to have a countries list indexed by country name and their coalition
FIXED: mist.dynAddStatic heading if not present to convert 360 degress to radians
MODIFIED: mist.tostringBR to return altitude in feet to be 1000s of feet
ADDED: mist.utils.tableShowSorted function that attempts to sort the entries alphanumerically. This is mostly to more easily compare written tables in np++ like with...
MODIFIED: mist.debug.dump_G to use mist.utils.tableShowSorted instead of the older tableShow
FIXED: typo in eventHandler
FIXED: getRandomPointInPoly to use a radius value rather than a fixed value.
ADDED: mist.DBs.spawnsByBase table that lists each airbase or unit that has an aircraft set to spawn on it.
MODIFIED: DB to contain the starting helipadId or airdromeId for each unit
MODIFIED: mist.getCurrentGroupData to use an empty table so it doesn't error if nothing is found
MODIFIED: mist.getCurrentGroupData to only call getPosition once.
MODIFIED: mist.getGroupTable to add country and category values to the table returned so it can be directly used in mist.dynAdd without having to dd those vlaue sback.
Fixed getCategory calls for Object.getCategory()
MIST 4.5.107 Hotfix
FIXED: bug in mist message output where display time failed to be updated.
FIXED: mist.marker.remove to support name values
Modified; mist.marker.add to automatically flip a polygon if the points are anti-clockwise. This is a workaround to a DCS bug.
FIXED: drawing DB entries for lines to support if the line is closed or not. If it is then a point will be inserted to connect the last vertex to the first.
MIST 4.5.106
+added: mist.getPathLength()
+added: mist.getPathInSegments()
+added: mist.getPointAtDistanceOnPath()
+added: mist.projectPoint()
+added: mist.utils.getHeadingPoints()
+added: mist.vec.normalize()
+added: mist.getGroupTable() Returns the verbatim table for a group as defined in the mission editor.
+added: mist.debug.writeGroup() This function is used to write a group table directly to a file of the groups name.lua. The point of this is to easily get the contents into a separate file.
+added: mist.debug.writeTypes() This function iterates through units placed in the mission file and writes to a file containing a list of object typeNames, CLSIDs, and liveries
+added: mist.shape.insideShape() Returns if the first shape is inside the second shape.
+added: mist.shape.circleInCircle()
+added: mist.shape.circleInPoly()
+added: mist.shape.polyInPoly()
+added: mist.shape.polyInCircle()
+added: mist.shape.getPointOnSegment()
+added: mist.shape.segmentInsersect()
+added: mist.mapValue()
+added: mist.utils.hexToRGB()
+added: mist.getWindBearingAndVel()
+added: mist.getUnitsByAttribute()
+added: mist.getGroupsByAttribute()
+added: mist.stringCondense()
+added: mist.debug.changeSetting()
+added: mist.debug.mark()
+added: mist.marker.add()
+added: mist.marker.getNextId()
+added: mist.marker.remove()
+added: mist.marker.get()
+added: mist.marker.drawZone()
+added: mist.marker.drawShape()
+added mist.groupIsDead()
+added better error handling messages in a number of functions
+added mist.DBs.drawingByName and mist.DBs.drawingIndexed.
Note: the above tables contains the values associated with the new drawings in the mission editor. Can be used with mist.marker.drawShape to activate a drawing shape created. There are limitations to this due to the scripting engine lacking a number of the draw features. For example rotating text, line thickness, icons, and outline types.
Note 2: The shapes created in the editor are allowed to share a name. As a result entries sharing names in mist.DBs.drawingsByName will be overwritten with whichever value was used last. All are added to mist.DBs.drawingIndexed.
-modified: properties table to zone entries in database
-modified: mist.dynAdd will now check tasks assigned in route for any beacons and will update the groupId or unitId as needed.
-modified: mist.getGroupData now has optional route boolean. If present it will also return the route. This allows the user to skip a function call.
-modified: mist.debug.dump_G now accepts a boolean value that deletes entries that I commonly delete when dumping _G.
-modified: mist.teleportToPoint
-modified: mist.respawnInZone
-modified: mist.cloneInZone
-modified: mist.teleportInZone
All four above functions now support additional parameters that can be used to alter specific behavior.
-newGroupName : forces the create group to use this name
- anyTerrain : If present no terrain check is performed to verify the new position is valid
- validTerrain : Customize valid terrain types for the group to spawn on
- initTasks : Keep initial tasking
- offsetWP1 : Offsets the initial WP the group spawns at. Will go to next WP as defined in the editor.
- offsetRoute : Offsets the entire route by the new location the group spawned at.
- Modified: the following functions to support static objects: getUnitsInZones, getUnitsInPolygon, getUnitsInMovingZones, and getUnitsLOS, makeUnitTable
- Modified: makeUnitTable to exlude units by category.
- Modified: groupRandomDistSelf and groupToRandomZone to accept optional disableRoads parameter
- Fixed: DB entry for country names to use the values stored in the country table instead of the localized name within the miz. This fixes a missmatch when spawning units for the third reich
- Modified: getRandPointInCircle to use a default radius of 1000m if none provided.
- Optimized: any instance of trigger.misc.getZone to reference mist.DBs.zonesByName instead
= Modified mist.DBs.const.callsigns to include the new callsigns - Modified mist messages to update the display only if a change has been made. This will reduce spam in new DCS Message Log feature. It is still dependent on how often messages are updated, if you update a message for a stop watch timer then expect spam.
-fixed: typo in mist.dynAdd
-fixed: typo is mist.teleportToPoint
-fixed: bug with mist.getLeadingPos where the position appeared to be reversed from what it was expecting
-Fixed: verifyDB to check for empty string from static objects because it apparently can happen.
-Fixed: checkSpawnedEventsNew to better handle errors from dbUpdate
-Fixed: getUnitsInPolygon was erroneously checking for category 14 instead of 1
-Fixed: getUNitsInZones had an incorrectly named variable that defined an entry as nil.
Release 4.4
Long overdue merge of changes from development to main branch.
Added mist.utils.getQFE.
Added 2 extra values to mist.getRandPointInCircle to specify a min andmax angle in degrees.
Added mist.getRandomPointInPoly. Returns a random vec2 coordinate inside a polyzone
Added checks to getLeadPos related functions to ensure the lead unit is returned if it exists
Added mist.utils.converter
Fixed a issue where altitude was not correctly saved for aircraft. Altitude set to AGL if not specified.
mist logger now defined in mistSettings.logLevel for easy access.
Fixed isTerrainValid checking terrainTypes table index is no longer being compared with SurfaceType enum values, leading to incorrect type inclusions
Fixed teleportToPoint if radius was nil or 0
Adding route name fetch to getGroupRoute()
playerCanDrive is no longer being overridden to true
Fixed minor bug with dynAddStatic where it would always assign a generated name if the entry lacked the alternate name entry of unitName.
Due to a change in DCS open beta 2.5.6.52196 that allows errors to be logged within scheduledFunctions and the speed at which mist checks to update a DB, better error handling was required.
-Modified tempSpawnedGroups to be a table containing the object and the type.
-Added check to ensure that the group and objects still exist before running potentially error causing scripting functions on.
-Modifed mist.removeFunction to return true or false if the function was removed.
-Added more descriptive logging to dbUpdate and checkSpawnedEventsNew
Added GNU v3 liscense.
Added paypal donation link
Release 4.3 Hotfix 3
Fixed issue with mist.getCurrentGroupData
Release 4.3 Hotfix 2
- fixed mist.time.getDate to account for changes made to the mission file format related to how the mission start time and date are saved with DCS 1.5.4. Also added in code to correctly account for leap years.
- fixed issue in DB updating checking the incorrect value
- fixed mist.getUnitSkill. Slightly reworked how the function got the data.
Release 4.3 Hotfix 1
Fixed a bug with flagfuncs and the unitNameDef optional entries. If the value passed to units wasn't a unitNameDef the function thought it was a unitNameDef and cause an error later on. I have corrected this.
Also I think I forgot to attach example DBs to last release. They are now in the rar.
Release 4.3
-Refactored DB update code. If a groupName or unitName is duplicated it will now overwrite the older DB entry for all "live" DBs
-Several fixes for dnyAddStatic function
--Optimized it by trimming excess code out.
--fixed country checker to better account for country names with spaces
--fixed function was broken if given certain params
-dynAdd functions now index names by category.
-Added mist.DBs.const.shapeNames DB. This is simply a table of static object names and their corresponding shape names.
-Added some error checking for some functions.