Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Modder's Guide, final version

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Brother against Brother: The Drawing of the Sword >> Mods and Scenarios >> Modder's Guide, final version Page: [1]
Login
Message << Older Topic   Newer Topic >>
Modder's Guide, final version - 6/5/2015 4:30:39 PM   
Gil R.


Posts: 10821
Joined: 4/1/2005
Status: offline
The modder's guide is now fully complete, so we figured I'd post the whole thing for any last-minute feedback and questions before Matrix formats it and adds it to the game. Have at it!

Introduction to Creating and Modding Scenarios

Creating or modifying “Brother against Brother” is done in two ways: working with specific scenario files, and using the scenario-editor in order to position units. All files that you will need to work with are standard text (.txt) files, though some are tab-delimited files which are more easily edited in a spreadsheet program like Excel or Open Office’s Calc. This is even true of the file that the scenario-editor uses to position units, as the editor makes changes to a specific .txt file, permitting one to do so far more quickly, efficiently and accurately than one could if entering the changes directly into that file manually.

Scenario Files: The Basics

All scenarios are located in individual folders within the SCENARIOS folder which is found inside the main “Brother against Brother” folder. As you can see by looking there the names of these folders correspond precisely to those of the scenarios in the game’s menu with two crucial differences: underscore characters take the place of spaces, and each folder ends with an ‘S’ (a capital ‘S’). Scenario folders’ names must follow these two rules. Also, scenario file names cannot be too long. (You will know that a name is too long if, when you load the game, the name appears on the same line as that of another scenario.)

Inside each scenario folder you will find files with the same generic names:
• AcwPlayers.txt: A file you should ignore. It does not affect the game at all, other than telling it that the USA is Player#1 and CSA is Player#2. (The fact that they are ‘1’ and ‘2’, respectively, is crucial for some of the other files to function.)

• MapTags.txt: This file is used to provide information that is linked to specific hexes on the map. If you type a word or phrase into it and a hex’s X and Y coordinates in the next line then that word or phrase will be superimposed on the map; or, if you do the same thing but begin the text line with an asterisk, you will produce one of those yellow question marks indicating hidden text that WCS has used to provide information about the battlefields.

• OrdersOfBattle.txt: The file devoted to putting all of the units, brigades, divisions, corps and armies into their correct place in the army hierarchy; assigning up to three commanders to each of these; determining all of the statistics, weapon types, etc. for each unit; and scripting the AI. (See next section.)

• Positions.txt: The file that uses six columns of numbers to identify every unit on the battlefield and assign it its starting hex, formation and facing. While this file can be changed manually, it is primarily changed by means of the scenario-editor.

• Preview.pcx: This is the graphics file for the small map that appears when selecting one’s scenario, showing the locations of Victory Hexes and the two sides’ forces. You can edit this file using a program like Photoshop or the free image editor GIMP.

• Scenario.txt: This file contains basic scenario information, including date, start/stop times, locations of Victory Hexes, weather conditions, and the scenarios’ introductory text. (See next section.)

• ScenarioCommanders.txt: While every general and officer assigned to a unit or brigade/division/corps/army is named in the OrdersOfBattle.txt file, it is in this file that their ratings are assigned. (See section.)

Important: When working with the scenario files, be very careful to use underscores for spaces where appropriate, or else the game will not work. (To know where this needs to be done, simply study the files that came with the game.) If you wish to leave a note to yourself or to other modders, put it at the start of a line and use // to get the code to skip to the next line.


Post #: 1
RE: Modder's Guide, final version - 6/5/2015 4:31:08 PM   
Gil R.


Posts: 10821
Joined: 4/1/2005
Status: offline
Main Scenario Files: Scenario.txt, OrdersOfBattle.txt, ScenarioCommanders.txt

The three files that are at the heart of each scenario require detailed explanation of how each column functions. Of the three, Scenario.txt is the easiest to use since it is a straightforward text file that can be opened, changed, and closed after saving. The other two, however, are tab-delimited, which means that they really should be edited in a spreadsheet like Excel or Open Office’s Calc so that the columns line up properly as one works on them.

