PDA

View Full Version : How to make Historical Battles



Dragoncrusader
10-16-2004, 10:59
How to create a Historical Battle (version 1.2)

Historical battles have a number of advantages over Custom battles that means it is really worth the extra time it takes to create them.
• You can write you own text to add a story to your battle.
• You can position units anywhere on the map at the start of the game to get more complex battles.
• And best of all you can program the ai! Want the ai to ambush your forces in a mountain pass or fight a retreat across a wide plain or have the Vikings land from ships while your Saxons hurry up from inland or get the ai army to sally out from a castle so that you can fight outside. It can all be done with a bit of basic knowledge.
• You can change the look of your troops

The battle information is kept in the MTW/Battle/batinit/historical battles folder and an a readme file about the ai called AISCRIPTINGINSTRUCTIONS at MTW/Battle with some of the information files in MTW/Battle/Flags or MTW/Campmap/shields or MTW/Loc/Eng.

The way to create a new historical battle (HB) is to create a new folder in MTW/Battle/batinit/historical battles and name it with your new name. Copy the adf and bdf files and the tga image file from the Bannockburn folder. This will give you a simple template to overwrite.

The Battle Description File
• Rename the bdf file with your new battle name and open it with a simple text editor like NoteTab. Replace all references to Bannockburn with your new battle name – except the map.
o StartposName – this sets the factions that are available and is usually set at ‘early’. You only need to change it to ‘viking’ if you want to use factions from that part of the game
o Predefined –
o Title - write battle name in here
o Author – here is your chance for 2 minutes of fame
o Rating –
o Description – write in here any text that you want to appear on the introduction screen
o Conditions - write in here what conditions you have to fulfil to win the battle
o IntroFMV
o OutroFMV
o MapName - Change the MapName to a map of your choice.
o Architecture - Change Architecture AT_(DARK_AGE_EUROPEAN EASTERN_EUROPEAN ISLAMIC SOUTHERN_EUROPEAN WESTERN_EUROPEAN WINTER)
o Terrain - Change Terrain (ARID LUSH ROCK_DESERT SAND_DESERT TEMPERATE WINTER) You need to check that the map you are using will allow all these terrain types. Look in MTW/Battle/Maps and check the notes for each map. Battle may fail to appear on list if an incorrect terrain type is used.
o BattleType::BATTLE_TYPE_HISTORICAL
o Deployement – true or false does not seem to affect anything
o Season - Change Season (spring summer autumn winter) to fit the map.
o WeatherSequenceId - Number sets weather for battle 0 clear 1 clear 2 rain 3 Heavy Snow 4 light snow and fog 5 light snow 6 light snow 7 light snow 8 light snow 9 mist ( I cannot find where you get a sandstorm from!!!!!)
• Change Player details
o Add a new name
o First number is the faction(for early these are 0 Rebel 1 Almouhad 2 Byzantine 3 Danish 4 Egyptian 5 English 6 French 7 German 8 Italian 9 Polish 10 Russian 11 Spain 12 Turkish 13 Aragonese 14 Burgundy 15 Mongols 16 Hungarian 17 People of Novgorod 18 Papal 19 Sicilian 20 Swiss and for Viking they are 1 Irish 2 Mercians 3 Northumbrians 4 Picts 5 Saxons 6 Scots 7 Vikings 8 Welsh )
o Second number is the alliance number. Always set this number to the same as the faction of the main army for that side and then all the allied armies need to use the same number.
o LOCAL OR ARTIFICIAL sets whether this player is ai or human. You can only have one LOCAL army.
o “Text” is the army name and must relate to an .adf file. You need one .adf file for each army
o 0 no idea
o True/false true sets army to attacker, false to defender.
o Next two numbers are the general unit’s map co-ordinates and determines for your general the starting position of the camera.
o The final number is the direction of facing 0 is north and 180 is south
o Set culture to appropriate to faction - (MUSLIM PAGAN CHRISTIAN ORTHODOX) _CULTUR0045
o If you want to add more players do so here by copying and pasting the player section and then changing the details to how you want them. You can only have ONE army from each faction, so if for example you want to create two French armies, you would create the first as normal and then use another faction, say Burgundy as the second. In order to get the second army to look French, copy the TGA image file for the French from MTW/Battle/Flags and the .bif image file from MTW/Campmap/shields using the small size of file. Paste these files into the battle folder and rename them to match the army name of the Burgundian army. I am afraid that the unit shields on the battlefield will be that of the faction that you are using and since these are determined by unit it would be a huge amount of work to change them all. So pick a faction that is close to your own in style or Rebels or Swiss which are grey.
• If you want to define an area on the battlefield, say the keep of a castle add it here in this format:
//areas
Area::1, CIRCLE 15558 35193 2000
• Triggers - Change the “” text to what you want to see on the screen like: Trigger 1 : “Protect the king or lose the battle” Trigger 2 : “Do not let your army be routed” Trigger 3 : “Break the enemy army or rout them from the field.” Change the faction numbers to match the army ones.
• If you want to add new victory conditions– change the triggers or insert new ones. Read the AISCRIPTINGINSTRUCTIONS guide to understand how triggers works and the victory conditions are listed below:
o Conditions format is: ‘Trigger::1, BT_GENERAL DIED CAPTURED FLED, factions 6, LABEL "Protect the General or lose the battle", INVERT_CHECKBOX’.
o First section of Triggers can be
 BT_GENERAL DIED and/or CAPTURED and/or FLED or BT_INCAPACITATE (to trigger when an army flees)
 BT_LIMIT, TIME n seconds, (to trigger after a given time)
 BT_CASTLE CAPTURED, num_areas 1, MEN 100, (to trigger capturing a given area of a castle with a certain number of men)
 BT_TROOPS DESTROYED, COUNT 4 (to trigger after a certain number of units have been destroyed)
 BT_AREA CAPTURED, area_ids 1, MEN 10, TIME 180, (to trigger after given area on the battlefield has been captured for a given period of time by a given number of men. Add MEN 1 FOE NO_MORE 0, to this string if you want to add the condition that they enemy must be destroyed first)
 BT_AREA RELINQUISHED, area_ids 1, MEN AT_LEAST 40, (to trigger if you want the player to be defeated if he fails to hold onto an area with a given number of men/time)
 BT_TROOPS DIED FLED CAPTURED, PERCENT 60, (to trigger after a set percentage of troop have been killed or routed)
