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
Hotfix for dbInit
FIXED: error checking if table entry doesn't exist when populating mist.DBS.spawnsByBase
FIXED: double check for any missing helipads not returned by world.getAirbases
FIXED: error checking if table entry doesn't exist when populating mist.DBS.spawnsByBase
FIXED: double check for any missing helipads not returned by world.getAirbases
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.
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: 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.
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: 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.
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
FIXED: But related to sound files not playing if there was no text message updates.
FIXED: typo in getUnitsByAttribute
FIXED: typo in getGroupsByAttribute
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.
CORRECTED: Included DB example files within release rar download.
- Added mist.DBs.drawingsByName and mist.DBs.drawingIndexed. They are a table of points
-Added new callsigns to mist.DBs.const.callsigns
-Added mist.marker.drawShape.
mist.shape.getPointOnSegment
-Added mist.shape.segmentInsersect
-Added mist.mapValue
-Added mist.utils.hexToRGB
-Added mist.getWindBearingAndVel
-Updated mist.messages to only display a message if the messages has been updated. This should prevent spamming the message log.
Fixed: Bug with mist.marker.add() associated with text boxes
Fixed: Zone radius value of verticies present
Updated: DB Sample Files
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.
Added linkUnit value to DB for statics
added shape functions
insideShape
circleInCircle
circleInPoly
polyInPoly
polyInCircle
-Added error handling for get2DDist and get3DDist if a value is missing.
Fixed: bug with mist.getLeadingPos where the position appeared to be reversed from what it was expecting
Added: mist.marker.drawZone. This function is a quick and easy way to render trigger zones on the F10 map.
Modified: mist.marker.add to also accept coa as variable name for markForCoa
Modified: mist.marker.add to accept number value for markForCoa
WIP: Updates to message display code. Currently commented out.
Changed mist.marker.list to mist.DBs.markList
Added markType and type as valid in mist.marker.add for the type Id
Added mist.groupIsDead function
Removed a log entry I left in.
Updated DB examples.
ADDED: 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.
ADDED: mist.getGroupTable. Returns the verbatim table for a group as defined in the mission editor.
MODIFIED: mist.teleportToPoint, mist.teleportInZone, mist.respawnInZone, mist.cloneInZone to have extra parameters for governing task and custom validTerrain values.
MODIFIED: mist.debug.dump_G now accepts a boolean value that deletes entries that I commonly delete when dumping _G.
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
WIP: mist functions to add, remove, query mark panels and shapes.
Replaced multiple instances of trigger.misc.getZone to rely on mist.DBs.zonesByName instead.
getRandPointInCircle will default to a radius of 1000 if none is specified.
Added mist.vec.normalize
Added ground level optional value to mist.utils.zoneToVec3 to return that point at ground level.
Some future proofing.
-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
-Added some future proofing
-Added error messages for updating DB
-Added disableRoads variable to grouoToRandomZone and groupRandomDistSelf
-Added support for static objects in makeUnitTable function. It still returns a list of all objects in a single table, so be careful and know that it WILL return static objects.
- Added optional value to mist.makeUnitTable to exclude categories of objects. Can be used to filter out statics or any other type. Input is a string or a table of strings.
-Added/fixed getUnitsInZones, getUnitsInPolygon, getUnitsInMovingZones, and getUnitsLOS to support static objects. Change was made due to farp objects returning via Unit.getByName() and not checking for object category.
-Added some definitions of static objects and model names
-added mist.getPathLength()
given a table of points it returns the total distance between all of the points. Distance by defualt is "2d" but can be 3d. Can also return the nearest index after a given cutoff distance.
-added mist.getPathInSegments()
sub divides a passed path into X number of segments. For example generate an on road route between 2 points, pass that table to this function and you can get the coordiantes of points relatively equidistant from each other.
-added mist.getPointAtDistanceOnPath()
Returns a vec2 or vec3 point at a set distance along a path.
added mist.projectPoint()
Returns a vec2 or vec 3 based on the point it was passed from that point at the angle of a given theta for a given distance.
-added mist.utils.getHeadingPoints()
Returns the heading from the first point to the 2nd point.
modified mist.teleportToPoint to have 2 optional new variables.
-- validTerrain is a table of terrain types you wish to force the function to use
-- newGroupName is a optional value to define the new name of the group.
Added support for DB info in the miz regarding neutral groups. Removed the checks for the coalition name so that if there are ever more coalitions added to the game the mist code won't need to explicitly look for them.
Added local function to verify the DB entries for anything that was spawned before mist is loaded.
Set all popup messages to false.
-Modifed mist.removeFunction to return true or false if the function was removed.
-Added more descriptive logging to dbUpdate and checkSpawnedEventsNew