Custom Formations 2 - Page 4

Custom Formations 2

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: Custom Formations 2

Post by Pxtl »

Could we get support for a single unit? Just send the unit to a random point on the line. I often get annoyed by the sudden jump to the old wall-move instead of line-move. Factories get the wall-move, don't they? Sending the built units to a random location would be good for the factory orders.
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Re: Custom Formations 2

Post by 1v0ry_k1ng »

can we remove the meta key bullshit? why would I want to drag the buggy line in any situation when I can draw one
User avatar
Niobium
Posts: 456
Joined: 07 Dec 2008, 02:35

Re: Custom Formations 2

Post by Niobium »

Pxtl wrote:Could we get support for a single unit? Just send the unit to a random point on the line. I often get annoyed by the sudden jump to the old wall-move instead of line-move. Factories get the wall-move, don't they? Sending the built units to a random location would be good for the factory orders.
Factories get the formation lines. As for single unit, just don't click and drag? I guess I could add it anyway.
1v0ry_k1ng wrote:can we remove the meta key bullshit? why would I want to drag the buggy line in any situation when I can draw one
What? Widget uses alt instead of meta now, and it applies to attack/unload only, such that you can still do box attack and area unload.
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Re: Custom Formations 2

Post by TheFatController »

For solo units may I suggest adding some functionality like this since clicking and dragging with 1 unit currently doesn't have a function in spring:
Image

I've already hacked this into my copy but it was a quick job and not very neat so i'll keep it to myself for now, however it is a useful skirmishing feature.
User avatar
manolo_
Posts: 1370
Joined: 01 Jul 2008, 00:08

Re: Custom Formations 2

Post by manolo_ »

nice idea, couldnt u release it?
User avatar
Niobium
Posts: 456
Joined: 07 Dec 2008, 02:35

Re: Custom Formations 2

Post by Niobium »

TheFatController wrote:For solo units may I suggest adding some functionality like this since clicking and dragging with 1 unit currently doesn't have a function in spring:

<image>

I've already hacked this into my copy but it was a quick job and not very neat so i'll keep it to myself for now, however it is a useful skirmishing feature.
Really cool idea, also solves Pxtl's problem of the ugly wall-formation thing appearing for single units, probably useful for buggy pathing out of factories too if there's a difficult corner to get around.

I'll code it in when I have the time later today.
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Re: Custom Formations 2

Post by TheFatController »

One thing that is nice is that the unit can start moving as the line is being drawn in this mode as there's no need to wait ;)

Drawback is it possibly sends too many commands if it's unoptimized.
User avatar
Niobium
Posts: 456
Joined: 07 Dec 2008, 02:35

Re: Custom Formations 2

Post by Niobium »

Version 2.1 released. Get from SpringDownloader or the widget database

Implemented TFCs idea. With a single unit selected it will follow the line starting immediately. Works with shift, but cannot be inserted. Waypoints are spaced a minimum distance apart (Configurable at top of file).

Shouldn't be any bugs, but the minimum spacing may need some tweaking, its a trade-off between speed/successful pathing and accuracy.

Tested in BA with zippers (Good), jeffys (Good), planes (Bad).

Depending on popularity there are many improvements that could be made (Inserting / Longer waypoints for planes / Working with multiple planes following one line / Curve smoothing / etc), so if you think this line thing is awesome then post some ideas.
User avatar
manolo_
Posts: 1370
Joined: 01 Jul 2008, 00:08

Re: Custom Formations 2

Post by manolo_ »

the distance between the waypoints could be a function of the zoom/distance camera-ground
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Re: Custom Formations 2

Post by TheFatController »

Looks good, better than my hack - thanks for the quick update 8)
User avatar
manolo_
Posts: 1370
Joined: 01 Jul 2008, 00:08

Re: Custom Formations 2

Post by manolo_ »

couldnt u release a seperate widget, coz i would find it really usefull to set an attack route for more units with that drawing
Hacked
Posts: 116
Joined: 15 Aug 2008, 18:06

Re: Custom Formations 2

Post by Hacked »

this post is a thank you and a compliment to niobium for working so hard on this widget.
User avatar
TheMightyOne
Posts: 492
Joined: 26 Feb 2007, 14:32

Re: Custom Formations 2

Post by TheMightyOne »

i haven't read the complete thread so maybe somebody already suggested it. what i would like to have is that when i have a lot of units selected and i draw a short line that they'd make more then 1 line, depending on the length of the line i draw and the amount + size of the units selected. the second line should be build behind the first one starting in the middle of the first. i hope thats comprehensive...
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Re: Custom Formations 2

Post by TheFatController »

Maybe you could use the scroll wheel while drawing the line to control that, might be a bit fiddly and hard to do tho..!
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: Custom Formations 2

Post by zwzsg »

But my mouse wheel is already used for zooming, and yes I do want to zoom in and out while drawing formation.
Hacked
Posts: 116
Joined: 15 Aug 2008, 18:06

Re: Custom Formations 2

Post by Hacked »

i think that makes sense
otherwise all the units will clump together
there should be a maximum "layers" to line-length ratio
just so it doesnt get too out of control
User avatar
JohannesH
Posts: 1793
Joined: 07 Apr 2009, 12:43

Re: Custom Formations 2

Post by JohannesH »

If I understood you right with how you want several lines, you can draw a kinda S-shaped line to do that.
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Custom Formations 2

Post by CarRepairer »

JohannesH wrote:If I understood you right with how you want several lines, you can draw a kinda S-shaped line to do that.
Yeah seriously it's not rocket science.
User avatar
TheMightyOne
Posts: 492
Joined: 26 Feb 2007, 14:32

Re: Custom Formations 2

Post by TheMightyOne »

CarRepairer wrote:
JohannesH wrote:If I understood you right with how you want several lines, you can draw a kinda S-shaped line to do that.
Yeah seriously it's not rocket science.
yea, though if i have 50 units selected id be sitting there for 2 mins drawing lines ... thats what widgets are all about, making life easier, right?
User avatar
manolo_
Posts: 1370
Joined: 01 Jul 2008, 00:08

Re: Custom Formations 2

Post by manolo_ »

TheMightyOne wrote:
CarRepairer wrote:
JohannesH wrote:If I understood you right with how you want several lines, you can draw a kinda S-shaped line to do that.
Yeah seriously it's not rocket science.
yea, though if i have 50 units selected id be sitting there for 2 mins drawing lines ... thats what widgets are all about, making life easier, right?
why not making a seperate widget for it, that works like in total war
Image
Post Reply

Return to “Lua Scripts”