o Second section determined the faction number
o Third section is the label that will appear on the victory conditions screen.
o Fourth section if left blank will tick the check box on the victory conditions screen or will leave it empty if contains INVERT_CHECKBOX
• Results – change the faction numbers to match the army ones.
• Groups – this links the triggers to the results, so you have to have a group that matches each trigger and then assign whether it is a victory result or defeat result.
• Save file as a .bdf file.

Army Description File
• Rename .adf so that they match the army names that you gave them in the .bdf file. Copy and paste to add further armies.
• Open an .adf file
• The file is a list of units and each unit is laid out as follows:
o UnitStart::"Unit"
o InitialLeaderName - gives the units a name
o IsGeneral – true or false with true setting unit as army general
o Position – two number co-ordinate on the map with the first number being the x co-ordinate and the second the y co-ordinate. The average map is about 50k by 50k so a co-ordinate of 10000 40000 would be in the top left hand corner of the map. When placing units together you need to place them at intervals of 2000 for x co-ordinates and 1000 for y co-ordinates to allow them enough room to deploy. (Assuming they are facing north or south)
o Direction – facing direction of unit 0 north 180 south
o GeneralRank – number of stars for general
o LeaderHonour – sets generals honour level
o UnitMon::1
o TroopType – this sets the type of unit and you can find all the unit names listed in the MTW folder under CRUSADERS_UNIT_PROD_11
o TroopNum – sets number of men in the unit. Default level is Bodyguard 20 Cavalry 40 Infantry 60 and Spears 100.
o TroopHonour - sets soldiers honour level
o Columns – sets initial width of formation
o CurveRadius::1
o FormationType::FORMATION_CLOSE or _OPEN
o MeleeMode::ENGAGE_AT_WILL or HOLD_FORMATION or SKIRMISH
o FatigueLevel::FRESH or TIRED
o HoldPosition::true or false. If true units will be set to hold at start of game.
o GeneralIsDaimyo::false
o ArmourLevel – set level of additional armour
o WeaponLevel – set level of additional weapons
o UnitTag:: allows you to group units together so that the ai can issue them instructions
o UnitEnd::

