- 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
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.
Added GNU v3 liscense.
Added paypal donation link
Fixed a issue where altitude was not correctly saved for aircraft
altitude set to AGL
Added Mark panel stuff. Currently WIP.
Fixed typos in function names where Celsius was spelled wrong:
mist.utils.kelvinToCelsius
mist.utils.FahreneitToCelsius
mist.utils.celsiusToFahrenheit
mist logger now defined in mistSettings.logLevel for easy access.
Temperature Conversions added.
-Kelvin to Celcius
-Celcius to Farhenheit
-Farhenheit to Celcius
getQFE modified to use new atmosphere function to return pressure. Will
use QNH as defined in editor to figure out QFE if function doesn't
return anything.
added mist.utils.converter() and shortcut mist.converter().
This function is a shortcut based method of converting a coordinate from
one format to another. Conversions exist for distance, temperature,
pressure, and speed. I may need to double check some conversions. :)
Added extra checks to unit spawn events
Fixed stupid errors with mist.getNextUnitId and mist.getNextGroupId
ground vehicles spawns via mist.dynAdd will now have playerCanDrive set
to true if value not present.
Fixed typo in mist.getUnitsInPolyGon
added mist.utils.getQFE. Values returned have some error, need to figure
it out, but added it for testing purposes.
Added 2 extra values to mist.getRandPointInCircle to specify a min and
max angle in degrees. Funtion currently assumes both are positive
numbers. Need to add extra checks to it.
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.
-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. 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.
Some minor fixes to code implemented last update
Updated mission used to create DBs. There should no longer be any unit
names that are the same as group names.
Dynamically generated names will now be indexed accordingly to their
category. Used to be just a single counter shared between all.
Several changes and fixes to dynAddStatic
-Fixed function wasn't working when given certain params.
-fixed country checker to better account for country names with spaces.
This fix was applied to dynAdd but not dynAddStatic, I corrected this.
-Optimized it slightly. Trimmed the fat of some of the code.
Update not pushed live at time of update due to a few bugs. Wanted to
get commit in.
Fixed typo with mist.utils.NMToMeters causing function not to work.
added Logger 'dbLog' to mist DB code
inserted do-end blocks to make DB code block shorter in length
Purpose of DB updating refactor is to more accurately keep unit tables
updated correctly. In the old system only 'byName' DBs were updated if a
group/unit name was duplicated. So it was possible for multiple units to
share the same name in unitsByNum, byCat, etc.
The process of how it checks added groups and units has been altered
slightly. Groups spawned with player controlled units will not be
updated.
The conditions for whether or not the table gets updated are as follows:
If groupName is already in DB then check if its groupId, country, or
coalition changed. If nothing has changed then it checks if the newly
spawned units exist in a DB entry and if so it will verify if the unitId
ort ype have changed. Any single update prompts the DB to update
accordingly.