@cola, loving the fact you can shift order the commands and see the results I've been waiting for this one for ages- should make using long range units like Orcas or Sniper bots far more effective (now we just need the equivalent of the TA / Spring Roko to go with this!)
Nice, I don't remember any roko / storm like unit in any of the previous balance mods so that will be nice (the slow rockets were always kinda silly but made for some great micro)
Well I hope it'll be good enough as it is now. Else it'll need more hours of improving the matching stuff, from skimming over NoX I think it may be a good idea to take the result from my current algorithm and run a few optimization passes over it that try to remove crossing lines. Not sure. Problem is PA is 3D. That makes all this not easier, a perfect solution might need to consider that the unit will walk around a sphere.
I think the system as is, is worth releasing..... Certainly looks workable and is way better than no line tool Obviously if you fancy working out an even more elaborate solution don't let me stop you
optimization problems. Endless fun. EDIT: Added another O(n^2) pass that tries to reduce the travelled distance by swapping the targets, seems to help a lot to at least not have some units that basically take the worst possible direction. perf wise the PA pathfinding and simulation run into issues before I do.
If you want to deal with the sphere, but still use straight lines for most of the algorithm, how about the following: Step 1: Find the average distance, get the arc length distance from that (assuming you can recover the radius of the planet?) Step 2: Rotate goal points back to where the units start, so basically you are really solving the problem of slightly modifying the formation. Step 3: Solve as normal, so this is solving the assignment regardless of how far along the sphere the commands are. Step 4: Rotate goal points back to original position, and issue orders with matching computed from step 3.
Might be a good idea to revisit this thread now that we have a more flexible API? https://forums.uberent.com/threads/ideas-from-zero-k.34222/
Guys i see lots of what i would call gameplay/visual mods. Has any of you ever considered federating all these mods within à single one ? Not saying that each of them should disapear as a single mod, but if no technical restrictions a "PA global enhancement" could lead to à larger adoption. Or it may be toi early to consider merging all these mods. I know also that it would require any modder accepts its mod to be added and someone responsible for updating the merged mod.
Great stuff, some questions: 1. Will we be able to set their rotation somehow? Orcas and Leviathans would be better off showing their broadside while making a train would be silly for other units and they'd look better facing the center. 2. Will we be able to make the units hold the line all the time? As in making them not chase enemy units.
this looks so good. I always loved that feature in ta spring and now its gonna happen in pa. Very awesome!
Are you overriding the default pathfinding behaviour or simply assigning the final positions for all the units ?
I am only assigning the final movement location target to each unit, that's why there are so many preview lines for all the move commands. I also cannot make this kind of command as a "group" command, so if you combine dox with ants in this the dox will move faster than the ants. @probodobodyne I can assign a target orientation as well I think, but it is in pathfindings hand to decide how to reach the location, so it probably would not do what I want. It might be possible to do lots of small "in between commands", but that would probably eat performance really bad. Maybe another day. You can always tell units to hold position, that's a default feature of the UI.
I've thought about it, but it seems my current algorithmn somewhat works for distances long enough. Longer distances may suffer from it, but over longer distances the pathfinding will screw everything over anyway. That scenario came down to 2 lines of dots moving together. Not even that bad I guess.
pinbender just told me that there still is the free formation code from a year ago. It can be triggered via the new API as well, but it's not exactly the same as my solution, as it doesn't do lines, it does free formation drawing. This mod will stay like it is, as it is about lines and nothing but lines. But just so everybody who like to mod PA knows: Calling the send order API with a move command, a lot of units and a curve in multi_pos yields you the old free form orders.
I thought using those custom formations crashed PA, which is why @wondible's mod was made obsolete? https://forums.uberent.com/threads/obsolete-enable-custom-formations-78071.62269/ Does it work again?
Yes and No. What @wondible did was call some native call that basically goes "okay please do line commands now". That made it use a different path to collect the input and then called some native calls that were supposed to end up with a free formation command. The new orders API exposes the underlying "do a free form order with these input points" function to js. That call seems to work fine, the crash probably is somewhere in the -by default not active- input collection code. My mod hooks into the js part of the free form input stuff, but then collects everything in js and only calls the new send order API. In fact I can easily switch it over to the free formation stuff instead. Maybe I'll actually find some modifier key, so the user can chose which behavior is wanted. They do behave differently.