Programming the AI
There is a guide called AISCRIPTINGINSTRUCTIONS which is found in MTW/Battle/Batinit which tells you how to program the ai to behave differently to normal. This allows you to bring on reinforcements, set up an ambush or set different victory conditions. The code for these instructions is added to the end of the .adf file for each enemy faction but if you have more than one enemy faction you must add code to all of them. This is quite difficult so either stick with one faction or do not try to adjust the ai when using more than one enemy army.

TGA and .bif files
TGA files are the image that appears on your generals flag and your units flags. The .bif files are the icon that appears next to the army name on the starting screen. Alter them as below:
(1) Load up Photoshop, or some other program that can handle TGAs.
(2) Load up a TGA from the game to use as a template.
(3) Load up the image that you wish to use, in Photoshop.
(3) Resize the image that you wish to use to the same size as the TGA from
the game (32 pixels by 32 pixels).
(4) Paste ths over the TGA from the game.
(5) Go to "Save As", select as TGA (TARGA etc).
(6) Rename the file to that which you want to call it - do not save over the
original unless you specifically wish to replace that TGA in the game.
(7) Click save, and select 24 bit when you are given the option.
(8) Place this TGA in the correct historical battle folder if it is not already
there.
(9) Resize the TGA in Photoshop to 18 pixels by 20 pixels and save it as
something different e.g. "Temp1", again in 24 bit.
(10) Use the CA BIF/BUF utility (downloadable at the org) Purpgrab to
convert this to a BIF.
(11) Give this BIF the name of one of the protagonists in the battle whose
name is encoded in the BDF file (see DragonCrusader's guide).
(12) Place this in the appropriate historical battle folder, overwriting the
original if need be, ie. if you want to replace a pre-existing BIF.
(13) Have a drink, you should be done. Load it up and see

Notes
The historical battles supplied with the game store their text files elsewhere and I have been unable to find these so far. But the game works well enough with the text in the .bdf file.

Historical Campaigns
So you have mastered Historical Battles and are looking for a new challenge?
Historical Campaigns are very similar and consist of a series of historical battle folders and files inside a historical campaign folder. The Campaign Folder is located in MTW/Battle/Batinit/historical campaigns folder in with the rest of the historical campaigns. The Campaign folder contains the various battle folders and a HCF file a HCD file and any TGA and .bif files that you want to add icons and flags for your character.

HCF file
Contains the following which can be opened and saved with NoteTab.
//
// England 100 year war. (Campaign folder name)
//

CampaignStartpos::"early" (as per .bdf, use viking for VI campaigns)

NumBattlesInCampaign::3

BattleName::"Crecy" (these are the folder names of the battles in the campaign folder)
BattleName::"Poitiers"
BattleName::"Agincourt"

Predefined::true

CampaignName::"England 100 Years War" (text which appears on the campaign intro screen)
Description::"England_100yrs_War_Description_Label" (description that appears on the campaign intro screen. Write your own text in here)

SortOrder::1 (this is the position that the campaign occupies in the list of campaigns on the introduction screen. Add a number higher than the existing number of campaigns)

The .bdf for each battle
Each .bdf for the individual battles is slightly different in that the result line that contains the victory result has an addition to the end of it. This defines the next battle in the sequence. For example:

Result::2, alliances 5, style VICTORY, battle "Poitiers"

The final battle in the sequence replaces the next battle file name with the text …… VICTORY, end COMPLETED_UNLOCKED

Contributions from Dragoncrusader, Ambrosius Aurelianus

AmbrosiusAurelianus
10-16-2004, 22:38
Excellent guide. Thanks very much for sharing your research. I would only add that you can change the BIFs as well as the TGAs by resizing the TGAs to 18 pixels by 20 in Photoshop, pasting your desired image over, and resaving under a desired filename. You can use CA's BIF/BUF utilities to convert the TGA into a BIF. Then as long as you give it the right name your battle should use it.
The only problem that I still have is that I cannot make the Historical Battles use units from mods, and that I cannot make my units deploy even though I set the deployement (sic) line to "TRUE". Any ideas anyone?
Thanks once again to DragonCrusader. :bow:

Dragoncrusader
10-20-2004, 08:00
Yes I have seen one or two of these .bif files but never knew what they did. Can you explain?
Have done the first battle controlling the AI - and it works!

AmbrosiusAurelianus
10-20-2004, 18:11
The BIFs should be the flags as icons not as battle flags ie. when you load up the game and go to single player, then historic battles, then the battle itself, you should see the description and the shields of the participants. These are BIFs. They are also the ones on the menus in game. They have to be resized before conversion from TGAs or they come up too big. Congratulations on getting your first historic battle done. My "Hastings as Harold" is all but done: I only have to playtest, but have not had the time to do so. Then it shall be Bosworth as Richard III. A horse, a horse....!
:charge:

Dragoncrusader
10-22-2004, 07:54
I shall have a go with changing the flags and icons now. I shall download the convertion utility from the org and have a go. ~:)
If you are using the standard maps, how about emailing your battles to me and I will give them a go. Are you using the ai coding to control the battle?Also I think that I will ask the moderator to put the guide somewhere where people can access it in the future - do you want to update it and add in the bits that you have found and especially about the images.

