widget: CustomFormations v2.2 (17 Jan 08) *PLEASE UPGRADE*

widget: CustomFormations v2.2 (17 Jan 08) *PLEASE UPGRADE*

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

Moderator: Moderators

User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

widget: CustomFormations v2.2 (17 Jan 08) *PLEASE UPGRADE*

Post by jK »

The widget replaces the inbuild line formation (hold right click+mouse move), so you can draw any line the units should line up.

Now you can easily surround your base to defend it, or circle enemy's comms with flashes, etc.

NEW: the destination points are now optimized to reduce the total movement distance.
Also you can now use ALT to use a random algorithm.

Image

Image
(version 2.2)

changelog v2.2:
*fixed hard freeze bug (whole spring freezed) *PLEASE UPGRADE*
*add minimap support

changelog v2.1:
*merged gunblob's hungarian implementation (used for upto ~20 units)
*integrated my own lazy linear optimization algo (used for upto ~80 units)
*fixed issue with shift and CMD_FIGHT

changelog v1.1:
*fixed a bug if you use any command menu buttons (Move,Fight,Attack,Patrol,...)
*now you can also use it with CMD.FIGHT

changelog v1.02:
*fixed ctrl mod key
Last edited by jK on 17 Jan 2008, 23:43, edited 10 times in total.
User avatar
det
Moderator
Posts: 737
Joined: 26 Nov 2005, 11:22

Post by det »

This is AWESOME.
User avatar
Ishach
Posts: 1670
Joined: 02 May 2006, 06:44

Post by Ishach »

There seems to be a bug with fleas, and i assume its something wrong with tiny units.

When I drew a line across an area all the fleas would get a move order to clump near the start of where i was drawing, rather than spread evenly over the line.
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Post by jK »

it was a combination of huge amount of units and too less line vertices :roll:
User avatar
Ishach
Posts: 1670
Joined: 02 May 2006, 06:44

Post by Ishach »

Sorry you're right, it was the amount of units not the size :X
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Post by jK »

lol, no reason to be sorry, I have to be cos I wrote bad code >_<

However, I already expect a v2.3 >_>
User avatar
TechnoTone
Posts: 165
Joined: 23 Aug 2005, 22:02

Post by TechnoTone »

Awesome indeed!

Can you get this to work with the Fight move command too?
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Post by Warlord Zsinj »

This would ideally be under modders control, rather then user control.

It's a pretty big advantage to be giving to players 'in the know'.

Which isn't to discount the fact that it's an excellent achievement, well done jK.
tombom
Posts: 1933
Joined: 18 Dec 2005, 20:21

Post by tombom »

Warlord Zsinj wrote:This would ideally be under modders control, rather then user control.

It's a pretty big advantage to be giving to players 'in the know'.

Which isn't to discount the fact that it's an excellent achievement, well done jK.
You can say something similar about pretty much every widget.
User avatar
BrainDamage
Lobby Developer
Posts: 1164
Joined: 25 Sep 2006, 13:56

Post by BrainDamage »

can you code that it stores the formation and when you send a move order to the entire group it recontructs the formation at the arrival point?
Lippy
Posts: 327
Joined: 16 Jul 2006, 00:24

Post by Lippy »

Warlord Zsinj wrote:This would ideally be under modders control, rather then user control.

It's a pretty big advantage to be giving to players 'in the know'.

Which isn't to discount the fact that it's an excellent achievement, well done jK.
Bah, do you know how many people don't know that holding SHIFT and ALT they can build squares of buildings? Or the wait command? (Or even the more advanced wait commands; which i estimate over 95% of people don't know about). And these features are built in.

'Players in the know' are the players who can be bothered to check the forums/unknown files and deserve to use this widget.

Oh yeah, and awesome script jK.
User avatar
TechnoTone
Posts: 165
Joined: 23 Aug 2005, 22:02

Post by TechnoTone »

Brain Damage wrote:can you code that it stores the formation and when you send a move order to the entire group it recontructs the formation at the arrival point?
You mean like CTRL+Move does? ;)
User avatar
Pendrokar
Posts: 658
Joined: 30 May 2007, 10:45