Some Caveats when using a spreadsheet program to save text files for BAB: When you save your work in the spreadsheet, you ought to ensure that the file is saved in a plain-text, tab-delimited format. Make sure you are not saving with comma-separated-value or some similar option. Also note that the tab-delimiters ought to be set to “none” rather than something like apostrophe or quotation mark, as that will add extraneous characters to the file.

Scenario.txt
Each scenario.txt file is arranged in the same order. It is important to preserve this order. The elements are:
1. A line that says “notEditMode” (see below)

2. The game and scenario name

3. The scenario’s introductory text, which ought not to be longer than can fit in the scenario introduction box, about 2,400 characters.

4. A line with the name of the map files (four PCX files that fit together) and the file produced by the map-editor (with .gbmap as its extension), all of which are in the MAPS folder. There is no reason to change these.

5. The number ‘1’ is used to indicate that the Union is considered the first player to move in the scenario. There currently is no support for scenarios which would have the Confederate player move first.

6. The time when the scenario begins, using the number of minutes from midnight, followed by the time when it ends. (To create a multi-day scenario the number of minutes should be more than 1440 minutes (= 24x60), e.g. 2520 min. would have a scenario end at 6:00 p.m. of Day 2.)

7. The times of sunrise and sunset on the day the battle was fought.

8. The date when the scenario begins as well as the next six dates (permitting multi-day battles), in each case providing the date on one line and then the month and day on the next two lines.

9. The list of Victory Hexes, for which each line must provide X-coordinate + <space> Y-coordinate + <space> + Side. For the latter, one uses 0 if a V.H. is USA-only (blue hex), 1 for CSA-only (red hex), and 2 for one that can benefit either side (white hex). It is essential to end this list with ‘0 0 0’ so that the code knows it has reached the end.

10. Hour-by-hour weather, with the hour assigned in the first column (using military time, e.g. 17 for 5:00 p.m.) followed by weather type. If you want for the weather to be normal the whole time just use ‘0 0’ and then there will be nothing but “clear” weather. It is essential to end this section with ‘-1 0’.


(in reply to Gil R.)
Post #: 2
RE: Modder's Guide, final version - 6/5/2015 4:31:57 PM   
Gil R.


Posts: 10821
Joined: 4/1/2005
Status: offline
OrdersOfBattle.txt
This file contains all of the forces and commanders present at the battle as well as all of the basic information for the units and the AI scripting. It is a tab-delimited text file to be opened in a spreadsheet program (see above). The columns of the spreadsheet, identified by both their label in the top row of each file and their column letter(s) in the spreadsheet, are:

1. PosID (A): Every unit or echelon has a sequential i.d. number, which is used in the Positions.txt file and by the code itself.

2. child (B): Shows the hierarchy of containment: the largest “container” for each side, normally an army, will always be ‘0’ and then any other container (e.g., a corps) or unit attached to it will be ‘1’. The highest number one will ever use will be ‘4’, for a regiment or other unit inside a brigade (3), division (2), corps (1) and army (0). (Note: It is possible for one side to have co-equal and independent 0-level containers. This was the case for the CSA at Wilson’s Creek, where neither McCulloch commanded the Western Army but not Price’s Missouri State Guard, and vice versa.)

3. playerID (C): Use ‘1’ for USA and ‘2’ for CSA.
4. ContainerUnitName (D): This is where the full name of every “container” (echelon group) and unit goes. Be sure to use <underscore> instead of <space>.