Mithrandir
10-23-2004, 05:27
Sticky for a while.

AmbrosiusAurelianus
10-23-2004, 22:51
If you are using the standard maps, how about emailing your battles to me and I will give them a go. Are you using the ai coding to control the battle?Also I think that I will ask the moderator to put the guide somewhere where people can access it in the future - do you want to update it and add in the bits that you have found and especially about the images.

If you'll PM me your e-mail address I'll send you the Hastings version I have done, after some final changes that I at last have time to make. At the moment I have not reprogrammed any of the AI in the Historic Battles because it already does what I want: all I'm doing is changing the units, flags and the like to suit me. I have been tinkering with TheSilverKnight's excellent Bosworth battle so that I can play as Richard III; then I shall do Stamford Bridge with the proper banners and units.
I'll rewrite the stuff about the flags into something coherent, as you requested. I think that it is good that the moderator is allowing us to continue with this discussion, because although I am sure that it is all very obvious to those that have been modding for ages, it is notoriously difficult to get replies to some basic stuff if you're new at it. There is some good stuff about modding factions, units, and campaigns in the archives, but not so much if you just want to change historical battles. As you said before they are basically a custom game with more options. The last remaining thing that I don't know is how to use units from mods in them. Hopefully time will tell.

AmbrosiusAurelianus
10-27-2004, 17:53
Okay, so at last I have time to put up the information on how to make the TGAs and BIFs for historical battles. Follow these steps. THis might not be the best method, but it has certainly worked for me.

