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.
Doc updates. Will Export pdf later.
mistSettings table added to display popup message on mist.Logger events.
Custom choice for error, warn, and info.
Fixed typo related to Fahrenheit
Minor changes to getRandPointInCircle
mist.getRandomPointInZone now accepts maxA and minA variables.
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.