Page 1 of 1

custom formation+1

Posted: 12 Jun 2010, 03:38
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

Re: custom formation+1

Posted: 12 Jun 2010, 03:48
by Beherith
Pretty good idea, Ill go try it out.
Welcome to the forums!

Re: custom formation+1

Posted: 12 Jun 2010, 11:05
by manolo_
cool idea, i hope you optimize it soon :)

Re: custom formation+1

Posted: 12 Jun 2010, 20:39
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?

Re: custom formation+1

Posted: 12 Jun 2010, 21:12
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.

Re: custom formation+1

Posted: 13 Jun 2010, 21:30
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. :)

Re: custom formation+1

Posted: 13 Jun 2010, 22:38
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.