(1) Load up Photoshop, or some other program that can handle TGAs.
(2) Load up a TGA from the game to use as a template.
(3) Load up the image that you wish to use, in Photoshop.
(3) Resize the image that you wish to use to the same size as the TGA from
the game (32 pixels by 32 pixels).
(4) Paste ths over the TGA from the game.
(5) Go to "Save As", select as TGA (TARGA etc).
(6) Rename the file to that which you want to call it - do not save over the
original unless you specifically wish to replace that TGA in the game.
(7) Click save, and select 24 bit when you are given the option.
(8) Place this TGA in the correct historical battle folder if it is not already
there.
(9) Resize the TGA in Photoshop to 18 pixels by 20 pixels and save it as
something different e.g. "Temp1", again in 24 bit.
(10) Use the CA BIF/BUF utility (downloadable at the org) Purpgrab to
convert this to a BIF.
(11) Give this BIF the name of one of the protagonists in the battle whose
name is encoded in the BDF file (see DragonCrusader's guide).
(12) Place this in the appropriate historical battle folder, overwriting the
original if need be, ie. if you want to replace a pre-existing BIF.
(13) Have a drink, you should be done. Load it up and see.

As I said this might not be the best method, but it has worked for me, so try it. ~:)

AA

Dragoncrusader
11-04-2004, 00:00
Hi
You will be glad to hear that I have managed to change all my icons and flags to ones that I want. So my crusaders now have a proper flag to fight under but I have kept the various faction colours so that I can recognise my troops from allies.
I have updated the guide again and added in your image section. I have added two other sections, one on setting battle conditions and the other on defining an area on the battlefield. The new battle conditions are good if you want to make a condition of winning the battle, the capturing of a castle but there are other ones which look quite useful. I had a look at the historical campaigns, especially the Barbarossa ones and these really make it clear how they work. So I am going to try to incorporate these into the battles. Makes a change from just trying to slaughter the enemy. I thought that they would be useful in the forthcoming 'Field of Blood' battle, as there is no way Roger of Antioch can survive but I can set the player another task which might be achievable. Just an idea but to defend the Great Jeweled Cross of Antioch for 20 minutes. I could do this by defining an area on the battle field marked by a tent and to task the Crusader army with keeping at least 1 man in the area for 1200 seconds. Then the player wins the game if he can achieve this.

There are still a couple of queries, I would like to know where the weather file is and how it works and about this deployment thing. I wonder if your modded units will not appear because they are not exactly files in the same place as the ordinary units. I found the shield icons in a file recently and wondered if I could change the shield image. Oh by the way faction 14 is Burgundy! Obviously a test faction. I do not have any modded units so I cannot experiement.

In the RTW mods forum, NinjaCool has posted about 15 historical battles which are very good. I mentioned this guide to him and have asked how he does the RTW ones. I have not even looked at it yet.

AmbrosiusAurelianus
11-08-2004, 20:31
There are still a couple of queries, I would like to know where the weather file is and how it works and about this deployment thing. I wonder if your modded units will not appear because they are not exactly files in the same place as the ordinary units. I found the shield icons in a file recently and wondered if I could change the shield image. Oh by the way faction 14 is Burgundy! Obviously a test faction. I do not have any modded units so I cannot experiement.

In the RTW mods forum, NinjaCool has posted about 15 historical battles which are very good. I mentioned this guide to him and have asked how he does the RTW ones. I have not even looked at it yet.

Sorry, I cannot help you with the weather or the deployment. If you are thinking about installing a mod then XL is the best IMHO. I've tried BKB's and MedMod, and both are good, but XL is the best I think. Thanks for incorportaing the stuff on images into the guide.

I have played NinjaCool's Battles, and yes they are good. It would be nice to try to amke a few for RTW.

I think that you can edit the shields, I found the file once too, but I think that it only really matters if you want to edit campaign factions; I don't, so I've never bothered. There is a blank template set that someone made. I have it saved somewhere, but I have forgotten where I downloaded it. I could e-mail to you if you wish.

At the moment I have been busy with RTW, so I have not been doing much MTW stuff for a while. When I get back into it and make some new battles I'll send them to you.

TonkaToys
11-09-2004, 14:20
Thanks for the great guide... are there any examples that anyone has created which we can try out?