Post by Pendrokar »

Suggestion "If unit doesn't fit into line make new"- If units won't fit with other units that are going close to that position(with checking collision size) then the lua spreads units in another same formation line(checking the units biggest collision size)!
User avatar
TechnoTone
Posts: 165
Joined: 23 Aug 2005, 22:02

Post by TechnoTone »

Lippy wrote:...Or even the more advanced wait commands; which i estimate over 95% of people don't know about...
Where? WHERE? It's not in the wiki.
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Post by jK »

He refers to CMD_TIMEWAIT, CMD_DEATHWAIT, CMD_SQUADWAIT and CMD_GATHERWAIT.

You have to bind them yourself in uikeys.txt
User avatar
TechnoTone
Posts: 165
Joined: 23 Aug 2005, 22:02

Post by TechnoTone »

Ah, those. I remember seeing them before but I had forgotten.
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Post by Warlord Zsinj »

You can say something similar about pretty much every widget.
Yes, I have similar feelings about every widget.

I think abstracting them into full player use was a bad idea for both level playing fields, and for modder control.

Having so much variability on the player's end is just a recipe for disaster, especially where gamedesign for mods is concerned.


[flameshield on ;) ]
User avatar
LordMatt
Posts: 3393
Joined: 15 May 2005, 04:26

Post by LordMatt »

I think this is a really cool widget, but it seems not to work in Linux Dual screen mode. The version on UF essentially disables right click when you have more than two units selected, and a second version jK sent just does the default behaviour. Strangely it works fine in single screen mode, but dual screen mode is pretty important to me :(.
Gnomre
Imperial Winter Developer
Posts: 1754
Joined: 06 Feb 2005, 13:42

Post by Gnomre »

Lippy wrote:
Warlord Zsinj wrote:This would ideally be under modders control, rather then user control.

It's a pretty big advantage to be giving to players 'in the know'.

Which isn't to discount the fact that it's an excellent achievement, well done jK.
Bah, do you know how many people don't know that holding SHIFT and ALT they can build squares of buildings? Or the wait command? (Or even the more advanced wait commands; which i estimate over 95% of people don't know about). And these features are built in.

'Players in the know' are the players who can be bothered to check the forums/unknown files and deserve to use this widget.

Oh yeah, and awesome script jK.
Difference is, those are built into the engine. Everyone has them, not everyone knows how to use them. Some people might read about it, some might be taught, some might find out on accident, but it's always been a level playing field from step one.

Widgets which are based solely on a user seeking them out and installing them himself (and are not strictly GUI rearrangements, which is permissable) is not exactly fair. Yes, it'd be slightly more fair if this widget was packaged with the engine installer, but what about the next widget? And the next? And the one after that? Where is the advantage/disadvantage line drawn for including a widget in the installer and expecting users to trawl download sites or forums to find out how they can level the playing field against their opponents who are outperforming them due to an enhancement only they have? Or even better, what if someone like jK shows up, makes this kind of widget, but keeps them to himself? There's no rule or sync or anything to make sure every user has the same widgets or that every author has to publish them.

It's barely a step below aimbotting in the wrong hands, and worse, it's not even protected against in the least except for word of mouth "don't play with that guy" on the lobby. It's bound to happen, unless we're quite happy with the same 200 people for the rest of time.

JK, don't get me wrong, it's nothing personal. The core of this widget is a good function. I just don't think this kind of thing should be left up to the users.
User avatar
Felix the Cat
Posts: 2383
Joined: 15 Jun 2005, 17:30

Post by Felix the Cat »

TBH the best solution that is intermediate between "widgets are very useful, let anyone use whatever they want" and "widgets are bad, banwagon them" is the oft-suggested "display which widgets a player is using in lobby, and allow the host to enable or disable certain widgets globally".

This way, you'd be able to have all your widgets in casual battles, but competitive battles and ladder games would have strict rules on which widgets are allowed.

We've been having conversations like this for a LONG time (all the way back to when GroupAI functionality was introduced) and I think this is the most reasonable solution that has been proposed.
Post Reply

Return to “Lua Scripts”