Sickdog Posted December 2, 2023 Posted December 2, 2023 I haven't seen it mentioned yet but I did a little more digging on this and found something interesting: It does appear that there is some hidden magic going on when creating waypoints in ME, versus scripting a waypoint and telling a group to follow roads. I noticed from testing that a single waypoint created for a group, following roads in ME, generates a table of points along the route, the table is named "spans". This can be found in the mission.lua of the miz file if you unzip it, then look at the ["route"] for the group, and you'll see a huge table of ["spans"] (the longer the route, the larger the table), listed prior to the ["points"] for the actual waypoint. So, my thinking is that when using the ME, it automatically generates all these pseudo waypoints to better path the vehicles to get to their destination. Perhaps having these "spans" (multi-mini waypoints) is what's necessary to keep vehicles happy and following along roads/crossing bridges, and scripting a simple "goto waypoint on-roads" just doesn't work as well. As far as I can tell, scripting in pretense tries to create tasks and waypoints and assign it to AI groups as similarly as possible to the way the ME translates to scripting in the mission.lua, so they should work similarly, if not the same way. However, this ["spans"] is definitely not being created in pretense and unfortunately I don't see any possible way of recreating this as it's black magic in the ME. I wonder if this is the center of the problem we're discsussing? 1 1 TM Warthog, TPR, TM MFDs, Pimax Crystal, AMD Ryzen 9 7950X3D. ASUS ROG Crossair X670E Hero AMD X670, G Skill Trident Z5 DDR5 64GB
Grimes Posted December 4, 2023 Posted December 4, 2023 On 12/2/2023 at 9:41 AM, Sickdog said: if not the same way. However, this ["spans"] is definitely not being created in pretense and unfortunately I don't see any possible way of recreating this as it's black magic in the ME. I wonder if this is the center of the problem we're discsussing? It is not. The spans table entry is used to "connect the dots" of the route used to display it in the editor. It is literally only used for rendering. You can delete all of the spans, load into the mission, and AI will behave exactly the same as if the spans table was present. Load into the editor, at least when I did it years ago, you won't see any lines making up a group route, only the waypoints as standalone circles. Any two points connecting two non on road waypoints will have two values for the span, the start point and the end point. On road waypoints is where the table balloons in size dramatically because at any point along the route that can't be connected by a straight line requires a point to be inserted. The black magic that will give you those points is land.findPathOnRoads. In fairness there is some magic going on because the returned values are far from consistent. 1 1 The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
Sickdog Posted December 5, 2023 Posted December 5, 2023 That’s great info, thanks Grimes! TM Warthog, TPR, TM MFDs, Pimax Crystal, AMD Ryzen 9 7950X3D. ASUS ROG Crossair X670E Hero AMD X670, G Skill Trident Z5 DDR5 64GB
Floyd1212 Posted December 14, 2023 Posted December 14, 2023 @Grimes Would it be possible to create a simple mission with a group of 4 units, and a way to place a user mark on the F10 map, and then script the group to move to the user mark with the action = AI.Task.VehicleFormation.ON_ROAD task? If this is possible, I may ask around to see if someone can work it up as a useful tool for experimentation, and demonstrating this issue. It is beyond my current abilities, but I feel like it should be doable, yes?
Grimes Posted December 15, 2023 Posted December 15, 2023 12 hours ago, Floyd1212 said: @Grimes Would it be possible to create a simple mission with a group of 4 units, and a way to place a user mark on the F10 map, and then script the group to move to the user mark with the action = AI.Task.VehicleFormation.ON_ROAD task? If this is possible, I may ask around to see if someone can work it up as a useful tool for experimentation, and demonstrating this issue. It is beyond my current abilities, but I feel like it should be doable, yes? Yup its very much possible. https://wiki.hoggitworld.com/view/DCS_event_mark_change to get the point and if you want to parse the text for the command. Pass the coordinate to a function that assigns a route. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
Recommended Posts