PDA

View Full Version : Formations



Duke John
12-13-2004, 15:11
Modding Resource Header

Title: Unit Formations

Posted by: Duke John

Modding area: Units (in battle)
Required programmes: Image editor capable of editing .tga files
Hardcoded limits: There can only be one formation set here. Any formation added will replace the Hord formation
Summary: The Horde formation is generated using dots in an image file. By re-arranging these dots, the shape of the formation can be changed, but you can only edit the existing horde formation. No new formations can be added.


__________________________________________________

Unit Formations

Horde
There is a file called horde.tga in \Data\battlefield\formation. From the dots I figured that this image acted as a template for the horde formation used by peasants and such. I tried several possibilities until I discovered that the different colours (there are about 55 green colours) didn't mean anything.

The horde formation is build up from the center of the image: x=367,y=373 and then some code is run that starts with ever growing circles (or a spiral) and each dot it finds is represented on the battlefield as an soldier.

So to test out the theory I made a grid of green dots in the center of the image:
http://chronicles.metw.net/org/guides/formation_horde_1.jpg

And the unit appeared on the battlefield in this formation:
http://chronicles.metw.net/org/guides/formation_horde_2.jpg
(Blue dot representing officers, and red dot the general.)

The center of the image should correspond with the center of the frontline of the unit.

The placement of the soldiers are horizontally mirrored. So if you want a gap in the formation on the left, you should leave out dots on the right.

Officers and generals are placed after all the soldiers and as such will always be placed on the outerside. Too bad since you cannot use this formation to place the general in the middle of the unit (which I had hoped for). The general is placed after the officer.

Cuthalion
01-06-2005, 17:33
Cool! Does this mean you can build formations yourself?! Can you help me to make a formation for swordsman? shields forward and swords forward too?
(if you have ICQ: 248-485-800 )

Duke John
01-08-2005, 09:22
No, that is not possible with this.

Cuthalion
01-08-2005, 20:27
euhm, so what does this do?

Duke John
01-09-2005, 14:38
Each dot represents a soldier. The original horde.tga looks like random placement of dots, which is excellent for the horde formation. If your mod doesn't use the horde formation, and you want for example a circular formation with a gap in the middle, then you alter the image. You can thus have something else than the standard rectangular shaped formations.

I researched this because I wanted to mingle officers among the soldiers. Too bad it wasn't possible, but since I researched it, I thought I might just as well write a little guide about how the horde formation is put together.

eadingas
01-10-2005, 12:40
What if you create 'square.tga', 'wedge.tga', etc. using this method? Will it work? Or maybe you can add new formations, by creating new pictures?

eadingas
01-16-2005, 13:18
Hmm nope, it doesn't seem to be working that way... did anyone succeed in making more than one formationname.tga?

HenryLet
01-16-2005, 14:15
You can change the position of the dots in the picture so that you can edit your own formation. I made up a new formation for the oplites which is almost invincible!! I formed a square of oplites composed by 4 units. Each unit of oplites points the spears into the 4 different direction of the square. So a unit points forward, an other backward, one on the right and the other on the left. There's no way to attack this "square of oplites" causing serious damages!! The weak point of every phalanx are the sides and with this formation I fixed the problem!!! It's a sort of a new militar tactic. Try it, it's worth. It defeats Roman legions easily as well!!

eadingas
01-16-2005, 14:21
Yes, but it's all about horde.tga, isn't it? And now, don't all barbarian troops have this formation? Or did you manage to get another formation type working, two?

Cuthalion
01-17-2005, 16:46
There's a formations.txt which allows you to make new formations..... try that....

eadingas
01-17-2005, 16:55
That's for group formations, not unit formations. All different thing.

Suraknar
01-28-2005, 04:28
Henry,

That is a nice tactic, however you don;t really have to mod it to make it work during a battle.

Either in Deployment phase or During a battle you can position any units in any desired patern and press the "G" key to make a groop of them and they will actually hold that Formation.

Nevertheless, using the formations file would be nice way to define some new Groop formations aswell. ~:cheers:

Marcus Caelius
08-27-2006, 15:37
It occurred to me that I could use this to better model the manipular legions by dividing each hastati or principes unit of 80 into two maniples of 40 with a gap between them as follows:

xxxxxxxx into xxxx-----xxxx

I set the centre point of the unit to be half way between the two maniples on the front rank.

The first time i tried this, the units became invisible, so i thought perhaps I'd spaced the men too close together (only 10 pixels separate).

When i tried it again having doubled the spacing, the whole graphics display became unusable. The program didn't crash exactly, but became very peculiar.

Any suggestions here as to what I might have done wrong?

Duke John
08-27-2006, 19:06
Can you show the tga?

Marcus Caelius
10-21-2006, 12:21
My apologies for the delay - i got caught up in something else

here it is in jpeg format

https://img99.imageshack.us/img99/8051/manipleqf7.th.jpg (https://img99.imageshack.us/my.php?image=manipleqf7.jpg)

Hanny
10-23-2006, 11:42
Try haveing your dots, set up in your manipular formation, ::: ::::

--------------------------------------------------- ::::


running acrosss the centre point of the tga and spanning the full lateral span of the tga, its a bit fiddly but once the puter finds the centre dot it just fills in from the start point which is the tga centre point, puts the officer at the front left hand side and calls it a day.

problems that can occur are more models than dots in the tga and sometimes grouping them all together on the deployment phase and locking up, but once you get a tga that givves you your ::: ::: :::
--------::: ::: you should be able to get mutiple maniples lines, or wedges, or whatever your looking to achieve.


the biggest drawback is the pathing for it on the battlefield, a line of maniples when it turns 90 degrees become a column of manipules, to avoid this you need to have a frontage and depth of the same number of maniples so tyhe formation retains this aspect after turning. It all depends on the orientation of the battlefiels, North south seems to be not a problem, but if attacked from east west the horde tga has a problem with directional control/orientation.