How to change the Battle For Europe Campaign

 


Under Construction


***Folders & Files involved:*****************


Data\Missions\MissionEngin : contains various sector scripts and additional information

    - BIGGOLD: for sectors with more gold than other sectors
    - SectorX.script.xml : contains the script for the sectors.
    - DirectionDataBase.script.xml : contains the script with directions ( neighbours of sectors)
    - EndMissionData.xml : default parameters
    - MissionEngine.dll : can not be touched without access to the source code, but is not needed to change sectors
    - smsSave.Xml : stores the last move information

Data\Missions\StatData\

    - SectorXX\
        - SecXX.txt : Tactical characteristics
        - SecObj00.txt : Victory Conditions
        - SecObjDefXX.txt : Conditions
        - SectorXX.m3d : the map
        - SectorXX.txt : addditional text information for capturing resources, pictures, etc ...
    - BigMapConst.dat : contains various constants for the campaign: resource income per sector, recruits, ...
    - Briefing.dat: contains map preview data
    - HeroArmy.dat: contains setup off the generals army availability
    - Quests.dat: contains setup off the quests for the various sectors
    - SecRevoltObj.txt: default message
    - Sectors.dat: contains the setup of the actual sector, the name, the ID, city position, initial owner, ...

Data\Missions\

    - Campaigns.txt : All Sectors making up the big map (Total amount + definition)
    - missions.txt: All files making up the sector ( map, text,...)

Data\Text\
    - BigMapData.txt : resources, text display on map, names, squads, defenses, sabotage , diplomacy, quests etc ...
    - BigMapHelp.txt : help display text

Data\
    - SectorXX.NDS : nation specifics for a particular sector

Data\Interf3\TotalWarGraph
   
    - bmSectMap.g17
    - bSectMap.g17
    - lva_Europe00.g17
    - lva_SectMiniMP.g17
    - lva_Sectors.g17
    -...
 


***Tools & Programs Needed:**************

- NotePad/WordPad (for .txt, .dat, .nds )
- Mission Script Editor ( trough Map Editor --> CTRL +E ) (on BFE : Data\Dialogs\ALLEDITORS.DIALOGSYSTEM.XML)  (for .script.xml)
- GigaPacker  (for .g16 , .g17)
 

***Further knowledge required:**********

- Map Editing ( for new .m3d) 
- Advanced map Editing ( for zones, ...)
- Specific map editing (for campaign scenario & quests)
- Basic Nation Editing ( for sector.NDS)
- Basic Text Editing ( for various .txt files)
 


***Suggested method of operation:*******

- Start by modifying one sector, make a change to one file and look how it reacts, and slowly and gradually continue to change an existing sector untill you fully understand which files are working toghether.
Once you are confident, then start by planning where the new sector will be located, what specifications it will have,...(write down a blue print on paper).
Then gradually start implementing the various new files ( md3, scripts, text files, sector nds, ...)
Whenever an error occurs , engine.exe will usually report wich error and where to locate it. If however it doesnt tell you specifically which file causes an error, revert back to a previous working version. If all fails, please contact me.

Notes:

- Always work on a copy of your game to avoid re-installation.
- Adding sectors is a mod, and as such if you wish to play Land War online, besides distributing your mod, you should also have a look in the Internet\ folder which contains set up for the Land War.

 

***Detailed File Information***********

- Data\Missions\MissionEngine\MissionEngin.dll : (optional)

As stated, to change this you would require the source code, which you don't need for adding or changing sectors. What this programm does is draw the interface and make the connections between the various files,...
Should for some reason ( depending on what you want to change) you need the source code or more detailed information from the source on these, you can either wait till GSC releases the source code in their anniversary box next year, ask GSC directly or ask me. In any case I will have to ask GSC aswell if it's 'ok' to share this with you.


- Data\Missions\MissionsEngine\SectorXX.script.xml (required)

