Amarok_73 Posted June 14, 2023 Posted June 14, 2023 Have anyone tried to prepare the script that would populate the Suez Canal with moving ships? Natural Born Kamikaze ------------------------- AMD Ryzen 5 3600, AMD Fatal1ty B450 Gaming K4, AMD Radeon RX 5700 XT, 32 GB RAM Corsair Vengeance LPX, PSU Modecom Volcano 750W, Virpil Constellation Alpha Prime on Moza AB9 base, Virpil MongoosT-50CM3 Throttle, Turtle Beach VelocityOne Rudder.
Grimes Posted June 14, 2023 Posted June 14, 2023 Most difficult part would be to build a valid path for them to take through the canal. Ship AI is finicky when near terrain like that. They don't actually have AI to navigate around obstacles, which means they precisely follow the path set and if they think they will collide with the terrain they will just stop outright. Its a problem with larger ships like the giant cargo ship and aircraft carriers. Managed getting a frigate to make it through after a few attempts. 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
Amarok_73 Posted June 15, 2023 Author Posted June 15, 2023 6 hours ago, Grimes said: Most difficult part would be to build a valid path for them to take through the canal. I expect that and I am thinking about using the NAVYGROUP from the MOOSE that offers some kind of path finding functionality. On the other hand, I am affraid the coast to coast distances in the Suez Canal may be too small for the mechanism to navigate ships through it both ways with sufficient resolution and fluence. Even if I'll decide not to use the Ever Given, and stay with smaller ships. Natural Born Kamikaze ------------------------- AMD Ryzen 5 3600, AMD Fatal1ty B450 Gaming K4, AMD Radeon RX 5700 XT, 32 GB RAM Corsair Vengeance LPX, PSU Modecom Volcano 750W, Virpil Constellation Alpha Prime on Moza AB9 base, Virpil MongoosT-50CM3 Throttle, Turtle Beach VelocityOne Rudder.
cfrag Posted June 15, 2023 Posted June 15, 2023 7 hours ago, Grimes said: Most difficult part would be to build a valid path for them to take through the canal. The best approach for this would be to create a single unit with a path that successfully navigates the canal (remember to keep the speed below 10 knots, and navigate between the orange buoys), and then write a small method that grabs that unit's path from the mission for description, and then supplies its own type (e.g. "Dry-cargo ship-1") and spawns it. To randomize the location, drop a random number of waypoints 1..n, and spawn somewhere between waypoint n and n+1. Do the same with a unit running the reverse direction, and make sure that they never collide for even more life-like traffic. This would be a script that's highly specific to Sinai, so I see very little general appeal of this script. I think it would be much better if the naval AI is upgraded to it can successfully navigate canals. 1
Amarok_73 Posted June 15, 2023 Author Posted June 15, 2023 16 minutes ago, cfrag said: I think it would be much better if the naval AI is upgraded to it can successfully navigate canals. Seems that unfortunately this approach is most valid for today, so we have to wait until (if?) developers will perhaps one day will focus on this rather minor issue. Until then, I'll stay with the static ships. Natural Born Kamikaze ------------------------- AMD Ryzen 5 3600, AMD Fatal1ty B450 Gaming K4, AMD Radeon RX 5700 XT, 32 GB RAM Corsair Vengeance LPX, PSU Modecom Volcano 750W, Virpil Constellation Alpha Prime on Moza AB9 base, Virpil MongoosT-50CM3 Throttle, Turtle Beach VelocityOne Rudder.
cfrag Posted June 15, 2023 Posted June 15, 2023 (edited) 28 minutes ago, HC_Official said: they get stuck every so often at different locations even tho -29m is the depth through out it (best I could tell), wee speed boats work ok , but military ships or cargo ones only get a bit thru it before getting stuck (for no apparent reson) Navigating the Suez Canal is tricky, and apparently requires some voodoo and obeying some rather undocumented rules. I've recently made a Sinai map (see here) that, among other things (mainly highlighting attractions), features the Roosevelt that navigates the Suez Canal, and (more importantly for mission designers) highlights the orange buoys (that are exceedingly difficult to see) which you must stay on the correct side of. And you must observe the speed limit of some 8-10 knots. It's (to me) a bit needlessly difficult and frustrating, but should be possible. Then again, using static ships should also lessen CPU impact, so I agree with @Amarok_73 that unless you really need to, statics are a better option than moving ships. Edited June 15, 2023 by cfrag 1
Solution cfrag Posted June 16, 2023 Solution Posted June 16, 2023 On 6/14/2023 at 12:39 PM, Amarok_73 said: Have anyone tried to prepare the script that would populate the Suez Canal with moving ships? Yes. See below On 6/15/2023 at 8:05 AM, HC_Official said: Sadly not going to work Now it does! Long story short, based on my ramblings in previous posts, here's a proof of concept that populates the Suez canal with 21 ships. 20 of them are spawned dynamically, based on the route that the one original ship (the Roosevelt in the demo) is taking, and they all spawn somewhere in front of the Roose, in one of five different types (dry cargo 1/2, Elnya, harbor Tug, Handy Wind). Each time you run the mission, the resulting ship positions are randomized To modify, look at the script 'lineTraffic'. lineTraffic.makeTrafficBasedOn() is the call that you invoke to create a new ship in front of the reference ship, based on that ship's route. To control the number of ships in the canal, change the 'passes' value. Each pass, 5 ships (one each of the types listed above) is added at a random path location. Here's the miz for your perusal. Enjoy, -ch Suez Populated.miz 2
Amarok_73 Posted June 16, 2023 Author Posted June 16, 2023 Sweet!! Sadly I can't mark Your post as solution, @cfrag Natural Born Kamikaze ------------------------- AMD Ryzen 5 3600, AMD Fatal1ty B450 Gaming K4, AMD Radeon RX 5700 XT, 32 GB RAM Corsair Vengeance LPX, PSU Modecom Volcano 750W, Virpil Constellation Alpha Prime on Moza AB9 base, Virpil MongoosT-50CM3 Throttle, Turtle Beach VelocityOne Rudder.
HC_Official Posted June 17, 2023 Posted June 17, 2023 (edited) wonder if I delete my post can u assign solution to cfrag ? @Amarok_73 try now Edited June 17, 2023 by HC_Official No more pre-orders Click here for tutorials for using Virpil Hardware and Software Click here for Virpil Flight equipment dimensions and pictures. .
Amarok_73 Posted June 17, 2023 Author Posted June 17, 2023 29 minutes ago, HC_Official said: try now It works and You've achieved the 'Da Man!' scouting skill, mate Natural Born Kamikaze ------------------------- AMD Ryzen 5 3600, AMD Fatal1ty B450 Gaming K4, AMD Radeon RX 5700 XT, 32 GB RAM Corsair Vengeance LPX, PSU Modecom Volcano 750W, Virpil Constellation Alpha Prime on Moza AB9 base, Virpil MongoosT-50CM3 Throttle, Turtle Beach VelocityOne Rudder.
Recommended Posts