Jump to content

Grimes

ED Beta Testers
  • Posts

    9669
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by Grimes

  1. Scripting would be the optimal and easy way to do this as it'd take multiple triggers to get more randomized behavior on a per group basis. This is more or less a countdown timer, you set a flag to a random value then at a set rate reduce the value of that flag, once it reaches a value of 1 execute a command. In this example it can take anywhere between 10 and 30 minutes to occur. Switched Condition>Whatever>Set Flag Random Value(x, 10, 30) Switched Condition>Time Since Flag X is 60 > Flag Decrease X by 1 Switched Condition> Flag X is 1> AI Off, Flag Y On Switched Condition> Time since flag y is whatever> Flag y Off, AI On. Where-as with scripting its pretty much the following. Point is you just have to edit the groups entry to add stuff and not make copies of the same however many triggers per group you want it to do. That is where the power of lua scripting makes things easier and shouldn't be that scary. env.info( '*** RANDOMIZER INCLUDE START *** ' ) local groups = {"Ground", "GroundB"} -- list of group names. local state = {} local function coffee(gp) if Group.getByName(gp) and #Group.getByName(gp):getUnits() > 0 then -- only executes if group is still alive if state[gp] == true then state[gp] = false trigger.action.outText(gp .. " is going on break!", 30) timer.scheduleFunction(coffee, gp, timer.getTime() + math.random(30, 60)) -- coffee break is 5 to 10 minutes else state[gp] = true trigger.action.outText(gp .. " is back from break!", 30) timer.scheduleFunction(coffee, gp, timer.getTime() + math.random(90, 360)) -- takes coffee break between 15 and 60 minutes end Group.getByName(gp):getController():setOnOff(state[gp]) -- sets AI on/off based on the value. end end for i = 1, #groups do state[groups[i]] = true -- adds initial state to table timer.scheduleFunction(coffee, groups[i], timer.getTime() + math.random(30, 60)) -- same rules for when it can take break end env.info( '*** RANDOMIZER INCLUDE STOP *** ' )
  2. Development branch updated: https://github.com/mrSkortch/MissionScriptingTools/commit/28da804e8013c88828ddd0870ce48acd496917e4 Big new feature are the mist.marker functions which are useful for drawing shapes on the map. Documentation on the wiki will be added soon. FIXED: typo in mist.dynAdd FIXED: typo is mist.teleportToPoint ADDED: mist.getUnitsByAttribute ADDED: mist.getGroupsByAttribute Both of those functions are meant to be an alternative way of getting a unit and group list from the database quickly. Similar to mist.makeUnitTable in a sense. ADDED: mist.stringCondense Function that excludes a bunch of characters from a string for use with string comparison. ADDED: mist.debug.changeSetting Function to change the default settings for stuff like logging within mist. ADDED: mist.marker.add ADDED: mist.marker.getNextId ADDED: mist.marker.remove ADDED: mist.marker.get Functions to add, remove, and get information on markers and shapes.
  3. IIRC train pathing is still a bit different than normal ground groups. Namely if the track is "one way" it won't work and when a train reaches the end of its path it'll "bounce" back toward the initial waypoint traveling in reverse instead of halting.
  4. Check DCS.log after trying an admin command to see if there is an error associated with your command input. Also try the admin command from the webGUI to see if anything happens. Most of the lua files for defining things are just lua tables indexed by UCID. To manually add it, you need to check the stats file to find your UCID, which is a bunch of random letters and numbers. Copy that into the Server Admins file. It'd be a good idea to modify that with DCS closed because the changes won't be reflected until the server starts or changes missions. The format would roughly be something like: Admins = { ["shuidashuihighsgaggsgahajfgsda"] = 'admin1', ["sdasffgauyhagjiouiojhguioaga"] = 'admin2', } -- end of Admins Alternatively using the webGUI you can do a chat command while you are connected to the server to add a player to it. -admin add playerName
  5. This appears to be a product of circumstance and can be fixed via temporary mission changes. For instance insert a waypoint into their route like with the other F-18 flight. For whatever reason that prevents the behavior. Not that it isn't a bug, just saying its not quite the same as the other take-off bug. Anyway I reported it.
  6. Last I recall several of the actions in zone don't work with quad zones. By don't work I mean they aren't doing a point in polygon check, rather it still thinks it is a circle. It uses the center point and whatever the furthest point from that as the radius. Odd shaped zones can cover a much larger area than what you think it would. Aleppo as a whole has well over 100,000 buildings. More if you count trees, walls, and a lot of other stuff that isn't returned via the scripting engine. Detecting everything is quite quick, but changing it to a destroyed state is the slow part and it has always been slow over large areas like that. With a 8km radius around Aleppo it took my PC a good 4 minutes to execute that trigger.
  7. Sadly doesn't exist at present. Fairly certain there is a report on it.
  8. Right click on an object in the mission editor and select "assign as". This creates a trigger zone over the object with the typeName as one of the values in the properties. It is important to note that the id isn't fixed and can change from patch to patch. It depends on if the map is updated, which means the value is more stable for something like Nevada but you never really know when it might update. So if you were making something that depends on a specific object being destroyed you pretty much have to rely on using the coordinates and the typeName to identify it.
  9. Nope. The group and unit name and id are unique identifiers. Suppose you could replace the group by despawning it and respawning it with the names you want, but it'd be easier to just name it before you spawn it.
  10. Check your DCS.log for a series of lines starting with: "SLMOD INIT: Loading Slmodv" and ending with "SLMOD INFO: SlmodTests.lua loaded." Also look for a line dealing with missionScripting.lua. Should look like: "SLMOD INFO: ./Scripts/MissionScripting.lua is up to date, no installation required."
  11. It is a multiplayer side bug with that trigger at the moment.
  12. You basically have to give the AI a new route and there isn't one specific function that does only that in mist. But it is easy enough to create with functions created by mist. First you get the current location of the aircraft. Then you pass the start position, the distance, and heading you want it to fly into mist.projectPoint to figure out the point to use downrange as the 2nd waypoint. https://wiki.hoggitworld.com/view/MIST_projectPoint Now you have a start point and end point. Pass each of those into mist.fixedWing.buildWP() to generate the needed format for aircraft waypoints and assigning em to a table like in the example on the wiki. https://wiki.hoggitworld.com/view/MIST_fixedWingBuildWP Then you pass the group and the path into mist.goRoute() and it will tell the AI to fly the route you designated. https://wiki.hoggitworld.com/view/MIST_goRoute
  13. That appears to be bugged. It is returning a table with each point being the bullseye. So if you had 3 different nav points it shows the callsign Id correctly but the point value is the same for all 3. The good news is that information is embedded within the miz and can be accessed by env.mission.coalition[coaName].nav_points. For instance mist builds a DB of the contents: https://github.com/mrSkortch/MissionScriptingTools/blob/master/Example DBs/mist_DBs_navPoints.lua
  14. Lower the altitude of the target point. If it is to high/far away the AI will just ignore the task and there are no built in checks in the editor UI telling you if it is outside parameters. Also in the future when uploading miz or track files to show a bug like this please just isolate it as much as possible first. All I needed was just a mission with 1 group and showing the task not working. Finding the group at fault, changing it to daylight so I can see easier, and dealing with the performance impact of 900 extra units is less than ideal for checking out bugs.
  15. My fault for not having "in game" in my statement because that is all I was referring to.
  16. The 19J6 is the search radar for the SA-5, and just like any other sam it doesn't have the EWR task available. Most likely it is tied to the value assigned to GT.WS.maxTargetDetectionRange for each radar. I'm trying another attack vector by making bug reports for each unit just asking to adjust that and another value. Lets face it even without considering the scripting function they are a good 50% shorter range than they should be. Kinda hoping that "this is a problem that should be fixed easily" might in turn fix the function.
  17. I don't think aircraft that provide services like AWACS, JTAC, and tankers are meant to work with multiple aircraft per flight. As it stands its known the AI always go to the closer tanker to refuel and I'm not sure if that is also at play here or AI just dont know how to react with multiple tankers in the formation. Just due to how formations work currently I could see how problems might arise.
  18. That version of mist is only 7,347 lines long and that error occurs at line 114,528. Post the mission perhaps?
  19. It is not possible. Best you can do is respawn the player aircraft on another country. It wouldn't exactly be seamless. Alternatively have the player on blue to start with, but make it invisible so AI don't attack it. Then turn invisible off.
  20. Which missions? Check the airfield where it spawns at to see if the warehouse has limited stores available.
  21. It should be possible for findPathOnRoads to fail if no valid path is found. The same pathfinding is used in the editor if you place two on road waypoints. If you are spawning stuff randomly and giving random destinations it is easy enough to create a mark point at those coordinates and then load into the editor and manually check if such a path is possible. A valid result would be the points "snap" to the actual path and not being a straight line. For reference you see this a bunch where one way roads exist like on Marianas. I'm honestly not sure if the AI can be overwhelmed with waypoints in their task. However depending on where it is at using all of the points returned via findPathOnRoads can be a bit excessive. Would have to double check but again it might be the exact same returns that the mission editor uses to "draw" the shape of the path. Which I'm not sure if any of you have noticed but it saves that to the miz file and especially long routes can contain several thousand points. This short 5km trek in the mountains has 393 points. Checking the distance between each point likely yields values as low as 5 meters. The AI should do just fine with a start point and destination. Though there would be nothing wrong with sub-dividing the points up, like if there were 500 points you use the points a 1, 100, 200, 300, 400, and 500 to define a route.
  22. 2021-07-17 04:40:57.515 ALERT LUACOMMON: Error: GUI Error: [string "./MissionEditor/modules/me_aircraft.lua"]:923: cart has no default task! cart is the unit typename. It is something from one of the mods you have installed. Probably best to figure out which mod is at fault and alert whoever made it and uninstall it in the meantime.
×
×
  • Create New...