custom formation+1

custom formation+1

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

Moderator: Moderators

Post Reply
bishop181
Posts: 4
Joined: 12 Jun 2010, 03:30

custom formation+1

Post by bishop181 »

v3.1.03

http://springfiles.com/2670

This is my first attempt at a customizing a widget & only learnt lua this week, so don't flame me to much :p

This is a modification of customformation2 (v3.0) by Niobium Which is based on 'Custom Formations' by jK and gunblob.

It puts units into upto 3 rows ordered by hp/cost. construction units always at the back. adds weighting to units w/ high trajectory & <90% health to move to back. enjoy

todo:

its a bit slow, needs to be made faster, some of the processing can be done earlier.

better ordering (units which cant shot over each other all need to be in the front row (and those that can in second<)). ensure aa units are at the back.


align units to centre if not in the front row.

all feedback welcome
Last edited by bishop181 on 15 Jun 2010, 22:55, edited 3 times in total.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: custom formation+1

Post by Beherith »

Pretty good idea, Ill go try it out.
Welcome to the forums!
User avatar
manolo_
Posts: 1370
Joined: 01 Jul 2008, 00:08

Re: custom formation+1

Post by manolo_ »

cool idea, i hope you optimize it soon :)
User avatar
Hobo Joe
Posts: 1001
Joined: 02 Jan 2008, 21:55

Re: custom formation+1

Post by Hobo Joe »

It would blow my mind to have a widget that automatically ordered my zeuses, snipers, and aa in nice rows.


Does this take range and ground/aa into account?
bishop181
Posts: 4
Joined: 12 Jun 2010, 03:30

Re: custom formation+1

Post by bishop181 »

In away, units w/ longer range generaly have lower hp/cost, so yer, would be towards the back. havent looked at AA yet, but yer, will ensure their at the back @ the next release.
User avatar
Hobo Joe
Posts: 1001
Joined: 02 Jan 2008, 21:55

Re: custom formation+1

Post by Hobo Joe »

bishop181 wrote:In away, units w/ longer range generaly have lower hp/cost, so yer, would be towards the back. havent looked at AA yet, but yer, will ensure their at the back @ the next release.
Well, taking into account range would be nice. i.e., if you had banishers and raiders you'd want the raiders in front, even though they have less hp, same with fatboy/zeus etc.

Looks promising though, keep at it. :)
bishop181
Posts: 4
Joined: 12 Jun 2010, 03:30

Re: custom formation+1

Post by bishop181 »

Hobo Joe wrote:
bishop181 wrote:In away, units w/ longer range generaly have lower hp/cost, so yer, would be towards the back. havent looked at AA yet, but yer, will ensure their at the back @ the next release.
Well, taking into account range would be nice. i.e., if you had banishers and raiders you'd want the raiders in front, even though they have less hp, same with fatboy/zeus etc.

Looks promising though, keep at it. :)
yer, that would/should happen:
unit: hp/cost(metel);
fatboy: 7000/1418 = 4.94
zues: 2975/329 = 9.04
fatboy has lower hp/cost so fatboy would be at the back.
banishers: 2250/939 = 2.4
raider: 1685/211 = 7.99
so again, banishers have lower hp/cost, so again would be at the back.
so as you can see, this rule holds true for these units. I have tested banishers/raiders, and they are in said order.
Post Reply

Return to “Lua Scripts”