5. Truncated Name (E): Currently inactive. Will provide the option of using an alternative, abbreviated name (e.g., “1st Vt.” for “1st Vermont Infantry.” If not using a cell just leave an ‘x’ there and the code will default to the name in Column D.

6. ContainerUnitType (F): Every “container” and unit must be identified by type for the code to handle it properly, and this is done by means of assigning it one of the following standard U.S. Army abbreviations: AM, CORPS, DIV, BDE, CAVBDE, ARTBDE, REG, INFCOY, CAV, CAVCOY, HRSART, and ARTBAT.

7. IsHQ (G): For “containers” to be commanded their commander must be assigned a small “staff and escort” cavalry unit. To distinguish these from regular cavalry regiments a ‘1’ is entered in this column. (Note that the commanders themselves are named in the army/corps/division/brigade’s row, not the Headquarters unit’s row. As can be seen by studying each HQ unit’s row, they function like other units, needing to be assigned arrival times, strength, etc., and also having a “child” level in Column B that indicates attachment to their “container.” They do not need to have AI scripting, however, as the code has special routines that will ensure that HQ units go where their subordinate units go.)

8. BrigadeCommand (H): This column, which should only be used for an infantry or cavalry brigade’s or artillery battalions rows, is used to assign each brigade’s Brigade Order at the beginning of a scenario. These are the B.O.’s and the number to use: No brigade command (-1), March (0), Rally (1), Hold (2), Fighting withdrawal (3), Advance (4), Attack (5), Mass charge (6).

9. Red / Green / Blue (I, J, K): These three columns assign the color-coding used to indicate the hierarchies, both in the order of battle that is found on the left side of the screen and the circles and squares beneath the individual units. Colors, which are indicated using the basic red-green-blue (RGB) system with values of 0-255, should only be assigned to armies, corps, divisions and brigades – not units.

10. Officer1number (L): For the unique number of the general or officer commanding the “container” or unit. (See ScenarioCommanders.txt section.)

11. Officer1name / Officer1FirstName (M, N): Two columns for that officer’s name, with the first being last-first-middle and the second for presenting the name more properly. It is this second column that shows up on the screen. Be sure to use <underscore> instead of <space>.

12. Officer1rank (O): Assigns that officer his rank: GEN, MG, BG, COL, LTC, MAJ, CAPT, LT.

13. Officer2number / Officer2name / Officer2FirstName / Officer2rank (P, Q, R, S): Same as Columns L-O, but for the subordinate officer (normally of a regiment or other unit, but some “containers” have a secondary officer listed). These subordinates do not have a role in the game unless Officer1 is killed or severely wounded (or promoted to brigade command), in which case they take over, or unless their unit is split, in which case the second-in-command takes over.

14. Officer3number / Officer3name / Officer3FirstName / Officer3rank (T, U, V, W): Same as Columns P-S, other than that this third officer plays no role whatsoever unless the first or second is incapacitated (or promoted out of the unit). Note that if a unit is not to have a second or third officer these columns should each have ‘0’; if, however, there should be an officer but his name is unknown then use ‘0’ for the number and name columns, but assign him a rank.

15. CompaniesNumber (X): For infantry and cavalry regiments indicates the number of companies present, while for infantry and cavalry companies as well as artillery batteries indicates that the unit is company-sized. For infantry and cavalry regiments this figure also indicates the number of abstracted junior officers (normally captains, one per company).

16. MaxCaptains (Y): This column is used for mid-battle scenarios to let the code know that it should calculate how many junior officers remain to an infantry or cavalry regiment that has seen action: by replacing the ‘0’ with ‘1’ such a calculation will be made, using the ratio of current strength to starting strength to estimate how many officers have been killed or incapacitated. (Since infantry and cavalry companies as well as artillery batteries are already at company size their junior officers, normally two lieutenants serving under a captain, are represented among the unit’s three officers, and thus this function does not apply to such small units.)

17. StrengthCurrent (Z): Indicates a unit’s strength at the start of the scenario. (This figure should be the same as Column AA or AB if a scenario is set at the beginning of the battle.)

18. StrengthStarting (AA): Indicates a unit’s strength at the start of the battle.

19. StrengthStarting(Estimated) (AB): When accurate numbers for units’ strength are unavailable – a very common phenomenon – an estimated strength can be provided using this column. (One should choose between assigning unit strength via Column AA or AB, rather than using both.)

20. HistoricalCasualties (AC): This column is intended only for scenario design and is ignored by the code: when creating mid-battle scenarios, which requires estimating how many casualties a unit has already suffered, it is much easier to have its total casualties right there beside Columns Z-AB.

21. Encamped (AD): If a unit should begin a scenario in “encamped” mode a ‘1’ should be used, while if set to “guard” mode a ‘2’ is used.

22. UnencampMinute (AE): Uses the number of minutes past midnight (e.g. 420 = 7:00 a.m.) to set the time for when a unit in “encamped” or “guard” mode is activated.

23. ArrivalDay / ArrivalMonth / ArrivalYear (AF, AG, AH): Sets the date of a unit’s appearance in a scenario – superfluous information in battles fought on a single day, but essential for multi-day battles.

24. ArrivalHour / Arrival Minute (AI, AJ): Uses military time (e.g., 13 = 1:00 p.m.) to set the hour, and 0/20/40 to set the minute.

25. Quality (AK): Assigns a unit’s quality at the start of a battle.

26. Morale (AL): Assigns a unit’s current morale level (which at the start of a battle will be equal to its quality, whereas for mid-battle scenarios it will normally be lower for a unit that has been engaged in fighting). Note that it is possible to assign a morale level higher than a unit’s quality, if one wishes to have a unit begin a scenario especially eager to fight and confident of success.

27. Fresh (AM): If a unit should start a scenario “fresh” replace the ‘0’ with a ‘1’.

28. FatigueLevel (AN): If a unit should start a scenario “fatigued” replace the ‘0’ with a ‘1’.

29. FatigueProne (AO): This value is currently unused.

30. Attribute0 / Attribute1 (AP, AQ): Used to assign up to two “unit attributes” to a unit, indicating that some of its men have a particular specialty or that it has superior equipment, horses, etc. For the list of available attributes, see Sect. 20.8 of the manual. To assign an attribute, simply include its i.d. number: Sharpshooters (3), Pioneers (8), Baggage Train (9), Scouts (12), Military Band (15), Zouaves (16), Quality Horses (17). Note that, as specified in the manual, some of these attributes are currently inactive.

31. Special0 / Special1 / Special2 (AR, AS, AT): Used to assign up to three “special abilities” to a unit, indicating that its men are especially skilled in a particular area of combat or movement. For the list of available abilities and how they function, see Sect. 20.7 of the manual. While the majority of abilities can be employed for any combat unit, some are unavailable to particular unit types. To assign an attribute, simply include its i.d. number: Disciplined (1), Brave (2; no art.), Wild (3; no art.), Fast (4), Hardy (5), Oblique Fire (6), Diggers (7; no cav.), Night Owls (8), Independent (9; no cav./art.), Shooters (10), Flankers (11), Swampwise (12), Chargers (13; no art.), Steady (14), Blasted (15; no art.), Obedient (16), Foragers (17), Polar Bears (18), Woodsmen (19), Sustained Volley (20), Dreaded (21), Heroes (22), Resilient (23), Organized (24), Bulldogs (25), Thrifty (26; no cav.), Stalwart (27; no art.), Rangers (28; no cav./art.), Cautious (29), Aggressive (30), Tenacious (31; no cav./art.), Hill Defenders (32; no cav./art.), Uphill Chargers (33; no cav./art.), Efficient Fire (34; no inf./cav.), Anti-Battery (35; no inf./cav.), Abatis Fighters (36; no cav./art.), Bombarders (37; no inf./cav.), Streetfighters (38; no art.), Skilled Skirmishers (39; no cav./art.), Marksmen (40; no cav./art.), Mounted Infantry (41; no inf./art.).

32. Key4Special0 / Key4Special1 / Key4Special2 (AU, AV, AW): These three columns are ignored by the code, and are there so that one can note which special abilities have been assigned.

33. Supply (AX): This column assigns a unit’s starting supply, which in the case of infantry and cavalry corresponds to the number of rounds each man would carry into combat (normally around sixty), while for artillery it is more abstracted. This column is also used to assign each supply unit the supply from which it resupplies the combat units.

34. Weapon1 / Weapon2 / NumberOfGuns1 / NumberOfGuns2 (AY, AZ, BA, BB): The Guns.txt file in the DATA folder provides a database of fifty-eight types of firearms and artillery, in addition to a mixture of inferior types designated “Improvised,” and up to two of these types may be assigned to each unit via these four columns. The first two columns assign the gun type based on its i.d. number, which is from 0-58 and can be found in the first column of Guns.txt. The second two columns are used for infantry and cavalry units to indicate what percentage of their men carry one gun or the other, while for artillery they indicate the exact number of guns a battery has: thus to assign an infantry unit 70% Springfields (#4) and 30% Enfields (#6) the four columns would have 4-6-70-30, while an artillery battery with three 6-pounders (15) and two 12-pounders (16) would have 15-16-3-2. (See below on modding this file.)

35. FlagNumber (BC): If non-zero, specifies the flag displayed for the unit given by the flag’s left-to-right, top-to-bottom index in the file Gfx/Flags/ACW_HWFlags.pcx.

36. UniformType (BD): Currently unused. Presently units’ uniform graphics is determined by their quality and perhaps by unit attributes.

37. AlwaysInCommand (BE): At the heart of the command & control system in “Brother against Brother” is that units must be in command range of their brigadier’s headquarters, and he must in turn be close enough to his division in order to receive commands, etc. Sometimes, however, it would be unrealistic for a unit/brigade/division/corps to be penalized for being out-of-command – for example, at Manassas the Confederate brigadiers guarding fords knew their assignment and did not need to have a division commander close by – and in such cases they can be rendered always in-command by putting a ‘1’ in this column. (Note that for commanders of brigades, divisions and corps the ‘1’ goes in the commander’s row, not that of the HQ unit to which he is attached.)

38. StartsReadyToFight (BF): Units with a ‘1’ in this column always begin a scenario with the status of “ready to fight” (see Sect. 5.3 of the manual).

39. CommandStaff / LogisticStaff (BG, BH): Currently unused.

40. AI_Doctrine / AI_X / AI_Y / AI_Radius / AI_MarchX / AI_MarchY (BI, BJ, BK, BL, BM, BN): Sets the initial A.I. scripting for a unit at the start of a scenario (see below).

41. AI_NewMinutes / AI_NewDoctrine / AI_NewX / AI_NewY / AI_NewRadius (BO, BP, BQ, BR, BS): A second set of A.I. Scripts.

42. AI_NewerMinutes / AI_NewerDoctrine / AI_NewerX / AI_NewerY / AI_NewerRadius (BT, BU, BV, BW, BX): A third set of A.I. Scripts.

43. Scripting_Notes (BY): A column that is ignored by the code, and solely intended for note-taking as one scripts a scenario. (Be sure to use <underscore> rather than <space> characters between all words.)

44. Bio (BZ): Used to provide the unit/brigade/division/corps/army histories that have already been composed for some, and will be added for others over time. There is a limit of 3900 characters.

45. Notes_to_Player (CA): A column that is ignored by the code, in which WCS (or a modder) may provide interesting information to players, or explain particular decisions. Only accessible to those who open and read the file itself.

Important: At the very end be sure to include “eof” (end of file) in the last column for the scenario to work properly.

(in reply to Gil R.)
Post #: 3
RE: Modder's Guide, final version - 6/5/2015 4:32:21 PM   
Gil R.


Posts: 10821
Joined: 4/1/2005
Status: offline
How to Script the A.I.:
“Brother against Brother” achieves an effective A.I. by a combination of coding and scripting. There is an “open” A.I., with unscripted units behaving especially aggressively, but the A.I. is considerably more effective if one points the units in a certain direction at a certain time and gives them a general idea of what they should do when they reach their destination. (Reaching their destination is not guaranteed: if there is a pressing need for a unit elsewhere it will be diverted, despite the scripting.)

Any combat unit may be scripted – meaning that headquarters and supply units should not be scripted, as the code automatically positions them where they are most needed.

As listed above, there are three sets of scripts, enabling one to have a unit change its mission twice mid-battle. Each set lets one assign an “A.I. doctrine” and destination hex (using X,Y coordinates). Radius determines how far from the specified script coordinate a unit will tend to operate in the absence of additional considerations such as the presence of enemy units or victory hexes; the default is ‘0’. In addition, the first set provides a set of “march” coordinates that let one tell a unit to head to its destination after first heading to a different point – a feature that can be used either to help it find the quickest path or to have it check for the enemy at one point before continuing to its ultimate destination. And, the second and third sets have “minutes” columns that use the number of minutes from midnight (e.g. 10:00 a.m. = 600) when the unit should switch to that set.

The three doctrines that may be assigned a unit are “defend” (0), reinforce (1), and attack (2). Units with “defend” as their doctrine prefer positions that permit them to damage the enemy while taking minimal casualties from counter-fire; those with “reinforce” as their doctrine prefer to attack enemy units from positions that are adjacent to friendly units; those with “attack” prefer to deal more damage to the enemy and care considerably less about taking damage themselves than units set to “defend.” Note that if all units in a brigade have “reinforce” as their doctrine it will never enter into the “Hold” brigade order.

Units that begin a scenario in fortifications will usually be kept in position by the A.I., especially if scripted to be in that hex with a “defend” doctrine.


ScenarioCommanders.txt
While generals and officers are attached to units or brigades/divisions/corps/armies in the OrdersOfBattle.txt file and their rank indicated, it is in the ScenarioCommanders.txt file that their specific qualities are determined. This file, like the OOB file, is tab-delimited, and thus should be worked on in the same way. What follows is a list of the columns, identified by both their label in the top row of each file and their column letter(s) if the ScenarioCommanders.txt file is loaded into Excel.
• Notes_to_Player (A): This column is ignored by the code – so long as there are no erroneous <space> characters to mess things up! – and is intended as a way to communicate to the player (or modders) information that had an effect on how the general or officer was rated, or is simply interesting. This information is only available to those who open the file directly.

• Battle (B): Currently unused.

• Scenario (C): Currently unused.

• Number (D): Every general or officer who appears in “Brother against Brother” is assigned a unique i.d. number, which must be provided in this column. The full list of all 1500+ commanders is available for reference in the BAB+FOF_Commanders(MasterList).xls file, which you will find in the DATA folder. (That file also contains all of the biographies currently available, and columns indicate what rank an individual was at during a particular battle that has been covered in “Brother against Brother.”)

• Name / FirstNameOrNickname (E, F): As in the OrdersOfBattle.txt file, provides each commander’s name, first last name+initial, then in a more natural way.

• Mugshot (G): If a general or officer has a photo available, as is true of #1-1014 and #1017 (and over time will be true of more), that image can be assigned be entering the proper file name (available in the BAB+FOF_Commanders(MasterList).xls file). If no photo is available then be sure to provide “Gen0.pcx” in this column.

• Nation (H): Enter ‘1’ for USA, ‘2’ for CSA.

• HealthStatus (I): Currently unused.

• AwayFromUnit (J): Currently unused.

• AggressivenessIndex (K): This column uses a numerical rating system to assign a commander his “personality.” The possible types of commander and associated rating number are: Cautious to a Fault (0), Very Cautious (1), Cautious (2), Mildly Cautious (3), Mildly Aggressive (4), Aggressive (5), Very Aggressive (6), Reckless (7), and Reckless to a Fault (8). This value is used for regiment leaders to determine the likelihood of charging enemy units.

• Leadership / Tactical / Initiative / Command (L, M, N, O): Every general and officer is rated in these four areas, according to this scale: Terrible (0), Bad (1), Poor (2), Normal (3), Fair (4), Good (5), Great (6), Excellent (7), Superb (8). Each rating has multiple uses, most of which can be found in the manual by means of a keyword search. In brief, Leadership is linked to unit morale, Tactical to damage inflicted and received, Initiative to moving forces more quickly and effectively and also taking advantage of combat opportunities, and Command to command & control. (Note that when there is insufficient information to assign a commander historical ratings entering 3-3-3-3 will prompt the code to assign random ratings, which skew towards the mean rather than creating a large number of outliers.)

• Cavalry / Artillery (P / Q): Ratings assigned according to the same 0-8 scale, but only applicable to officers commanding individual artillery or cavalry units or else generals in command of artillery battalions or cavalry brigades.

• Bio (R): This column is for providing biographical sketches of the general or officer, limited to 3900 characters. If none is available then be sure to write “Nobio.”

• Check (S): A column that requires each row to have ‘123456’, and should be given no further thought.

Important: At the very end be sure to include “eof” (end of file) in the first column or else there will be a malfunction.

(in reply to Gil R.)
Post #: 4
RE: Modder's Guide, final version - 6/5/2015 4:32:45 PM   
Gil R.


Posts: 10821
Joined: 4/1/2005
Status: offline
Other Moddable Files

It is best to avoid the files in the DATA folder, since much of its contents is technical or deprecated. However, two files here are of particular note:

• Maxims.txt: This file is the source of the “flavor quotes” on the opening screen. One can add or subtract, though if adding be sure not to exceed the length of the longest one.

• Gunx.txt: Contains data for the firearms used in “Brother against Brother.” Though moddable, the only part of this file that one might wish to change would be the base damage at each range increment. Note that this file originated in WCS’s strategic/tactical Civil War game “Forge of Freedom” and that many of the columns are vestigial, serving no purpose in “Brother against Brother.” WCS will provide in the online modding forum (see below) a file that is devoted only to the functional columns, which may be used for quick reference, and will be updated as changes are made to the guns.txt file. The file should be mostly self-explanatory, with some exceptions:
o The columns named “infantry,” “cavalry” and “artillery” use a ‘1’ to indicate that a unit can be equipped with that weapon – thus artillery batteries cannot be assigned shotguns, and cavalry units do not gallop about the battlefield armed with 300-pdr. Parrott Rifles.

o The SharpS column indicates a weapon’s sharpshooting value, i.e. its bonus towards wounding or killing commanders.

o The ModfMove column can be used to slow down or speed up units armed with that weapon.

o The IndirectFire column is used for mortars (which are not yet used in current “Brother against Brother” battles).

o The ChargeProtect column determines the chance that charges degenerate into firefights.


Using the Scenario-Editor

The scenario-editor permits one both to place or relocate units on a map and to change their facing, formation or mode – thus it is used both for creating wholly new scenarios and modifying those that already exist. It also provides some ability to check on A.I. scripting. The interface is similar to the one used for playing the game itself, and quite user-friendly. All changes made through the scenario-editor modify the Positions.txt file, and that file only. (As a simple text file it can be changed directly, but the scenario-editor is much easier to use.)

To access the scenario-editor for a new or previously existing scenario you must change the first line of that scenario’s Scenario.txt file from “notEditMode” to “EditMode” – that simple change makes it possible to edit the scenario but impossible to play it until you undo this change. You should then load the game and the scenario itself, which will take you into a screen on which you can see the map and any units already placed there (along with arrows showing the direction that the A.I. is scripted to send them), but in which you can do nothing else. To begin to make changes hit the <U> key (for “units”); after you make the desired changes be sure to hit the <U> key again or else none of your changes will be preserved.

To select a unit you must right-click on it, to move it you must left-click on the destination hex, to change its facing you must right-click on an empty hex in the desired direction (as in the game itself), and to put it into line, column or skirmish you must click on the appropriate button (as in the game). To dismount/mount cavalry use the <K> key, not the button. Once you have finished with a unit you may select another with the mouse, but if you wish to move to the next unit in the OOB file just hit the ‘+’ key (or ‘-’ to go backwards to the previous unit), which will keep you in the same place on the map regardless of where that unit is, or hit SHIFT-‘+’/‘-’ to move to that unit.

If the A.I. has been scripted then when a unit is selected an arrow will show the direction towards which it will head. These arrows can be toggled on and off with the <I> key.

If you are creating a wholly new scenario or creating new units for an existing scenario they will show up at coordinates 0,0, which is located in the blackness beyond the top edge of the map. To go there you can hit the <Z> key, and after selecting the unit you wish to place go to the map; after placing it, you can use the ‘+’ key, as noted above, to cycle to the next unit. (Note: When creating a new scenario or new units the code will automatically add them to the Positions.txt file, filling each new row with 0’s until the scenario-editor is used to add data concerning location, facing, etc., when the scenario is first loaded using the scenario-editor.)

Note that while there is no stacking in “Brother against Brother” it is possible to stack units in the scenario-editor, which permits reinforcements to enter the map from the same hex at different times. To select a unit when two or more are occupying the same hex just right-click on that hex repeatedly until you have selected it.

(in reply to Gil R.)
Post #: 5
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Brother against Brother: The Drawing of the Sword >> Mods and Scenarios >> Modder's Guide, final version Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.148