Custom Formations 2 - Page 6

Custom Formations 2

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

Moderator: Moderators

User avatar
Niobium
Posts: 456
Joined: 07 Dec 2008, 02:35

Re: Custom Formations 2

Post by Niobium »

A wild update appears ! (and rezzes the thread)

v3.3:
-----
- Fixed possibility of lines exiting the map, which could mangle orders or prevent them being issued.
- Clicking and dragging from a guard command will begin a move formation line.
- The control key modifier will now cause units to move at the slowest units speed for formations.

As usual the latest version can be found at the widget database.

Important to update due to the first change, the bug is reasonably rare in general use but for formations near the map edge (often with air units) it is more common.

The second change is for when your cursor is over an allied unit, which will turn your cursor into a guard command instead of the default move, the change allows you to start a move formation by dragging that guard command, which lets you do move formations without focusing on making sure you click the ground and not a unit. Great when you are in a rush.

The third change brings custom formations closer to spring functionality with the ability to slow down faster units in a group, but with all the usual formation goodness, works for any command. Also fixes previously-slowed units continuing to be slow on further orders.
User avatar
Jazcash
Posts: 5309
Joined: 08 Dec 2007, 17:39

Re: Custom Formations 2

Post by Jazcash »

I want your babies.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Custom Formations 2

Post by hoijui »

very nice! i like the last one the most, and very nice release post! :-)
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Custom Formations 2

Post by knorke »

nice.
but i saw this update only by chance and soon it will be lost. you should update first post of thread or make new one.
User avatar
Niobium
Posts: 456
Joined: 07 Dec 2008, 02:35

Re: Custom Formations 2

Post by Niobium »

knorke wrote:nice.
but i saw this update only by chance and soon it will be lost. you should update first post of thread or make new one.
I don't think the average spring player would be following the Development -> Lua Scripts forum anyway, this is really just for the mod-devs who should update the version they ship and then everyone will be updated.

What's funny though is that CA/Zero-K still run v2.3 of CF, good job guys.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Custom Formations 2

Post by Beherith »

Fixed possibility of lines exiting the map, which could mangle orders or prevent them being issued.
Much thanks for this, as I always get this when doing scout sweeps in FFA.
SirMaverick
Posts: 834
Joined: 19 May 2009, 21:10

Re: Custom Formations 2

Post by SirMaverick »

Niobium wrote:What's funny though is that CA/Zero-K still run v2.3 of CF, good job guys.
Thank you very much.
There have been some changes to the widget due to conflicts with other widgets. So updating it is not just about coping a file anymore.
User avatar
Niobium
Posts: 456
Joined: 07 Dec 2008, 02:35

Re: Custom Formations 2

Post by Niobium »

SirMaverick wrote:
Niobium wrote:What's funny though is that CA/Zero-K still run v2.3 of CF, good job guys.
Thank you very much.
There have been some changes to the widget due to conflicts with other widgets. So updating it is not just about coping a file anymore.
All of the changes that the CA team made to CF v2.3 to fix compatibility should never have been made in the first place (and shouldn't be transferred into v3.3), the compatibility problems were the fault of the other widgets, not CF.

There shouldn't be any reason to modify any of the code within CF, so if you do find a reason then please tell me so I can modify it/make it configurable and update it for everyone.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: Custom Formations 2

Post by Pxtl »

ZK has two separate commands mapped to rclick. No matter what there's gonna be some conflict.
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: Custom Formations 2

Post by Google_Frog »

There shouldn't be any reason to modify any of the code within CF, so if you do find a reason then please tell me so I can modify it/make it configurable and update it for everyone.
If you right click with multiple builders selected the gesture menu should come up instead of a custom formations line.

See it is stupidity to make something as specific as that a config.

Anyway if a version of a widget works why update? That is what I thought about the version before the currently used version. The current version has a new bug where lines that hit the edge of the map end up screwing up. This latest version apparently has fixed that so I'll look into updating it at some stage.

The best edge of the map handling I have seen was in a very old version. With that version the line stops when you leave the map and causes a big line along the edge of the map when you reenter. This was an easy way to make units move to a map edge.
User avatar
Niobium
Posts: 456
Joined: 07 Dec 2008, 02:35

Re: Custom Formations 2

Post by Niobium »

Google_Frog wrote:If you right click with multiple builders selected the gesture menu should come up instead of a custom formations line.

See it is stupidity to make something as specific as that a config.
I love this comment, you call the idea of configurable widget ordering 'stupidity', when it already exists as part of the basic widgetHandler and gives an easy, elegant solution to your problem.

Here's a quick explanation:
- The order in which widgets are asked if they want to take a mousepress is not random, it is determined by each widgets info.layer, with lower being asked first.
- CF has a relatively high layer of 10,000 (most widgets have a layer around 0)
- The gesture widget has a layer of 100,000, putting it after CF.

Now at this point you have two main options to solve it.
Option 1) Change the single layer number at the top of the file, in either widget, to get the ordering you want.
Option 2) Start hacking in logic specific to widget B into widget A's mousepress to stop it 'stealing' it, despite widget B deliberately putting itself behind widget A in the line.
Google_Frog wrote:Anyway if a version of a widget works why update? That is what I thought about the version before the currently used version. The current version has a new bug where lines that hit the edge of the map end up screwing up. This latest version apparently has fixed that so I'll look into updating it at some stage.

The best edge of the map handling I have seen was in a very old version. With that version the line stops when you leave the map and causes a big line along the edge of the map when you reenter. This was an easy way to make units move to a map edge.
Why are you defending the bad changes so aggressively? In attempting to scramble together supporting points for the changes you bring up ridiculous things like 'Why update a widget that works?', and incorrect claims about particular CF versions.

All previous versions of CF contain the potential for off-map lines, and all of them bug in the same way when it happens. Additionally every single version of CF2, from the initial to the latest, exhibit the same 'best edge of map handling I have seen'.
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: Custom Formations 2

Post by Google_Frog »

Hmm you're completely right about the command order, I keep on being trapped into assuming other people know what they are doing with widgets. In this case I did not write gestures or the modifications to CF so I assumed the workaround was used for a good reason. I did know about widget order and assumed the author of the changes did too and did not use it for a good reason.

I also thought there were other good reasons for some other changes to CF. For example single unit line move was disabled but on closer inspection the only reason is a small conflict with command insert.

The issue for me is that with a large code base it would take forever for me to do anything if I did not assume that strange looking bits of code were strange for a good reason. I have to assume competence of teammates. There are many examples of changes to widgets which are there for a very good reason.
Niobium wrote:All previous versions of CF contain the potential for off-map lines, and all of them bug in the same way when it happens. Additionally every single version of CF2, from the initial to the latest, exhibit the same 'best edge of map handling I have seen'.
There was a version of CF that did not have the off the map bug and always gave orders to your selected units. A later version did have that bug which is where my 'why update' statement comes from.
User avatar
Jazcash
Posts: 5309
Joined: 08 Dec 2007, 17:39

Re: Custom Formations 2

Post by Jazcash »

Wait what. This is my thread? Err, best to lock this and Niob create his own. I cba to update topic every time there's a change. Updated first post anyway.
Post Reply

Return to “Lua Scripts”