You can choose to manually set these up with notepad or wordpad, but there is actually an editor build in game which makes it easier to understand. You can access this editor by going to the map editor and pressing the hotkeys CONTROL + E. A list like on the picture below should appear. If this list does not show, because you are on Battle for Europe ( 1.3-1.4) then you need to download or copy Data\Dialogs\ALLEDITORS.DIALOGSYSTEM.XML ( See above for link **Tools & Programms Needed***)



Select the Mission Script Editor from the class editor list.

This will open the next screen:



1. Click on 'add...' CScript.
2. Click on the Load button to load any existing SectorXX.Script.xml should you wish to look at an example
3. Click on the + button to open up the script folder.




1. Script Name: SectorXX & Nation Index Number
2. Type of script : CKillEnemy00 or DirectionDataBase ( see below)
3. Difficulty folder settings
4. Zone's & Quest & Rewards (Prizs) set up
5. Zone name as placed on the .m3d map ( for more information about zoning : (insert link)
6. UnitType that triggers the quest. If this particular unit is in the defined zone, the quest will be given
7. Direction: 0 - 512 ( 512 is East)
8. Page Name: internal display name for which "page 3" is to be displayed on giving the quest. The actual information is stored in Data\Missions\StatData\SectorXX\SectorXX.txt . In this case for my english version it reads as

#page3  Missions\Pictures\message 4

Sir, the carts with our provisions, ammunition and money are being delayed by the enemy. 
The courier who reported this fought his way back to us. We have to clear the roads immediately!


9. Don't forget to save your script. It doesn't matter where you store it, as long as you correctly refer to it in the Data\Missions\Missions.txt. It is advisable to keep your sectors scripts in the same folder as the original one's but perhaps a sub folder named (ADD or MOD)


- Data\Missions\MissionsEngin\Directiondatabase.script.xml (required)

This editor is the same as the previous one ( Mission Script Editor), the only difference lies in the script type. The above (see number 2) script was a CKillEnemyScript, this one is a DirectionDataBase Script.



1. Load up the already existing direction data base script.
2. Here you define directions for the sectors.
For example "from sector ID:1 to sector ID:0 , the direction is South. This means Sector 1 lies north of sector 0.
If you move sector 1 on the map to the west of sector 0, then the direction to use becomes 'East'

Again, don't forget to save the changes.

A special note about these class editors: you can actually select any child dialogue and press control + C to copy and control + V to paste. If you have a lot of similar entries to make, then this can be quite handy.

- Data\Missions\MissionsEngin\EndMission.xml (optional)

Contains default resource settings and experience parameter gained on ending a 'sector'.

- Data\Missions\MissionsEngin\SmsSAVE.xml ( optional)

Stores information on which sector the player was on the last move, which army and sectors occupied, etc...

- Data\Missions\StatData\SectorXX\ (required)

Contains the .md3 map prepared in the editor with the help of Battle Editor + textfiles for display of text ( quests, ....) .

- Data\Missions\StatData\BigMapConst.dat (optional)

Contains various default constants for the various sectors. Income resources from sectors, maximum recruits, sabotage prices, sabotage percentage, start resources, defence parameters, experience, tower colors, ...

- Data\Missions\StatData\Briefing.dat ( required)

Contains the preview coordinates (x, y) for the various sectors. If a new sector is added then one should acccordingly change this file aswell.

- Data\Missions\StatData\HeroArmy.dat (optional)

Availability of units to the general depending on how much experience. Units here should be defined in the sector.NDS files.

- Data\Missions\StatData\Quests.dat ( required)

Contains the setup of who attacks who (nation vs sector), the probability of the attack (%) and the nature of the attack ( attack nation, capture sector, Defend sector, sell sector, add gold, delete gold, rebellion,...)

- Data\Missions\StatData\Sectors.dat ( required)

Contains the actual setup of the sectors.
Eg.

#SECTORN#           24 //Total Amount Of Sectors
#MAPSIZE#           990 825 // Map size in Pixels
#SECTOR#
ID                  0
// Sector ID
Center            111 12  // Center coordinates in x, y
SityXY            169 111 // City coordinates in x, y
FortXY            153 52 // Defensive coordinates in x, y
DefOwner        0 // Default Owner
Defence            0 // Defense level ( 0 - 1 - 2 - 3)
Population        0 // Default amount of population
SectorName          Sector00 // Sector name = script name
Neighbors           1     1  //Sector neighbours ID
Arrow            152 133 0 // Attack arrow coordinates in x , y
Villages            5 //Amount of villages
Ressource           4 // Amount of resource types
Owner            0 // Current Owner ( vs DefOwner : for rebellion allegiance)

- Data\Missions\Campaigns.txt (required)

Not entirely sure what this file does, but it looks like it puts together a list of the various sectors.
Eg.
24
#SECTOR00@ ON 1 1 1
/States that there are 24 sectors in total and then similar entries for each sector below the number. This means the engine will read trough the next 24 lines of text. If you have 25 sectors, you need to change this number accordingly.

- Data\Missions\Missions.txt (required)

This file puts a sector together.
Eg.

0                     / Some kind of constant, do not change
#SECTOR00@                 / #Sector name as seen in data\missions\campaigns.txt and data\text\bigmapdata.txt
Mission Name - Sector00.         / Mission name
Missions\MissionEngin\MissionEngine.dll / engine to use
Missions\StatData\Sector00\Sector00.m3d / map to use
Missions\StatData\Sector00\Sector00.txt / text file to use
1                    / some kind of constant ( 1: Big Map Campaign , 2:Skirmish & Battles)
Missions\StatData\Sector00\Sector00.txt / not sure why this file is repeated here


- Data\Text\BigMapData.txt (required)

Contains everything that will display visually on the campaign map. This file is used for translating to different languages.

It is straight forward.
Eg.

#CWV_WorldMap    Europe Map  / The #CWV_WorldMap is the internal name used by either the interface, missionengin.dll or any parameter file ( .xml, .dat,...) The second entry 'Europe Map' is what will display. So if you are on a russian version this is where you change the text.

#CHINT_WorldMap    Europe Map Menu ({CG}TAB{C}) / This is the hint that will show up. Notice the color tags {CG}Text{C} , these will show up part of the hinted text in the defined color. For color codes: http://www.visibone.com/colorlab/

For the rest it contains the names of the cities, sectors, hero's, ranks, ....
 
- Data\Text\BigMapHelp.txt ( optional)

Contains the text display on calling for help trough F1 hotkey. Not required to change.

- Data\SectorXX.NDS (optional)

Contains the set up of the nations to be played with on the partical m3d map. Which units are available, what buildings can be build,...This means each 'nation' can be different on a different map.
One can choose to use an already existing sector nds, clone an nds or create a new nds.
 
***Graphics*********************

There are a couple of graphic files involved ( see list above). They are mainly for the background such as the europe map, the sector and its transparant 'lva_Sectors.g17'
If new sectors are added, they will have to be included in these graphic files.
Graphics are in 32 bits .tga and are created with GigaPack. For further information about gigapack, please see here

Basic layout of the campaign map screen:

(Picture from an early version of an American Revolution mod by [HWK]Michael )

1. Data\Interf3\TotalWarGraph\lva_Europe00.g17
2. Data\Interf3\TotalWarGraph\lva_Sectors.g17
3. Data\Interf3\TotalWarGraph\lva_army.g17
4. Data\Interf3\TotalWarGraph\bm_defence.g17
5. data\Interf3\TotalWarGraph\lva_Nation.g17
6. Data\Interf3\TotalWarGraph\lva_SectMiniMP.g17

...
 

There are more things to be considered when changing this campaign mode. Depending on what exactly you want to do.  Some things, such as the actual setup of the quests, the use of the message manager, etc... I have not had time to write things down on these.
 
For more help & information: http://cossacksworld.ucoz.co.uk/forum/29