AmbrosiusAurelianus
11-09-2004, 19:39
Watch this spot! I think DragonCrusader is planning to upload a few when he can get the chance. ~:)

Dragoncrusader
11-15-2004, 09:12
Hi
Have been very busy this weekend and have corrected a number of errors in the guide, added the Historical Campaign section and wrestled with getting the ai to control three enemy armies at once.
But I now have three battles ready, the Pass of Death, Ascalon and Dorylaeum. Still having trouble with my .bifs, they either come out too big or all blotchy.All I want is one .bif with a shield of St George on it.
Oh well back to the images.

Mithrandir
11-15-2004, 12:06
Can you post what you have so far please?

Dragoncrusader
11-16-2004, 08:57
Good morning Mithrandir
Between us we have four new historical battles. I have read the upload guides but cannot see where to post to get the battles into the historical battles section of the downloads section. Can you help?

AmbrosiusAurelianus
11-16-2004, 22:30
DragonCrusader,

I didn't realise that you were so close to upload, or I would have pulled out more stops and increased our number of historical battles. I am extremely busy at present, but I might be able to update the material on the BIFs in the guide. I have some new information, or rather some older info that I might be able to work into a usable form. Did you receive the BIF that I sent you? If not I can resend it. Let me know if you need further help on materials for your battles, because you churn them out more quickly than I at present, and I can help with the flags and icons if you want. Come Xmas holidays I'll have a few more battles for you. ~:)

Dragoncrusader
11-18-2004, 07:31
Hi
I would not worry about it at the moment. I have not found out how to upload yet or how it works. ~:confused:
I think that we can upload the battles one by one as we go along and I was going to experiment with the Pass of Death and Ascalon as they use standard maps. Then to move onto other ones around Christmas.
The Guide is growing daily and if you email me the sections you want to amend or add to, I will add them into the next version. I have added version to try and keep track of where we are! Have still to work out how you get sandstorms - which I will need for a forthcoming battle.
I think that the .bif that I have at present will do fine. So I am ok on the image front.
Since I am doing the First Crusade series of battles, they all have pretty much the same elements in them and so I can create them quite quickly and just alter the tactical problems. I will slow down from now on as I am moving onto new territory and also I am back to the day job on Monday!

Mithrandir
11-18-2004, 14:24
I believe you can upload them in the section of MTW, with a description. Barocca will then move them to the appropriate section when he finds time (usually uncanny quick).

In the meanwhile you can upload them to the MTW test section and post the links to to the files in this thread...

Thanks,
Mithrandir.

Dragoncrusader
11-28-2004, 09:09
Sorry guys,
have tried to upload the battles onto the Org site and they look as if they have gone but they still have not appeared on the download site. Have emailed to ask what I have done wrong. Watch this space...... ~:confused:

Dragoncrusader
01-03-2005, 09:40
Update on the new battles available. I have uploaded 8 new battles but they have not been transfered into the download area. But you can download them if you do to the UPLOAD area on the Org front page. Any problems let me know and if you get really stuck send me a private message and I will email them to you.
Happy New Year
Dragoncrusader

AmbrosiusAurelianus
01-03-2005, 16:03
Well at last people should be able to have a go at some of the battles. Maybe we can get more people into making them and increase the number on offer. Does anyone want to start a feedback thread so we can get peoples ideas for future battles?

Happy New Year to one and all,
Ambrosius.

Age
03-06-2005, 05:36
Can you use Viking ships in custom battles?Thanks

AmbrosiusAurelianus
03-26-2005, 16:02
Can you use Viking ships in custom battles?Thanks

Erm, certainly not in custom battles. If you mean in historical battles then the answer is still no, as far as I am aware. Never been asked that before lol. ~:)

King Bob VI
04-22-2005, 20:18
H, I'm new, and I would like to try Dragoncrusader's Historical Battles, but I can't seem to find them. Link, please? Thanks.

Mithrandir
06-29-2005, 17:23
Copied to Tech dojo.