Skip to content

Conversation

@mrSkortch
Copy link
Owner

+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.

-Fixed bug due to mission file adding a string value into a table that is normally just a table of numbers. Added a type check to handle that.
-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 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.
Somehow screwed up the same syntax error, failed to noticed, and uplodaed. This is now fixed.
-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
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 typo generating error in mist.getRandomPointInZone
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.
FIXED: typo in mist.dynAdd
ADDED: mist.getUnitsByAttribute
ADDED: mist.getGroupsByAttribute
FIXED: typo is mist.teleportToPoint
ADDED: mist.stringCondense
ADDED: mist.debug.changeSetting
ADDED: mist.marker.add
ADDED: mist.marker.getNextId
ADDED: mist.marker.remove
ADDED: mist.marker.get
Forgot to update the build number to 100. Whoops.
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.
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.
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: 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 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
@mrSkortch mrSkortch merged commit 9c3c678 into master Feb 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant