221 Commits

Author SHA1 Message Date
mrSkortch
da53d53087
Merge pull request #94 from mrSkortch/development
Development
4.5.126
2024-04-03 16:54:51 -06:00
mrSkortch
c6b7b957d1 groupIsDead fix
FIXED: mist.groupIsDead to account for instances where isExist() still returns true.
2024-04-03 16:53:09 -06:00
mrSkortch
8985ba9a7e minor change to getCurrentGroupData
FIXED: mist.getCurrentGroupData to inherit all values that are saved in DB.
2024-03-26 15:38:19 -06:00
mrSkortch
730e5d37ab markid fix
FIXED: returning markId rather than id
2024-02-23 19:04:39 -07:00
mrSkortch
e01bfd25d5 marker fixes and other things
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
2024-02-23 18:56:36 -07:00
mrSkortch
ab11c65512 getUnitsLOS fix.
FIXED: error message inside of scheduledFunctions
FIXED: typo in getUnitsLOS that caused an error
2023-12-12 04:56:11 -07:00
mrSkortch
a6e14558a2
Merge pull request #88 from mrSkortch/development
linkUnit fix
4.5.122
2023-11-22 18:11:58 -07:00
mrSkortch
1ed42de92a linkUnit fix
FIXED: error if a zone is linked to a unit.
2023-11-21 22:37:21 -07:00
mrSkortch
b5d905fd6e
Merge pull request #86 from mrSkortch/development
updatedDBs
4.5.121
2023-11-19 14:01:34 -07:00
mrSkortch
2569b19b40 updatedDBs
Re exported example DB files.
2023-11-19 14:01:03 -07:00
mrSkortch
94629d2cfd
Merge pull request #85 from mrSkortch/development
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
2023-11-18 22:18:38 -07:00
mrSkortch
d57b8c5a03 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
2023-11-18 22:17:56 -07:00
mrSkortch
4922d756d5
Merge pull request #84 from mrSkortch/development
All of the fixes from dev branch to main.
2023-11-17 02:39:09 -07:00
mrSkortch
e6bdd50e16 Fixed getCategory checks
Fixed getCategory calls for Object.getCategory()
2023-11-17 02:35:09 -07:00
mrSkortch
ab55753487 spawnsByBase and other fixes
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.
2023-11-07 17:20:18 -07:00
mrSkortch
2e6f77452c moar updates
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.
2023-06-28 23:55:41 -06:00
mrSkortch
b9f6e11d97 Typo of 116 version name
Whoops
2023-01-12 18:13:58 -07:00
mrSkortch
be5023e2fd Database Update Changes
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.
2023-01-12 18:12:41 -07:00
mrSkortch
0c37aaaa09 v115
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.
2023-01-12 01:54:02 -07:00
mrSkortch
2c54802861 Assorted Fixes
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.
2022-07-04 16:39:23 -06:00
mrSkortch
a13abdd0e6 Build 4.5.110: Bug fixes
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
2022-04-15 21:26:31 -06:00
mrSkortch
3654aa9a88 Added isExist() to a number of functions
Added isExist() to a number of scripting functions to counteract a bug in DCS due to objects returning when they shouldn't.
2022-03-19 18:05:47 -06:00
mrSkortch
9e38ae5087 Revert display to v4
Reverting message display to v4 of function.
2022-03-07 02:54:50 -07:00
mrSkortch
eb0d16b556 Messages hotfix 2
FIXED: But related to sound files not playing if there was no text message updates.
FIXED: typo in getUnitsByAttribute
FIXED: typo in getGroupsByAttribute
2022-03-07 02:16:51 -07:00
mrSkortch
67f2c5f983
Merge pull request #67 from mrSkortch/development
4.5 Release Hotfix 1
4.5.107
2022-03-02 18:12:58 -07:00
mrSkortch
17726628ec 4.5 Release Hotfix 1
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.
2022-03-02 18:12:14 -07:00
mrSkortch
9c3c67817b
Merge pull request #66 from mrSkortch/development
Mist 4.5 Release
4.5.106
2022-02-11 03:14:07 -07:00
mrSkortch
45fd759aae Build 106
- 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
2022-02-11 01:58:17 -07:00
mrSkortch
d1e57e4107 Hotfix some bugs
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.
2022-01-17 02:24:39 -07:00
mrSkortch
f657c5d5a6 Shape Functions and linkUnit
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.
2021-10-06 20:51:33 -06:00
mrSkortch
20f49ee454 Build 102
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.
2021-09-07 04:59:23 -06:00
mrSkortch
388d218b4e Build 101. Bug fixes mostly
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.
2021-08-23 03:27:26 -06:00
mrSkortch
d9130cb57a Forgot update build num
Forgot to update the build number to 100. Whoops.
2021-08-16 01:50:11 -06:00
mrSkortch
28da804e80 4_5 RC1
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
2021-08-16 01:41:40 -06:00
mrSkortch
c4b96b896b Output functions and other changes
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.
2021-07-07 03:53:25 -06:00
mrSkortch
fb76ec3656 Remove extra file 2021-04-09 14:14:52 -06:00
mrSkortch
1c9e14add3 Fixed Typo
Fixed typo generating error in mist.getRandomPointInZone
2021-04-09 14:14:11 -06:00
mrSkortch
fdcbac0ac5 Removed getZone checks
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.
2021-04-02 17:51:36 -06:00
mrSkortch
cadde17c84 Build 96
-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
2021-02-28 21:04:18 -07:00
mrSkortch
ad5af75541 Fairly big oops
Somehow screwed up the same syntax error, failed to noticed, and uplodaed. This is now fixed.
2020-11-19 17:50:36 -07:00
mrSkortch
7829d380b0 Static support for makeUnitTable
-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.
2020-11-17 20:43:01 -07:00
mrSkortch
4e7b4158f4 4_5 build1
-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.
2020-11-01 23:19:22 -07:00
mrSkortch
d550180e58 Fix for checking CA slots
-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.
2020-09-30 15:33:47 -06:00
mrSkortch
debded08f4
Merge pull request #55 from mrSkortch/development
Long overdue PR
4.4.90
2020-09-17 17:43:50 -06:00
mrSkortch
0fb1bf157b
Merge pull request #53 from jarpy/development
Cool didn't know about that.
2020-09-17 16:58:58 -06:00
mrSkortch
5e26588a91 Neutral coalition support
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.
2020-09-17 16:56:25 -06:00
Toby McLaughlin
2146bec663
Add .editorconfig 2020-09-12 19:18:46 +09:30
mrSkortch
14843a5690 4_4_88
Forgot to update the versioned file.
2020-07-24 18:23:26 -06:00
mrSkortch
de4b4e0d0d removeFunction returns true/false
-Modifed mist.removeFunction to return true or false if the function was removed.
-Added more descriptive logging to dbUpdate and checkSpawnedEventsNew
2020-07-24 18:21:52 -06:00
mrSkortch
e2bbe238d7 Re exported example DBs
Exported sample DBs because it hasn't been done in a while.
2020-07-17 16:01:04 -06:00